;/* polyfill.js */
String.prototype.trim=function(){return this.replace(/^(\s|\u3000)*|(\s|\u3000)*$/g,"")},String.prototype.getBytes=function(){for(var t=0,e=0;e256?2:1;return t},"function"!=typeof Object.create&&(Object.create=function(t,e){function n(){}if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object prototype may only be an Object: "+t);if(null===t)throw new Error("This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.");if("undefined"!=typeof e)throw new Error("This browser's implementation of Object.create is a shim and doesn't support a second argument.");return n.prototype=t,new n}),Number.isNaN=Number.isNaN||function(t){return t!==t},window.JSON=window.JSON||function(){function f(t){return t<10?"0"+t:t}function stringify(t,e){var n,r,o,i,f,u=/["\\\x00-\x1f\x7f-\x9f]/g;switch(typeof t){case"string":return u.test(t)?'"'+t.replace(u,function(t){var e=m[t];return e?e:(e=t.charCodeAt(),"\\u00"+Math.floor(e/16).toString(16)+(e%16).toString(16))})+'"':'"'+t+'"';case"number":return isFinite(t)?String(t):"null";case"boolean":case"null":return String(t);case"object":if(!t)return"null";if("function"==typeof t.toJSON)return stringify(t.toJSON());if(n=[],"number"==typeof t.length&&!t.propertyIsEnumerable("length")){for(i=t.length,r=0;rthis.length)&&this.indexOf(t,e)!==-1}),"function"!=typeof Object.assign&&(Object.assign=function(t){"use strict";if(null==t)throw new TypeError("Cannot convert undefined or null to object");t=Object(t);for(var e=1;e>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(e=arguments[1]),n=0;n>>0;if("function"!=typeof t)throw new TypeError;for(var r=[],o=arguments.length>=2?arguments[1]:void 0,i=0;i>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(e=arguments[1]),n=new Array(i),r=0;r/,f=//,w={rouder:function(r,a){if(c[r.name]&&c[r.name].url==r.url&&s.test(c[r.name].tpl)&&f.test(c[r.name].tpl)&&!d)return a(null,c[r.name].tpl);var o=window.location.protocol+r.url.replace(/^http[s]?:/,"");e.ajax({url:o,contentType:"text/html;charset=UTF-8",timeout:1e4,success:function(e){if(!s.test(e)||!f.test(e))return a("get tpl error, {$name} tpl is incomplete".replace("{$name}",r.name));if(n){c[r.name]={url:r.url,tpl:e,date:(new Date).getTime()};try{window.localStorage.setItem(t,JSON.stringify(c))}catch(o){}}return a(null,e)},error:function(e,t,r){return a(["ajax error. url:",o,"readyState:",e.readyState,"status:",e.status,"statusText:",e.statusText,"responseText:",e.responseText,"textStatus:",t,"errorThrown:",r].join(", "))}})},addWaiting:function(e,t,r){u.waitings.push({name:e,ref:t,fn:r})},checkModuleReady:function(t){var r=!0;return e(t).each(function(e,t){if(t)return u.readyModule[t]?void 0:(r=!1,!0)}),r},checkWaiting:function(){if(u.waitings.length)for(var e=0;ee&&(delete c[o],r=!0);if(r)try{window.localStorage.setItem(t,JSON.stringify(c))}catch(i){}}},h.cache=c,h.setExprie(i),h.onModuleReady=function(e,t){return u.readyModule[e]?t&&t():void w.addWaiting("onModuleReady",[e],t)},l&&h.clear(),window.yyloader||(window.yyloader=h),"undefined"!=typeof define&&define.amd?define("yyloader",[],function(){return h}):"undefined"!=typeof module&&module.exports&&(module.exports=h)}();
;/* header.js */
!function(e,t,n){var o=e.jQuery||e.$,i={ie:!!("ActiveXObject"in e&&/(msie |Trident\/.*rv:)(\d*)/i.test(navigator.userAgent))&&RegExp.$2,firefox:/Firefox/i.test(navigator.userAgent),init:function(){var e=navigator.userAgent;i.browser=function(){var t="";return t=i.ie?"ie"+i.ie:/Chrome/i.test(e)?"chrome":/Opera/i.test(e)?"opera":/FireFox/i.test(e)?"firefox":"other"}(),i.system=function(){var t="";return t=/Windows NT 10.0/.test(e)?"windows 10":/Windows NT 5.1/.test(e)?"windows xp":/Windows NT 6.1/.test(e)?"windows 7":/Windows NT 6.2/.test(e)?"windows 8":/Windows NT 6.0/.test(e)?"windows vista":/Windows NT 5.2/.test(e)?"windows 2003":/Mac OS/.test(e)?"mac":/Linux/.test(e)?"linux":"other"}()}},a={localStorage:{cache:{},removeItem:function(t){var n=this;t in n.cache&&delete n.cache[t];try{var o=e.localStorage;o.rmoveItem(t)}catch(i){}},setItem:function(t,n){var o=this;o.cache[t]=n;try{var i=e.localStorage;i&&i.setItem(t,n)}catch(a){"QuotaExceededError"===a.name&&o.clear()}},getItem:function(t){var n,o=this;try{var i=e.localStorage;n=i?e.localStorage.getItem(t):o.cache[t]}catch(a){n=o.cache[t]}return n},clear:function(){try{var t=e.localStorage;t&&t.clear()}catch(n){}}},domain:function(){return"yy.duowan.com"==e.location.hostname?"//yy.duowan.com":"//www.yy.com"}(),UA:i,formator:function(e){return parseInt(e,10).toLocaleString(n,{minimumFractionDigits:2,maximumFractionDigits:2}).replace(/\.00$/,"")||0},dateFormator:function(e,t){function n(e){return e.toString().length<2?"0"+e:e}return t.replace(/%([a-zA-Z])/g,function(t,o){switch(o){case"Y":return e.getFullYear();case"M":return n(e.getMonth()+1);case"d":return n(e.getDate());case"H":return n(e.getHours());case"m":return n(e.getMinutes());case"s":return n(e.getSeconds());default:throw new Error("Unsupported format code: "+o)}})},isPropTruthy:function(e){return function(t){return t[e]}},transfromPropName:function(e,t){return function(n){if(n[e]){var o=Object.assign({},n);return o[t]=o[e],delete o[e],o}}},escape:function(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,function(e){return t[e]})},escapeToNull:function(e){return String(e).replace(/[<>"'`?\/]/g,"")},isElementAppearInParentView:function(t,n){n=n||e;var o={top:0,right:e.innerWidth,bottom:e.innerHeight,left:0,height:e.innerHeight,width:e.innerWidth},i=a.getRelativeRect(t,n),r=n===e?o:n.getBoundingClientRect(),s=r.height||r.bottom-r.top,c=parent.width||r.right-r.left;return i.top<=s&&i.left<=c},getRectWidth:function(e){var t=e.getBoundingClientRect();return t.width||t.right-t.left},getRelativeRect:function(t,n){n=n||e;var o={top:0,right:e.innerWidth,bottom:e.innerHeight,left:0,height:e.innerHeight,width:e.innerWidth},i=t.getBoundingClientRect(),a=n===e?o:n.getBoundingClientRect();return{top:i.top-a.top,right:i.right-a.right,bottom:i.bottom-a.bottom,left:i.left-a.left}},unsign:function(e){return e<0?0:e},filterByProperty:function(e,t,n){return e.filter(function(e){return e[t]===n})},activateLazyImage:function(t,n){var i={placeholder:"",failure_limit:1/0,load:function(){o(this).css("visibility","visible")}};t=o.extend({},i,t),o(".lazy").lazyload(t),n||o(e).trigger("resize")},scrollTo:function(e,t){return t="undefined"!=typeof t?t:400,new Promise(function(n){o("html, body").stop().animate({scrollTop:o(e).offset().top-o(".w-head__main").height()},t,n)})},scrollTop:function(e){return e="undefined"!=typeof e?e:400,new Promise(function(t){o("html, body").stop().animate({scrollTop:0},e,t)})},injectCSS:function(e,t){t&&o('").appendTo("head")},replaceCSS:function(e,t){t&&(o("#"+e).remove(),a.injectCSS(e,t))},touchCSS:function(e,n){var o=t.getElementById(e);return o?void a.replaceCSS(e,n):void a.injectCSS(e,n)},getParameterByName:function(t,n){n||(n=e.location.href),t=t.replace(/[[\]]/g,"\\$&");var o=new RegExp("[?&]"+t+"(=([^]*)|&|#|$)"),i=o.exec(n);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null},fill:function(e,t,o,i){if(!Array.isArray(e))throw new TypeError("array is not a Array");var a=e.length;o=parseInt(o,10)||0,i=i===n?a:parseInt(i,10)||0;var r,s;for(r=o<0?Math.max(a+o,0):Math.min(o,a),s=i<0?Math.max(a+i,0):Math.min(i,a);r=t?e:[].concat(e,a.fill(Array(t),n).slice(0,t-e.length))},flash:{init:function(e,t){var n={wmode:"opaque",width:300,height:300,flashvars:"",flashUrl:"",fullscreen:!1,bgcolor:"#000000"};if("object"==typeof t){if("undefined"!=typeof t.wmode){switch(t.wmode.toLowerCase()){case"opaque":n.wmode="opaque";break;case"window":n.wmode="window";break;case"transparent":n.wmode="transparent"}n.wmode=t.wmode}"undefined"!=typeof t.width&&(n.width=t.width),"undefined"!=typeof t.height&&(n.height=t.height),"undefined"!=typeof t.flashvars&&(n.flashvars=t.flashvars),"undefined"!=typeof t.flashUrl&&(n.flashUrl=t.flashUrl),"undefined"!=typeof t.fullscreen&&(n.fullscreen=t.fullscreen),"undefined"!=typeof t.bgcolor&&(n.bgcolor=t.bgcolor)}if(""!==n.flashUrl){var o=['"].join("");return o.replace(/\{if ie\}(.*?)\{endif ie\}/g,~navigator.appName.indexOf("Microsoft")?"$1":"").replace(/\{\$name\}/g,e).replace(/\{\$width\}/g,n.width).replace(/\{\$height\}/g,n.height).replace(/\{\$flashUrl\}/g,n.flashUrl).replace(/\{\$flashvars\}/g,n.flashvars).replace(/\{\$wmode\}/g,n.wmode).replace(/\{\$bgcolor\}/g,n.bgcolor).replace(/\{\$fullscreen\}/g,n.fullscreen)}},write:function(e,n){var o=this.init(e,n);o&&t.write(o)},add:function(e,t,n){var o=this.init(t,n);e&&o&&(e.innerHTML=o)},ctrl:function(e){try{var n=t.getElementById(e);return a.UA.ie?"object"==n.tagName.toLowerCase()?n:"":"embed"==n.tagName.toLowerCase()?n:n.getElementsByTagName("embed")[0]}catch(o){console.warn(e)}}},Promise:function(e){var t=this;return t.queue=[],t.current=0,t.isResolved=!1,t.then=function(e){return"function"==typeof e&&t.queue.push(e),t},t.start=function(){var e=Array.prototype.slice.call(arguments);return t.resolve.apply(t,e),t},t.resolve=function(){var e=Array.prototype.slice.call(arguments);e.push(t.resolve),t.current&&e.push(t.queue[t.current-1]),t.current!=t.queue.length&&t.queue[t.current++].apply(t,e)},e&&t.then(e),t},type:function(e){var t,n=Object.prototype.toString;return null===e?t=String(e):(t=n.call(e).toLowerCase(),t=t.substring(8,t.length-1)),t},isPlainObject:function(e){var t,o=this,i=Object.prototype.hasOwnProperty;if(!e||"object"!==o.type(e))return!1;if(e.constructor&&!i.call(e,"constructor")&&!i.call(e.constructor.prototype,"isPrototypeOf"))return!1;for(t in e);return t===n||i.call(e,t)},extend:function(){var e,t,o,i,a,r,s=this,c=arguments[0]||{},u=1,d=arguments.length,l=!1;for("boolean"==typeof c&&(l=c,c=arguments[1]||{},u=2),"object"!=typeof c&&"function"!==s.type(c)&&(c={}),d===u&&(c=this,--u);u=1?parseInt(d)+"年前":l>=1?parseInt(l)+"个月前":f>=1?parseInt(f)+"周前":h>=1?parseInt(h)+"天前":p>=1?parseInt(p)+"个小时前":m>=1?parseInt(m)+"分钟前":"刚刚"},getUrlParams:function(){var t=e.location.search;t=t.substr(1);var n={};if(""===t)return n;for(var o=t.split("&"),i=0,a=o.length;i0&&(e=(+e).toFixed(t)),n=e.toString().split("."),n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),n.join(".")},request:{search:function(e){var t=location.search.replace(/[? ]/g,"");if(""===t)return null;for(var n=t.split("&"),o=0,i=n.length;o1&&r&&("undefined"!=typeof o?o(e).on(a,r):e.addEventListener?e.addEventListener(a,r,!1):e.attachEvent?e.attachEvent("on"+a,function(){r.call(e)}):e["on"+a]=r)};if(r){a=r.split(",");for(var c=0,u=a.length;c":">",'"':""","'":"'","&":"&"};return"string"!=typeof e?e:e.replace(/[<>"'&]/g,function(e){return t[e]})},htmlDecode:function(e){var n=t.createElement("span");return n.innerHTML=e,n.innerText},convertHttps:function(e){if("string"==typeof e){var t=e.replace(/http:/g,""),n=/^\/\/s[45]\.yy\.com/;return n.test(t)&&(t=t.replace(n,"//s1.yy.com")),t}return e},cookies:{get:function(n){try{var o=t.cookie.match(new RegExp("(^| )"+n+"=([^;]*)(;|$)"))}catch(i){}return null!==o?e.unescape(o[2]):null},set:function(n,o,i,a,r,s){i||(i=24);var c=new Date;c.setTime(c.getTime()+60*i*60*1e3),t.cookie=n+"="+e.escape(o)+";expires="+c.toGMTString()+(r?";domain="+r:"")+(a?";path="+a:"")+(s===!0?";secure":"")},getWithDecode:function(n){var o=t.cookie.match(new RegExp("(^| )"+n+"=([^;]*)(;|$)"));return null!==o?e.decodeURI(o[2]):null},setWithEncode:function(n,o,i,a,r,s){i||(i=24);var c=new Date;c.setTime(c.getTime()+60*i*60*1e3),t.cookie=n+"="+e.encodeURI(o)+";expires="+c.toGMTString()+(r?";domain="+r:"")+(a?";path="+a:"")+(s===!0?";secure":"")},del:function(e){var n=new Date;n.setTime(n.getTime()-6e4);var o=this.get(e);null!==o&&(t.cookie=e+"="+o+";expires="+n.toGMTString())},erase:function(e,n,o){a.cookies.get(e)&&(t.cookie=e+"="+(n?";path="+n:"")+(o?";domain="+o:"")+";expires=Thu, 01 Jan 1970 00:00:01 GMT")},keys:function(){return t.cookie?t.cookie.split(";").map(function(e){return e.split("=")[0].trim()}):[]}},JSON:e.JSON,getCssProperty:function(e){for(var n=e.substr(0,1),o=e.substr(1),i=n.toUpperCase()+o,a=n.toLowerCase()+o,r=[a,"Webkit"+i,"Moz"+i,"O"+i,"-ms-"+i,"ms"+i],s=t.documentElement.style,c=0,u=r.length;ct?(r&&(clearTimeout(r),r=null),s=u,a=e.apply(o,i),r||(o=i=null)):r||n.trailing===!1||(r=setTimeout(c,d)),a}},flattenProperty:function(e,t){var n=null;for(var o in e[t]){if(e[o])throw new Error("["+o+"] already exists in component!");n=e[t][o].bind(e),e[t][o]=n,e[o]=n}},textCutOff:function(e,t){var n="",o=function(e){for(var t=0,n=/[\u4e00-\u9fa5]/,o=/[\u3002|\uff1f|\uff01|\uff0c|\u3001|\uff1b|\uff1a|\u201c|\u201d|\u2018|\u2019|\uff08|\uff09|\u300a|\u300b|\u3008|\u3009|\u3010|\u3011|\u300e|\u300f|\u300c|\u300d|\ufe43|\ufe44|\u3014|\u3015|\u2026|\u2014|\uff5e|\ufe4f|\uffe5]/,i=e.length-1;i>=0;i--)t+=n.test(e[i])||o.test(e[i])?1:.5;return t},i=o(e);return n=i<=t?e:e.substr(0,t-1)+"..."},countDown:function(e){var t,n,i,a,r={time:1e3,totalTime:0,cb:null};i=o.extend({},r,e),i.totalTime%i.time&&(i.totalTime=Math.floor(i.totalTime/i.time)*i.time+i.time),a={currentT:i.time||0,totalTime:i.totalTime-i.time||0};var s=function(){t=setTimeout(function(){a.totalTime>=0?(i.cb(a),a.totalTime-=i.time,a.currentT+=i.time,s()):clearTimeout(t)},i.time)};return n={start:function(){t&&clearTimeout(t),s()},pause:function(){t&&clearTimeout(t)},stop:function(){t&&clearTimeout(t),a.currentT=0},destory:function(){t&&clearTimeout(t),t=null,a.currentT=0}}}};"undefined"!=typeof define&&define.amd&&define("util",[],function(){return a}),e.util=a}(window,document),!function(){function e(e){0!==arguments.length&&(e=e||{},this.TYPE=e.type,this.WIDTH=e.width||300,this.HEIGHT=e.height||"",this.CONTENT=e.content||"",this.TITLE=e.title||"",this.MASK=e.mask||!1,this.YOURCLASS=e.yourClass||"",this.TIMEOUT=e.timeout||!1,this.OVERTIME=e.overtime||2e3,this.SPEED=e.speed||200,this.FLAG=e.flag||!1,this.LOADED=e.loaded||null,this.CALLBACK=e.callback||null,this.CANCLECALLBACK=e.cancleCallback||null,this.SUBMITTXT=e.submitTxt||"确认",this.CANCELTXT=e.cancelTxt||"取消",this.OBJ,this.OLDWidth,this.parent=e.parent,this.submitDefine=e.submitDefine,this.isOnly=e.isOnly||!1)}function t(){return!window.XMLHttpRequest}function n(e,t){var n=Object(t.prototype);n.constructor=e,e.prototype=n}e.prototype={_construct:function(){var e=this,n="";switch(e.isOnly?(n='',$("body").append(n)):0===$("div.popup-wrap").length&&(n='',$("body").append(n)),e.OBJ=e.isOnly?$("div.popup-wrap--only"):$("div.popup-wrap"),e.OBJ.IDTIME=e.OBJ.data("timeoutkey"),e.OBJ.IDTIME&&clearTimeout(e.OBJ.IDTIME),e.parent?($(e.parent).append(e.OBJ),e.OBJ.addClass("popup-wrap-withparent")):$("body").append(e.OBJ),t()&&e._updateWrapSize(),e.WIDTH?e.OBJ.find("div.popup-box").css("width",e.WIDTH+"px"):e.OBJ.find("div.popup-box").css("width",""),e.HEIGHT?e.OBJ.find("div.popup-box").css("height",e.HEIGHT+"px"):e.OBJ.find("div.popup-box").css("height",""),""!==e.TITLE&&e.OBJ.find("div.popup-hd").html(''+e.TITLE+"
"),""!==e.CONTENT&&e.OBJ.find("div.popup-bd").html(e.CONTENT),e.MASK||e.OBJ.find("div.mask").addClass("mask-transparent"),e.TYPE){case"popup":""===e.YOURCLASS&&(e.YOURCLASS="text-popup"),e.OBJ.find("div.popup-inner").attr("class",["popup-inner",e.YOURCLASS].join(" ")),e._showPopup();break;case"alert":""===e.YOURCLASS&&(e.YOURCLASS="text-alert"),e.OBJ.find("div.popup-inner").attr("class",["popup-inner",e.YOURCLASS].join(" ")),e._showAlert();break;case"confirm":""===e.YOURCLASS&&(e.YOURCLASS="text-confirm"),e.OBJ.find("div.popup-inner").attr("class",["popup-inner",e.YOURCLASS].join(" ")),e._showConfirm()}},_showPopup:function(){this._showPop()},_showAlert:function(){var e=this,t='";e.OBJ.find("div.popup-ft").html(t),e._showPop()},_showConfirm:function(){var e=this,t=' ";t+='
",e.OBJ.find("div.popup-ft").html(t),e._showPop()},removePop:function(){var e=this;return e.isOnly?(e.OBJ.remove(),e=null):(e.OBJ.IDTIME&&clearTimeout(e.OBJ.IDTIME),e.FLAG||e.OBJ.addClass("hidden"),e.OBJ.find("div.popup-box, div.popup-box-inner").removeAttr("style"),e.OBJ.find("a.submit, a.cancel, span.close-btn").unbind("click"),e.OBJ.find("div.popup-hd, div.popup-bd, div.popup-ft").html(""),e.MASK||e.OBJ.find("div.mask").removeClass("mask-transparent"),e.OBJ.find("div.popup-inner").attr("class","popup-inner"),e.LOADED=null,e.CALLBACK=null,void(e.callbackFun=null))},_showPop:function(){var e=this;null!==e.LOADED&&e.LOADED.call(e,e.OBJ),e.OBJ.removeClass("hidden"),e._setLayerLocation(),e.TIMEOUT&&e._setTimeOutClose()},_setLayerLocation:function(){var e=this,t=e._getLayerSize().width,n=e._getLayerSize().height;e.OBJ.find("div.popup-box-inner").hide(),e.OBJ.find("div.popup-box").css({width:t+"px",height:n+"px","margin-left":-(t/2)+"px","margin-top":-(n/2)+"px"}),e.OBJ.find("div.popup-box-inner").show()},_setTimeOutClose:function(){var e=this,t=setTimeout(function(){e.callbackFun()},e.OVERTIME);e.OBJ.data("timeoutkey",t),e.OBJ.IDTIME=t},_getLayerSize:function(){var e=this;if(e._checkIfEmpty(this.OBJ.find("div.popup-bd"))&&e.OBJ.is(":visible"))return{width:e.OBJ.find("div.popup-box").outerWidth(),height:e.OBJ.find("div.popup-box").outerHeight()}},_checkIfEmpty:function(e){var t=this;return""!==e.html()||!t.CONTENT||void setTimeout(function(){t._checkIfEmpty(e)},100)},_updateWrapSize:function(){var e=this;e.OBJ.width(e._getWindowsSize().width+"px").height(e._getWindowsSize().height+"px")},_getWindowsSize:function(){return{width:$(window).width(),height:$(window).height()}},reCountLocation:function(){var e=this,t=e.OBJ.find("div.popup-box").width(),n=e.OBJ.find("div.popup-box-inner").outerHeight(),o=e.SPEED-150;e.OBJ.find("div.popup-box").css("width",e.OLDWidth+"px"),e.OBJ.find("div.popup-box").stop().animate({width:t+"px",height:n+"px","margin-left":-(t/2)+"px","margin-top":-(n/2)+"px"},o)},callbackFun:function(){var e=this;e.OBJ.IDTIME&&clearTimeout(e.OBJ.IDTIME),null===e.CALLBACK?e.removePop():(e.OLDWidth=e.OBJ.find("div.popup-box").width(),this.CALLBACK.call(e,e.OBJ),e.removePop())},cancleCallbackFun:function(){var e=this;e.OBJ.IDTIME&&clearTimeout(e.OBJ.IDTIME),null===e.CANCLECALLBACK?e.removePop():(e.OLDWidth=e.OBJ.find("div.popup-box").width(),this.CANCLECALLBACK.call(e,e.OBJ),e.removePop())},_btnBindEvent:function(){var e=this,n=t();if("alert"!=e.TYPE&&"confirm"!=e.TYPE||e.OBJ.find("a.submit").click(function(t){t.preventDefault(),e.callbackFun()}),e.submitDefine&&"confirm"==e.TYPE)for(var o=0,i=e.submitDefine.length;o-1||s.indexOf("Windows Xp")>-1,u={userInfo:"//www.yy.com/yyweb/user/queryUserInfo.json",userInfoByRevenue:"//www.yy.com/ent/user/headerUserInfo.action?sid={$sid}",usersInfo:"//www.yy.com/yyweb/user/queryUserInfos.json?uidarray=[{$uids}]",myFollow:"//www.yy.com/yyweb/user/queryLivePreview.json?_={$time}",login:"//www.yy.com/yyweb/login/getSdkAuth.action",logout:"//www.yy.com/login/logout",myMedia:"//yue.yy.com/tqw/userSubscribe/getSubscribedPublishes?_={$time}",sponsorInfo:"//www.yy.com/live/detail?uid={$uid}&sid={$sid}&ssid={$ssid}&_={$time}",sponsorInfo4xianchang:"//www.yy.com/live/detailCurrent?uid={$uid}&pid={$pid}&_={$time}",livingBgImage:"//www.yy.com/bg/getLivingBgImage?anchorUid={$uid}",subscriptionList:"//www.yy.com/yyweb/user/querySubscribeList?_={$time}",subscription:"//www.yy.com/yyweb/user/subscribe?predictId={$eventId}",attentionList:"//www.yy.com/yyweb/user/queryAttentionList.json?_={$time}",attention:"//www.yy.com/yyweb/user/attention.json?objectId={$uid}",qrcode:"//www.yy.com/download/qrcode?qrcode={$url}",cherishList:"//www.yy.com/show/cherish/getCherishOpenStatus.action?anchorUid={$anchorUid}",liveInfo:"//www.yy.com/api/liveInfoDetail/{$sid}/{$ssid}/{$uid}"},d={userInfo:{},attentionList:{},subscriptionList:{},userInfoByRevenue:{},myFollowInfo:{now:0,data:void 0},fnAjaxData:{}},l={queueFunction:function(){var e=o.makeArray(arguments),n=e.shift();t(n).each(function(t,n){try{"function"==typeof n&&n.apply(n,e)}catch(i){o.trace.error(i)}})},ajax:function(e,n){var i,a={};for(var r in e)e.hasOwnProperty(r)&&"function"!=typeof e[r]&&(a[r]=e[r]);return i=encodeURIComponent(o.JSON.stringify(a)),d.fnAjaxData[i]?(e.success&&d.fnAjaxData[i].successArr.push(e.success),void(e.error&&d.fnAjaxData[i].successArr.push(e.error))):(d.fnAjaxData[i]={successArr:[],errorArr:[]},e.success&&d.fnAjaxData[i].successArr.push(e.success),e.error&&d.fnAjaxData[i].errorArr.push(e.error),t.ajax(o.extend(a,{success:function(){var e=o.makeArray(arguments),t=d.fnAjaxData[i];t&&l.queueFunction.apply(this,[t.successArr].concat(e)),delete d.fnAjaxData[i]},error:function(){var e=o.makeArray(arguments),t=d.fnAjaxData[i];t&&l.queueFunction.apply(this,[t.errorArr].concat(e)),delete d.fnAjaxData[i]}}),n),void 0)}},f="",h=!1,p=[],m={downloadGuide:{name:"downloadGuide",get:function(){var e={};try{e=JSON.parse(o.localStorage.getItem(this.name))||{}}catch(t){}if(!e.time)return 0;var n=new Date(e.time),i=new Date;return n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()&&n.getDate()===i.getDate()&&e.val?e.val:0},mark:function(){var e=this.get();o.localStorage.setItem(this.name,JSON.stringify({val:e+1,time:+new Date}))},clear:function(){o.localStorage.setItem(this.name,JSON.stringify({}))}},fetchUserInfo:function(){return new Promise(function(e){var t=!1,n=5e3,o=setTimeout(function(){t=!0,e({code:"ajax_timeout",errMsg:"ajax request over "+n+" ms"})},n);l.ajax({url:u.userInfo,timeout:5e3,dataType:"jsonp",async:!0,success:function(n){t||(clearTimeout(o),n.code=n.resultCode,d.userInfo[m.getUidSync()]=n.data,e(n))},error:function(n){t||(clearTimeout(o),e({code:"ajax_error",errMsg:n.message}))}})})},fetchUserInfoByRevenue:function(){return new Promise(function(e){var t="undefined"!=typeof a&&a.sid?a.sid:"";l.ajax({url:u.userInfoByRevenue.replace("{$sid}",t),timeout:5e3,type:"GET",dataType:"json",async:!0,cache:!1,success:function(t){if(t.code=t.result,0===+t.result){var n={};n.isExpired=t.nobleGrowInfo.isExpired,n.nobleLevel=t.nobleGrowInfo.nobleLevel||0,n.honourLevel=t.nobleGrowInfo.honourLevel||0,n.curHonour=t.nobleGrowInfo.curHonour||0,n.goalHonour=t.nobleGrowInfo.goalHonour||0,n.honourRatio=100*parseFloat(t.nobleGrowInfo.curHonour/t.nobleGrowInfo.goalHonour),n.diamond=o.unitFormat(t.assetsInfo.diamond+t.assetsInfo.actDiamond,3),n.yyMoney=o.unitFormat(t.assetsInfo.yyMoney,3),n.yyMoneyOriginal=t.assetsInfo.yyMoney,n.hadCherish=t.cherishInfo.hadCherish,n.cherishGroupName=t.cherishInfo.hadCherish?t.cherishInfo.cherishGroup.groupname:"",n.isAnchor=1==t.role||2==t.role,n.role=t.role;var i=["平民","国王","公爵","侯爵","伯爵","子爵","男爵","勋爵"];n.nobleLevelName=i[parseInt(t.nobleGrowInfo.nobleLevel,10)],t.data=n}e(t)},error:function(t){e({code:"ajax_error",errMsg:t.message})}})})},isLoginSync:function(){var e=o.cookies.get("udb_n")&&o.cookies.get("udb_l")&&o.cookies.get("yyuid");return e||!1},getUidSync:function(){return o.cookies.get("yyuid")||0},getNickSync:function(){var e=m.getUidSync();return d.userInfo[e]?d.userInfo[e].nick:""},getUserInfoSync:function(){var e=m.getUidSync();return d.userInfo[e]},getLiveInfo:function(e,n){if(e){var o=u.liveInfo.replace("{$sid}",e.sid).replace("{$ssid}",e.ssid||0).replace("{$uid}",e.uid||0);t.ajax({url:o,timeout:5e3,type:"GET",dataType:"json",success:function(e){n(e.data&&!e.resultCode?e.data:!1)},error:function(){n(!1)}})}},getUserInfo:function(e,n){var o;if(1===arguments.length){o=u.userInfo,n=e;var a=m.getUidSync();+a?d.userInfo[a]?n(d.userInfo[a]):h?p.push(n):(h=!0,l.ajax({url:o,timeout:5e3,dataType:"jsonp",async:!0,success:function(e){if(e.data&&!e.resultCode)for(e.logo=e.logo||e.hdLogo||i,e.nick=e.nick||"YY_"+e.uid,d.userInfo[a]=e.data,n(e.data);p.length>0;)p.shift()(e.data);else if(e.resultCode==-1&&/reload=1/.test(location.hash)===!1)location.hash+="&reload=1",location.reload();else for(n(!1);p.length>0;)p.shift()(!1)},error:function(){n(!1)}},"json")):n(!1)}if(2===arguments.length)if(e){var r=/array/i.test(Object.prototype.toString.call(e))?e:[e],s=[],c=[];if(t(r).each(function(e,t){d.userInfo[t]||s.push(t)}),s.length){var f=Math.ceil(s.length/20),_=function(){o=u.usersInfo.replace("{$uids}",encodeURIComponent(g.join(","))),l.ajax({url:o,timeout:5e3,dataType:"jsonp",async:!0,success:function(e){if(e.data&&!e.resultCode)for(var t in e.data)e.data.hasOwnProperty(t)&&(d.userInfo[t]=e.data[t]);f--,y()},error:function(){f--,y()}})},y=function(){f||(t(r).each(function(e,t){var n=d.userInfo[t];n?(n.logo=n.logo||n.hdLogo||i,n.nick=n.nick||"YY_"+n.uid,c.push(n)):c.push({uid:t,nick:"YY_"+t,logo:i,isGuest:!0})}),n("object"!=typeof e?c[0]:c))};do{var g=s.splice(0,20);_(g)}while(s.length)}else t(r).each(function(e,t){var n=d.userInfo[t];n?(n.logo=n.logo||n.hdLogo||i,n.nick=n.nick||"YY_"+n.uid,c.push(n)):c.push({})}),n("object"!=typeof e?c[0]:c)}else n(!1)},getUserInfoByRevenue:function(e){var t=m.getUidSync(),n=new Date;if(t)if(d.userInfoByRevenue[t]&&n-d.userInfoByRevenue[t].cacheTime<3e3)e(d.userInfoByRevenue[t]);else{var i="undefined"!=typeof a&&a.sid?a.sid:"";l.ajax({url:u.userInfoByRevenue.replace("{$sid}",i),timeout:5e3,type:"GET",dataType:"json",async:!0,cache:!1,success:function(n){if(0===+n.result){var i={};i.isExpired=n.nobleGrowInfo.isExpired,i.nobleLevel=n.nobleGrowInfo.nobleLevel||0,i.honourLevel=n.nobleGrowInfo.honourLevel||0,i.curHonour=n.nobleGrowInfo.curHonour||0,i.goalHonour=n.nobleGrowInfo.goalHonour||0,i.honourRatio=100*parseFloat(n.nobleGrowInfo.curHonour/n.nobleGrowInfo.goalHonour),i.diamond=o.unitFormat(n.assetsInfo.diamond+n.assetsInfo.actDiamond,3),i.yyMoney=o.unitFormat(n.assetsInfo.yyMoney,3),i.yyMoneyOriginal=n.assetsInfo.yyMoney,i.hadCherish=n.cherishInfo.hadCherish,i.cherishGroupName=n.cherishInfo.hadCherish?n.cherishInfo.cherishGroup.groupname:"",i.isAnchor=1==n.role||2==n.role,i.role=n.role;var a=["平民","国王","公爵","侯爵","伯爵","子爵","男爵","勋爵"];i.nobleLevelName=a[parseInt(n.nobleGrowInfo.nobleLevel,10)],d.userInfoByRevenue[t]=i,d.userInfoByRevenue[t].cacheTime=new Date,d.userInfo[t]&&o.extend(!0,d.userInfo[t],i),e(i)}else e(!1)},error:function(){e(!1)}})}else e(!1)},getMyFocus:function(e){var n=5e3;return+new Date-d.myFollowInfo.now/g,"")),e&&(e=g[1]+t(e)+g[2]+"\n"),e}function a(t){var n=f;if(u?t=u(t,o):r&&(t=t.replace(/\n/g,function(){return f++,"$line="+f+";"})),0===t.indexOf("=")){var i=l&&!/^=[=#]/.test(t);if(t=t.replace(/^=[=#]?|[\s;]*$/g,""),i){var a=t.replace(/\s*\([^\)]+\)/,"");h[a]||/^(include|print)$/.test(a)||(t="$escape("+t+")")}else t="$string("+t+")";t=g[1]+t+g[2]}return r&&(t="$line="+n+";"+t),y(e(t),function(e){if(e&&!m[e]){var t;t="print"===e?v:"include"===e?A:h[e]?"$utils."+e:p[e]?"$helpers."+e:"$data."+e,S+=e+"="+t+",",m[e]=!0}}),t+"\n"}var r=o.debug,s=o.openTag,c=o.closeTag,u=o.parser,d=o.compress,l=o.escape,f=1,m={$data:1,$filename:1,$utils:1,$helpers:1,$out:1,$line:1},_="".trim,g=_?["$out='';","$out+=",";","$out"]:["$out=[];","$out.push(",");","$out.join('')"],w=_?"$out+=text;return $out;":"$out.push(text);",v="function(){var text=''.concat.apply('',arguments);"+w+"}",A="function(filename,data){data=data||$data;var text=$utils.$include(filename,data,$filename);"+w+"}",S="'use strict';var $utils=this,$helpers=$utils.$helpers,"+(r?"$line=0,":""),R=g[0],E="return new String("+g[3]+");";y(n.split(s),function(e){e=e.split(c);var t=e[0],n=e[1];1===e.length?R+=i(t):(R+=a(t),n&&(R+=i(n)))});var T=S+R+E;r&&(T="try{"+T+"}catch(e){throw {filename:$filename,name:'Render Error',message:e.message,line:$line,source:"+t(n)+".split(/\\n/)[$line-1].replace(/^\\s+/,'')};}");try{var I=new Function("$data","$filename",T);return I.prototype=h,I}catch(C){throw C.temp="function anonymous($data,$filename) {"+T+"}",C}}var o=function(e,t){return"string"==typeof t?_(t,{filename:e}):r(e,t)};o.version="3.0.0",o.config=function(e,t){i[e]=t};var i=o.defaults={openTag:"<%",closeTag:"%>",escape:!0,cache:!0,compress:!1,parser:null},a=o.cache={};o.render=function(e,t){return _(e,t)};var r=o.renderFile=function(e,t){var n=o.get(e)||m({filename:e,name:"Render Error",message:"Template not found"});return t?n(t):n};o.get=function(e){var t;if(a[e])t=a[e];else if("object"==typeof document){var n=document.getElementById(e);if(n){var o=(n.value||n.innerHTML).replace(/^\s*|\s*$/g,"");t=_(o,{filename:e})}}return t};var s=function(e,t){return"string"!=typeof e&&(t=typeof e,"number"===t?e+="":e="function"===t?s(e.call(e)):""),e},c={"<":"<",">":">",'"':""","'":"'","&":"&"},u=function(e){return c[e]},d=function(e){return s(e).replace(/&(?![\w#]+;)|[<>"']/g,u)},l=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},f=function(e,t){var n,o;if(l(e))for(n=0,o=e.length;o>n;n++)t.call(e,e[n],n,e);else for(n in e)t.call(e,e[n],n)},h=o.utils={$helpers:{},$include:r,$string:s,$escape:d,$each:f};o.helper=function(e,t){p[e]=t};var p=o.helpers=h.$helpers;o.onerror=function(e){var t="Template Error\n\n";for(var n in e)t+="<"+n+">\n"+e[n]+"\n\n";"object"==typeof console&&console.error(t)};var m=function(e){return o.onerror(e),function(){return"{Template Error}"}},_=o.compile=function(e,t){function o(n){try{return new c(n,s)+""}catch(o){return t.debug?m(o)():(t.debug=!0,_(e,t)(n))}}t=t||{};for(var r in i)void 0===t[r]&&(t[r]=i[r]);var s=t.filename;try{var c=n(e,t)}catch(u){return u.filename=s||"anonymous",u.name="Syntax Error",m(u)}return o.prototype=c.prototype,o.toString=function(){return c.toString()},s&&t.cache&&(a[s]=o),o},y=h.$each,g="break,case,catch,continue,debugger,default,delete,do,else,false,finally,for,function,if,in,instanceof,new,null,return,switch,this,throw,true,try,typeof,var,void,while,with,abstract,boolean,byte,char,class,const,double,enum,export,extends,final,float,goto,implements,import,int,interface,long,native,package,private,protected,public,short,static,super,synchronized,throws,transient,volatile,arguments,let,yield,undefined",w=/\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|\s*\.\s*[$\w\.]+/g,v=/[^\w$]+/g,A=new RegExp(["\\b"+g.replace(/,/g,"\\b|\\b")+"\\b"].join("|"),"g"),S=/^\d[^,]*|,\d[^,]*/g,R=/^,+|,+$/g,E=/^$|,+/;i.openTag="{{",i.closeTag="}}";var T=function(e,t){var n=t.split(":"),o=n.shift(),i=n.join(":")||"";return i&&(i=", "+i),"$helpers."+o+"("+e+i+")"};i.parser=function(e){e=e.replace(/^\s/,"");var t=e.split(" "),n=t.shift(),i=t.join(" ");switch(n){case"if":e="if("+i+"){";break;case"else":t="if"===t.shift()?" if("+t.join(" ")+")":"",e="}else"+t+"{";break;case"/if":e="}";break;case"each":var a=t[0]||"$data",r=t[1]||"as",s=t[2]||"$value",c=t[3]||"$index",u=s+","+c;"as"!==r&&(a="[]"),e="$each("+a+",function("+u+"){";break;case"/each":e="});";break;case"echo":e="print("+i+");";break;case"print":case"include":e=n+"("+t.join(",")+");";break;default:if(/^\s*\|\s*[\w\$]/.test(i)){var d=!0;0===e.indexOf("#")&&(e=e.substr(1),d=!1);for(var l=0,f=e.split("|"),h=f.length,p=f[l++];h>l;l++)p=T(p,f[l]);e=(d?"=":"=#")+p}else e=o.helpers[n]?"=#"+n+"("+t.join(",")+");":"="+e}return e},"function"==typeof define?define("artTemplate",[],function(){return o}):"undefined"!=typeof exports?module.exports=o:this.template=o}(),function(){var e=function(e,t){function n(e,t,n){this.target=e,this.keyword=t,this.excludeArr=n,this._init()}function o(){f=i(c.THINK_DRAG),y=i(c.SEARCH_FORM),h=i(c.SEARCH_IPT),p=i(c.THINK_DRAG_CNT),m=i(c.SEARCH_HOT_KEY),_=0,this._init()}var i=window.jQuery||window.$,a=!1,r=null,s=10,c={HEADER_LISTENER:"#wHead",THINK_DRAG:"#wHeadSearchThinkDrag",THINK_DRAG_CNT:"#wHeadSearchThinkDragCnt",THINK_DRAG_ITEMS:"#wHeadSearchThinkDragCnt li",THINK_DRAG_CONNECT_ITEMS:".w-head-search__mod-think__connectbox",THINK_DRAG_CHANNEL_BOX:".w-head-search__mod-think__channelbox",THINK_DRAG_SORT_BOX:".w-head-search__mod-think__sortbox",THINK_DRAG_LIVE_BTN:".w-head-search__mod-think__connectbox__live,.w-head-search__mod-think__channelbox__main__info__status--live",SEARCH_FORM:"#wHeadSearchForm",SEARCH_HOT_KEY:"#wHeadSearchHotKey",SEARCH_IPT:"#wHeadSearch",SEARCH_BTN:"#wHeadSearchBtn"},u={THINK_DRAG:"wheadTplThinkDrag"},d={HIGHTLIGHT:"search-hightlight",THINK_DRAG_SHOW:"w-head__drag--show",THINK_DRAG_ITEM_HOVER:"w-head-search__mod-think__item--hover",THINK_DRAG_LIVE_BTN:"w-head-search__mod-think__connectbox__live",THINK_DRAG_LIVE_BTN2:"w-head-search__mod-think__channelbox__main__info__status--live",SEARCH_HAS_WORD:"w-head-search__form--has-word",SEARCH_FOCUS:"w-head-search__form--focus"},l={THINK_WORD:"//www.yy.com/search/search2.json?q={$key}&t=-3&n=1&s=10"};n.prototype={constructor:n,_init:function(){this._addHightLightClass()},_addHightLightClass:function(e){e||(e=i(this.target)[0]);for(var t=this.keyword,n=this.excludeArr,o=0;o-1))if(r&&i.trim(r).length&&r.indexOf(t)>-1){var s=new RegExp("("+t+")","g"),c=''+t+"",u=a.parentNode.innerHTML.match(/]*href="([^"]*)"[^>]*>(.*?)<\/a>/g),l=r.replace(s,c);a.parentNode.innerHTML=l+(u?u[0]:"")}else this._addHightLightClass(a)}}};var f,h,p,m,_,y;return o.prototype={illegalData:function(){this.hide()},dealWithAjax:function(){if(!a){var t=i.trim(h.val()),_=i.trim(m.text());t&&t!=_?i.ajax({url:l.THINK_WORD.replace("{$key}",encodeURIComponent(t)),type:"get",dataType:"json",cache:!1,success:function(t){var i=o.prototype,a={colLimit:s},l=!1;if(t&&0==t.status&&t.data.searchResult){if(t.data.searchResult.response[-10086])return void i.illegalData();t.data.searchResult.response[2]&&(a.channelData=t.data.searchResult.response[2].docs[0],a.colLimit-=1,a.channelData&&!a.channelData.iconUrl&&(a.channelData.iconUrl="http://yyweb.yystatic.com/pc/images/default_portrait-822f6a7747.jpg"),a.channelData&&a.channelData.length&&(l=!0)),t.data.searchResult.response[121]&&(a.sortData=t.data.searchResult.response[121].docs[0],a.colLimit-=1,a.sortData&&a.sortData.length&&(l=!0)),t.data.searchResult.response[-3]&&(a.colData=t.data.searchResult.response[-3].docs,a.colData&&a.colData.length&&(l=!0)),p.html(e(u.THINK_DRAG,a)),r?(r.keyword=h.val().trim(),r._addHightLightClass()):r=new n(c.THINK_DRAG_CNT,h.val().trim(),[d.THINK_DRAG_LIVE_BTN,d.THINK_DRAG_LIVE_BTN2]),y.hasClass(d.SEARCH_FOCUS)&&l?f.addClass(d.THINK_DRAG_SHOW):f.removeClass(d.THINK_DRAG_SHOW)}},error:function(){var e=o.prototype;e.illegalData(),console.log("ajax search2.json fail")}}):this.hide()}},bindEvents:function(){var e=this;i("body").bind("click",function(t){i(t.target)[0]==h[0]||i(t.target).is(c.SEARCH_BTN)||e.hide()}),p.on("click",c.THINK_DRAG_CONNECT_ITEMS,function(e){h.val(i(e.currentTarget).attr("data-keyword")),y.trigger("submit")});var n,o=(new Date).getTime();h.bind("input propertychange",function(){n=(new Date).getTime(),n-o<300&&(a=!0),o=n,a=!1,clearTimeout(_),setTimeout(function(){e.dealWithAjax()},300)}).bind("keyup",function(e){8!=e.keyCode&&46!=e.keyCode||h.trigger("input")}).bind("keydown",function(e){if(f.hasClass(d.THINK_DRAG_SHOW)&&(40==e.which||38==e.which)){var t=i(c.THINK_DRAG_ITEMS);if(!t.length)return;var n=-1;t.each(function(e){if(i(this).hasClass(d.THINK_DRAG_ITEM_HOVER))return n=e,!0});var o=n+1;38==e.keyCode&&(o-=2),o==t.length&&(o=0),t.eq(o).addClass(d.THINK_DRAG_ITEM_HOVER).siblings().removeClass(d.THINK_DRAG_ITEM_HOVER),h.val(t.eq(o).attr("data-keyword"))}}).bind("focus",function(){var n=i(c.THINK_DRAG_ITEMS);t.UA&&t.UA.ie<=8||n.length<=0?(f.removeClass(c.THINK_DRAG_SHOW),""!=h.val()&&e.dealWithAjax()):f.addClass(c.THINK_DRAG_SHOW)}),f.on("click",c.THINK_DRAG_CHANNEL_BOX,function(e){e.stopPropagation(),i(c.HEADER_LISTENER).trigger("thinkItemChannelBoxClick",i.trim(h.val()))}),i(".header-search-tips").on("click",c.THINK_DRAG_SORT_BOX,function(e){e.stopPropagation(),i(c.HEADER_LISTENER).trigger("thinkItemSortBoxClick",i.trim(h.val()))}),h.on("click",c.THINK_DRAG_CONNECT_ITEMS,function(e){e.stopPropagation(),i(c.HEADER_LISTENER).trigger("thinkItemConnectBoxClick",i.trim(h.val()))}),h.on("click",c.THINK_DRAG_LIVE_BTN,function(e){e.stopPropagation(),i(c.HEADER_LISTENER).trigger("thinkItemLiveBtnClick")}),""!==h.val()&&h.is(":focus")&&h.trigger("focus")},show:function(){f.addClass(d.THINK_DRAG_SHOW)},hide:function(){p.html(""),f.removeClass(d.THINK_DRAG_SHOW)},_init:function(){this.bindEvents()}},"undefined"!=typeof define&&define.amd?o:void(window.wHeadSearchAutoComplete=o)};"function"==typeof define&&define.amd?define("wHeadSearchAutoComplete",["artTemplate","util"],e):e(window.template,window.util)}(),function(){var e=function(e){var t,n,o,i,a,r=window.jQuery||window.$,s=window.util,c=!1,u="yy_searchHistory",d=10,l=5,f={HEADER_LISTENER:"#wHead",SEARCH_FORM:"#wHeadSearchForm",SEARCH_HOT_KEY:"#wHeadSearchHotKey",SEARCH_IPT:"#wHeadSearch",SEARCH_BTN:"#wHeadSearchBtn",DRAG:"#wHeadSearchHistoryDrag",DRAG_HISTORY:"#wHeadSearchHistoryList",DRAG_CLEAN_BTN:"#wHeadSearchHistoryCleanBtn",DRAG_RECORD_BTN:"#wHeadSearchHistoryRecordBtn",DRAG_RECOMMEND:"#wHeadSearchRecommendList",DRAG_ITEMS:"#wHeadSearchHistoryDrag li",HISTORY_DEL:".w-head__search-history__s2__item__icon",HISTORY_ITEMS:".w-head__search-history__s2__item",RECOMMEND_ITEMS:".w-head__search-recommend__cnt__item"},h={HISTORY:"wheadTplSearchHistoryList",RECOMMEND:"wheadTplSearchRecommendList"},p={SEARCH_HAS_WORD:"w-head-search__form--has-word",SEARCH_FOCUS:"w-head-search__form--focus",DRAG_SHOW:"w-head__drag--show",DRAG_ITEM_HOVER:"w-head__search-history__item--hover",DRAG_WITH_HISTORY:"w-head__drag--with-history"},m={RECOMMEND:"//www.yy.com/search/search2.json?q=s&t=-22&n=1&s=10&_="+ +new Date},_={recommendData:null,limit:d},y=function(){t=r(f.SEARCH_IPT),n=r(f.DRAG_HISTORY),o=r(f.DRAG_RECOMMEND),i=r(f.DRAG_CLEAN_BTN),a=r(f.DRAG),this._init()};return y.prototype={_init:function(){this.initHistory(),this.initRecommend(),this.bindEvents()},initHistory:function(){var t=this,o=[],i=(new Date).getTime(),r=s.localStorage.getItem(u);if(r)try{o=JSON.parse(r).searchList}catch(c){}o||(o=[]),o.length>l&&(o.length=l),o.map(function(e,n){e.timer||(o=[],t.cleanHistory()),i-e.timer>1296e6&&o.splice(n,1)}),n.html(e(h.HISTORY,{historys:o})),a[o.length?"addClass":"removeClass"](p.DRAG_WITH_HISTORY)},initRecommend:function(){_.recommendData&&_.recommendData.length?o.html(e(h.RECOMMEND,{recommendDatas:_.recommendData,limit:_.limit})):r.ajax({url:m.RECOMMEND,type:"GET",dataType:"json",cache:!1,success:function(t){if(t&&0==t.status&&t.data.searchResult&&t.data.searchResult.response[-22]){var n=t.data.searchResult.response[-22].docs;_.recommendData=n,o.html(e(h.RECOMMEND,{recommendDatas:n,limit:_.limit}))}}})},bindEvents:function(){var e=this;r("body").bind("click",function(n){r(n.target)[0]!=t[0]&&e.hide()}),r(f.HISTORY_DEL).on("click",function(t){t.stopPropagation();var n=r(this).data("keyword");r(f.DRAG_HISTORY).children(".w-head__search-history__s2__item").length<=1&&a.removeClass(p.DRAG_WITH_HISTORY),e.delHistory(n),r(this).parents(".w-head__search-history__s2__item").remove()}),t.bind("focus",function(){c=!0,""!=t.val()?e.hide():e.show()}).bind("input propertychange",function(){""==t.val()&&c?e.show():(e.hide(),r(f.HEADER_LISTENER).trigger("searchInputChange"))}).bind("keyup",function(e){8!=e.keyCode&&46!=e.keyCode||t.trigger("input")}).bind("keydown",function(e){if(a.hasClass(p.DRAG_SHOW)&&(40==e.keyCode||38==e.keyCode)){var n=r(f.DRAG_ITEMS);if(!n.length)return;var o=-1;n.each(function(e){if(r(this).hasClass(p.DRAG_ITEM_HOVER))return o=e,!0});var i=o;38===e.keyCode?i!==-1&&(i-=1):i+=1,i<0&&(i=n.length+i),i>=n.length&&(i%=n.length),n.each(function(e){r(this)[e==i?"addClass":"removeClass"](p.DRAG_ITEM_HOVER)}),t.val(n.eq(i).attr("data-keyword")),r(f.SEARCH_FORM).addClass(p.SEARCH_HAS_WORD)}}),i.on("click",function(t){t.stopPropagation(),e.cleanHistory(),r(f.DRAG_ITEMS).removeClass(p.DRAG_ITEM_HOVER),r(f.HEADER_LISTENER).trigger("historyClear")}),r(a).on("click",f.HISTORY_ITEMS,function(n){n.stopPropagation(),t.val(r(n.currentTarget).attr("data-keyword")),r(f.SEARCH_FORM).trigger("submit"),r(f.HEADER_LISTENER).trigger("historyItemClick"),e.hide()}),r(a).on("click",f.RECOMMEND_ITEMS,function(n){n.stopPropagation(),t.val(r(n.currentTarget).attr("data-keyword")),r(f.SEARCH_FORM).trigger("submit"),r(f.HEADER_LISTENER).trigger("recommendItemClick"),e.hide()})},cleanHistory:function(){_.limit=d,s.localStorage.setItem(u,"{}"),this.initHistory()},delHistory:function(e){var t=s.localStorage.getItem(u),n=[];if(t)try{n=JSON.parse(t).searchList}catch(o){}if(n.length){n.map(function(t,o){t.value==e&&n.splice(o,1)});var i=JSON.parse(s.localStorage.getItem(u));i.searchList=n,s.localStorage.setItem(u,JSON.stringify(i))}},hide:function(){a.removeClass(p.DRAG_SHOW),r(f.DRAG_ITEMS).removeClass(p.DRAG_ITEM_HOVER)},show:function(){a.addClass(p.DRAG_SHOW)}},"undefined"!=typeof define&&define.amd?y:void(window.wHeadSearchHistory=y)};"function"==typeof define&&define.amd?define("wHeadSearchHistory",["artTemplate"],e):e(window.template)}(),function(){var e=function(e,t,n){var o=window.util,i={HEADER_LISTENER:"#wHead",SEARCH_FORM:"#wHeadSearchForm",SEARCH_FILTER:"#searchFilter",SEARCH_IPT:"#wHeadSearch",SEARCH_SELECT_AREA:"#wHeadSearchFormSelectorArea",SEARCH_HOT_KEY:"#wHeadSearchHotKey",SEARCH_SELECT_ITEM_BOX:"#wHeadSearchFormSelectorItems",SEARCH_SELECT_ITEMS:"#wHeadSearchFormSelectorItems a",SEARCH_SELECT_TL:"#wHeadSearchFormSelectorTl",THINK_AREA:"#wHeadSearchThinkDrag",HISTORY_AREA:"#wHeadSearchHistoryDrag",STATISTICS_SEARCH_FORM:"#wHeadSearchForm",STATISTICS_SEARCH_IPT:"#wHeadSearch"},a={SEARCH_FORM_FOCUS:"w-head-search__form--focus",SEARCH_SELECT_SHOW:"w-head-search__form__main__selector__opts--show",SEARCH_HAS_WORD:"w-head-search__form--has-word"},r={THINK_AREA:"wHeadTplThinkArea",HISTORY_AREA:"wHeadTplSearchHistoryArea"},s={maxsearchLength:10,setSearchDate:function(e){var t,n="yy_searchHistory",i="searchList",a=!1,r=o.localStorage.getItem(n)||"{}";if(t=JSON.parse(r)[i]||[],t.map(function(t){t.value==e.value&&(a=!0)}),e&&!a){t.unshift(e);var s=JSON.parse(r);s[i]=t,o.localStorage.setItem(n,JSON.stringify(s))}}},c={type:"yyl",searchMeta:{selected:"直播",searchTypeName:"searchType",opts:[]}},u={init:function(e){if(c=o.extend(!0,c,e),"yue"===c.type){var t="",n=o.getParameterByName("searchType"),i=c.searchMeta.opts.concat([c.searchMeta.selected]);"0"===n&&(t="媒体"),"1"===n&&(t="新闻"),t&&(c.searchMeta.selected=t,c.searchMeta.opts=i.filter(function(e){return e!==t}))}this.render()},render:function(){"yy"!=c.type&&$(i.SEARCH_FORM).html(n("wHeadTplSearchForm",c)),$(i.THINK_AREA).html(n(r.THINK_AREA)),$(i.HISTORY_AREA).html(n(r.HISTORY_AREA)),"yue"===c.type&&"新闻"===c.searchMeta.selected&&("新闻"==c.searchMeta.selected?($(i.SEARCH_FORM).attr("method","get"),$(i.SEARCH_FILTER).attr("name",c.searchMeta.searchTypeName).val("1")):"媒体"==c.searchMeta.selected&&($(i.SEARCH_FORM).attr("method","get"),$(i.SEARCH_FILTER).attr("name",c.searchMeta.searchTypeName).val("0")));var u=$(i.SEARCH_IPT),d=$(i.SEARCH_FORM),l=$.trim($(i.SEARCH_HOT_KEY).text());u.on("focus",function(){d.addClass(a.SEARCH_FORM_FOCUS);var e=$(this).val();d[e?"addClass":"removeClass"](a.SEARCH_HAS_WORD)}).on("blur",function(){d.removeClass(a.SEARCH_FORM_FOCUS);var e=$(this).val();d[e?"addClass":"removeClass"](a.SEARCH_HAS_WORD)}).on("input propertychange",function(){var e=$(this).val();d[e?"addClass":"removeClass"](a.SEARCH_HAS_WORD)}),"yy"===c.type&&(new t(u),window.onFirstScreenLoaded(function(){new e})),"yue"===c.type&&$(i.SEARCH_FORM).attr("action","//www.yy.com/yue/search"),"yy"===c.type&&$(i.SEARCH_FORM).attr("action","//www.yy.com/search-{$keyWord}"),$(i.SEARCH_SELECT_AREA).on("mouseenter",function(){$(i.SEARCH_SELECT_ITEM_BOX).addClass(a.SEARCH_SELECT_SHOW)}).on("mouseleave",function(){$(i.SEARCH_SELECT_ITEM_BOX).removeClass(a.SEARCH_SELECT_SHOW)}),$(i.SEARCH_SELECT_ITEMS).on("click",function(){var e=$(this).html(),t=$(i.SEARCH_SELECT_TL),n=c.searchMeta.searchTypeName,o=t.html(),r=$(i.SEARCH_FILTER);t.html(e),$(this).html(o),"直播"===e?$(i.SEARCH_FORM).attr("action","//www.yy.com/search").attr("target","_blank"):("yue"===c.type&&($(i.SEARCH_FORM).attr("action","//www.yy.com/yue/search"),$(i.SEARCH_FORM).attr("method","get")),$(i.SEARCH_FORM).attr("target","_self")),"直播"===e&&(r.attr("name","").val(""),$("input.ipt").attr("name","q")),"新闻"===e&&(r.attr("name",n).val("1"),$(i.SEARCH_IPT).attr("name","keywords")),"媒体"===e&&(r.attr("name",n).val("0"),$(i.SEARCH_IPT).attr("name","keywords")),$(i.SEARCH_SELECT_ITEMS).removeClass(a.SEARCH_SELECT_SHOW)}),0!==$(i.SEARCH_FORM).length&&($(i.SEARCH_FORM)[0].onsubmit=function(e){var t="_blank;";if(location.pathname.indexOf("search")>-1&&(t="_self"),$.trim(u.val())||(location.pathname.indexOf("search")>-1&&(l=$(i.SEARCH_HOT_KEY).text()),u.val(l)),!$.trim(u.val()))return!1;var n,r=o.escapeToNull(u.val());("yy"===c.type||"yue"===c.type&&"直播"==$(i.SEARCH_SELECT_TL).html())&&(e.preventDefault(),n="//www.yy.com/search-"+$.trim(r),$(i.SEARCH_FORM).attr("method","post").attr("action",n),$(i.SEARCH_IPT).attr("name",""),window.open(n,t)),$(i.SEARCH_FORM).addClass(a.SEARCH_HAS_WORD),$.trim(u.val())&&s.setSearchDate({value:$.trim(u.val()),timer:(new Date).getTime()}),$(i.HEADER_LISTENER).trigger("search",$.trim(u.val()))})}};return"function"==typeof define&&define.amd?u:void(window.wHeadSearch=u)};"function"==typeof define&&define.amd?define("wHeadSearch",["wHeadSearchAutoComplete","wHeadSearchHistory","artTemplate"],e):e(window.wHeadSearchAutoComplete,window.wHeadSearchHistory,window.template)}(),function(){var e=window.jQuery||window.$;if(!e)throw new Error("yyl-loader required jquery");var t="yylloader_data",n=!!("ActiveXObject"in window&&/(msie |Trident\/.*rv:)(\d*)/i.test(navigator.userAgent))&&RegExp.$2,o=!1;try{o=window.localStorage&&!n}catch(i){}var a;try{a=top.location.href}catch(i){a=window.location.href}var r=18e5,s=/nocache/.test(a),c=/nocache/.test(a),u={};if(o)try{u=JSON.parse(window.localStorage.getItem(t))||{}}catch(i){}var d={queues:[],readyModule:{},waitings:[]},l=/^/,f=//,h={rouder:function(n,i){if(u[n.name]&&u[n.name].url==n.url&&l.test(u[n.name].tpl)&&f.test(u[n.name].tpl)&&!s)return i(null,u[n.name].tpl);var a=window.location.protocol+n.url.replace(/^http[s]?:/,"");e.ajax({url:a,contentType:"text/html;charset=UTF-8",timeout:1e4,success:function(e){if(!l.test(e)||!f.test(e))return i("get tpl error, {$name} tpl is incomplete".replace("{$name}",n.name));if(o){u[n.name]={url:n.url,tpl:e,date:(new Date).getTime()};try{window.localStorage.setItem(t,JSON.stringify(u))}catch(a){}}return i(null,e)},error:function(e,t,n){return i(["ajax error. url:",a,"readyState:",e.readyState,"status:",e.status,"statusText:",e.statusText,"responseText:",e.responseText,"textStatus:",t,"errorThrown:",n].join(", "))}})},addWaiting:function(e,t,n){d.waitings.push({name:e,ref:t,fn:n})},checkModuleReady:function(t){var n=!0;return e(t).each(function(e,t){if(t)return d.readyModule[t]?void 0:(n=!1,!0)}),n},checkWaiting:function(){if(d.waitings.length)for(var e=0;ee&&(delete u[a],n=!0);if(n)try{window.localStorage.setItem(t,JSON.stringify(u))}catch(r){}}},m.cache=u,m.setExprie(r),m.onModuleReady=function(e,t){return d.readyModule[e]?t&&t():void h.addWaiting("onModuleReady",[e],t)},c&&m.clear(),window.yyloader||(window.yyloader=m),"undefined"!=typeof define&&define.amd?define("yyloader",[],function(){return m}):"undefined"!=typeof module&&module.exports&&(module.exports=m)}(),function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e?t(e):function(){throw new Error("header requires a window with a document")}:t(e)}(window,function(e){function t(t){this.id=t.id,this.className=t.className,this.parent=t.parent||"body",n("#"+this.id).length&&(console.warn("iframe: "+this.id+" already exist! replacing it..."),n("#"+this.id).remove()),this.$frameContainer=n(''),this.$frameContainer.attr("id",this.id),this.$frame=n(""),this.$frame.addClass(this.className),this.$frameContainer.append(this.$frame),n(this.parent).append(this.$frameContainer),e.closeIframe||(e.closeIframe=function(e){n("#"+e).remove()}),e.statisticBridge||(e.statisticBridge=function(t){e.statisticEvent.set(t)})}var n=e.jQuery||e.$,o="//web.yystatic.com/project/yycom/pc/images/default_portrait-9db86c8d6c.png",i="avatar",a=3e3,r=8e3,s=e.pageInfo&&"studio"===e.pageInfo.position,c={JSONP:{REGISTER_REPORT:"//w.yy.com/task/center/registered?appType=2",DAILY_TASK_SIGNIN:"//w.yy.com/task/center/signin",DAILY_TASK:"//w.yy.com/task/center/tasks",SIGNIN_INFO:"//w.yy.com/task/center/signininfo",GOLD:"//w.yy.com/gold/gold/account/get"},GET:{UNREAD_MESSAGE:"//www.yy.com/zone/message/getMsgTabCount.json?userType=0&msgTypeList=101"}},u={HEADER:"#wHead",USER_CARD_AREA:"#wHeadInfo",USER_CARD_MINI_AVATAR_AREA:"#wHeadMiniAvatarArea",USER_CARD_AVATAR_AREA:"#wHeadAvatarArea",USER_CARD_RED_DOT:"#wHeadUserInfoRedDotEl",USER_CARD_DRAG:"#wHeadInfoDrag",USER_CARD_ICONS_AREA:"#wHeadInfoIcons",USER_CARD_WALLET_AREA:"#wHeadWalletArea",USER_CARD_DAILY_TASK_AREA:"#wHeadDailyTaskArea",USER_CARD_NAV_AREA:"#wHeadUserCardNavArea"},d={USER_CARD:"wHeadTplUserCard",USER_CARD_MINI_AVATAR:"wHeadTplUserCardMiniAvatar",USER_CARD_AVATAR:"wHeadTplUserCardAvatar",USER_CARD_ICONS:"wHeadTplUserCardSectionIcons",USER_CARD_WALLET:"wHeadTplUserCardSectionWallet",USER_CARD_DAILY_TASK:"wHeadTplUserCardSectionDailyTask",USER_CARD_NAV:"wHeadTplUserCardSectionNav"},l={USER_CARD:u.USER_CARD_AREA,USER_CARD_MINI_AVATAR:u.USER_CARD_MINI_AVATAR_AREA,USER_CARD_AVATAR:u.USER_CARD_AVATAR_AREA,USER_CARD_ICONS:u.USER_CARD_ICONS_AREA,USER_CARD_WALLET:u.USER_CARD_WALLET_AREA,USER_CARD_DAILY_TASK:u.USER_CARD_DAILY_TASK_AREA,USER_CARD_NAV:u.USER_CARD_NAV_AREA},f={DRAG_SHOW:"w-head__drag--show"},h={};t.prototype.load=function(e){var t=this;return t.$frame.attr("src",e),new Promise(function(e){t.$frame.on("load",function(){e()})})};var p=function(p,m,_){var y=function(e,t,o){var i=new Date,a=function(e){n(u.HEADER).trigger("userCardRequest",{type:t,cost:new Date-i,code:e.code})};if("user"!==e||!m[t]){if(e&&t&&c[e]&&c[e][t])return new Promise(function(i,s){var u=!1,d=setTimeout(function(){u=!0;var e={code:"ajax_timeout",errMsg:"ajax request over "+r+"ms"};a(e),s(e)},r),l={type:e,url:c[e][t],data:o,success:function(e){clearTimeout(d),u||(0===e.code?i(e):s(e),a(e))},fail:function(e){var t={code:"ajax_error",errMsg:e.errorMessage};a(t),s(t)}};"JSONP"===e&&(l.type="GET",l.dataType="jsonp"),n.ajax(l)});throw new Error("iRequest run fail, type not match")}switch(t){case"fetchUserInfo":case"fetchUserInfoByRevenue":return new Promise(function(e){m[t]().then(function(t){e(t),a(t)})});default:throw t+" is not in iRequest case"}},g={openTaskCenter:function(e){e.preventDefault();var o=n(this).attr("href"),i=new t({id:"taskcenterFrame",className:"taskcenterFrame"});i.load(o),n(u.HEADER).trigger("openTaskCenter")},checkin:function(){0!==A.get("dailyTask.sign.status")&&y("JSONP","DAILY_TASK_SIGNIN").then(function(e){1===e.data.status&&(A.set("dailyTask.sign",{finished:e.data.continueDay,status:0}),A.get("unreadMsg")||A.set("showReddot",!1),A.render("USER_CARD_DAILY_TASK"),A.render("USER_CARD_MINI_AVATAR"),n(u.HEADER).trigger("userCardDailyTaskSign"))})},coverOnError:function(){this.onerror=null,this.src=o},logout:function(){return m.logout()},login:function(){m.showYYLoginBox()},reg:function(){m.showYYRegBox(function(){y("jsonp","REGISTER_REPORT").then(function(){n(u.HEADER).trigger("regReport")})})},avatarClick:function(){n(u.HEADER).trigger("avatarClick")},nobleClick:function(){e.roomNoble&&e.roomNoble.noblePop.show(3)},cherishClick:function(){
e.cherish&&e.cherish.openCherishDialog(3)}},w={},v={source:{},init:function(){var e=null;try{e=JSON.parse(p.localStorage.getItem(i)),e=e[m.getUidSync()]}catch(t){}e&&(v.source=e)},get:function(e){return this.source[e]},set:function(e,t){v.source[e]=t,p.localStorage.setItem(i,JSON.stringify(v.source))}},A={source:{info:{yb:"-",red:"-",gold:"-",nobleIconTitle:"",cherishIconTitle:""}},set:function(e,t){var n=this,o=e.split("."),i=n.source;o.forEach(function(e,n){n===o.length-1?"object"==typeof t?"object"!=typeof i[e]?i[e]=t:i[e]=p.extend(!0,i[e],t):i[e]=t:("object"!=typeof i[e]&&(i[e]={}),i=i[e])})},get:function(e){var t=this,n=e.split("."),o=t.source;return n.forEach(function(e){void 0!==o&&(o="object"==typeof o?o[e]:void 0)}),o},init:function(e){var t=this;t.set("showTask","yy"===e.type),t.set("info.nobleIconTitle",s?"点亮身份象征,尽享尊贵特权!主人,你有点腻害呀":"进入娱乐直播间再点我咯~"),t.set("info.cherishIconTitle",s?"喜欢就要会表达,为TA开个珍爱吧!":"进入娱乐直播间再点我咯~"),v.init(),n(u.USER_CARD_AREA).on("mouseenter",p.debounce(function(){if(m.isLoginSync()){n(u.USER_CARD_DRAG).addClass(f.DRAG_SHOW),t.set("dragShow",!0);var e=new Date;(!h.preUpdateTime||e-h.preUpdateTime>a)&&(h.preUpdateTime=e,t.update())}else t.logInOut()},500,!0)),n(u.USER_CARD_AREA).on("mouseleave",p.debounce(function(){m.isLoginSync()&&(n(u.USER_CARD_DRAG).removeClass(f.DRAG_SHOW),t.set("dragShow",!1))},500,!0)),t.logInOut()},logInOut:function(){var e=this,t=m.isLoginSync();if(e.set("isLogined",t),e.render("USER_CARD"),t){var n=v.get(m.getUidSync());n?e.set("info",n):(e.set("info",{logo:o,nick:"加载中"}),e.update("userInfo")),e.get("dragShow")?e.update():e.update("dailyTask"),e.render("USER_CARD_MINI_AVATAR"),e.render("USER_CARD_AVATAR"),e.render("USER_CARD_ICONS"),e.render("USER_CARD_WALLET"),e.render("USER_CARD_NAV")}else e.render("USER_CARD")},update:function(e){var t=this;t.set("isLogined",m.isLoginSync());var n={userInfo:function(){y("user","fetchUserInfo").then(function(e){var n=e.data;n&&(n.logo&&(n.logo=p.convertHttps(n.logo)),t.set("info",n),v.set(n.uid,n),t.render("USER_CARD_MINI_AVATAR"),t.render("USER_CARD_AVATAR"))})["catch"](function(){})},dailyTask:function(){var e=function(e){e.code===-1?m.logout():(t.set("showTask",!1),t.render("USER_CARD_DAILY_TASK"))};y("JSONP","SIGNIN_INFO",{}).then(function(n){var o=0;n.data&&(o=n.data.hadSignIn&&n.data.currentDay),y("JSONP","DAILY_TASK",{appType:2,yyVersion:null,os:"pc"}).then(function(e){var n=e.data&&e.data.daily||[],i=e.data&&e.data.freshman||[],a=[].concat(n,i),r={};a.forEach(function(e){2===e.type?(r.sign=e,r.sign.finished=o):212===e.type?r.danmu=e:210===e.type?r.watch=e:211===e.type&&(r.gift=e)}),t.set("showReddot",r.sign&&1===r.sign.status),t.set("dailyTask",r),t.render("USER_CARD_DAILY_TASK"),t.render("USER_CARD_MINI_AVATAR")})["catch"](e)})["catch"](e)},gold:function(){var e=function(e){e.data&&e.data.totalAmount&&(t.set("info.gold",p.unitFormat(e.data.totalAmount||0,2)),t.render("USER_CARD_ICONS"))};y("JSONP","GOLD").then(function(t){e(t)})["catch"](function(n){2===n.code?e(n):(t.set("info.gold","-"),e(n))})},extUserInfo:function(){y("user","fetchUserInfoByRevenue").then(function(e){var n=e.data;n&&(n.isExpired?(n.honourLevel="已过期",n.nobleLevel=0):n.honourLevel="LV"+n.honourLevel,n.yb=n.yyMoney,n.red=n.diamond,n.blue=p.unitFormat(n.grandTotalBlue||0,2),n.money=p.unitFormat(n.commission?n.commission.commission_sum_payif:0,2),n.isAnchor=1==n.role||2==n.role,1==n.role?n.usercenterUrl="/i/income":2==n.role?n.usercenterUrl="/i/anchorManage/signAnchors":n.usercenterUrl="/i",n.logo&&(n.logo=p.convertHttps(n.logo)),s&&(n.nobleIconTitle=n.honourLevel,n.hadCherish&&(n.cherishIconTitle="团勋章:"+n.cherishGroupName)),t.set("info",n),t.render("USER_CARD_ICONS"),t.render("USER_CARD_WALLET"))})["catch"](function(){t.set("info",{yb:"-",red:"-",blue:"-",money:"-"}),t.render("USER_CARD_ICONS"),t.render("USER_CARD_WALLET")})},unreadMsg:function(){y("GET","UNREAD_MESSAGE").then(function(e){e.data&&e.data.unread&&(t.set("showReddot",!0),t.set("unreadMsg",!0),t.render("USER_CARD_MINI_AVATAR"),t.render("USER_CARD_NAV"))})}};e?n[e]&&n[e]():Object.keys(n).forEach(function(e){n[e]()})},render:function(e){var t=this;if(d[e]&&l[e]){var o=n(l[e]);o.length&&(o.html(_(d[e],t.source)),p.eventRender(o[0],w,g))}}};return"function"==typeof define&&define.amd?A:void(e.wHeadUserInfo=A)};"function"==typeof define&&define.amd?define("wHeadUserInfo",["util","wUser","artTemplate"],p):p(e.util,e.user,e.template)}),function(){var e=function(){var e=window.util,t={name:"downloadGuideConfig",data:null,initData:function(){var t=this;t.data=JSON.parse(e.localStorage.getItem(t.name)||"{}")},mark:function(){var t=this;e.localStorage.setItem(t.name,JSON.stringify(t.data||{}))},get:function(e){var t=this;t.data||t.initData();var n=t.data[e];if("object"==typeof n&&n.time){var o=new Date(n.time),i=new Date;return o.getFullYear()===i.getFullYear()&&o.getMonth()===i.getMonth()&&o.getDate()===i.getDate()?n.val||0:0}return 0},set:function(e,t){var n=this;n.data||n.initData(),n.data[e]={val:t||0,time:+new Date},n.mark()}},n={download:{inPromotion:!1,flink:{title:"安卓下载YY极速版",sub:"登录立拆7元红包",link:"https://android.myapp.com/myapp/detail.htm?apkName=com.yy.yylite&ADTAG=mobile"},mobileYY:{title:"IOS下载手机YY",sub:"更多互动玩法",link:"http://www.yy.com/download"}},header:{downloadGuide:{enable:!0,tips:"领红包",display:function(e){var o=!1;return 0===t.get("header")&&(o=!0),e||n.header.downloadGuide.mark(),o},mark:function(){var e=t.get("header")+1;t.set("header",e)}}},drawer:{display:function(e){var o=null;return 0===t.get("drawer")&&(o=!0),!e&&o&&n.drawer.mark(),o},mark:function(){var e=t.get("drawer")+1;t.set("drawer",e)}},yyBear:{defaultTips:"领红包",display:function(e){var o=null;return 0===t.get("yyBear")&&(o=!0),1===t.get("header")&&(o=!1),!e&&o&&n.yyBear.mark(),o},mark:function(){var e=t.get("yyBear")+1;t.set("yyBear",e)}}};return"function"==typeof define&&define.amd?n:void(window.wTheme=n)};"function"==typeof define&&define.amd?define("wTheme",[],e):e()}(),function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e?t(e):function(){throw new Error("header requires a window with a document")}:t(e)}(window,function(e){function t(t){this.id=t.id,this.className=t.className,this.parent=t.parent||"body",o("#"+this.id).length&&(console.warn("iframe: "+this.id+" already exist! replacing it..."),o("#"+this.id).remove()),this.$frameContainer=o(''),this.$frameContainer.attr("id",this.id),this.$frame=o(""),this.$frame.addClass(this.className),this.$frameContainer.append(this.$frame),o(this.parent).append(this.$frameContainer),e.closeIframe||(e.closeIframe=function(e){o("#"+e).remove()}),e.statisticBridge||(e.statisticBridge=function(t){e.statisticEvent.set(t)})}var n=e.document,o=e.jQuery||e.$,i="//"+e.location.hostname;"www.yy.com"!==e.location.hostname&&"yy.duowan.com"!==e.location.hostname&&(i="//www.yy.com"),t.prototype.load=function(e){var t=this;return t.$frame.attr("src",e),new Promise(function(e){t.$frame.on("load",function(){e()})})};var a={MY_WATCH_HISTORY:"//www.yy.com/api/live/current?query={$watches}"},r={userInfo:{},userInfoByRevenueRefreshNow:0,kanNavInit:!1,statusChangeQueue:[],resizeQueue:[]},s="//web.yystatic.com/project/yycom/pc/images/default_portrait-9db86c8d6c.png",c={HEAD_RIGH:"wHeadTplRight",USER_INFO_LOGINOUT:"wHeadTplLoginout",USER_INFO_DRAG:"wHeadTplLoginDrag",USER_INFO_DRAG_CONTENT:"wHeadTplLoginDragContent",FOCUS:"wHeadTplFocus",FOCUS_ATT:"wHeadTplFocusAtt",FOCUS_SUB:"wHeadTplFocusSub",FOCUS_MED:"wHeadTplFocusMed",HISTORY:"wHeadTplWatchHistory",NAV_DRAG:"wHeadTplNavDrag"},u={HEADER_AREA:".p-header",HEADER:"#wHead",HEAD_LOGO:"#wHead .w-head__main__cnt__logo",HEAD_TMPL_AREA:"#wHeadTmplArea",HEAD_BACK_LINK:"#wHeadBackLink",HEAD_RIGHT:"#wHeadRight",NAV_AREA:"#wHeadNav",NAV_TL:"#wHeadNavTl",NAV_DRAG:"#wHeadNavDrag",USER_INFO_AREA:"#wHeadInfo",USER_INFO_DRAG:"#wHeadInfoDrag",USER_INFO_DEAG_MAIN:"#wHeadInfoDragMain",FOCUS_AREA:"#wHeadFocusarea",FOCUS_TL:"#wHeadFocusTl",FOCUS_DRAG:"#wHeadFocusDrag",FOCUS_DRAG_MAIN:"#wHeadFocusDragMain",FOCUS_DRAG_MAIN_ATT:"#wHeadFocusDragMainAtt",FOCUS_DRAG_MAIN_SUB:"#wHeadFocusDragMainSub",FOCUS_DRAG_MAIN_MED:"#wHeadFocusDragMainMed",FOCUS_DRAG_MAIN_INF:"#wHeadFocusDragMainInf",FOCUS_TAB_CNTS:"#wHeadFocusDragMain .w-head__tabs__bd",HISTORY_AREA:"#wHeadWatchhistory",HISTORY_TL:"#wHeadWatchhistoryTl",HISTORY_DRAG:"#wHeadWatchhistoryDrag",HISTORY_DRAG_MAIN:"#wHeadWatchhistoryDragMain",DOWNLOAD_AREA:"#wHeadDownload",DOWNLOAD_TL:"#wHeadDownloadTl",DOWNLOAD_DRAG:"#wHeadDownloadDrag",DOWNLOAD_GUIDE_DRAG:"#wHeadDownloadGuideDrag",DOWNLOAD_GUIDE_DRAG_CLOSE:"#wHeadDownloadGuideDragClose",STATISTICS_LOGO:".w-head__main__cnt__logo",STATISTICS_BACK:".w-head__main__cnt__back",STATISTICS_NAV_TL:".w-head__nav__tl__t",STATISTICS_NAV_ITEMS:".w-head__nav__main__section__cnt__item__link",STATISTICS_DOWNLOAD_ITEMS:".w-head__download__item__link",STATISTICS_SHOWU:".w-head__main__cnt__right__item--showu",STATISTICS_FOCUS_ITEMS:".w-head__focus__att__list__item__box, .w-head__focus__sub__list__ul__item__box",STATISTICS_FOCUS_ATT_ITEMS:".w-head__focus__att__list__item__box",STATISTICS_FOCUS_SUB_ITEMS:".w-head__focus__sub__list__item__box",STATISTICS_HISTORY_ITEMS:".w-head__history__cnt__l__ul__box",STATISTICS_SEARCH_HISTORY_ITEMS:".w-head__search-history__s2__item__cnt",STATISTICS_RECHARGE_BTN:".w-head__userinfo__main__section--money .w-head__userinfo__main__section__btn",STATISTICS_GETMONEY_BTN:".w-head__userinfo__main__section--income .w-head__userinfo__main__section__btn"},d={PAGE_END_LESS:"page-endless",PAGE_STUDIO_WITHOUT_GIFTBAR:"page--without-entbar",DRAG_LOADING:"w-head__drag--loading",DRAG_SHOW:"w-head__drag--show",NAV_CURRENT:"w-head__nav--current",NAC_ITEM_CURRENT:"w-head__nav__main__section__cnt__item--current",TAB_CNT_LOADING:"w-head__tabs__bd--loading",TAB_CURRENT:"w-head__tabs__hd__item--current",TAB_CNT_CURRENT:"w-head__tabs__bd--current",RIGHT_ITEM_TL_SHOWTIPS:"w-head__main__cnt__right__item__tl--showtips",HEADER_TAG_CURRENT:"w-head__tab--current",HEADER_YUE:"w-head--yue",HEADER_GODSONG:"w-head--shenqu",HEADER_BBS:"w-head--bbs",HEADER_SV:"w-head--sv",HEADER_FIXED:"w-head--fixed",HEADER_WITH_BACK:"w-head--with-back",HEADER_WITHOUT_SEARCH:"w-head--without-search",HEADER_WITH_HISTORY:"w-head--with-history"},l=1e4,f={$:null,runIntime:function(e,t){var n=new Date,o="runIntimeKey__"+t,i=new Date(r[o]);if(isNaN(i)&&(i=0),n-i>l)return r[o]=n,e&&e()},yyEventBind:function(e,t,n){var o=f.$;t&&o(e).find("*[yy-on]").each(function(){var e=this,n=e.getAttribute("yy-on"),i=n.split(/\s*,\s*/);i.forEach(function(n){var i=n.split(/\s*:\s*/),a=i[0],r=t[i[1]];r&&o(e).on(a,r)}),this.removeAttribute("yy-on")}),n&&o(e).find("[yy-el]").each(function(){n[this.getAttribute("yy-el")]=this,this.removeAttribute("yy-el")})},parseUsers:function(e){var t=0;return e>=1e4?(e=Math.round(e/1e3),t=(e/10).toFixed(1)+"万"):t=e,t},formatTpl:function(e){return e?e.replace(/\r|\n/g,""):e},unitFormat:function(e){var t=parseInt(e);return isNaN(t)?0:t<1e5?t:Math.floor(t/1e5*10)/10+"万"},getDateAssignDay:function(e){var t=new Date;t.setDate(t.getDate()+e);var n=t.getFullYear(),o=t.getMonth()+1,i=t.getDate();return{year:n,month:o,day:i}},timeFormat:function(e){if(!e)return!1;var t=new Date(e),n=t.getFullYear(),o=t.getMonth()+1,i=t.getDate(),a=t.getHours(),r=t.getMinutes(),s={};s.day=n+o+i;var c=this.getDateAssignDay(0).year+this.getDateAssignDay(0).month+this.getDateAssignDay(0).day,u=this.getDateAssignDay(1).year+this.getDateAssignDay(1).month+this.getDateAssignDay(1).day;return s.day===c?s.day="今天":s.day===u?s.day="明天":s.day=(o<10?"0"+o:o)+"月"+(i<10?"0"+i:i)+"日",s.time=(a<10?"0"+a:a)+":"+(r<10?"0"+r:r),s}},h={"w--wide":[1441,void 0],w960:[0,1440],s1800:[1800,void 0],s1700:[1700,1799],s1600:[1600,1699]},p=function(t){var n=o(e),i=o("html"),a=n.width()||e.screen.width,r=33,s=function(e,t,n,o){var a=!0;isNaN(n)||to&&(a=!1),i[a?"addClass":"removeClass"](e)};for(var c in h)h.hasOwnProperty(c)&&s(c,a+r,h[c][0],h[c][1]);t&&t.length&&o(t).each(function(e,t){t&&t(a)})};e.pageInfo&&e.pageInfo.position&&/studio|secondaryUi|catalog/.test(e.pageInfo.position)&&o("html").addClass(d.PAGE_END_LESS),e.pageInfo&&"studio"==e.pageInfo.position&&!e.pageInfo.isEnt&&o("html").addClass(d.PAGE_STUDIO_WITHOUT_GIFTBAR);var m=function(l,h,m,_,y,g,w){var v=o(e);v.on("resize",l.debounce(function(){p(r.resizeQueue)},200,!1)),v.trigger("resize"),f.$=o;var A={theme:{init:function(t){var n=o(u.HEADER),i=o(u.HEAD_BACK_LINK),a=o(u.HEAD_LOGO);switch(t.type){case"yue":n.addClass(d.HEADER_YUE),a.attr("href","/yue"),i.attr("href","/yue");break;case"bbs":n.addClass(d.HEADER_BBS),a.attr("href","/bbs"),i.attr("href","/bbs");break;case"shenqu":n.addClass(d.HEADER_GODSONG),a.attr("href","/shenqu"),i.attr("href","/shenqu");break;case"sv":n.addClass(d.HEADER_SV),a.attr("href","/sv"),i.attr("href","/sv")}t.enabledSearch||n.addClass(d.HEADER_WITHOUT_SEARCH),t.fixed&&n.addClass(d.HEADER_FIXED),"bbs"!=t.type&&"yue"!=t.type&&"shenqu"!=t.type&&n.addClass(d.HEADER_WITH_HISTORY),t.current?"index"==t.current?o(u.HEAD_BACK_LINK).addClass(d.HEADER_TAG_CURRENT):"catalog"==t.current&&o(u.NAV_TL).addClass(d.HEADER_TAG_CURRENT):"/yue"==location.pathname?o(u.HEAD_BACK_LINK).addClass(d.HEADER_TAG_CURRENT):"/bbs/portal.php"==location.pathname?o(u.HEAD_BACK_LINK).addClass(d.HEADER_TAG_CURRENT):"/shenqu/"==location.pathname?o(u.HEAD_BACK_LINK).addClass(d.HEADER_TAG_CURRENT):"/sv"==location.pathname&&o(u.HEAD_BACK_LINK).addClass(d.HEADER_TAG_CURRENT);var r=e.pageInfo&&e.pageInfo.position;switch(r){case"studio":case"play":case"secondary":n.addClass(d.HEADER_WITH_BACK)}}},rightbar:{init:function(){o(u.HEAD_RIGHT).html(m(c.HEAD_RIGH,{theme:w}))}},nav:{init:function(){this.render()},render:function(){e.headerInfo&&(e.headerInfo.catalogInfo&&e.headerInfo.catalogInfo.length&&e.headerInfo.catalogInfo.forEach(function(e){e.url&&(e.url=l.convertHttps(e.url)),e.navs.forEach(function(e){e.url=l.convertHttps(e.url)})}),o(u.NAV_DRAG).html(m(c.NAV_DRAG,{catalogs:e.headerInfo.catalogInfo}))),o(u.NAV_AREA).on("mouseenter",function(){o(this).addClass(d.NAV_CURRENT),o(u.NAV_DRAG).addClass(d.DRAG_SHOW)}).on("mouseleave",function(){o(this).removeClass(d.NAV_CURRENT),o(u.NAV_DRAG).removeClass(d.DRAG_SHOW)})}},history:{init:function(){var e=this;e.update(),e.render()},update:function(){var t=this,i={queryWatchHistoryData:[],myWatchHistoryData:[],done:null,hasKnowIsCross:!1,init:function(t){var i=this;if(this.done="function"==typeof t?t:null,"www.yy.com"==e.location.hostname||"yy.duowan.com"==e.location.hostname)i.getLocalData(e);else if(/\.yy\.com$/.test(e.location.hostname)){if(!h.isLoginSync())return this.done&&this.done(!1);if(this.hasKnowIsCross)i.getLocalData(o("#watchHistoryIframeId")[0].contentWindow);else{this.hasKnowIsCross=!0,o("#watchHistoryIframeId").remove();var a=n.createElement("iframe");a.id="watchHistoryIframeId",a.src="//www.yy.com/api/crosspage",a.style.display="none",n.body.appendChild(a),a.onload=function(){i.getLocalData(a.contentWindow)}}}},getLocalData:function(e){try{var t=e.localStorage.yy_watchHistory&&l.JSON.parse(e.localStorage.yy_watchHistory),n="anony",o=[],i=[];if(!t)return this.done&&this.done(!1);h.isLoginSync()&&(n=h.getUidSync()),o=t[n]||[],this.myWatchHistoryData=l.JSON.parse(l.JSON.stringify(o));for(var a=0,r=o.length;a12096e5||!s.roomName.length?this.myWatchHistoryData.splice(a,1):i.push({topCid:s.topCid,subCid:s.subCid})}this.queryWatchHistoryData=i,this.queryData()}catch(c){}},queryData:function(){var e=this.done,t=this.queryWatchHistoryData,n=this.myWatchHistoryData;return t.length?void o.ajax({url:a.MY_WATCH_HISTORY.replace("{$watches}",l.JSON.stringify(t).replace(/{/g,"%7B").replace(/}/g,"%7D")),timeout:5e3,type:"GET",dataType:"jsonp",success:function(t){if(0===+t.code&&t.data&&t.data.length){for(var o=t.data,i=n,a=0,r=o.length;a12096e5||c.topCid===i.topCid&&c.subCid===i.subCid)&&a.splice(r,1)}o=a,o.unshift(i),o.length>30&&(o.length=30);var u=JSON.parse(l.localStorage.getItem(t)||"{}");u[n]=o,l.localStorage.setItem(t,JSON.stringify(u)),T&&T.$frame[0].contentWindow.postMessage(JSON.stringify({type:"set",key:"yy_watchHistory",value:JSON.stringify(u)}),"https://www.yy.com")}}},R};"function"==typeof define&&define.amd?define("wHead",["util","wUser","artTemplate","wHeadSearch","yyloader","wHeadUserInfo","wTheme"],m):m(e.util,e.user,e.template,e.wHeadSearch,e.yyloader,e.wHeadUserInfo,e.wTheme)}),function(){var e,t,n,o,i,a,r,s,c,u,d,l,f=window.jQuery||window.$,h={hasInit:!1,runAfterSourceLoadedFns:[]},p={HEADER_LISTENER:"#wHead"},m={runAfterSourceLoaded:function(e){return window.UDB?e&&e():e&&h.runAfterSourceLoadedFns.push(e)},runAfterSourceLoadedFns:function(){f(h.runAfterSourceLoadedFns).each(function(e,t){"function"==typeof t&&t()})},popShow:function(){"fixed"==e.parent().css("position")&&e.parent().css("height","100%")},popHide:function(){"fixed"==e.parent().css("position")&&e.parent().css("height","")}},_=function(_,y,g){function w(e,t,n){var o=f(e),i=f(t),a=f("#line"),r=f(".login-sidebar");0===+n?(a.animate({left:"0"},100),r.addClass("s"),L.initLoginIframe()):(f("#udbsdk_frm_normal").attr("src",""),O||(f("#register-phone").attr("src",H),O=!0),a.animate({left:"88px"},100),r.removeClass("s")),o.eq(n).addClass("active").siblings().removeClass("active"),i.eq(n).addClass("active").siblings().removeClass("active")}var v=location.protocol.substr(0,location.protocol.length-1),A=window.location.hostname,S="Win32"==navigator.platform||"Windows"==navigator.platform,R=navigator.userAgent.indexOf("Windows NT 5.1")>-1||navigator.userAgent.indexOf("Windows Xp")>-1,E="yy.duowan.com"===window.location.hostname?"1690793979":"2822259651",T={XP_LOAD_SCRIPT:"https://ulink.yy.com/js/beforeLoginSha2Check.js",UDB_SDK:"//res.udb.duowan.com/lgn/js/oauth/udbsdk/pcweb/udb.sdk.pcweb.embed.min.js",UDB_SDK2:"//res.udb.duowan.com/lgn/js/oauth/udbsdk/udb.sdk.getmm.min.js"},I={QQ_SHARE:v+"://"+A+"/3rdLogin/qq-login.html",WB_SHARE:v+"://"+A+"/3rdLogin/weibo-login.html",WX_SHARE:v+"://"+A+"/3rdLogin/weixin-login.html?jump_url="+window.location.href,REG_SRC:v+"://"+A+"/3rdLogin/reg-login.html"},C="yy_"+g.ref+".cpuid_"+g.cpuid+".channel_"+("undefined"!=typeof window.pageInfo&&window.pageInfo.sid||"0"),D={QQ:"https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=101163067&redirect_uri="+encodeURIComponent(I.QQ_SHARE),WB:"https://api.weibo.com/oauth2/authorize?client_id="+E+"&response_type=code&redirect_uri="+encodeURIComponent(I.WB_SHARE),WX:"https://open.weixin.qq.com/connect/qrconnect?appid=wxbc92ea88a894bfe9&redirect_uri="+encodeURIComponent(I.WX_SHARE)+"&response_type=code&scope=snsapi_login&style=white"},b="https://zc.yy.com/reg/udb/reg4udb.do?appid=5719&action=3&type=Email&mode=udb&fromadv="+C+"&busiurl="+encodeURIComponent(I.REG_SRC),H="https://zc.yy.com/reg/udb/reg4udb.do?appid=5719&action=3&type=Mobile&mode=udb&fromadv="+C+"&busiurl="+encodeURIComponent(I.REG_SRC),O=!1,L={isInitLoginIframe:!1,done:void 0,init:function(y){return h.hasInit?m.runAfterSourceLoaded(y):void new _.Promise(function(e){window.UDB?e():f.getScript(T.UDB_SDK,function(){window.UDB.sdk.PCWeb.initialize(),m.runAfterSourceLoadedFns(),e()})}).then(function(e){window.getMC?e():f.getScript(T.UDB_SDK2,function(){e()})}).then(function(e){S&&R?f.getScript(T.XP_LOAD_SCRIPT,e):e()}).then(function(_){t=f("#loginWrap"),n=f("#thirdparty-frame-box"),o=n.find(".close"),i=n.find(".back"),a=f(".account-login-mask"),r=t.find(".close"),s=f("#thirdpartyLoginFrame"),c=f(".thirdparty-register-head"),u=f(".thirdparty-login-head"),d=f(".login-state-register"),l=f(".login-state-login"),e=f("#wHead").parent(),f(".use-email").on("click",function(){f("#register-phone").attr("src",""),f("#register-email").attr("src",b),f("#reg-email").addClass("active"),f("#reg-phone").removeClass("active"),f(".email-title").addClass("active"),f(".phone-title").removeClass("active")}),f(".use-phone").on("click",function(){f("#register-email").attr("src",""),f("#register-phone").attr("src",H),f("#reg-phone").addClass("active"),f("#reg-email").removeClass("active"),f(".phone-title").addClass("active"),f(".email-title").removeClass("active")}),f("#login-btn").on("click",function(){f(p.HEADER_LISTENER).trigger("tpLoginBtnClick"),w(".login-hd .tab-btn",".login-content .tab-unit",0)}),f("#register-btn").on("click",function(){g.isOuterHeader||f(p.HEADER_LISTENER).trigger("loginDragRegTabClick"),w(".login-hd .tab-btn",".login-content .tab-unit",1)}),f(".qqlogin").on("click",function(){L.qqLogin()}),f(".wblogin").on("click",function(){L.wbLogin()}),f(".wxlogin").on("click",function(){L.wxLogin()}),o.on("click",function(){n.removeClass("show"),a.removeClass("show"),m.popHide()}),i.on("click",function(){n.removeClass("show"),a.removeClass("show"),m.popHide(),L.udbLogin()}),r.on("click",function(){t.removeClass("show"),a.removeClass("show"),m.popHide()}),h.hasInit=!0,_()}).then(function(){f(p.HEADER_LISTENER).trigger("tdLoginReady"),"true"==L.getUrlParam("regSuccess")&&f(p.HEADER_LISTENER).trigger("regSuccess")}).start()},sha2UnSupport:function(){new y.POPUP({width:574,title:"暂时阻止YY LIVE登陆",mask:!0,content:'YY LIVE已支持加密安全连接协议来保障你的帐户安全。
由于你目前使用的操作系统版本太低,可能导致帐户的相关数据被窃听,
我们暂时阻止你登录。
建议升级操作系统版本到windows7及以上版本。
',yourClass:"popup-unlogin"})},udbLogin:function(e){return h.hasInit?(this.done=e,w(".login-hd .tab-btn",".login-content .tab-unit",0),c.removeClass("show"),u.addClass("show"),d.removeClass("show"),l.addClass("show"),t.addClass("show"),a.height(f("body").height()),a.addClass("show"),void m.popShow()):(clearTimeout(h.udbloginDelay),void(h.udbloginDelay=setTimeout(function(){L.udbLogin(e)},200)))},udbRegister:function(e){if(!h.hasInit)return clearTimeout(h.udbloginDelay),void(h.udbloginDelay=setTimeout(function(){L.udbRegister(e)},200));if(c.addClass("show"),u.removeClass("show"),d.addClass("show"),l.removeClass("show"),w(".login-hd .tab-btn",".login-content .tab-unit",1),t.addClass("show"),a.height(f("body").height()),a.addClass("show"),m.popShow(),e&&"function"==typeof e)this.done=e;else{var n=function(){g.loginNoRefresh?g.statusChange():window.location.reload()};this.done=n}},qqLogin:function(){f(p.HEADER_LISTENER).trigger("qqLogin"),this.insertIframe(D.QQ)},wbLogin:function(){f(p.HEADER_LISTENER).trigger("wbLogin"),this.insertIframe(D.WB)},wxLogin:function(){f(p.HEADER_LISTENER).trigger("wxLogin"),this.insertIframe(D.WX)},insertIframe:function(e){t.removeClass("show"),s.attr("src",e),n.append(s),0!==e.indexOf("weixin")?n.css("background-color","#333"):n.css("background-color","transparent"),
n.addClass("show")},hideThirdLoginFrame:function(){n.removeClass("show")},getCookie:function(e){if(e){for(var t={},n=document.cookie?document.cookie.split("; "):[],o=/(%[0-9A-Z]{2})+/g,i=0;i'),t.body.appendChild(i)),!a){var r=t.createElement("div");r.innerHTML='',a=r.children[0],a.style.cssText="position: absolute; left: -500px; top: -500px;",t.body.appendChild(a)}o.UA.init();var s={ns:"webperf",channel:"web",platform:o.UA.system,browser:o.UA.browser,time:+new Date,uid:0},c=new o.Promise,u=function(e,t){var n=o.extend({},s);n.key=e,n.value=t,c.then(function(e){i.data.value=o.JSON.stringify(n);try{a.onload=function(){a.onload=null,e()},i.submit()}catch(t){e()}})};for(var d in e)e.hasOwnProperty(d)&&u(d,e[d]);c.start()},d.intervalStat={timerStat:function(e,t){e&&t&&((new Image).src="//statistics.yy.com/statistics/YycomPageLoadTimeStatisticsAction.json?uri="+encodeURIComponent(e)+"&time="+t)}},d.thirdStat={eventInit:function(e){var t=new Date,o=this;n(e).find("*").each(function(e,i){var a,r,s=n(i);if(s.attr("data-ad-id")&&s.attr("data-ad-url")){if(a=s.attr("data-ad-startTime"),r=s.attr("data-ad-endTime"),a&&tr)return;o.send({url:n(i).attr("data-ad-url"),id:n(i).attr("data-ad-id"),pos:n(i).attr("data-ad-position")})}})},send:function(e){e=e||{},e.url&&((new Image).src=e.url),d({eventid:10009953,bak1:e.pos,bak2:e.id})}},e.appHiido={send:function(){a.holdit(c.send,c,a.makeArray(arguments))}};var l=function(){a.holdit(d,e,a.makeArray(arguments))};return n.fn.extend(l,{init:function(){i.runInit=!0,clearTimeout(i.initIntervalKey),r.getCookie("hiido_ui")?a.runHolds():i.initIntervalKey=setTimeout(function(){l.init()},500)},eventInit:function(){a.holdit(d.eventInit,d,a.makeArray(arguments))},collectStat:function(){a.holdit(d.collectStat,d,a.makeArray(arguments))},intervalStat:function(){a.holdit(d.intervalStat,d,a.makeArray(arguments))},thirdStat:{eventInit:function(){a.holdit(d.thirdStat.eventInit,d.thirdStat,a.makeArray(arguments))},send:function(){a.holdit(d.thirdStat.send,d.thirdStat,a.makeArray(arguments))}}}),l};"function"==typeof define&&define.amd?define("statistics",["util"],o):e.statistics=o(e.util)}),function(e,t){"function"==typeof define&&define.amd?define("statisticEvent",[],t):"object"==typeof exports?module.exports=t():e.statisticEvent=t()}(window,function(){var e={HIIDO_INTERNAL:"//hdjs.hiido.com/hiido_internal.js",WEBSDK:"//cdn.hiido.com/sdk/websdk.js"},t="2.2.0",n=window.jQuery||window.$,o=window.hiidoEvent,i={libReady:!1,holds:[],metricsHolds:[]},a={makeArray:function(e){return Array.prototype.slice.call(e)},cookies:{get:function(e){var t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]*)(;|$)"));return null!==t?window.unescape(t[2]):null}},typeFn:function(e){var t,n=Object.prototype.toString;return null===e?t=String(e):(t=n.call(e).toLowerCase(),t=t.substring(8,t.length-1)),t},isPlainObjectFn:function(e){var t,n=this,o=Object.prototype.hasOwnProperty;if(!e||"object"!==n._type(e))return!1;if(e.constructor&&!o.call(e,"constructor")&&!o.call(e.constructor.prototype,"isPrototypeOf"))return!1;for(t in e);return void 0===t||o.call(e,t)},getFromFn:function(e){var t,n,o,i={},a=window.location.search,r="";if(a){a=a.slice(1,a.length),t=a.split("&"),n=t.length;for(var s=0;s1&&(n.push(i),r.Metrics.serviceReport({scode:50208,ver:"1.0.0",uri:n.join("/"),timeSpent:t.cost,code:t.code}))}).bind("requestLoginAuth",function(e,t){var n=["用户登录","获取Auth",i];r.Metrics.serviceReport({scode:50208,ver:"1.0.0",uri:n.join("/"),timeSpent:t.cost,code:t.code})}).bind("requestFollow",function(e,t){var n=["其他","关注操作",i];r.Metrics.serviceReport({scode:50208,ver:"1.0.0",uri:n.join("/"),timeSpent:t.cost,code:t.code})})}),"function"==typeof e.onHeaderReady&&e.onHeaderReady()};"function"==typeof define&&define.amd?(require.nextTick=function(e){e()},require(["util","popup","wTPLogin","statistics","statisticEvent","yyloader","artTemplate","wHead","wUser"],n),define("components/p-header/p-header.js",[],function(){})):n(e.util,e.ShowDialog,e.wTPLogin,e.statistics,e.statisticEvent,e.yyloader,e.template,e.header,e.user)});
;/* footer.js */
!function(e,o){"object"==typeof module&&"object"==typeof module.exports?module.exports=e?o(e):function(){throw new Error("header requires a window with a document")}:o(e)}(window,function(e){var o=(e.header,e.jQuery),n={QR_CODE:"#wFooterQrCode"},r=function(){var r=function(){var e=o(n.QR_CODE),r=e.data("original");r&&(e.attr("src",r),e.data("original",""))};e.onFirstScreenLoaded?e.onFirstScreenLoaded(r):o().ready(r)};"function"==typeof define&&define.amd?(require([],r),define("components/p-footer/p-footer.js",[],function(){})):r()});