',videoTop:S}}else videosLazy[e]=""}loadImagesLazy(),loadVideosLazy(),trackViewables()}function viewablesInit(){if(sections.length>0&&"string"==typeof window.gPageId&&""!==window.gPageId){var e={block:0,banner:0,mpu:0,storympu:0,footer:0,"in-story-recommend":0};window.bBlocked="unknown";for(var t=0;t=0?(0===t&&"number"!=typeof i&&document.getElementById("topad")&§ions[t].previousSibling.offsetTop>0&&(i=sections[t].previousSibling.offsetTop,n=sections[t].previousSibling.offsetHeight),r="banner",s=.5,l=!0):"story_main_mpu"===sections[t].id?(r="storympu",s=.5,l=!0):sections[t].className.indexOf("mpu-container")>=0?(r="mpu",s=.5,l=!0):sections[t].className.indexOf("footer")>=0?r="footer":sections[t].className.indexOf("block")>=0?r="block":sections[t].className.indexOf("in-story-recommend")>=0&&(r="in-story-recommend"),l===!0&&null!==(a=sections[t].querySelector(".banner-iframe"))&&(c=a.getAttribute("data-adch")||"",d=a.getAttribute("data-adPosition")||""),e[r]++,"number"==typeof i?(viewables[t]={id:r+"-"+e[r],top:i,height:n,minimum:s,time:1e3,viewed:o,adch:c,adPosition:d},0===t&&(window.bBlocked="no")):(viewables[t]="",0===t&&(window.bBlocked="yes")),sections[t].setAttribute("data-id",r+"-"+e[r]),"in-story-recommend"===r&&window.gReplacedInstroyWithAd&&viewables[t]&&(viewables[t].id="instoryAd"+textIndex,gInstoryAdHasTrackInview===!1?(viewables[t].viewed=!1,gInstoryAdHasTrackInview=!0):viewables[t].viewed=!0)}}}function stickyBottomPrepare(){var e=document.querySelector(".o-nav__placeholder");void 0===e&&(e=document.body),gNavOffsetY=findTop(e),bodyHeight=getBodyHeight(gNavOffsetY),"object"==typeof recommendInner&&(gRecomendOffsetY=findTop(recommendInner)),document.getElementById("story-action-placeholder")&&(gShareOffsetY=findTop(document.getElementById("story-action-placeholder"))),document.getElementById("audio-placeholder")&&(gAudioOffsetY=findTop(document.getElementById("audio-placeholder")));var t=document.querySelector("#story-body-container, .story-container");t&&(gStoryBodyBottomOffsetY=findTop(t)+t.offsetHeight);var o,a=document.querySelectorAll(".sticky-element").length,i=document.querySelector(".sticky-element");if(i&&(o=i.querySelector(".sticky-element-inner")),1===a&&i&&o){i.style.height="auto",o.style.height="auto",gStickyElementOffsetY=findTop(i);var n=i.offsetHeight,r=o.offsetWidth;n>0&&r>0&&(i.style.height=n+"px",o.style.height=n+"px",o.style.width=r+"px")}var s=document.getElementById("language-switch-placeholder");if(s&&(gLanguageSwitchOffsetY=findTop(s)),w=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,sectionsWithSide&§ionsWithSide.length>0)for(var c=0;cgNavOffsetY?scrollTop+gNavOffsetY>=gLanguageSwitchOffsetY&&(e+=" audio-sticky"):"number"==typeof gShareOffsetY&&gShareOffsetY>gNavOffsetY?scrollTop>=gShareOffsetY?e+=" tool-sticky":scrollTop>=gNavHeight&&(e+=" o-nav-sticky"):scrollTop>=gNavOffsetY&&(e+=" o-nav-sticky"),"number"==typeof gAudioOffsetY&&gAudioOffsetY>gNavOffsetY&&scrollTop+gNavOffsetY>=gAudioOffsetY&&(e+=" audio-sticky"),"number"==typeof gStickyElementOffsetY&&gStickyElementOffsetY>gNavOffsetY&&scrollTop+gNavHeight>=gStickyElementOffsetY&&(e+=" sticky-element-on"),e!==htmlClass&&(htmlClass=e,document.documentElement.className=htmlClass),sectionsWithSideLength>0&&w>hasSideWidth)for(var t=0;t=bodyHeight&&maxHeight[t]-minHeight[t]>=100&&(minHeight[t]+gNavHeight+defaultPaddingsideHeight[t]?o<=0?sectionClassNameNew[t]+=" bottomside":a<=0&&(sectionClassNameNew[t]+=" fixside"+i):mainHeight[t]0)for(var n=0;n0?" is-fix":"",c="banner-container"+c,c!==stickyAds[n].currentClass&&(stickyAds[n].currentClass=c,document.getElementById(stickyAds[n].BannerId).parentNode.parentNode.parentNode.className=c)}gRecomendInViewNoted===!1&&window.recommendLoaded===!0&&"object"==typeof window.recommendInner&&gRecomendOffsetY>0&&scrollTop+bodyHeight>gRecomendOffsetY&&(void 0===window.ftItemId&&(window.ftItemId=""),gRecomendInViewNoted=!0),"object"==typeof inreadAd&&inreadAd.h>0&&inreadAd.t>0&&inreadAd.displayed===!1&&scrollTop+bodyHeight>inreadAd.t+inreadAd.h&&showInreadAd(),loadImagesLazy(),loadVideosLazy(),trackViewables()}function requestTick(){ticking||requestAnimationFrame(stickyBottomUpdate),ticking=!0}function stickyBottom(){scrollTop=window.scrollY||document.documentElement.scrollTop,"function"==typeof requestAnimationFrame?requestTick():stickyBottomUpdate()}function setResizeClass(){htmlClass.indexOf(" resized")<0&&gShowLanguageSwitchOnly===!1&&(htmlClass+=" resized",document.documentElement.className=htmlClass)}function validHTMLCode(){if(!/print|findpassword|search|corp|marketing|event|innotree|webview=ftcapp|newad=yes/.test(window.location.href)){var e=!1;document.querySelectorAll&&("home"===window.gPageId?0===document.querySelectorAll(".item-container").length&&(e=!0):"story"===window.gPageId?0===document.querySelectorAll(".story-body, .subscribe-lock-container").length&&(e=!0):"string"==typeof window.gPageId&&0===document.querySelectorAll(".item-container").length&&(e=!0),e===!0&&ga("send","event","CatchError","Page Validation Fail","Some Page",{nonInteraction:1}))}}function checkLanguageSwitch(){var e,t=document.referrer||"",o=window.location.hostname||"",a=""!==t&&""!==o&&t.indexOf(o)>=0;e=!!document.querySelector(".language-switch-inner"),(a||isTouchDevice())&&e?(document.documentElement.className+=" show-language-switch-only audio-sticky",gShowLanguageSwitchOnly=!0):gShowLanguageSwitchOnly=!1}function isHidden(e){return null===e.offsetParent}function openLink(e){try{webkit.messageHandlers.link.postMessage(e)}catch(t){document.location=e}}function trackInternalPromos(){setTimeout(function(){for(var e=document.querySelectorAll(".n-internal-promo"),t=0;t0&&scrollTop>=e/2&&trackRead("Read To Half","metric4")}}function changeFontSize(){fontOptionsEle=document.getElementById("font-options"),fontOptionsEle.onclick=function(e){var t,o=e.target.className||"",a=document.querySelector(".story-container").className;o.indexOf("selected")<0&&(t=fontOptionsEle.querySelector(".selected")?fontOptionsEle.querySelector(".selected").className||"":"",t=t.replace(/ selected/g,""),fontOptionsEle.querySelector(".selected")&&(fontOptionsEle.querySelector(".selected").className=t),e.target.className=o+" selected",SetCookie("fs",o,"","/"),a=a.replace(/ (normal|bigger|biggest|smaller|smallest)/g,""),document.querySelector(".story-container").className=a+" "+o,stickyBottomPrepare(),stickyAdsPrepare(),setResizeClass())}}function checkFontSize(e){if(fs=e||GetCookie("fs"),SetCookie(fs),"string"==typeof fs&&null!==fs&&""!==fs&&document.getElementById("font-options")&&document.querySelector(".story-container")){document.getElementById("font-options").querySelector("."+fs.replace(/ /g,".")).className=fs+" selected";for(var t=["smallest","smaller","normal","bigger","biggest"],o=document.querySelector(".story-container").className,a=0;a0){for(var t="",o="",a=0,i=e.length;a0&&(message.head={},message.head.transactiontype="10002",message.head.source="web",message.body={},message.body.ielement={},message.body.ielement.storyid=t,message.body.ielement.withpic=1,ftc_api.method=ajaxMethod,ftc_api.server_url=ajaxUrl,ftc_api.call(message,getThirdPartRecommendSuccess,getThirdPartRecommendFailed))}}function getThirdPartRecommendSuccess(e){e=JSON.parse(e),"0"===e.body.oelement.errorcode&&e.body.odatalist&&e.body.odatalist.length>0&&(recommendData=e.body.odatalist,recommendPayLoad(recommendData,adData))}function getThirdPartRecommendFailed(){console.log("getThirdPartRecommendFaild")}function recommendPayLoad(e,t){if(window.suppressRecommendation!==!0){for(var o,a,i,n,r,s,c,d=0,l="",m="",u="Click"+recommendVersion,g=0,f=0,h=0;h0&&(p='
'),o=e[h].cheadline,a=e[h].piclink,i=e[h].storyid,n=e[h].t,e[h].lead||e[h].clongleadbody||e[h].cshortleadbody||"",r=e[h].tag||"为您推荐",r=r.replace(/[,,].*$/g,""),void 0!==n&&null!==n||(n=""),s="/story/"+i+"?tcode=smartrecommend&ulu-rcmd="+thirdPartData[i],d<8)if(0===g&&1===t.isAd&&h===uluAdPosition){console.log("b"),console.log("uluAdPosition:"+uluAdPosition);var v,w,b,S;v=t.title,w=t.pic,b=t.url,S=p+'',w&&""!==w&&(console.log("c"),m+=S,d++,gThereIsUluAd=1),g=1,h--,f++}else if(e[h]&&a&&""!==a){if(showRecommendTop&&h<=3){var k="https://www.ft.com/__origami/service/image/v2/images/raw/"+encodeURIComponent(a)+"?source=ftchinese&width=74&height=42";c='
  • ',l+=c}else c=p+'',m+=c,f++;d+=1}}showRecommendTop&&(recommendTop.innerHTML=l),recommendBottom&&(recommendBottom.innerHTML=m),bindFeedbackEvent(),document.getElementById("story-recommend-container").style.display="block",loadImages();try{stickyBottomPrepare()}catch(e){}recommendLoaded=!0}}function bindFeedbackEvent(){var e=new Delegate(document.getElementById("story-recommend"));"-002"===recommendVersion&&e.on("click","a",function(e,t){try{var o=t.getAttribute("href"),a=o.replace(/^\/story\/([0-9]+)\?.*$/g,"$1"),i=o.replace(/^.*ulu-rcmd=([^&]+).*$/g,"$1");ftc_api.jsonp(thirdPartFeedbackUrl+"&recId="+a+"&cki="+userId+"¶meter="+i)}catch(e){}})}function getRandomInt(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e}function getDeviceSpecie(){var e=navigator.userAgent||navigator.vendor||"",t="PC";return/iPad/i.test(e)?t="iPad":/OS [0-9]+\_/i.test(e)&&(/iPhone/i.test(e)||/iPod/i.test(e))?t="iPhone":/Android|micromessenger/i.test(e)&&(t="android"),t}function Toggler(e){function t(){i.isOpen=!i.isOpen,i.isOpen?(i.button.setAttribute("aria-expanded","true"),i.target.setAttribute("aria-hidden","false")):(i.button.setAttribute("aria-expanded","false"),i.target.setAttribute("aria-hidden","true"))}function o(e){i.isOpen&&27===e.keyCode&&t()}function a(o){i.isOpen&&!e.contains(o.target)&&t()}var i=this,n="[data-o-toggler-button]",r="[data-o-toggler-target]";!function(){e||(e=document.body);var s=e.querySelector(n),c=e.querySelector(r);s&&(i.rootEl=e,i.button=s,i.target=c,i.isOpen=!1,i.button.addEventListener("click",t),document.body.addEventListener("click",a),document.body.addEventListener("keydown",o))}()}function Nav(e){var t={navClassName:"o-nav"},o=this;!function(){e||(e=document.body);var t=new Delegate(e);o.delegate=t,o.rootEl=e}(),function(){var e=o.rootEl.querySelector("[data-o-nav-togglable]"),a=t.navClassName+"--open";e&&e.addEventListener("click",function(){document.documentElement.classList.toggle(a),document.body.classList.toggle(a)})}(),function(){o.delegate.on("click","[data-o-nav-togglable]",function(e,t){var o=t.getAttribute("aria-pressed");"true"===o?t.setAttribute("aria-pressed","false"):"false"!==o&&o||t.setAttribute("aria-pressed","true")})}(),function(){var e=o.rootEl.querySelectorAll(".nav-section-head.mobile");o.delegate.on("click",".nav-section-head.mobile",function(t,o){for(var a=0;a0)for(var i=0,n=a.length;i-1)for(var u=m.getAttribute("data-section"),g=m.getElementsByTagName("ol"),f=0;f=0&&(n=decodeURIComponent(n),o[a].setAttribute("data-tag",n)),"object"==typeof t[i]&&(t[i].indexOf(n)>=0?(o[a].innerHTML="已关注",o[a].className=o[a].className.replace(/ plus/g," tick")):(o[a].innerHTML="关注",o[a].className=o[a].className.replace(/ tick/g," plus")))}}Delegate.prototype.root=function(e){var t,o=this.listenerMap;if(this.rootElement){for(t in o[1])o[1].hasOwnProperty(t)&&this.rootElement.removeEventListener(t,this.handle,!0);for(t in o[0])o[0].hasOwnProperty(t)&&this.rootElement.removeEventListener(t,this.handle,!1)}if(!e||!e.addEventListener)return this.rootElement&&delete this.rootElement,this;this.rootElement=e;for(t in o[1])o[1].hasOwnProperty(t)&&this.rootElement.addEventListener(t,this.handle,!0);for(t in o[0])o[0].hasOwnProperty(t)&&this.rootElement.addEventListener(t,this.handle,!1);return this},Delegate.prototype.captureForType=function(e){return["blur","error","focus","load","resize","scroll"].indexOf(e)!==-1},Delegate.prototype.on=function(e,t,o,a){var i,n,r,s;if(!e)throw new TypeError("Invalid event type: "+e);if("function"==typeof t&&(a=o,o=t,t=null),void 0===a&&(a=this.captureForType(e)),"function"!=typeof o)throw new TypeError("Handler must be a type of Function");return i=this.rootElement,n=this.listenerMap[a?1:0],n[e]||(i&&i.addEventListener(e,this.handle,a),n[e]=[]),t?/^[a-z]+$/i.test(t)?(s=t,r=matchesTag):/^#[a-z0-9\-_]+$/i.test(t)?(s=t.slice(1),r=matchesId):(s=t,r=matches):(s=null,r=matchesRoot.bind(this)),n[e].push({selector:t,handler:o,matcher:r,matcherParam:s}),this},Delegate.prototype.off=function(e,t,o,a){var i,n,r,s,c;if("function"==typeof t&&(a=o,o=t,t=null),void 0===a)return this.off(e,t,o,!0),this.off(e,t,o,!1),this;if(r=this.listenerMap[a?1:0],!e){for(c in r)r.hasOwnProperty(c)&&this.off(c,t,o);return this}if(!(s=r[e])||!s.length)return this;for(i=s.length-1;i>=0;i--)n=s[i],t&&t!==n.selector||o&&o!==n.handler||s.splice(i,1);return s.length||(delete r[e],this.rootElement&&this.rootElement.removeEventListener(e,this.handle,a)),this},Delegate.prototype.handle=function(e){var t,o,a,i,n,r,s=e.type,c=[];if(e.ftLabsDelegateIgnore!==!0){switch(r=e.target,3===r.nodeType&&(r=r.parentNode),a=this.rootElement,e.eventPhase||(e.target!==e.currentTarget?3:2)){case 1:c=this.listenerMap[1][s];break;case 2:this.listenerMap[0]&&this.listenerMap[0][s]&&(c=c.concat(this.listenerMap[0][s])),this.listenerMap[1]&&this.listenerMap[1][s]&&(c=c.concat(this.listenerMap[1][s]));break;case 3:c=this.listenerMap[0][s]}for(o=c.length;r&&o;){for(t=0;t1,scrollTop=window.scrollY||document.documentElement.scrollTop,ticking=!1,hostForVideo="",currentFavButton,figures=document.querySelectorAll("figure.loading"),figuresLazy=[],figuresLoadStatus=0,videos=document.querySelectorAll("figure.loading-video"),videosLazy=[],videosLoadStatus=0,viewables=[],gShowLanguageSwitchOnly;try{delegate=new Delegate(document.body)}catch(e){}try{validHTMLCode()}catch(e){}0===(gNavOffsetY=findTop(document.querySelector(".o-nav__placeholder")))&&(gNavOffsetY=findTop(document.querySelector(".site-map")));var addEvent=window.attachEvent||window.addEventListener,eventResize=window.attachEvent?"onresize":"resize",eventScroll=window.attachEvent?"onscroll":"scroll";if(checkLanguageSwitch(),(gNavOffsetY>30&&w>490||document.getElementById("audio-placeholder"))&&gShowLanguageSwitchOnly===!1)try{stickyBottomPrepare(),stickyAdsPrepare(),addEvent(eventScroll,function(){stickyBottom(),trackViewables()}),addEvent(eventResize,function(){stickyBottomPrepare(),stickyAdsPrepare(),setResizeClass(),loadImages()}),setInterval(function(){stickyBottomPrepare(),stickyAdsPrepare()},1e4)}catch(e){}else stickyBottomPrepare(),bodyHeight=getBodyHeight(),addEvent(eventResize,function(){bodyHeight=getBodyHeight(),loadImages(),setResizeClass()}),addEvent(eventScroll,function(){scrollTop=window.scrollY||document.documentElement.scrollTop,loadImagesLazy(),loadVideosLazy(),trackViewables()});"undefined"==typeof SVGRect&&(document.documentElement.className+=" no-svg"),loadImages(),viewablesInit();try{delegate.on("error","img",function(){if(""!==this.getAttribute("src")){var e=this.getAttribute("data-backupimage")||"";""!==e?(this.setAttribute("data-backupimage",""),this.src=e):(this.setAttribute("data-hide-image-reason","failed to load"),this.style.display="none")}})}catch(e){}try{delegate.on("click",".video-package .XL2 a.image",function(){var e=hostForVideo+this.getAttribute("href"),t=this.parentNode.parentNode.parentNode,o=t.querySelector("#video-package-play"),a=o.offsetWidth,i=o.offsetHeight,n=this.parentNode.parentNode,r=n.querySelector(".item-headline a").innerHTML,s=this.parentNode.parentNode.parentNode.querySelectorAll(".video-package .XL2");e=e.replace(/#.*$/g,"");for(var c=0;c=0&&(d=d.replace(" on",""),s[c].className=d)}return this.parentNode.parentNode.className+=" on",o.querySelector("iframe").src=e+"?i=2&k=1&w="+a+"&h="+i+"&autostart=true",t.querySelector(".video-package-title a").innerHTML=r,t.querySelector(".video-package-title a").href=e,!1}),delegate.on("click","a, .track-click",function(){var e=this.getAttribute("data-ec")||"",t=this.getAttribute("data-ea")||"",o=this.getAttribute("data-el")||"";if(""!==e&&""!==t&&(this.className.indexOf("track-click")>=0&&ga("send","event",e,t,o),"uluAd"===o)){var a=new Image,i=0,n="Success",r="Fail",s=function(){i>0&&(n="Success"+i,r="Fail"+i),a.onload=function(){},a.onerror=function(){++i<=5&&s()},a.src="http://e.cn.miaozhen.com/r/k=2049651&p=76w3I&dx=__IPDX__&rt=2&ns=__IP__&ni=__IESID__&v=__LOC__&xa=__ADPLATFORM__&tr=__REQUESTID__&mo=__OS__&m0=__OPENUDID__&m0a=__DUID__&m1=__ANDROIDID1__&m1a=__ANDROIDID__&m2=__IMEI__&m4=__AAID__&m5=__IDFA__&m6=__MAC1__&m6a=__MAC__&o="};s()}}),delegate.on("click",".overlay",function(e){"cell"===e.target.className&&closeOverlay()})}catch(e){}delegate.on("click",".overlay-close, .overlay-bg",function(){var e=this.getAttribute("data-parentid");closeOverlay(e)}),delegate.on("click",".current-edition span",function(){var e=this.parentNode.parentNode.className;e.indexOf(" on")>0?e=e.replace(/ on/g,""):e+=" on",this.parentNode.parentNode.className=e}),delegate.on("click",".icon-save button",function(){if(""===username||null===username)return void alert("您必须登录后能才能收藏文章!");var e,t=this.id.replace(/addfavlink/g,"");if("收藏"===this.innerHTML)e="add";else{if("删除"!==this.innerHTML)return;e="remove"}currentFavButton=document.getElementById("addfavlink"+t)||document.getElementById("addfavlink"),currentFavButton.innerHTML="add"===e?"保存...":"删除...";var o=new XMLHttpRequest;o.open("POST","/users/"+e+"favstory/"+t),o.setRequestHeader("Content-Type","application/text"),o.onload=function(){if(200===o.status){var t=o.responseText;"ok"!==t&&""!==t||(currentFavButton.innerHTML="add"===e?"删除":"收藏")}else o.status},o.send(JSON.stringify({storyid:t}))}),delegate.on("click",".close-img",function(){var e=document.querySelector(".warn-content");e&&(e.style.display="none",SetCookie("DSW","1","","/",null))}),trackInternalPromos();var deleteWarn=GetCookie("DSW")||"",warnContent=document.querySelector(".warn-content");warnContent&&(warnContent.style.display=deleteWarn?"none":"block");try{if("VIP"===window.gUserType||"Subscriber"===window.gUserType)for(var fullScreenContainers=document.querySelectorAll(".o-ads.fullscreen-pc, .o-ads.fullscreen-ad"),i=0;i'+itemLeads[i].innerHTML+"")}}}void 0===window.privilegeEventLabel||"Subscriber"!==window.gUserType&&"VIP"!==window.gUserType||(window.privilegeEventCategory=window.privilegeEventCategory||"Web Privileges",ga("send","event",window.privilegeEventCategory,"Read",window.privilegeEventLabel,{nonInteraction:1})) ;var fontOptionsEle,fs,ajaxMethod,ajaxUrl,message={},recommendLoaded=!1,recommendTop=document.getElementById("story-recommend-top"),recommendTopPart=document.getElementById("recommend-top-part"),showRecommendTop=recommendTopPart&&recommendTopPart.offsetHeight>0&&recommendTop,recommendBottom=document.getElementById("story-recommend-bottom"),recommendVersion,uluAdPosition=getRandomInt(1,5),thirdPartAPIUrl="//tj.qipus.cn/rcmd/getRtCmd?siteId=5002&num=12&itemId="+ftItemId+"&position="+uluAdPosition,thirdPartFeedbackUrl="//tj.qipus.cn/rcmd/rec/click?siteId=5002&itemId="+ftItemId+"&position="+uluAdPosition,thirdPartData=[],userId,recommendData=[],adData={};recommendVersion="-002",/127\.0|localhost|192\.168/.test(window.location.href)?(ajaxMethod="GET",ajaxUrl="/api/page/recommend.json"):(ajaxMethod="POST",ajaxUrl="/eaclient/apijson.php");var ftc_api={server_url:"",method:"POST",call:function(e,t,o){var a=new XMLHttpRequest;try{if(""===this.server_url)throw"The server address is empty!";a.open(this.method,encodeURI(this.server_url),!0),a.setRequestHeader("Content-Type","application/json"),a.onreadystatechange=function(){4===a.readyState&&(200===a.status?"function"==typeof t&&t(a.responseText):"function"==typeof o&&o(a.status))},a.send(JSON.stringify(e))}catch(e){}},jsonp:function(e){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=e;var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(t,o)}},userIdForYoulu=GetCookie("USER_ID")||GetCookie("uniqueVisitorId");null===userIdForYoulu&&(userIdForYoulu=guid(),SetCookie("uniqueVisitorId",userIdForYoulu,"","/")),ftc_api.jsonp(thirdPartAPIUrl+"&callback=getRec&cki="+userId+"&v="+(new Date).getTime());try{checkFontSize(),changeFontSize()}catch(e){}var subscribeNow=document.getElementById("subscribe-now"),openApp=document.getElementById("open-app");try{if(subscribeNow){var hrefLink="/index.php/ft/subscription?el="+window.gSubscriptionEventLabel,discountCode=paravalue(window.location.href,"from");""!==discountCode&&(hrefLink+="&from="+discountCode),subscribeNow.href=hrefLink,subscribeNow.onclick=function(){ga("ec:addPromo",{id:window.gSubscriptionEventLabel,name:window.gSubscriptionEventLabel,creative:location.href,position:"become a member"}),ga("ec:setAction","promo_click"),ga("send","event","Web Privileges","Tap",window.gSubscriptionEventLabel)},updateClientIdLinks()}}catch(e){}var deviceSpecie=getDeviceSpecie();try{if(openApp){var pathname=window.location.pathname,paraArr=pathname.split("/"),storyId=paraArr[paraArr.length-1];"iPad"===deviceSpecie||"iPhone"===deviceSpecie?(openApp.innerHTML="App内打开",openApp.href=storyId?"/startapp.html?id="+storyId:"/startapp.html"):(openApp.innerHTML="下载应用►",openApp.href="http://a.app.qq.com/o/simple.jsp?pkgname=com.ft")}}catch(e){}document.addEventListener("copy",function(e){var t=window.getSelection().toString(),o=t.length,a="请使用文章顶部或底部的共享按钮来进行共享文章的链接。未经允许复制文章内容分享给他人是违反苹果彩娱乐 诚信服务彩民条款和条件以及版权政策的行为。发送电子邮件至licensing@ftchinese.com以购买其他权利。有关更多信息,请访问/m/corp/copyright.html。\r\n\r\n"+location.href+"\r\n\r\n",i=Math.min(100*Math.floor(o/100),1e3);ga("set","metric2",o),ga("send","event","Copy Story",ftItemId,i,{nonInteraction:1}),o>=200&&(e.clipboardData.setData("text/plain",a+t),e.preventDefault())});for(var languageSwitches=document.querySelectorAll(".language-switch"),i=0;i=200&&o.status<300||304===o.status?t(null,o.responseText):t(o.status))},o.open("GET",e),o.send(null)}};new Nav(navEl);var searchEl=navEl.querySelector(".o-nav__search");new Toggler(searchEl);var emptyNavSections=getEmptyNavSections(navEl),ajaxNavUrl="/m/corp/ajax-nav.html";"localhost"!==window.location.hostname&&0!==window.location.hostname.indexOf("192.168")&&0!==window.location.hostname.indexOf("10.113")&&0!==window.location.hostname.indexOf("127.0")||(ajaxNavUrl="./api/page/ajax-nav.html"),ajax.getData(ajaxNavUrl,function(e,t){if(e)return e;zipObject(emptyNavSections,stringToDOM(t))})}try{var key="my-ft-follow";delegate.on("click",".myft-follow",function(){var e=!(this.className.indexOf(" plus")>0);if(!localStorage)return void alert("亲爱的读者,您的浏览器不支持localStorage,请您更换现代浏览器来使用关注的功能。");var t=localStorage.getItem(key),o=JSON.parse(t)||{},a=this.getAttribute("data-tag")||"",i=this.getAttribute("data-type")||"tag";if(""===a)return void alert("亲爱的读者,我们无法识别您关注的标签,请您刷新页面重新试试。");if("object"!=typeof o[i]&&(o[i]=[]),e===!1)o[i].indexOf(a)<0&&o[i].push(a);else{for(var n=[],r=0;r=1?updateUnlockClass():(isPremium=t.premium>=1,!isPremium&&isEditorChoiceChannel()?updateUnlockClass():updateLockClass()),window.htmlClass=document.documentElement.className,window.htmlClass=window.htmlClass.replace(/\ is\-subscriber/g,"").replace(/\ is\-premium/g,"").replace(/\ is\-standard/g,"");var a="noneSubscriber";0===t.paywall&&(1===t.premium?(window.htmlClass+=" is-subscriber is-premium",a="premium"):(window.htmlClass+=" is-subscriber is-standard",a="standard"));var o="";t.expire&&(o=t.expire);var s=t.campaign_code||"",l=t.latest_duration||"",r="WebSite",c="",d=navigator.userAgent||navigator.vendor||"";if(window.location.href.indexOf("webview=ftcapp")>=0)if(/iphone|ipod|ipad/i.test(d)){r="iOSApp";try{c=paravalue(window.location.href,"pendingRenewal")}catch(e){}}else r="AndroidApp";var u=new XMLHttpRequest;u.open("get","/m/corp/partial.html?include=promoboxone&type="+a+"&expire="+o+"&ccode="+s+"&duration="+l+"&platform="+r+"&pendingRenewal="+c),u.setRequestHeader("Content-Type","application/text"),u.onload=function(){if(200===u.status){var e=u.responseText;if(""!==e){var n=document.getElementById("promo-box-container");n.innerHTML=e,startCountdown(n,o),sendTracking(n)}}},u.send(null),document.documentElement.className=window.htmlClass}else isReqSuccess=!1,i++,setTimeout(function(){payWall()},500),console.log("fail to request:"+i)},e.send(null)}}function startCountdown(e,n){if(n>0){var t=e.querySelector(".countdown-hour"),a=e.querySelector(".countdown-minute"),o=e.querySelector(".countdown-second");t&&a&&o&&setInterval(function(){var e=Math.round((new Date).getTime()/1e3),i=n-e,s=Math.floor(i/3600);s=s>999?999:s,s=("0"+s).slice(-2);var l=Math.floor(i/60)%60;l=("0"+l).slice(-2);var r=i%60;r=("0"+r).slice(-2),t.innerHTML=s,a.innerHTML=l,o.innerHTML=r},1e3)}}function sendTracking(e){var n=e.querySelector(".subscription-promo-box");if(n){var t=n.getAttribute("data-promo-id");t&&""!==t&&ga("send","event","PromoBox","Display",t,{nonInteraction:1})}}function isEditorChoiceChannel(){return location.search.substring(1).indexOf("issue=EditorChoice")>=0}function getPayStory(e){for(var n=document.querySelectorAll(".item-headline"),t=[],a=0;a0)for(var n=0;n0)for(var n=0;n=0;)t=t.replace(" "+n+" "," ");e.className=t.replace(/^\s+|\s+$/g,"")}}function showPaywallHint(){if(document.getElementById("paywall-hint-container")){var e=document.getElementById("paywall-overlay-shadow"),n=document.getElementById("paywall-hint-container");e.onclick=function(){n.style.display="none"}}}function openHint(){var e=location.search.substring(1),n=location.href;if(e.indexOf("issue=EditorChoice")>=0||n.indexOf("speedread")>=0){var t=document.getElementById("paywall-hint-container"),a=document.querySelectorAll('[data-hint="dataHint"]');if(a.length>0)for(var o=0,i=a.length;o