define("newsmedia:widget/mod_sidebar/mod_sidebar.js",function(o,e,i){var n=o("newsmedia:widget/ui/iscroll/iscroll.js"),t=function(){function o(){$(function(){e(s)})}function e(o){var e="/passport.baidu.com/?checkuser";$.ajax({url:e,type:"GET",dataType:"jsonp",success:function(e){0==e.bdErrCode&&i(e,o)}})}function i(o,e){var i=o.uName;if(i){var n=c.find(".username");d.text("退出"),/^[\x20-\x7f]+$/.test(i)&&n.text(i).show()}else d.text("登录");e(),c.delegate(".login","click",function(){i&&a(),i||t()})}function t(){var o=window.location.href,e=["/wappass.baidu.com/passport/?login","u="+encodeURIComponent(o),"tpl=xw","uid=","ssid=","bd_page_type=1","pu=","tn="].join("&");setTimeout(function(){location.href=e},100)}function a(){var o="/"+window.location.host+window.location.pathname,e=["/wappass.baidu.com/passport/?logout","u="+encodeURIComponent(o),"tpl=xw","uid=","ssid=","bd_page_type=1","pu=","tn="].join("&");location.href=e}function s(){if("pc"!==r){var o=new n(".mod-sidebar",{scrollbars:!0,fadeScrollbars:!0,click:!0,shrinkScrollbars:"clip",deceleration:.005});window.sidebarScroll=o}}var c=$(".mod-sidebar"),d=c.find(".login"),r=serverData.device;o()};i.exports=t});