Professional Documents
Culture Documents
Combo 22
Combo 22
features,r
=function(){};r.prototype={isTrendingWithLRECEnabled:function(){return n.enabled
("trendingWithLREC")},isShotClockEnabled:function(){return n.enabled("trendingWi
thShotClock")},isTrendingGiftsAPIExpired:function(){var e=NeoConfig.serverTime,n
=t.settings.value("trendingGiftsCutOffTime");return e>n},shouldShowTrendingGifts
Feed:function(){return n.enabled("trendingGifts")&&this.isTrendingGiftsAPIExpire
d()===!1},shouldShowTrendingNowFeed:function(){return this.shouldShowTrendingGif
tsFeed()?!1:n.enabled("trendingNow")},shouldShowTrendingRevenueFeed:function(){r
eturn this.shouldShowTrendingGiftsFeed()||this.shouldShowTrendingNowFeed()?!1:n.
enabled("trendingRevenue")},isTrendingTwoColEnabled:function(){return n.enabled(
"trendingTwoColLayout")},isTrendingBelowLRECEnabled:function(){return n.enabled(
"trendingBelowLREC")},isTrendingYahooLogoEnabled:function(){return n.enabled("tr
endingWithYahooLogo")}},e.namespace("mail.ui"),e.mail.ui.trendingUtils=new r},"1
.0.0",{requires:["mail-common-utils-settings","mail-common-utils-features","comm
on-utils"]});
YUI.add("minty_module_trending_gifts",function(e){e.namespace("ui.Templates"),e.
ui.Templates.minty_module_trending_gifts={base:'<div id="trending-gifts" class="
mb-right-rail right-rail-ad"> {{showShotClock}} <h2 class="right-rail-ad-header
fresh-toolbar"> <span class="icon icon-trendingItem icon-backtoschool"></span> <
span class="right-rail-sponsored-text" id="tn-description">{{description}}</span
> </h2> <ul class="right-rail-ad-list tn-list"> {{gift}} <div class="trending-ya
hoo-logo hidden"> <span class="yahoo-powered-by">Powered By</span> <span class="
yahoo-search">Search</span> </div> </ul></div>',shotClockItems:'<span class="sho
t-clock-num" id={{valueId}}>{{shotClockValue}}</span><span class="source shot-cl
ock-unit">{{shotClockUnit}}</span> ',showShotClock:'<div id="showShotClock" clas
s="right-rail-ad-header shot-clock"> <div class="source shot-clock-desc"> {{shot
ClockDescription}} </div> <div class="shot-clock-count"> {{shotClockItems}} </di
v> </div> ',gift:'<li class="tn-list-item"> <a class="adlink unread right-rail-b
lock-link tn-gifts" href="{{searchLink}}" target="_blank" title="{{searchTerm}}"
> <div class="headline"> <div class="tn-posSpace "> <span class="source pos-numb
er">{{position}}</span> </div> <div class="icon-text tn-textSpace">{{searchTerm}
}</div> </div> </a> </li> '}},"1.0.0");
/*
YUI 3.16.0 (build 3.16.0-ym17)
Copyright 2015 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("array-extras",function(e,t){var n=e.Array,r=e.Lang,i=Array.prototype;n.
lastIndexOf=r._isNative(i.lastIndexOf)?function(e,t,n){return n||n===0?e.lastInd
exOf(t,n):e.lastIndexOf(t)}:function(e,t,n){var r=e.length,i=r-1;if(n||n===0)i=M
ath.min(n<0?r+n:n,r);if(i>-1&&r>0)for(;i>-1;--i)if(i in e&&e[i]===t)return i;ret
urn-1},n.unique=function(e,t){var n=0,r=e.length,i=[],s,o,u,a;e:for(;n<r;n++){a=
e[n];for(s=0,u=i.length;s<u;s++){o=i[s];if(t){if(t.call(e,a,o,n,e))continue e}el
se if(a===o)continue e}i.push(a)}return i},n.filter=r._isNative(i.filter)?functi
on(e,t,n){return i.filter.call(e,t,n)}:function(e,t,n){var r=0,i=e.length,s=[],o
;for(;r<i;++r)r in e&&(o=e[r],t.call(n,o,r,e)&&s.push(o));return s},n.reject=fun
ction(e,t,r){return n.filter(e,function(e,n,i){return!t.call(r,e,n,i)})},n.every
=r._isNative(i.every)?function(e,t,n){return i.every.call(e,t,n)}:function(e,t,n
){for(var r=0,i=e.length;r<i;++r)if(r in e&&!t.call(n,e[r],r,e))return!1;return!
0},n.map=r._isNative(i.map)?function(e,t,n){return i.map.call(e,t,n)}:function(e
,t,n){var r=0,s=e.length,o=i.concat.call(e);for(;r<s;++r)r in e&&(o[r]=t.call(n,
e[r],r,e));return o},n.reduce=r._isNative(i.reduce)?function(e,t,n,r){return i.r
educe.call(e,function(e,t,i,s){return n.call(r,e,t,i,s)},t)}:function(e,t,n,r){v
ar i=0,s=e.length,o=t;for(;i<s;++i)i in e&&(o=n.call(r,o,e[i],i,e));return o},n.
find=function(e,t,n){for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r,e
))return e[r];return null},n.grep=function(e,t){return n.filter(e,function(e,n){
return t.test(e)})},n.partition=function(e,t,r){var i={matches:[],rejects:[]};re
turn n.each(e,function(n,s){var u=t.call(r,n,s,e)?i.matches:i.rejects;u.push(n)}
alue();if(!y&&!b&&!w&&!E){var t=e.one("#trending-gifts");t&&(y=t.one("#"+l),b=t.
one("#"+c),w=t.one("#"+h),E=t.one("#"+p))}o>=0||u>=0||a>=0||f>=0?(y.set("text",g
._formatData(o)),b.set("text",g._formatData(u)),w.set("text",g._formatData(a)),E
.set("text",g._formatData(f))):g._stopCountDown()}catch(n){typeof globals!="unde
fined"&&globals.report?globals.report("caughterror:..-build-mail-ui-trending-tre
ndingView:1",n,"TRY_CATCH",1,1,1):window.console&&console.log&&console.log("caug
hterror:..-build-mail-ui-trending-trendingView:1"),g._stopCountDown()}},_stopCou
ntDown:function(){i&&(clearInterval(i),y=b=w=E=null)},_calCountDownValue:functio
n(){var e=new Date,t=e.getTime(),n=s.getTime(),r=n-t;r/=1e3,f=Math.floor(r%60),r
/=60,a=Math.floor(r%60),r/=60,u=Math.floor(r%24),o=Math.floor(r/24)},handleClick
:function(e){var t=e.currentTarget;t.removeClass("unread")},handleOnHover:functi
on(e){var t=e.currentTarget,n,r;n=t.one(".icon-trendingItem"),r=t.one(".pos-numb
er"),n&&r&&(r.addClass("hidden"),n.removeClass("hidden"))},handleAfterHover:func
tion(e){var t=e.currentTarget,n,r;return e.preventDefault(),n=t.one(".icon-trend
ingItem"),r=t.one(".pos-number"),n&&(n.addClass("hidden"),r.removeClass("hidden"
)),!1}},e.namespace("mail.ui"),e.mail.ui.trendingView=r},"1.0.0",{requires:["min
ty_module_trending_gifts","mail-ui-trending-utils","event-base","mail-common-uti
ls-settings","array-extras","common-utils"]});
YUI.add("mail-ui-trending-model",function(e){var t=e.common.net.SessionMgr,n=e.c
ommon.Utils,r=function(){};r.prototype={previousData:null,execute:function(r){va
r i=n.settings.value("trendingNowEndpoint"),s=this;t.requestProxy(i,{on:{success
:function(t,n){var i,o=!1;switch(n&&n.status){case 200:try{i=e.JSON.parse(n.resp
onseText),s.previousData!==n.responseText&&(o=!0),s.previousData=n.responseText}
catch(u){typeof globals!="undefined"&&globals.report?globals.report("caughterror
:..-build-mail-ui-trending-trendingModel:1",u,"TRY_CATCH",1,1,1):window.console&
&console.log&&console.log("caughterror:..-build-mail-ui-trending-trendingModel:1
")}break;case-1:break;default:}r(i,o)},failure:function(){r(!1)}},method:"GET",t
imeout:1e3,service:"tn"})}},e.namespace("mail.ui"),e.mail.ui.trendingModel=r},"1
.0.0",{requires:["event-base","common-net-sessionmgr","json-parse","common-utils
"]});
YUI.add("mail-ui-trending-controller",function(e){var t=new e.mail.ui.trendingMo
del,n=e.mail.ui.trendingUtils,r="#theAd",i=function(){};i.prototype={init:functi
on(t){var i;if(!n.shouldShowTrendingNowFeed()&&!n.shouldShowTrendingRevenueFeed(
)&&!n.shouldShowTrendingGiftsFeed())return;i=e.one(r),this.darlaAPI=t,this.initV
iew(),n.isTrendingWithLRECEnabled()&&this.darlaAPI.adPosition==="LREC"&&this.exe
cute(),e.on(["darla:blankAdLoaded:trending","showTrendingModule"],function(e,t){
var r;t&&e&&(this.darlaAPI.adPosition=t.rightRailAdPos),n.isTrendingWithLRECEnab
led()&&this.darlaAPI.adPosition==="LREC"?(r=i.one("#trending-gifts"),this.execut
e(!0),r&&(i.one("#slot_LREC").addClass("hidden"),r.one("h2").removeClass("tn-des
c"),n.isTrendingBelowLRECEnabled()&&r.removeClass("trendingBelow"))):this.execut
e(!1)},this)},initView:function(){var t=e.one(r),i,s,o,u;this.view=new e.mail.ui
.trendingView(this.darlaAPI,t),e.on(["adReturned:SKY","adReturned:MON","sidekick
:render"],this.view.clean,this.view),n.isTrendingWithLRECEnabled()?u=function(){
t&&(i=t.one("#slot_LREC"),s=t.one("#showShotClock"),o=t.one("#trending-gifts")),
this.darlaAPI.adPosition="LREC",this.execute(),s&&s.get("parentNode").removeChil
d(s),o&&(n.isTrendingTwoColEnabled()?(i.addClass("trendingLRECTwoCol").removeCla
ss("hidden"),o.addClass("trendingGiftsTwoCol"),n.isTrendingBelowLRECEnabled()&&(
i.addClass("trendingLRECAbove"),o.addClass("trendingBelow"))):i.addClass("trendi
ngLREC").removeClass("hidden"),o.one("h2").removeClass("tn-desc"))}.bind(this):u
=this.view.clean.bind(this.view),e.on("adReturned:LREC",u)},execute:function(e){
t.execute(function(t,r){this.view.render(t,r,this.darlaAPI.adPosition,n.shouldSh
owTrendingNowFeed(),e)}.bind(this))}},e.namespace("mail.ui"),e.mail.ui.trendingC
ontroller=new i},"1.0.0",{requires:["event-base","mail-ui-trending-utils","mailui-trending-view","mail-ui-trending-model"]});