Last active
August 13, 2016 08:54
-
-
Save Beej126/567a36f2dd1e3ce613ad8ec5846a40d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { var f;function g(b){function c(c){var e=b;if(c)for(var h=0;h<c.length;h++)e=e.replace("$"+(h+1),c[h]);return e}c.toString=function(){k.error("Attempt to treat enum as string:",b);return""};return c} | |
var m=m?m:{},aa=g("Pandora One - Listen to Pandora with No Ads, Higher Quality Audio, and More"),ba=g("Pandora Radio - Listen to Free Internet Radio, Find New Music"),ca=g("Could not create your account at this time. Please try again later."),da=g("Invalid email."),ea=g("An account already exists with that email address."),fa=g("Your password should be at least 6 characters."),ha=g("Your password may contain only letters, numbers, and punctuation."),ia=g("The provided password was incorrect. Please re-enter your password."), | |
ja=g("Please enter a valid birth year."),ka=g("Please enter a valid birth day."),la=g("Please provide month and day of your birth."),ma=g("We're sorry, you must be at least 13 years old to register."),na=g("Invalid ZIP code"),oa=g("Invalid postal code"),qa=g("You must agree to the terms of service to continue."),ra=g("Please specify your gender."),sa=g("Is this correct?"),va=g("This is the email you'll use to log in:"),wa=g("Yes"),xa=g("No"),ya=g("Please enter an email address"),za=g("Invalid Email"), | |
Aa=g("Please enter a password."),Ba=g("Please enter an email address and password"),Ca=g("Your password may contain only letters, numbers, and punctuation."),Da=g("Your password should be at least 6 characters."),Ea=g("The two passwords provided were different, please try again"),Fa=g("Your password has been changed"),Ga=g("Reset password"),Ha=g(""),Ia=g("To reset your password, please sign out."),Ka=g("Sign Out"),La=g("Cancel"),Ma=g("Your Pandora account has been deleted"),Na=g("MALE"),Oa=g("FEMALE"), | |
Pa=g("Create Station"),Qa=g("Enter an artist, song, or genre to create a station"),Ra=g("Top Hit"),Sa=g("Songs"),Ta=g("Artists"),Ua=g("Composers"),Va=g("Genres"),Wa=g("Brand Stations"),Xa=g("Stations"),Ya=g("Artist Stations"),Za=g("Your PIN must be at least 2 characters long."),$a=g("Your PIN has been emailed to you."),ab=g("Your credit card was removed from storage."),cb=g("Settings have not yet been saved."),db=g("Settings have been saved."),eb={},hb=g("Congratulations! Your Pandora One upgrade has been extended. Your new expiration date is $1"), | |
ib=g("Congratulations, you have been upgraded to Pandora One."),jb=g("Your gift code was entered incorrectly"),kb=g("Your email was entered incorrectly"),lb=g("Your password was entered incorrectly"),nb=g("Welcome to your Pandora One Free Trial!"),ob=g("Your free trial is already in progress."),pb=g("You are already using Pandora One."),qb=g("Your account is not eligible for a trial."),rb=g("You must register before starting a trial of Pandora One."),sb=g("Your account has already had a trial."), | |
ub=g("Invalid sponsor $1"),vb=g("Too many trials underway - try again tomorrow."),wb=g("Unknown reason."),xb=g("We've encountered an error. Sorry, it's our fault. Please click 'reload' to continue listening."),yb=g("Unfortunately our music licenses force us to limit the number of tracks you may skip each hour. If you want to hear something else, try creating another station starting with a different artist or track."),zb=g("Unfortunately our music licenses force us to limit the number of tracks you may skip each hour. If you want to hear something else, try creating another station starting with a different artist or track."), | |
Ab=g("Unfortunately our music licenses force us to limit the number of tracks you may skip each hour. If you want to hear something else, try creating another station starting with a different artist or track."),Bb=g("Unfortunately our music licenses force us to limit the number of tracks you may skip each hour. If you want to hear something else, try creating another station starting with a different artist or track."),Eb=g("Sorry about that. When this track is over, we'll never play it again on this station."), | |
Fb=g("ERROR: Your browser cannot play audio - please upgrade to Flash 10 or higher"),Gb=g("ERROR: Your Explicit Content Filter could not be saved because the PIN you entered is invalid."),Hb=g("Sorry, I couldn't send the email: $1"),Ib=g("You must enter one or more valid email addresses"),Jb=g("You may not include email addresses or HTML content in your message"),Kb=g("Error: unable to move track to another station"),Lb=g("Error while redeeming gift code: "),Mb=g("Error while registering: "),Nb=g("Sorry, I had a problem while saving your credit card and was unable to upgrade your account."), | |
Ob=g("Sorry, we are unable to upgrade your account at this time. Please confirm that the data you provided is accurate and try again. If you experience multiple declines please contact your credit card company."),Pb=g("A payment is already in progress. Please retry in a few minutes."),Qb=g("Sorry, we are unable to upgrade your account at this time. We are working on the problem now. Please try again later."),Rb=g("An error prevented this operation: $1"),Sb=g("You must upgrade to Pandora One to use the Pandora desktop application"), | |
Tb=g("I'm sorry, you may only create up to 10 stations. Register now and create up to 100 stations."),Ub=g("Your station limit has been reached. Remove a station from your list to add a new one."),Vb=g("Want Thumbprint Radio? We need to know you a little bit better. Keep creating stations and thumbing up songs you love, and we\u2019ll let you know when it\u2019s ready!"),Wb=g("Sorry, we couldn't create this station. Please try again."),Xb=g("We cannot accept your comment at this time. Please try again later."), | |
Yb=g("We cannot report the comment at this time. Please try again later."),Zb=g("We're having unexpected technical difficulties. Our engineers are scrambling to fix things. Please try again later."),$b=g("We're sorry, but we can't find any more music to play on your station right now. Try switching stations."),ac=g("This exclusive station is no longer available. Please select a different station."),bc=g("This exclusive station has finished playing."),cc=g("Pandora One's high quality audio requires an internet connection speed of 192 kbps. Your audio has been changed to normal quality. (You can change this back using 'Audio Quality' on the Pandora One menu)"), | |
dc=g("Your internet connection is slow, causing the music to pause during playback. Pandora requires at least 64 kbps to stream."),ec=g("This feature is temporarily unavailable"),fc=g("Please log in or register before creating a station"),gc=g("We're sorry, we could not play music on this station. Please try another station."),hc=g("We're sorry, this Facebook account is being used by another Pandora account. For assistance, please visit our <a href='http://help.pandora.com/customer/portal/articles/765766' target='_blank'>help page</a> or <a href='http://help.pandora.com/customer/portal/emails/new' target='_blank'>email us</a>"), | |
ic=g("Sorry, we could not start the free trial via PayPal. Please try again, or select another payment option."),jc=g("Sorry, we could not complete the payment via PayPal. No charges have been made. Please try again, or select another payment option."),kc=g("Sorry, the payment was declined by PayPal. Please correct the issue with PayPal and try again, or select another payment option."),lc=g("The requested track does not exist on this station."),mc=g("Your advertiser account owns this station, and it is already in your station list."), | |
nc=g("Sorry, a problem occurred with your reward. Please try again."),oc=g("Sorry, we could not redeem the gift with the PayPal information provided. Please try again, or select another payment option."),pc=g("You are unable to delete this station from the station list. As the station owner, you must delete the station directly from the station management system where the station was created."),qc=g("Sorry, this artist audio message is no longer available."),rc=g("Private Profile"),sc=g("Public Profile"), | |
tc=g("This is your space to write something about yourself"),uc=g("Ok, we'll put it on the shelf for a while."),vc=g("<strong>Thanks for the feedback.</strong><br>We appreciate your input, and it will help us improve artist audio messages in the future."),wc=g("<strong>Thanks for the feedback.</strong><br>In Settings > Artist Messages, you can turn off artist audio messages on a specific station, or turn them off for all your stations."),xc=g('Successfully emailed "$1"'),yc=g("Thanks for sharing. You just posted to $1"), | |
zc=g('We deleted your station "$1".'),Ac=g("You like this station"),Bc=g("Like this station"),Cc=g("Shared Station"),Dc=g("Would you like to make this station your own station?"),Ec=g("When you like a track while listening to a shared station, you become the owner of the station. Once you own the station, changes made by the original creator of the station will no longer apply."),Fc=g("When you rename a shared station, you become the owner of the station. Once you own the station, changes made by the original creator of the station will no longer apply."), | |
Gc=g("Make this my station"),Hc=g("Keep this as a shared station"),Ic=g("You like this "),Jc=g("Like this "),Kc=g("Are you sure?"),Lc=g("Pandora"),Mc=g("Undo like"),Nc=g("yes"),Oc=g("no"),Pc=g("We have updated the Pandora site. Click 'reload' to use the latest version."),Qc=g("Please take a moment to <a href='#' class='toastItemReload'>click here</a> and reload your station."),Rc=g("Type in artist, track, or composer"),Sc=g("Add variety to this station"),Tc=g("Type in the name of another artist, track or composer and we'll add music with similar musical qualities to this station."), | |
Uc=g("I'm sorry I can't find \"$1\" in the Music Genome Project."),Vc=g("Lyrics"),Wc=g("Lyrics not available"),Xc=g("About"),Yc=g("Similar Artists"),Zc=g("Similar Composers"),$c=g("About This Track"),ad=g("More Tracks"),bd=g("You must agree to the Pandora One terms."),cd=g("Enter a valid security code."),dd=g("Select a subscription frequency"),ed=g("Enter a valid card number."),fd=g("Your card has expired."),gd=g("Enter name as it appears on card."),hd=g("We're sorry, we couldn't authorize the card."), | |
id=g("Connecting..."),jd=g("Thank you! Your Pandora One payment is complete. Enjoy the music!"),kd=g("Thank you! Your Pandora for Business payment is complete. Enjoy the music!"),ld=g("Thank you! Your $0.99 payment is complete. Enjoy the music!"),md=g("Could not convert to Pandora for Business."),nd=g("You need to be a subscriber to convert to Pandora for Business."),od=g("You have already converted to Pandora for Business once."),pd=g("Please provide some information about your business to continue.");m.v={};m.v.Nn=g("ANONYMOUS");m.v.Qn=g("CANCELLED");m.v.sg=g("COMPLIMENTARY");m.v.GB=g("FREE");m.v.lu=g("EXPIRED_SUBSCRIBER");m.v.Du=g("REGISTERED");m.v.Ku=g("SUSPENDED");m.v.xd=g("SUBSCRIBER");m.v.Ru=g("VENDOR_BILLED_COMPLIMENTARY");m.v.Tu=g("VENDOR_BILLED_SUBSCRIBER");m.v.zu=g("PAY_TO_PLAY");m.v.Zh=g("BUSINESS");m.sa={};m.sa.vB=g("COMPLIMENTARY_PERIOD_EXPIRED");m.sa.Su=g("VENDOR_BILLED_COMPLIMENTARY_PERIOD_EXPIRED");m.sa.LB=g("INITIAL_SETTLEMENT_DECLINED");m.sa.fo=g("RENEWAL_SETTLEMENT_DECLINED");m.sa.F0=g("SUBSCRIPTION_EXPIRED_WITHOUT_RENEWAL");m.sa.ko=g("VENDOR_BILLED_SUBSCRIPTION_TIMED_OUT");m.sa.uC=g("SPONSORED_COMPLIMENTARY_PERIOD_EXPIRED");m.sa.yV=g("GIFT_PERIOD_EXPIRED");m.sa.jC=g("MULTI_DAY_PASS_EXPIRED");m.sa.sB=g("BUSINESS_EXPIRED");m.d={};m.d.BR=g("ADDRESS_IMPORT_SERVICE_DISABLED");m.d.CR=g("ADDRESS_IMPORT_SERVICE_UNKNOWN");m.d.Ve=g("AUTH_INVALID_USERNAME_PASSWORD");m.d.LR=g("AUTH_MISSING_USERNAME_PASSWORD");m.d.pB=g("AUTH_INVALID_TOKEN");m.d.qu=g("INVALID_PASSWORD_RESET_TOKEN");m.d.NR=g("AUTH_WEB_LOGIN_NOT_ALLOWED");m.d.KR=g("AUTH_ADMIN_LOGIN_NOT_ALLOWED");m.d.FS=g("CREDIT_CARD_NO_RECORD_FOUND");m.d.oT=g("EMAIL_MALFORMED_ADDRESS");m.d.pT=g("EMAIL_NO_SUBJECT");m.d.nT=g("EMAIL_CONTENT_TOO_LONG");m.d.AT=g("EXPLICIT_PIN_MALFORMED"); | |
m.d.xT=g("EXPLICIT_CONTENT_FILTER_NOT_ENABLED");m.d.BT=g("EXPLICIT_PIN_NOT_SET");m.d.yT=g("EXPLICIT_PIN_ALREADY_SET");m.d.zT=g("EXPLICIT_PIN_INCORRECT");m.d.su=g("LISTENER_ACCOUNT_IN_USE");m.d.tu=g("LISTENER_DUPLICATE_USERNAME");m.d.uu=g("LISTENER_MALFORMED_USERNAME");m.d.WZ=g("LISTENER_MISSING_EMAIL");m.d.wu=g("LISTENER_SUSPENDED");m.d.zC=g("STATION_DOES_NOT_EXIST");m.d.y0=g("STATION_ALREADY_EXISTS");m.d.s0=g("SEED_INVALID");m.d.xC=g("STATION_CODE_INVALID");m.d.z0=g("STATION_HAS_NO_MORE_CONTENT"); | |
m.d.f0=g("QUICKMIX_NOT_PLAYABLE");m.d.e0=g("QUICKMIX_NEEDS_MORE_STATIONS");m.d.IR=g("ARTIST_MUSICID_INVALID");m.d.u0=g("SONG_MUSICID_INVALID");m.d.t0=g("SONG_IDENTITY_INVALID");m.d.bo=g("LISTENER_INVALID_PASSWORD");m.d.Ak=g("LISTENER_NOT_AUTHORIZED");m.d.K2=g("VENDOR_NOT_AUTHORIZED");m.d.eo=g("LISTENER_PASSWORD_TOO_SHORT");m.d.XZ=g("LISTENER_NOT_FOUND");m.d.Au=g("PLAYLIST_END");m.d.wB=g("CREDIT_CARD_DECLINED_AUTHORIZATION");m.d.xB=g("CREDIT_CARD_DECLINED_PAYMENT");m.d.HS=g("CREDIT_CARD_NUMBER_NOT_SET"); | |
m.d.JS=g("CREDIT_CARD_NUMBER_TOO_SHORT");m.d.IS=g("CREDIT_CARD_NUMBER_TOO_LONG");m.d.GS=g("CREDIT_CARD_NUMBER_BAD_CHECKSUM");m.d.BS=g("CREDIT_CARD_EXPIRATION_DATE_IN_THE_PAST");m.d.AS=g("CREDIT_CARD_COMPANY_NOT_SET");m.d.ES=g("CREDIT_CARD_NAME_NOT_SET");m.d.NS=g("CREDIT_CARD_ZIPCODE_NOT_SET");m.d.LS=g("CREDIT_CARD_SECURITY_CODE_MALFORMED");m.d.CS=g("CREDIT_CARD_EXPMONTH_OUT_OF_RANGE");m.d.DS=g("CREDIT_CARD_EXPYEAR_OUT_OF_RANGE");m.d.MS=g("CREDIT_CARD_VOID_FAILED");m.d.KS=g("CREDIT_CARD_PAYMENT_VOIDED"); | |
m.d.O_=g("PREVIEW_INVALID_CODE");m.d.N_=g("PREVIEW_EXPIRED_CODE");m.d.lC=g("OUT_OF_SYNC");m.d.d_=g("MAX_RESULTS_OUT_OF_RANGE");m.d.I2=g("VENDOR_ALIAS_IS_BLANK");m.d.J2=g("VENDOR_ALIAS_IS_INVALID");m.d.H2=g("VENDOR_ALIAS_HASH_IS_INVALID");m.d.G2=g("VENDOR_ALIAS_ALREADY_IN_USE");m.d.MR=g("AUTH_TOKEN_TYPE_NOT_ALLOWED");m.d.UV=g("INVALID_VENDOR");m.d.ER=g("ANONYMOUS_VENDOR_ALIAS_NOT_ALLOWED");m.d.vu=g("LISTENER_STATE_NOT_ALLOWED");m.d.dC=g("MAINTENANCE_MODE");m.d.oC=g("READONLY_MODE");m.d.KB=g("INCOMPATIBLE_VERSION"); | |
m.d.UZ=g("LISTENER_BANNED_FROM_POSTING");m.d.tS=g("COMMENT_IS_EMPTY");m.d.uS=g("COMMENT_IS_EMPTY_AFTER_CLEAN");m.d.vS=g("COMMENT_IS_SPAM");m.d.wS=g("COMMENT_IS_TOO_LONG");m.d.rT=g("EXCESSIVE_NOTE_POSTING");m.d.sT=g("EXCESSIVE_NOTE_REPORTING");m.d.sS=g("COMMENT_DELETED");m.d.B_=g("PARAMETER_TYPE_MISMATCH");m.d.A_=g("PARAMETER_MISSING");m.d.C_=g("PARAMETER_VALUE_INVALID");m.d.$S=g("DUPLICATE_ARTIST_BOOKMARK");m.d.cT=g("DUPLICATE_SONG_BOOKMARK");m.d.aT=g("DUPLICATE_FRIEND_BOOKMARK");m.d.bT=g("DUPLICATE_SEED_BOOKMARK"); | |
m.d.tT=g("EXCESSIVE_USER_QUICK_BOOKMARKING");m.d.YZ=g("LISTENER_NOT_LOGGED_IN");m.d.g0=g("REMOVING_TOO_MANY_SEEDS");m.d.ZS=g("DEVICE_NOT_FOUND");m.d.WS=g("DEVICE_CODE_INVALID");m.d.YS=g("DEVICE_DUPLICATE_DEVICECODE");m.d.w0=g("STATE_TRANSITION_NOT_ALLOWED");m.d.P_=g("PRIVATE_PROFILE");m.d.Z2=g("WEB_ACTIVATION_CODE_INVALID");m.d.VS=g("DEVICE_ALREADY_ASSOCIATED_TO_ACCOUNT");m.d.FC=g("USER_ALREADY_USED_TRIAL");m.d.TV=g("INVALID_MOBILE_CLIENT_VERSION");m.d.RV=g("INVALID_MOBILE_CLIENT_APPLICATION_TYPE"); | |
m.d.SV=g("INVALID_MOBILE_CLIENT_HANDSET");m.d.xR=g("ACCOUNT_ALREADY_ACTIVATED");m.d.SZ=g("LICENSING_RESTRICTIONS");m.d.On=g("BIRTH_YEAR_INVALID");m.d.Pn=g("BIRTH_YEAR_TOO_YOUNG");m.d.no=g("ZIP_CODE_INVALID");m.d.Tn=g("GENDER_INVALID");m.d.yS=g("COUNTRY_CODE_INVALID");m.d.AR=g("ADDRESS_BOOK_IMPORTER_ERROR");m.d.zR=g("ADDRESS_BOOK_AUTHENTICATION_ERROR");m.d.mT=g("EMAIL_CONTENT_INVALID");m.d.lT=g("EMAIL_ADDRESS_INVALID");m.d.v_=g("NO_VALID_EMAIL_ADDRESSES");m.d.GR=g("API_CALL_NOT_ALLOWED");m.d.D_=g("PASSWORD_NOT_ALLOWED_FOR_SHARED_DEVICE"); | |
m.d.QV=g("INVALID_AD_TOKEN");m.d.XS=g("DEVICE_DISABLED");m.d.DR=g("AD_COOKIE_NOT_FOUND");m.d.TB=g("INVALID_SPONSOR");m.d.AB=g("DAILY_TRIAL_LIMIT_REACHED");m.d.QU=g("FEATURE_TEMPORARILY_UNAVAILABLE");m.d.SB=g("INVALID_FACEBOOK_ACCOUNT_ASSOCIATION");m.d.G0=g("SUBSCRIPTION_NOT_RENEWABLE");m.d.Dk=g("SUBSCRIPTION_DISABLED");m.d.Un=g("GIFT_CODE_INVALID");m.d.Vn=g("GIFT_CODE_REDEEMED");m.d.vV=g("GIFT_CODE_REDEEMED_BY_LISTENER");m.d.HB=g("GIFT_CODE_REDEMPTION_ATTEMPTS_EXCEEDED");m.d.IB=g("GIFT_REQUIRES_PAYMENT_INFO"); | |
m.d.wV=g("GIFT_DUPLICATE");m.d.xV=g("GIFT_DURATION_INVALID");m.d.mu=g("GIFT_INELIGIBLE");m.d.zV=g("GIFT_SERVICE_UNAVAILABLE");m.d.LV=g("INTEGRATION_PARTNER_UNAVAILABLE");m.d.qC=g("SERVICE_UNAVAILABLE");m.d.qT=g("EXCESSIVE_ACTIVITY");m.d.US=g("DAILY_SKIP_LIMIT_REACHED");m.d.gu=g("CONTENT_HAS_EXPIRED");m.d.E_=g("PAYPAL_INVALID_TOKEN");m.d.F_=g("PAYPAL_PAYMENT_ALREADY_PAID");m.d.L_=g("PAYPAL_PAYMENT_NOT_CONFIRMED");m.d.J_=g("PAYPAL_PAYMENT_INVALID_STATE");m.d.I_=g("PAYPAL_PAYMENT_FAILED_TRY_LATER"); | |
m.d.H_=g("PAYPAL_PAYMENT_FAILED");m.d.G_=g("PAYPAL_PAYMENT_DECLINED");m.d.K_=g("PAYPAL_PAYMENT_NOT_COMPLETED");m.d.HR=g("API_UNSUPPORTED_FUNCTIONALITY");m.d.Y1=g("TOO_MANY_STATION_IDS");m.d.nC=g("PAYMENT_IN_PROGRESS");m.d.E2=g("VALUE_EXCHANGE_BAD_OFFER_NAME");m.d.kS=g("BAD_A_LA_CARTE_RECEIPT");m.d.lS=g("BAD_A_LA_CARTE_SKU");m.d.AV=g("GIFT_SUBSCRIBER_CANT_CONVERT_TO_BUSINESS");m.d.bC=g("LISTENER_ALREADY_CONVERTED_TO_BUSINESS_ONCE");m.d.nS=g("BUSINESS_SUBSCRIPTIONS_UNAVAILABLE");m.d.tB=g("BUSINESS_INFORMATION_MISSING"); | |
m.d.dV=g("FRIEND_LIMIT_EXCEEDED");m.d.k_=g("MIP_NO_ARTIST_PERMISSIONS");m.d.j_=g("MIP_NOT_OWNER");m.d.i_=g("MIP_INVALID_INPUT");m.d.h_=g("MIP_FEATURE_DISABLED");m.d.l_=g("MIP_NO_AVAILABLE_INVENTORY");m.d.g_=g("MIP_CTA_URL_INVALID");m.d.f_=g("MIP_CTA_BLACKLISTED");m.d.AC=g("THUMBPRINT_RADIO_NOT_ELIGIBLE");m.d.A0=g("STOPPED_AS_SUSPICIOUS");m.d.VZ=g("LISTENER_INCORRECT_PASSWORD");m.d.XU=g("FLEX_REPLAY_TRACK_NOT_FOUND");m.d.WU=g("FLEX_REPLAY_RIGHT_UNAVAILABLE");m.d.ZU=g("FLEX_SKIP_RIGHT_UNAVAILABLE"); | |
m.d.SU=g("FLEX_DOWNLOAD_RIGHT_UNAVAILABLE");m.d.UU=g("FLEX_ON_DEMAND_RIGHT_UNAVAILABLE");m.d.VU=g("FLEX_REPLAY_LISTENER_INELIGIBLE");m.d.YU=g("FLEX_REPLAY_TRACK_TYPE_UNSUPPORTED");m.d.F2=g("VALUE_EXCHANGE_EXCEPTION");m.d.TU=g("FLEX_INSUFFICIENT_REWARD_REPLAYS");m.Gc={};m.Gc.a2=g("TRANSFORM_CONFIRM");m.Gc.Z1=g("TRANSFORM_AUTOMATIC");m.Gc.Ye=g("TRANSFORM_NOT_ALLOWED");m.Xe={};m.Xe.$P=g("song");m.Xe.Pc=g("album");m.Xe.GE=g("artist");m.Xe.i=g("station");m.Xe.y3=g("genrestation");m.ge={};m.ge.Mu=g("TIMEOUT_CREDIT");m.ge.m_=g("MONTHLY_LISTENING");m.ge.io=g("SPONSORED_LISTENING");m.Ab={};m.Ab.mB=g("AUDIO_IMPRESSION");m.Ab.oB=g("AUDIO_TILE_IMPRESSION");m.Ab.cV=g("FOLLOW_ON_IMPRESSION");m.Ab.sC=g("SKIP");m.Ab.nB=g("AUDIO_TILE_CLICK");m.Ab.bV=g("FOLLOW_ON_CLICK");m.Ab.yC=g("STATION_CREATE");m.Ab.JR=g("AUDIO_IMPRESSION_UNIQUE");function qd(b){var c=typeof b;if("object"==c)if(b){if(b instanceof Array||!(b instanceof Object)&&"[object Array]"==Object.prototype.toString.call(b)||"number"==typeof b.length&&"undefined"!=typeof b.splice&&"undefined"!=typeof b.propertyIsEnumerable&&!b.propertyIsEnumerable("splice"))return"array";if(!(b instanceof Object||"[object Function]"!=Object.prototype.toString.call(b)&&("undefined"==typeof b.call||"undefined"==typeof b.propertyIsEnumerable||b.propertyIsEnumerable("call"))))return"function"}else return"null"; | |
else if("function"==c&&"undefined"==typeof b.call)return"object";return c}function rd(b){return"string"==typeof b}function sd(b){return"number"==typeof b}function td(b){b=qd(b);return"object"==b||"array"==b||"function"==b}Math.floor(2147483648*Math.random()).toString(36);var ud=Date.now||function(){return+new Date};function vd(b,c){function d(){}d.prototype=c.prototype;b.uQ=c.prototype;b.prototype=new d;b.prototype.constructor=b};m=m?m:{};function wd(){};function xd(b){this.body=b}vd(xd,wd);function yd(b){this.xb=b}vd(yd,wd);function n(b){return b.xb[0]}function zd(b){this.message=b;this.ng=Rb([b])}vd(zd,wd);function Ad(b){zd.call(this,b)}vd(Ad,zd);function Bd(b){zd.call(this,b)}vd(Bd,Ad);function Cd(b,c,d){zd.call(this,b);this.url=c;this.xml=d}vd(Cd,Bd);function Dd(b,c){zd.call(this,b);this.code=c}vd(Dd,Ad);function Ed(){return Math.floor(Fd()/1E3)}function Fd(){return(new Date).getTime()}function Gd(b,c,d,e){if(d)return"/img/no_photo_180_fb.png";b=null==b?null:b.nH?b.Ea:b.fbId?b.fbId:b.fbid?b.fbid:b.attr?b.attr("fbid"):null;return null!=b&&0<b&&!e?"http://graph.facebook.com/v2.2/"+b+"/picture?type="+(c?"square":"large"):"/img/no_listener_image.png"}function Hd(b){return b.replace(/<\/?[^>]+(>|$)|\"/g,"")}function Id(b){return b.substring(0,b.indexOf("'s Thumbprint Radio"))};function Jd(b){var c="",d,e,h,l,p,q,t=0;b=b.replace(/\r\n/g,"\n");e="";for(h=0;h<b.length;h++)l=b.charCodeAt(h),128>l?e+=String.fromCharCode(l):(127<l&&2048>l?e+=String.fromCharCode(l>>6|192):(e+=String.fromCharCode(l>>12|224),e+=String.fromCharCode(l>>6&63|128)),e+=String.fromCharCode(l&63|128));for(b=e;t<b.length;)d=b.charCodeAt(t++),e=b.charCodeAt(t++),h=b.charCodeAt(t++),l=d>>2,d=(d&3)<<4|e>>4,p=(e&15)<<2|h>>6,q=h&63,isNaN(e)?p=q=64:isNaN(h)&&(q=64),c=c+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_ ".charAt(l)+ | |
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_ ".charAt(d)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_ ".charAt(p)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_ ".charAt(q),c=c.replace(/\s+$/,"");return c};var Kd=[0,0,192,224,240,248,252],Ld=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2, | |
2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5],Md=[0,12416,925824,63447168,4194836608,2181570688];function Nd(){} | |
function Od(){return[[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472, | |
3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372, | |
1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591, | |
1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851, | |
2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149, | |
4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971E4,1235738493, | |
2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025, | |
935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187, | |
70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725, | |
1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787, | |
1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854, | |
3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035, | |
1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927, | |
3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507, | |
3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926, | |
3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717, | |
4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638, | |
3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837, | |
3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078, | |
3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409E3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877, | |
2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063, | |
266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436, | |
29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]]}function Pd(){var b=Od();null==b&&(b=Od());var c=b[0],d=b[1],e=b[2],h=b[3],b=b[4],l=new Nd;Qd(l,c,d,e,h,b);for(var p=Sd(Td("Ba-qrf5@t%pf/;u^")),q=0,t=0;18>t;++t){for(var y=0,E=0;4>E;++E)y=y<<8|p[q],q+=1,q>=p.length&&(q=0);c[t]^=y}p=[0,0];for(t=0;18>t;t+=2)l.Tp(p,0),c[t]=p[0],c[t+1]=p[1];for(t=0;4>t;t++)for(c=[d,e,h,b][t],q=0;256>q;q+=2)l.Tp(p,0),c[q]=p[0],c[q+1]=p[1];return l} | |
function Ud(b){var c=new Nd;Qd(c,b[0],b[1],b[2],b[3],b[4]);return c} | |
function Qd(b,c,d,e,h,l){b.Tp=function(b,q){var t=b[q],y=b[q+1],E,J;for(J=0;16>J;++J){var N=t^=c[J],U,pa;pa=N&255;N>>=8;E=N&255;N>>=8;U=N&255;N>>=8;N=d[N&255]+e[U];N^=h[E];N+=l[pa];y^=N;E=t;t=y;y=E}E=t;t=y;y=E^c[16];t^=c[17];b[q]=t;b[q+1]=y};b.VF=function(b,q){var t=b[q],y=b[q+1],E,J;for(J=17;1<J;--J){var N=t^=c[J],U,pa;pa=N&255;N>>=8;E=N&255;N>>=8;U=N&255;N>>=8;N=d[N&255]+e[U];N^=h[E];N+=l[pa];y^=N;E=t;t=y;y=E}E=t;t=y;y=E^c[1];t^=c[0];b[q]=t;b[q+1]=y}} | |
Nd.prototype.encrypt=function(b){b=Td(b);b=Sd(b);b=Vd(b);for(var c=0;c<b.length;c+=2)this.Tp(b,c);b=Wd(b);for(var c="",d=0;d<b.length;d++)var e=b[d].toString(16),c=1==e.length?c+("0"+e):c+e;return c};Nd.prototype.decrypt=function(b){b=String(b);b=Xd(this,b);b=Yd(b);return Zd(b)};function Xd(b,c){for(var d=[],e=0;e<c.length;e+=2)d.push(parseInt(c.substr(e,2),16));d=Vd(d);for(e=0;e<d.length;e+=2)b.VF(d,e);return Wd(d)}function Td(b){for(var c=[],d=0;d<b.length;d++)c.push(b.charCodeAt(d));return c} | |
function Zd(b){for(var c=[],d=0;d<b.length;d++)c.push(String.fromCharCode(b[d]));return c.join("")} | |
function Sd(b){for(var c=[],d=0;d<b.length;){var e=b[d];d++;if(55296<=e&&56319>=e){if(d==b.length){k.error("source exhausted");break}var h=b[d];(56320>h||57343<e)&&k.error("unpaired high surrogate");e=(e-55296<<10)+(h-56320)+65536;d++}else 56320<=e&&57343>=e&&k.error("UTF-16 surrogate values are illegal in UTF-32");h=0;128>e?h=1:2048>e?h=2:65536>e?h=3:1114112>e?h=4:(h=3,e=65533);if(null==Kd[h]){k.error("invalid bytesToWrite: "+h);break}var l=c.length;switch(h){case 4:c[l+3]=(e|128)&191,e>>=6;case 3:c[l+ | |
2]=(e|128)&191,e>>=6;case 2:c[l+1]=(e|128)&191,e>>=6;case 1:c[l]=e|Kd[h]}}return c} | |
function Yd(b){for(var c=[],d=0;d<b.length;){var e=0,h=Ld[b[d]];if(d+h>b.length)return k.error("source exhausted"),c;if(!$d(b.slice(d,d+h+1)))return k.error("not legal UTF-8"),c;switch(h){case 5:e+=b[d],d++,e<<=6;case 4:e+=b[d],d++,e<<=6;case 3:e+=b[d],d++,e<<=6;case 2:e+=b[d],d++,e<<=6;case 1:e+=b[d],d++,e<<=6;case 0:e+=b[d],d++}e-=Md[h];65535>=e?55296<=e&&57343>=e?(k.error("UTF-16 surrogate values are illegal in UTF-32"),c.push(65533)):c.push(e):1114111<e?(k.error("ch > UNI_MAX_UTF16"),c.push(65533)): | |
(e-=65536,c.push((e>>10)+55296),c.push((e&1023)+56320))}for(;c.length&&8>=c[c.length-1];)c.pop();return c} | |
function $d(b){var c;switch(b.length){default:return!1;case 4:if(128>(c=b[3])||191<c)return!1;case 3:if(128>(c=b[2])||191<c)return!1;case 2:if(191<(c=b[1]))return!1;switch(b[0]){case 224:if(160>c)return!1;break;case 237:if(159<c)return!1;break;case 240:if(144>c)return!1;break;case 244:if(143<c)return!1;break;default:if(128>c)return!1}case 1:if(128<=b[0]&&194>b[0])return!1}return 244<b[0]?!1:!0} | |
function Vd(b){var c=[],d=b.length,e=0==d%4?d:d-d%4,h;for(h=0;h<e;h+=4)c[c.length]=b[h]<<24|b[h+1]<<16|b[h+2]<<8|b[h+3];if(h<d){for(var l=e=0;4>l;l++)h+l<d&&(e|=b[h+l]<<8*(3-l));c[c.length]=e}return c}function Wd(b){for(var c=[],d=0,e=0;e<b.length;e++){var h=b[e];c[d]=h>>24&255;d++;c[d]=h>>16&255;d++;c[d]=h>>8&255;d++;c[d]=h&255;d++}return c};function r(b,c){null!=b&&null!=c||k.error("neither caller nor method may be null");var d=trackJs.watch(function(){return c.apply(b,arguments)});d._caller=b;return d}function ae(b,c,d){return setTimeout(r(b,c),d)}function be(b){null!=b&&0<b.length&&(b=b.replace(/^.*\/xml\//,"/json/"));return b} | |
function ce(b){if(!_.isFunction(b))return k.error("Attempting to create a single call function but no backing function was provided."),$.noop;var c=!1;return function(){c?k.warn("A function that should only be called once is being called again."):(c=!0,b.apply(null,arguments))}}function de(b,c,d){var e=null;2<arguments.length&&(e=_.rest(arguments,2));var h=ce(b);c&&setTimeout(function(){h.apply(null,e)},c);return h} | |
function ee(b){null!=b&&0<b.length&&(b=b.replace(/\?dc=.*?$/,""),b=b.replace("/music/artist",""),b=b.replace("/music/composer",""),b=b.replace("/music/album",""),b=b.replace("/music/song",""));return b}function fe(b){return _.without(b.split("/"),"")}function ge(){return(new Date).getTime()+""+Math.floor(1E4*Math.random())}function he(b,c){for(var d=0;b&&d<b.length;d++)if(b[d]==c)return!0;return!1}function ie(b){return null!=b&&""!=b+""}function je(b){return null==b||0==b.length} | |
function ke(b){return 100*Math.random()<b}function le(b){return null==b?!1:"true"==b.toLowerCase()}function me(b,c,d,e){var h="Unknown";b.message?h=b.message:rd(b)&&(h=String(b));ne({msg:h,url:c,num:d,ua:navigator.userAgent,browser:oe(),site_version:window._pandoraVersion,flash_ver:pe()},e)} | |
function qe(b,c){var d,e=(new Date).format("yyyy-mm-dd HH:MM:ss",!0),h=null;d||(d=re?re.get("currentUser"):null);re&&re.get("sequenceNumber")&&(h=re.get("sequenceNumber"),re.set({sequenceNumber:h+1}));s("mobile_view_mode",{page_view:b,view_mode:c,vendor_id:u,device_id:se,device_code:se,device_os:oe(),client_timestamp:e,sequence_number:h},d)} | |
function te(b,c,d,e){var h,l=(new Date).format("yyyy-mm-dd HH:MM:ss",!0);h||(h=re?re.get("currentUser"):null);s("onboarding_server_action",{page_view:b,view_mode:c,vendor_id:u,device_id:se,device_code:se,device_os:oe(),client_timestamp:l,action:d,action_failure_reason:e},h)} | |
function ue(b,c,d){var e=v.h&&v.h.Jf();d&&trackJs.console.warn("message: "+d);d=c&&c.jPlayer&&c.jPlayer.error&&c.jPlayer.error.message||c;var h=c&&c.jPlayer&&c.jPlayer.error&&c.jPlayer.error.formatType||"",l=c&&c.jPlayer&&c.jPlayer.flash&&c.jPlayer.flash.active||"";c=c&&c.jPlayer&&c.jPlayer.version&&c.jPlayer.version.flash||"";trackJs.console.warn("adToken: "+e);trackJs.console.warn("trackToken: "+(b&&b.eb()));trackJs.console.warn("stationId: "+(b&&b.r&&b.r().e()));trackJs.console.warn("message: "+ | |
d);trackJs.console.warn("format: "+h);trackJs.console.warn("using flash: "+l);l&&trackJs.console.warn("flash ver: "+c);trackJs.track("Error during playback detected.")}function pe(){var b="unknown";try{if(swfobject)var c=swfobject.getFlashPlayerVersion(),b=c.major+"."+c.minor+"."+c.release}catch(d){}return b}function oe(){return BrowserDetect.browser+" "+BrowserDetect.version+" ("+BrowserDetect.OS+")"} | |
function ve(b){if(!je(window.location.hostname)){$.cookie(b,null,{path:"/",domain:window.location.hostname});var c=window.location.hostname.indexOf(".");0>c&&(c=0);$.cookie(b,null,{path:"/",domain:window.location.hostname.substring(c)})}$.cookie(b,null,{path:"/"})}function we(){return"Explorer"==BrowserDetect.browser&&8>=BrowserDetect.version}function xe(){return"Explorer"==BrowserDetect.browser&&7>=BrowserDetect.version}function ye(){return"Firefox"==BrowserDetect.browser} | |
function ze(b,c){for(var d="",e=0;e<b.length;e++)d+=String.fromCharCode(b.charCodeAt(e)^c[e%c.length]);return d}window.emptySelection=function(){$.textSelect("clear")};var k={enabled:!1,debug:function(){},info:function(){},warn:function(b){null!=window.console&&null!=window.console.warn&&window.console.warn.apply(window.console,arguments)},error:function(b){null!=window.console&&null!=window.console.error&&window.console.error.apply(window.console,arguments)}};"Explorer"==BrowserDetect.browser&&10>BrowserDetect.version&&null!=window.console&&(null!=window.console.warn&&(k.warn=window.console.warn),null!=window.console.error&&(k.error=window.console.error));var w=0,Ae=w++,Be=w++,Ce=w++,De=w++,Ee=w++,Fe=w++,Ge=w++,He=w++,Ie=w++,Je=w++,Ke=w++,Le=w++,Me=w++,Ne=w++,Oe=w++,Pe=w++,Qe=w++,Re=w++,Se=w++,Te=w++,Ue=w++,Ve=w++,We=w++,Xe=w++,Ye=w++,Ze=w++,$e=w++,af=w++,bf=w++,cf=w++,df=w++,ef=w++,ff=w++,gf=w++,hf=w++,jf=w++,kf=w++,lf=w++,mf=w++,nf=w++,of=w++,pf=w++,qf=w++,rf=w++,sf=w++,tf=w++,uf=w++,vf=w++,wf=w++,xf=w++,yf=w++,zf=w++,Af=w++,Bf=w++,Cf=w++,Df=w++,Ef=w++,Ff=w++,Gf=w++,Hf=w++,If=w++,Jf=w++,Kf=w++,Lf=w++,Mf=w++,Nf=w++,Of=w++,Pf=w++,Qf=w++,Rf=w++,Sf= | |
w++,Tf=w++,Uf=w++,Vf=w++,Wf=w++,Xf=w++,Yf=w++,Zf=w++,$f=w++,ag=w++,bg=w++,cg=w++,dg=w++,eg=w++,fg=w++,gg=w++,hg=w++,ig=w++,jg=w++,kg=w++,lg=w++,mg=w++,ng=w++,og=w++,pg=w++,qg=w++,rg=w++,sg=w++,tg=w++,ug=w++,vg=w++,wg=w++,xg=w++,yg=w++,zg=w++,Ag=w++,Bg=w++,Cg=w++,Dg=w++,Eg=w++,Fg=w++,Gg=w++,Hg=w++,Ig=w++,Jg=w++,Kg=w++,Lg=w++,Mg=w++,Ng=w++,Og=w++,Pg=w++,Qg=w++,Rg=w++,Sg=w++,Tg=w++,Ug=w++,Vg=w++,Wg=w++,Xg=w++,Yg=w++,Zg=w++,$g=w++,ah=w++,bh=w++,ch=w++,dh=w++,eh=w++,fh=w++,gh=w++,hh=w++,ih=w++,jh=w++, | |
kh=w++,lh=w++,mh=w++,nh=w++,oh=w++,ph=w++,qh=w++,rh=w++,sh=w++,th=w++,uh=w++,vh=w++,wh=w++,xh=w++,yh=w++,zh=w++,Ah=w++,Bh=w++,Ch=w++,Dh=w++,Eh=w++,Fh=w++,Gh=w++,Hh=w++,Ih=w++,Jh=w++,Kh=w++,Lh=w++,Mh=w++,Nh=w++,Oh=w++,Ph=w++,Qh=w++,Rh=w++,Sh=w++,Th=w++,Uh=w++,Vh=w++,Wh=w++,Xh=w++,Yh=w++,Zh=w++,$h=w++,ai=w++,bi=w++,ci=w++,di=w++,ei=w++,fi=w++,gi=w++,hi=w++,ii=w++,ji=w++,ki=w++,li=w++,mi=w++,ni=w++,oi=w++,pi=w++,qi=w++,ri=w++,si=w++,ti=w++,ui=w++,vi=w++,wi=w++,xi=w++,yi=w++,zi=w++,Ai=w++,Bi=w++,Ci=w++, | |
Di=w++,Ei=w++,Fi=w++,Gi=w++,Hi=w++,Ii=w++,Ji=w++,Ki=w++,Li=w++,Mi=w++,Ni=w++,Oi=w++,Pi=w++,Qi=w++,Ri=w++,Si=w++,Ti=w++,Ui=w++,Vi=w++,Wi=w++,Xi=w++,Yi=w++,Zi=w++,$i=w++,aj=w++,bj=w++,cj=w++,dj=w++,ej=w++,fj=w++,gj=w++,hj=w++,ij=w++,jj=w++,kj=w++,lj=w++,mj=w++,nj=w++,oj=w++,pj=w++,qj=w++,rj=w++,sj=w++,tj=w++,uj=w++,vj=w++,wj=w++,xj=w++,yj=w++,zj=w++,Aj=w++,Bj=w++,Cj=w++,Dj=w++,Ej=w++,Fj=w++,Gj=w++,Hj=w++,Ij=w++,Jj=w++,Kj=w++,Lj=w++,Mj=w++,Nj=w++,Oj=w++,Pj=w++,Qj=w++,Rj=w++,Tj=w++,Uj=w++,Vj=w++,Wj=w++, | |
Xj=w++,Yj=w++,Zj=w++,ak=w++,bk=w++,ck=w++,dk=w++,ek=w++,fk=w++,gk=w++,hk=w++,ik=w++,jk=w++,kk=w++,lk=w++,mk=w++,nk=w++,ok=w++,pk=w++,qk=w++,rk=w++,sk=w++,tk=w++,uk=w++,vk=w++,wk=w++,xk=w++,yk=w++,zk=w++,Ak=w++,Bk=w++,Ck=w++,Dk=w++,Ek=w++,Fk=w++,Gk=w++,Hk=w++,Ik=w++,Jk=w++,Kk=w++,Lk=w++,Mk=w++,Nk=w++,Ok=w++,Pk=w++,Qk=w++,Rk=w++,Sk=w++,Tk=w++,Uk=w++,Vk=w++,Wk=w++,Xk=w++,Yk=w++,Zk=w++,$k=w++,al=w++,bl=w++,cl=w++,dl=w++,el=w++,fl=w++,gl=w++,hl=w++,il=w++,jl=w++,kl=w++,ll=w++,ml=w++,nl=w++,ol=[]; | |
$.each({WV:Ae,VV:Be,S1:Ce,C2:De,D2:Ee,X_:Fe,Y_:Ge,Z_:He,sV:Ie,S_:Je,U_:Ke,L1:Le,K1:Me,D1:Ne,N1:Oe,s1:Pe,J1:Qe,i2:Re,k2:Se,l2:Te,h2:Ue,j0:Ve,PR:We,r0:Xe,QR:Ye,o2:Ze,n2:$e,j2:af,T0:bf,U0:cf,M0:df,X0:ef,OR:ff,f1:gf,d2:hf,Y0:jf,NU:kf,OU:lf,MU:mf,f2:nf,y1:of,x1:pf,$0:qf,W0:rf,O2:sf,P1:tf,p_:uf,q_:vf,o_:wf,q0:xf,iV:yf,$Z:zf,t2:Af,u2:Bf,DV:Cf,EV:Df,CV:Ef,a1:Ff,b1:Gf,w2:Hf,x2:If,y2:Jf,n_:Kf,d0:Lf,eT:Mf,qV:Nf,s2:Of,v2:Pf,pS:Qf,r2:Rf,W_:Sf,I0:Tf,e2:Uf,H0:Vf,GV:Wf,tV:Xf,XV:Yf,ET:Zf,dS:$f,cS:ag,mV:bg,nV:cg,WR:dg, | |
YV:eg,E1:fg,oV:gg,PU:hg,p0:ig,W1:jg,V1:kg,b_:lg,c_:mg,IV:ng,HV:og,y_:pg,z_:qg,fY:rg,PS:sg,fV:tg,eV:ug,gV:vg,kV:wg,hV:xg,jV:yg,M_:zg,p2:Ag,q2:Bg,A2:Cg,h1:Dg,Z0:Eg,T1:Fg,TS:Gg,l0:Hg,b0:Ig,uW:Jg,vW:Kg,NW:Lg,a0:Mg,k0:Ng,i0:Og,rS:Pg,qS:Qg,jS:Rg,R1:Sg,s_:Tg,bS:Ug,dT:Vg,RZ:Wg,eU:Xg,dY:Yg,hS:Zg,JT:$g,dU:ah,cU:bh,iU:ch,FT:dh,TT:eh,pU:fh,qU:gh,UT:hh,sU:ih,BU:jh,RT:kh,CU:lh,HT:mh,vU:nh,FU:oh,WT:ph,LU:qh,QT:rh,oU:sh,GU:th,uU:uh,HU:vh,IU:wh,JU:xh,gU:yh,mU:zh,hU:Ah,bU:Bh,rU:Ch,aU:Dh,tU:Eh,MT:Fh,LT:Gh,KU:Hh,$T:Ih, | |
kU:Jh,lU:Kh,DU:Lh,fU:Mh,EU:Nh,ZR:Oh,yU:Ph,OT:Qh,YT:Rh,wU:Sh,xU:Th,NT:Uh,nU:Vh,zU:Wh,PT:Xh,GT:Yh,IT:Zh,ST:$h,AZ:ai,dX:bi,zZ:ci,BZ:di,xZ:ei,wZ:fi,LW:gi,KW:hi,OX:ii,uZ:ji,rZ:ki,wY:li,AY:mi,kW:ni,HX:oi,IX:pi,YX:qi,eY:ri,QZ:si,sW:ti,pY:ui,vY:vi,sY:wi,RX:xi,QX:yi,SX:zi,RW:Ai,$W:Bi,nX:Ci,wW:Di,zW:Ei,xW:Fi,yW:Gi,JW:Hi,fX:Ii,lY:Ji,mY:Ki,PX:Li,vZ:Mi,DX:Ni,qX:Oi,OW:Pi,cW:Qi,bW:Ri,rY:Si,PZ:Ti,PW:Ui,yZ:Vi,hZ:Wi,LX:Xi,oY:Yi,nY:Zi,UB:$i,aY:aj,FY:bj,ZX:cj,tY:dj,yY:ej,CX:fj,wX:gj,uX:hj,cY:ij,CY:jj,BY:kj,UW:lj,VW:mj, | |
YW:nj,TW:oj,iW:pj,FX:qj,GZ:rj,VB:sj,jX:tj,HZ:uj,iX:vj,qY:wj,KZ:xj,LZ:yj,MZ:zj,KX:Aj,VX:Bj,JZ:Cj,jY:Dj,eX:Ej,FZ:Fj,fW:Gj,EZ:Hj,BW:Ij,HW:Jj,aX:Kj,SW:Lj,jW:Mj,XT:Nj,VT:Oj,KT:Pj,XX:Qj,WB:Rj,ZV:Tj,iY:Uj,FW:Vj,CZ:Wj,EX:Xj,MX:Yj,$X:Zj,tW:ak,GX:bk,QW:ck,uY:dk,mZ:ek,nZ:fk,pW:gk,qW:hk,lX:ik,mX:jk,iZ:kk,jZ:lk,kZ:mk,lZ:nk,nW:ok,oW:pk,BX:qk,bX:rk,cX:sk,xY:tk,zY:uk,WX:vk,oZ:wk,pZ:xk,rW:yk,OZ:zk,iS:Ak,NX:Bk,T_:Ck,jU:Dk,B2:Ek,gT:Fk,hT:Gk,c0:Hk,BV:Ik,o0:Jk,n0:Kk,eS:Lk,fS:Mk,gS:Nk,T2:Ok,S2:Pk,U2:Qk,P2:Rk,Q2:Sk,R2:Tk, | |
V2:Uk,FR:Vk,MW:Wk,AX:Xk,TX:Yk,zX:Zk,$V:$k,lW:al,mW:bl,b2:cl,qZ:dl,AU:el,N2:fl,M2:gl,L2:hl,A1:il,z1:jl,AW:kl,oX:ll,ZT:ml,FV:nl},function(b,c){ol[c]=b});function pl(b){switch(b){case di:return"128";case ei:return"129";case fi:return"130";case li:return"133";case Vi:return"168";case $i:return"173";case jj:return"183";case kj:return"184";case qj:return"188"}k.error("AppEvent.getPersistable could not map event ",b,ol[b]);return"0"};function ql(b,c,d,e,h,l){this.error=b;this.message=c;this.fr=d;this.iL=e;this.El=h;this.Qg=l}function x(b,c,d,e,h){z.b(Oh,new ql(b,b.ng,c,d,e,h))};var rl,sl,tl=[];function ul(b){tl.push(b);return b} | |
var vl=ul({key:"AnonAuthToken",G:!1}),wl=ul({key:"psn",G:!1}),xl=ul({key:"lastUserId",G:!1}),yl=ul({key:"storedUserIds",G:!1}),zl=ul({key:"hasLoggedIn",G:!1}),Al=ul({key:"Volume",G:!1}),Bl=ul({key:"Muted",G:!1}),Cl=ul({key:"Username",G:!0}),Dl=ul({key:"Password",G:!0,Ti:!0}),El=ul({key:"KeepLoggedIn",G:!0}),Fl=ul({key:"isAnonymous",G:!0}),Gl=ul({key:"PlayTimeMapSeconds",G:!0}),Hl=ul({key:"LastPlayTimeSeconds",G:!0}),Il=ul({key:"DeltaListeningTimeSeconds",G:!0}),Jl=ul({key:"ListeningTimestamp",G:!0}), | |
Kl=ul({key:"LastPlayedStationId",G:!0}),Ll=ul({key:"StationSortOrderAlpha",G:!0}),Ml=ul({key:"SkipResetTimestamps",G:!0}),Nl=ul({key:"StationSkipCounts",G:!0}),Ol=ul({key:"DailySkipCount",G:!0}),Pl=ul({key:"CurrentTrack",G:!0}),Ql=ul({key:"CurrentTrackOnDemandAAM",G:!0}),Rl=ul({key:"ElapsedTime",G:!0}),Sl=ul({key:"ElapsedTimeOnDemandAAM",G:!0}),Tl=ul({key:"ContextualHelpIntents",G:!0}),Ul=ul({key:"DisplayedTips",G:!0}),Vl=ul({key:"CurrentSkinPath",G:!0}),Wl=ul({key:"AlbumArtSize",G:!0}),Xl=ul({key:"DeclinedRenewalOffer", | |
G:!0}),Yl=ul({key:"lowQualityAudio",G:!0}),Zl=ul({key:"shuffleType",G:!0}),$l=ul({key:"shuffleStations",G:!0}),am=ul({key:"shareOnTwitter",G:!0}),bm=ul({key:"shareOnFacebook",G:!0}),cm=ul({key:"SeenFbConnected",G:!0}),dm=ul({key:"deviceId",G:!0}),em=ul({key:"LiveStreamListeningStart",G:!0}),fm=ul({key:"LiveStreamListeningSeconds",G:!0}),gm=ul({key:"flaggedMsgs",G:!0}),hm=ul({key:"TimeoutDialogImpressions",G:!0}),im=ul({key:"SessionStartDialogLastShown",G:!0}); | |
function jm(){for(var b=km(yl)||[],c=0;c<b.length;c++){var d=lm("U"+b[c],Tl),e=mm(d);if(null!=e&&rd(e)){var h={};_.each((""+e).split(","),function(b){ie(b)&&(null==h[b]?h[b]=1:h[b]++)});nm(d,h)}}}function km(b){return mm(om(b),b.Ti)}function pm(b,c,d){nm(om(b),c,d,b.Ti)}function qm(b){rm(om(b),b.Ti)}function om(b,c){if(b.G){if(sl)return lm("U"+sl,b,c);k.warn("PersistenceManager.currentUserId is null for key "+b.key);return"zorro"}return b.key} | |
function lm(b,c,d){return null==d?b+"."+c.key:b+"."+c.key+"."+d}function sm(b,c){return c||!xe()?rl.encrypt(b):b}function mm(b,c){var d;if(d="ttls"!=b)d=(mm("ttls")||{})[b],d=null!=d&&d<(new Date).getTime();if(d)return rm(b,c),null;d=$.jStorage.get(sm(b,c));try{return null==d||0==d.length?d:JSON.parse(c||!xe()?rl.decrypt(d):d)}catch(e){return trackJs.track(e),k.error("Could not parse encrypted value: ",d),null}} | |
function nm(b,c,d,e){null!=c?($.jStorage.set(sm(b,e),sm(JSON.stringify(c),e)),null!=d&&(c=mm("ttls")||{},c[b]=d+(new Date).getTime(),nm("ttls",c))):rm(b,e)}function rm(b,c){$.jStorage.deleteKey(sm(b,c));var d=mm("ttls")||{};null!=d[b]&&(delete d[b],nm("ttls",d))}function tm(){$.jStorage.flush();k.info("PersistenceManager wipe is complete")}function um(){var b=mm("ttls")||{},c=[];$.each(b,function(b,e){e<(new Date).getTime()&&c.push(b)});$.each(c,function(b,c){rm(c)})} | |
function vm(){var b=km(El);return null==b||!0===b}function wm(b){pm(vl,b);if(sl){pm(Fl,null!=b);b=[];for(var c=km(yl)||[],d=0;d<c.length;d++)if(c[d]!=sl&&mm(lm("U"+c[d],Fl)))for(var e=c[d],h=0;h<tl.length;h++)tl[h].G&&rm(lm("U"+e,tl[h]));else b.push(c[d]);c.length!=b.length&&pm(yl,b)}}function xm(){var b=km(Fl);return null==b?!1:!0===b}function ym(){if(!sl)return 0;var b=km(Gl);null==b&&(b={});var c=0,d;for(d in b){var e=b[d];if(null==e||isNaN(Number(e)))return 0;c+=Number(e)}return c} | |
function zm(b){var c=km(Hl);null==c&&(c={});c[b]=Math.floor((new Date).getTime()/1E3);pm(Hl,c)}function Am(){if(!sl)return 0;var b=km(Il);return null==b||isNaN(Number(b))?0:Number(b)}function Bm(){if(!sl)return 0;var b=km(Jl);return null==b||isNaN(Number(b))?0:Number(b)}function Cm(){var b=km(am);return null==b||!0===b}function Dm(){var b=km(bm);return null==b||!0===b}function Em(){var b=km(Al);return null==b||isNaN(Number(b))?80:Number(b)}function Fm(){return!0===km(Bl)} | |
function Gm(b){if(!sl)return null;var c=km(Ml);return c&&c[b]?c[b]:null}function Hm(b){if(!sl)return 0;var c=km(Nl);return c&&c[b]?c[b]:0}function Im(b,c){var d=sl?km(Nl):null;null==d&&(d={});d[b]=c;pm(Nl,d)}function Jm(){if(!sl)return null;var b=km(Ol);if(null!=b&&b.date==Km())return b.skips;Lm(0);return 0}function Mm(b,c,d,e,h){0>=d||!sl||(0==e&&(e=600),b=b+","+d,d=1E3*(e-d),e=Rl,h&&(e=Sl),nm(om(e,c),b,d))} | |
function Nm(b,c,d){var e=Rl;d&&(e=Sl);c=mm(om(e,c));return null==c||(c=c.split(","),2!=c.length||c[0]!=b||(b=parseInt(c[1],10),isNaN(b)))?null:b}function Lm(b){pm(Ol,{date:Km(),skips:b},864E5)}function Om(){if(!sl)return{};var b=km(Tl);return null!=b&&td(b)?b:{}}function Pm(b){b=Om()[pl(b)];return null!=b?b:0}function Qm(b){var c=Rm();c.push(b);pm(Ul,c.join(","))}function Rm(){if(!sl)return[];var b=km(Ul);return null==b?[]:(""+b).split(",")} | |
function Sm(){if(!sl)return 215;var b=km(Wl);if(null==b||isNaN(Number(b)))return 215;b=Math.max(b,134);b=Math.min(b,450);return Number(b)}function Tm(){if(!sl)return"all";var b=km(Zl);return null==b?"all":""+b}function Um(){if(!sl)return"";var b=km($l);return null==b?"":""+b}function Km(){var b=new Date;return""+b.getDate()+(b.getMonth()+1)+b.getFullYear()}function Vm(b){b.Ti=!0;var c=km(b);b.Ti=null;return c} | |
function Wm(){if(xe()){var b=Vm(xl);if(null!=b){var c=sl;sl=b;var d=Vm(Cl),e=km(Dl)||"";null!=d&&null!=e&&0<d.length&&0<e.length&&($.jStorage.flush(),pm(xl,b),pm(Cl,d),pm(Dl,e),k.info("+++ ie 7 updated +++"));sl=c}}b=km(xl);return null!=b?(c=sl,sl=b,d=km(Cl),(d=null!=d&&0<d.length)?pm(xl,b):sl=c,d):!1}function Xm(b){pm(xl,b);if(sl=b){for(var c=km(yl)||[],d=0;d<c.length;d++)if(b==c[d])return;c.push(b);pm(yl,c)}} | |
function Ym(){if(!sl)return null;var b=km(dm);b&&""!=b||(b=hex_md5(sl+"-"+BrowserDetect.browser+"-"+BrowserDetect.OS+"-"+(new Date).getTime()),pm(dm,b));return b}function Zm(b){pm(em,b)}function $m(b){pm(fm,b)}function an(b){var c=bn();c.push(b);pm(gm,c.join(","))}function bn(){var b=[],c=km(gm);c&&(b=c.split(","));return b}function cn(){var b=(km(hm)||0)+1;pm(hm,b)};var z={};z.JC=[af,$f,ag,mi,Ak];z.er=!1;z.Gs=!1;z.Fo={};z.Eo={};z.Do={};z.c=function(b,c){z.Po(b,c,z.Fo)};z.Eh=function(b,c){z.Po(b,c,z.Eo)};z.hb=function(b,c){z.Po(b,c,z.Do)};z.Po=function(b,c,d){var e=d[b]||[];e.push(c);d[b]=e;c=c._caller;null!=c&&(d=c._eventTypes||[],d.push(b),c._eventTypes=d)}; | |
z.pa=function(b,c){if(void 0!==c)for(var d=[z.Eo,z.Fo,z.Do],e=0;e<d.length;e++){var h=d[e][c];if(h)for(var l=0;l<h.length;l++)h[l]._caller==b&&h.splice(l--,1)}else for(var d=b._eventTypes,e=0;d&&e<d.length;e++)z.pa(b,d[e])};z.Wy=function(b){if(td(b)){var c=$.extend({},b);_.each(["password","username"],function(b){c[b]&&(c[b]="*****")});return c}return b};z.jD=function(b,c,d){try{b(c,d)}catch(e){trackJs.track(e),me(e)}}; | |
z.b=function(b,c){if(-1===z.JC.indexOf(b)){var d=BrowserDetect.browser;void 0!==c?"Chrome"==d||"Firefox"==d?k.info("%cEVENT:","color:blue",ol[b],z.Wy(c)):k.info("EVENT:",ol[b],z.Wy(c)):"Chrome"==d||"Firefox"==d?k.info("%cEVENT:","color:blue",ol[b]):k.info("EVENT:",ol[b])}for(var d=[],e=[z.Eo,z.Fo,z.Do],h=0;h<e.length;h++){var l=e[h][b];if(l)for(var p=0;p<l.length;p++)d.push(l[p])}for(h=0;h<d.length;h++)z.jD(d[h],c,b)};z.Lk={ti:10,fw:"/js/libs/jquery.jplayer-2.3.9",dl:"html, flash"};z.se=function(){return z.Lk}; | |
z.zQ=function(){$.ajax({type:"GET",url:dn()+"ssl-test.jsonp",dataType:"jsonp",jsonpCallback:"callback",timeout:5E3}).fail(function(b,c,d){"parsererror"!=c&&s("ssl_error",{ua:navigator.userAgent,site_version:window._pandoraVersion,browser:oe(),textStatus:c,errorThrown:d})})};z.qP=function(){z.ba=0;setInterval(function(){$.get("/appstamp.txt",{cachebuster:""+(new Date).getTime()},function(b){b=parseInt($.trim(b),10);if(b>z.ba){var c=z.ba;z.ba=b;0<c&&setTimeout(function(){z.b(Yj)},6E4)}})},3E5)}; | |
z.oP=function(){function b(){en="AT-"+(new Date).getTime()+"-"+Math.floor(1E3*Math.random());$.cookie("atn",en);z.paused=!1}setInterval(function(){null==en||$.cookie("atn")==en||z.paused||(z.paused=!0,z.b(ci,!0))},1E3);z.c(ai,b);z.c(Re,b);z.c(Li,b)};z.or=function(){var b=fn(),c=$(this).attr("href"),c=c.replace("#!","#");-1!=c.indexOf("#")?c=c.substr(c.indexOf("#")+1):0==c.indexOf(b)&&(c=c.substr(b.length-1));return c};z.zS="/profile/ /stations/edit/ /station/ /music/song/ /music/album/ /music/artist/ /music/composer/ /music/ /everywhere/".split(" "); | |
z.rP=function(){$('a[href^="#"][rel!="external"]:not([target])').address(z.or);$('a[href^="/"][rel!="external"]:not([target])').address(z.or);$('a[href^="'+fn()+'"][rel!="external"]:not([target])').address(z.or)};z.FE=function(){return null!=$.cookie&&null!=$.jPlayer}; | |
z.start=function(){k.info("Starting Pandora");gn();z.zQ();z.er||(z.Fy=setTimeout(function(){s("not_loaded",{ua:navigator.userAgent,site_version:window._pandoraVersion,browser:oe()});z.b(ag,"splash");$("#splash .cantload.normal").fadeIn();hn()},4E4),z.c(Ae,function(){clearTimeout(z.Fy);clearTimeout(z.Ey)}));z.oP();z.qP();z.rP();jn("persistence");rl=Ud(kn());um();$.jStorage.storageAvailable()||k.error("No persistence mechanism available");k.info("PersistenceManager initialized using "+$.jStorage.currentBackend()); | |
sl=null;jm();z.c(ni,tm);jn("persistence-done");ln()&&ve("lsc");new mn;new nn;jn("start-done")};window._trackJs||(window.onerror=function(b,c,d){me(b,c,d);return!0});window.flashLoaded=function(){z.Gs&&(z.Ey=setTimeout(function(){clearTimeout(z.Fy);s("not_loaded",{ua:navigator.userAgent,site_version:window._pandoraVersion,browser:oe()});z.b(ag,"splash");$("#splash .cantload.flash").fadeIn();hn()},1E4))};window.flashEnabled=function(){z.Gs=!1;clearTimeout(z.Ey)}; | |
$(function(){$.ajaxPrefilter(function(b,c,d){c.url&&""!=c.url||(d.abort(),trackJs.track(Error("Attempt to make an AJAX request without a URL.")))});setTimeout(function(){z.FE()||$("#depedencyNotLoaded").fadeIn()},5E3);var b=/(webkit)[ \/]([\w.]+)/.exec(navigator.userAgent.toLowerCase());if(b)var c=parseFloat(b[2]);b=le(A._data.forceFlash);if("Explorer"==BrowserDetect.browser&&7>BrowserDetect.version||"Opera"==BrowserDetect.browser&&10.5>BrowserDetect.version||"Mozilla"==BrowserDetect.browser&&2>BrowserDetect.version|| | |
0<c&&528.16>c)$("#oldbrowser").fadeIn();else{var d=0<swfobject.getFlashPlayerVersion().I3||0<deconceptFlashVersionMajor,e=swfobject.hasFlashPlayerVersion("10")||9<deconceptFlashVersionMajor||9==deconceptFlashVersionMajor&&115<=deconceptFlashVersionRelease,h=Modernizr.audio&&""!=Modernizr.audio.m4a&&"no"!=Modernizr.audio.m4a&&""!=Modernizr.audio.mp3&&"no"!=Modernizr.audio.mp3,l=h||e;if(window._isInAudioJplayerHTML5Experiment||window._isInAudioMediaElementExperiment){if(0<window._listenerIdFromCookie){var p= | |
"no",q="no";Modernizr.audio&&(p=Modernizr.audio.m4a,q=Modernizr.audio.mp3);s("browser_has_audio",{has_html5_audio:h,has_flash:e,has_m4a:p,has_mp3:q,browser:oe(),user_agent:navigator.userAgent,listener_id:window._listenerIdFromCookie,vendor_id:u,device_code:se},null)}z.Lk.fw="/js/libs/jquery.jplayer-2.9.2";if(h&&!b){z.Lk.dl="html";z.start();return}}if(b=(b=b||0<c||"Windows"==BrowserDetect.OS&&"Firefox"==BrowserDetect.browser||"Mac"==BrowserDetect.OS&&"Firefox"==BrowserDetect.browser&&37<=BrowserDetect.version)&& | |
!le(A._data.disableForceFlash))d&&e?(z.Lk.dl="flash",z.Gs=!0):l=!1;l?z.start():d?($("#splash").hide(),$("#topnav").hide(),$("#flash_upgrade").show(),swfobject.showExpressInstall({data:"/js/libs/swfobject-2.2/expressInstall.swf",width:""+$(document).width(),height:"240"},{},"flash_upgrade",function(b){b.success?window.location.reload():$("#noaudio").fadeIn()})):0<c?$("#noaudio_webkit").fadeIn():$("#noaudio").fadeIn()}});function on(b){this._isCreator=b.isCreator;this._stationId=b.stationId;this._stationIdToken=b.stationIdToken;this._originalCreatorId=b.originalCreatorId;this._originalStationId=b.originalStationId;this._stationName=b.stationName;this._stationArt=b.stationArt;this._fbShareArt=b.fbShareArt;this._transformType=b.transformType;this._isQuickMix=b.isQuickMix;this._quickMixStationIds=b.quickMixStationIds;this._quickMixType=b.quickMixType;this._chronologicalSequence=b.chronologicalSequence;this._isThumbprintStation= | |
b.isThumbprint||!1;this._thumbCount=b.thumbCount||"";this._originalStationShareName=this._stationShareName=b.stationShareName||"";this._initialSeed=b.initialSeed;this._originalSeed=b.originalSeed;this._adGenre=b.adGenre;this._genre=b.genre;this._genreSponsorship=b.genreSponsorship;this._antiTarget=b.antiTarget;this._comedy=b.isComedy;this._isNew=b.isNew;this._isOnDemandStation=b.isOnDemandStation;this._canShuffleStation=b.canShuffleStation;this._advertisingKey=pn(b);this._advertiserStation=b.advertiserStation; | |
this._canAutoshare=!!b.canAutoshare;this._description=b.description;this._recommendedStation=b.recommendedStation;this._promotedStationCampaignId=b.promotedStationCampaignId;this._promotedStationAdId=b.promotedStationAdId;this._promotedTrackingUrls=b.promotedTrackingUrls;this._promotedImpressionUrls=b.promotedImpressionUrls;this._promotedSponsorText=b.promotedSponsorText;this._promotedStationCorrelationId=b.adServerCorrelationId;this._impressionTracked=b.impressionTracked;this._stationNameWithTwitterHandle= | |
b.stationNameWithTwitterHandle;this._enableArtistAudioMessages=b.enableArtistAudioMessages;this._processSkips=b.processSkips||!1;this._hasLiveStream=b.hasLiveStream;this._artistMessageArtistUid=b.artistMessageArtistUid;this._artistMessageId=b.artistMessageId}f=on.prototype; | |
f.update=function(b){this._stationId=b.stationId;this._stationIdToken=b.stationIdToken;this._stationName=b.stationName;this._isQuickMix=b.isQuickMix;this._isCreator=b.isCreator;this._initialSeed=b.initialSeed;this._adGenre=b.adGenre;this._genre=b.genre;this._genreSponsorship=b.genreSponsorship;this._antiTarget=b.antiTarget;this._quickMixStationIds=b.quickMixStationIds;this._quickMixType=b.quickMixType;this._artistMessageArtistUid=b.artistMessageArtistUid;this._artistMessageId=b.artistMessageId}; | |
function qn(b){return b._promotedStationAdId}function rn(b){return b._promotedStationCorrelationId}f.Fb=function(){return this._promotedStationCampaignId};f.Tb=function(){return this._recommendedStation};f.Z=function(){return"true"===this._isCreator||!0===this._isCreator};f.e=function(){return this._stationId};f.Md=function(){return this._stationIdToken};f.gh=function(){return this._originalCreatorId};f.Wi=function(){return this._originalStationId};f.ue=function(){return this._transformType}; | |
f.fa=function(){return this._stationName};f.an=function(b){this._stationName=b};f.D=function(){return"true"===this._isQuickMix||!0===this._isQuickMix};f.Ha=function(){return"true"===this._isThumbprintStation||!0===this._isThumbprintStation};f.sq=function(){return this._thumbCount};function sn(b){return b.Ha()?b._stationShareName:b._stationName}f.te=function(){return this._quickMixStationIds};f.$m=function(b){this._quickMixStationIds=b};f.Zl=function(){return this._quickMixType};f.wa=function(){return this._initialSeed}; | |
function tn(b){return b._originalSeed}f.If=function(){return this._adGenre};f.Lf=function(){return this._genre};f.Ul=function(){return this._genreSponsorship};f.Pl=function(){return this._antiTarget};f.ir=function(){return"true"===this._comedy||!0===this._comedy};f.Ra=function(){return"true"===this._isOnDemandStation||!0===this._isOnDemandStation};function un(b){return"true"===b._canShuffleStation||!0===b._canShuffleStation}f.Ka=function(){return this._advertisingKey};f.rc=function(){return this._advertiserStation}; | |
f.pm=function(){return this._enableArtistAudioMessages};function vn(b){return"true"===b._isNew||!0===b._isNew}function pn(b){var c=b.advertisingKey;/\*$/.test(b.stationName)&&(c=b.originalStationId);return c}f.Eb=function(){return!1};f.Sl=function(){return this._description};function wn(b){return b.isCustomContentStation?new xn(b):new on(b)}f.lp=function(){return this._canAutoshare};f.Xs=function(){return this._processSkips};f.fm=function(){return this._hasLiveStream}; | |
f.hj=function(){return null!=this._artistMessageArtistUid&&null!=this._artistMessageId};f.pq=function(){return this._artistMessageArtistUid};f.qq=function(){return this._artistMessageId};f.Qs=function(b){this._artistMessageArtistUid=b};f.Rs=function(b){this._artistMessageId=b};function xn(b,c){on.call(this,b);this._isQuickMix=!1;this._isOnDemandStation=!0;this._advertisingKey=pn(b);this._adIntervalMinutes=b.adIntervalMinutes;this._delayedInStationAd=b.delayedInStationAd;this._tracks=c;this._expiration=new Date;this._expiration.setTime(b.expirationTimeMillis)}vd(xn,on); | |
xn.prototype.update=function(b){this._stationId=b.stationId;this._stationIdToken=b.stationIdToken;this._stationName=b.stationName;this._isCreator=b.isCreator;this._initialSeed=b.initialSeed;this._adGenre=b.adGenre;this._genre=b.genre;this._genreSponsorship=b.genreSponsorship;this._antiTarget=b.antiTarget;this._quickMixType=b.quickMixType};function yn(b,c){b._tracks=c}xn.prototype.Eb=function(){return!0};function zn(b,c){this.le=-1;this.Ja=b.songTitle;this.bi=b.artistSummary;this.Bo=b.composerName;this.kb=b.albumTitle;this.Ro=b.stationId||"";this.cc=b.musicId;this.zv=b.musicIdToken;this.NC=b.albumIdToken;this.bf=b.artistMusicId;this.Nc=b.rating;this.Av=b.narrative;this.Lo=b.lyricSnippet;this.fi=b.lyricId;this.wv=b.lyricChecksum;this.RC=be(b.artistExplorerUrl);be(b.songExplorerUrl);this.av=ee(b.artistDetailURL);this.Yu=ee(b.albumDetailURL);this.Hv=ee(b.songDetailURL);this.ii=b.songDetailToken;this.Tk= | |
b.shareLandingURL;this.kD=b.isFeatured;this.Bv=null;this.iE=b.userSeed;this.bv=b.audioSkipUrl;this.wo=b.amazonUrl;this.uo=b.albumAmazonDigitalAsin;this.Io=b.itunesUrl;this.Wk=!1;this.Ao=b.audioIntroductoryMessage;this.Kc=b.nonMusicTrack;this.eE=b.trackToken;this.dE=b.trackLength;this.To=b.trackType;this.bE=null!=b.streaming;this.Mc=b.programDescriptor;this.sb=b.categoryDescriptor;this.oD=An(b.firstThumbed&&b.firstThumbed.timestamp);this.qv=b.firstThumbed?b.firstThumbed.station:null;this.GD=An(b.lastThumbed&& | |
b.lastThumbed.timestamp);this.vv=b.lastThumbed?b.lastThumbed.station:null;this.JD=b.numThumbs;this.Qb=b.artRadio||"/img/no_album_art.png";this.Qb||(this.Qb="/img/no_album_art.png");this.MC=document.createElement("img");this.MC.src=this.Qb;this.fv=b.compilation;this.Ho=this.ki=this.Vk=!1;this.vo=b.allowStartStationFromTrack;this.$u=b.allowTiredOfTrack;this.PC=true/*b.allowSkipTrackWithoutLimit*/;this.Zu=b.allowFeedback;this.me=b.templatePath;this.Ic=b.artistTwitterHandle;this.WC=c;this.zo=b.audioEncoding; | |
"aacplus"==this.zo&&(this.zo="m4a");this.ci=b.fileGain;this.ci=""==this.ci||isNaN(Number(this.ci))?null:Number(this.ci)}function An(b){if(!b)return null;var c=new Date;c.setTime(b);return c}f=zn.prototype;f.W=function(){return this.bi};f.vb=function(){return this.Qb};f.e=function(){return this.Ro};f.o=function(){return this.cc};f.eb=function(){return this.eE};f.bh=function(){return this.av};f.Ol=function(){return this.Yu};f.hh=function(){return this.Hv};f.oh=function(){return this.kD};f.Lx=function(){return this.iE}; | |
f.Jy=function(){return null!=this.Io||null!=this.wo||null!=this.uo};f.Wj=function(b){this.Wk=b};f.gb=function(){return this.Wk};f.Yc=function(){return this.dE};f.Be=function(){return this.bE};f.Yl=function(){return!1};f.Ql=function(){return this.WC};f.Vc=function(){return this.zo};f.oc=function(){return this.ci};f.Fx=function(){return""};function Bn(b){this.Fa=b.gain;this.zf=b.clickthrough;this.qc=b.impression;this.tracker=b.tracker;this.vn=b.tile_tracker_urls;this.Af=b.companion;this.rl=b.companion_web?b.companion_web:b.banner_html;this.lb=b.type;this.ig=!0;this.cc="V1";this.Qb=b.image;this.le=-1;this.kb=this.Ja="ad";this.Hv=this.Yu=this.av=this.bi=""}vd(Bn,zn);f=Bn.prototype;f.rH=function(){return this.qc};f.OH=function(){return this.tracker};f.NH=function(){return this.vn}; | |
f.vb=function(){var b=this.Qb;if(null==b||""==b)b="/img/ads/generictile.png";if(b&&"/img/ads/generictile.png"!=b&&-1==b.indexOf("mediaserverPublicRedirect.jsp")&&-1==b.indexOf("_500x500")){var c=b.match(/(?:\.([^.]+))?$/);c[1]&&(b=b.substr(0,b.lastIndexOf("."))+"_500x500."+c[1])}return b};f.sm=function(){return this.ig};f.Ss=function(b){this.ig=b};function Cn(b,c){zn.call(this,b,c);this.cc=b.musicId;this.Qb=b.tileImageURL;this.le=b.trackNumber;this.Ja=b.trackName;this.bi=b.categoryName;this.kb=b.programName;this.me=b.templatePath;this.sb=b.categoryDescriptor;this.Mc=b.programDescriptor}vd(Cn,zn);f=Cn.prototype;f.bh=function(){return this.bm()};f.Ol=function(){return this.bm()};f.hh=function(){return this.bm()};f.bm=function(){return"/station/"+this.Ro};f.Yl=function(){return!0};function Dn(b){zn.call(this,b,null);this.cc=b.musicId;this.me=b.templatePath;this.sb=b.categoryDescriptor;this.Mc=b.programDescriptor;this.wD=b.hlsLiveStreamPath;this.tv=b.hdsLiveStreamPath;this.YD=b.shortLink;this.Ev=Ed()}vd(Dn,zn);f=Dn.prototype;f.bm=function(){return"/station/"+this.Ro};f.Yl=function(){return!0};f.Be=function(){return!1};f.Jy=function(){return!1};f.Fx=function(){return this.YD};var En={},En={StationKeyType:{AMG_ARTIST:"ar",MUSIC_ID:"mi",QUICKMIX:"qm",SHARED:"sh",MUSIC_ID_AC:"mc",GIFTED:"sg",AUTOPLAY_FACEBOOK:"af",FACEBOOK_SUGGEST:"fa",FRIENDS_STATION:"fs",FRIENDS_BOOKMARK:"fb",ARTIST_SUGGEST:"as",GENRE_SUGGEST:"gs",FACEBOOK_SUGGEST_SEARCH_VIEW:"fv",EXTENDED_SEARCH:"es",RECOMMENDATION:"re"}};var Fn={},Gn=g([[-668617326,-1489172681,1065101486,-115379946,-278200290,-746248963,1417609708,-372646020,635342487,-1622802655,-2025352635,1957035642,-1656086821,2129644150,1488000962,243217342,478415738,367978584],[1242278845,1186421985,-632397609,1658687266,1720545937,1882393713,-1899091612,-724446641,575132671,868035971,712898834,-1176038968,241517787,977647203,-1969572901,-777943246,309332310,635037017,-1706926976,-833502787,1943558205,582565347,1072930735,992875E3,-1567149616,1328296287,-1268677942, | |
-1299425746,-1015376167,-1963962233,1952430114,-339479800,792775040,-513386591,-1108553382,-913014509,-784386903,1382684063,-174576567,1440883213,246053430,-1871242693,-2060622435,-198495282,-1135236240,-712731143,-1608903574,342755680,-591140101,1163271072,-1752422059,68052641,1419848668,-2031388476,830175929,-1055711368,-1134050495,-125498832,652979891,-1575244906,-229455478,-390523918,-1841832974,-985010095,-1283540245,-507787403,-1050321547,1661602118,-1360752569,1321570751,-1319781990,787241843, | |
-563004666,312882359,332303031,-1819448167,899084E3,1343197286,-151517417,1087987224,-1043039698,-1913774587,-478267742,1422393299,1258273231,558691768,-1419201209,-1211361247,1551738969,-1294303777,-2073783046,-1934602987,441086370,1609600394,-2023170203,-1840369693,79171738,-468159446,1489862931,251112137,-1833906311,-1340096814,1306775074,1803001376,485566159,394897300,-1471791706,-204675156,-769297654,756748830,1059850320,-483983093,1457084545,-2043038802,28560107,527405828,2102129511,-454287143, | |
1829087825,-2010418931,-62875593,1709314758,-1530312057,-1323659090,-1250613908,-1676497131,1747940074,-993473015,1140244836,1271928281,-1684332594,-1676639195,1084808976,-1329822157,-1756447878,-563098084,-536517811,1888250270,2103180335,-1131586608,-255008730,-1242231292,-2079175737,-1707837428,887679316,1692493219,805803421,-1918612472,-1441736639,2122803936,-1241381839,1207233130,-192786348,381955035,-778676894,930592272,1958048798,-703840039,979300739,-2028591859,-1854309299,27429221,-115991108, | |
1151985154,-1410535675,-1433355626,1986035133,1220500409,629410442,-777234778,1872446068,-983021869,-1999696533,844033984,-360512289,-1568781695,-1700044421,855753881,1357446935,1739886399,1526414210,-216598573,-1170056268,138285812,486192091,2025883817,1858614789,-1267912471,2051396862,439466712,690236786,1911551839,1842326680,2040604186,946204405,1637114275,-1034288591,1963225810,2071022781,2119671992,-1280888417,1071496875,-995680635,1154712361,-1575286703,-1119572330,-96800304,1030186681,-1501016443, | |
-741760832,-890863364,1103305260,153018157,-1633360315,480261324,-519194088,-1842697764,767760587,-996315376,-286808216,-2123113066,-1772804712,-1423619086,-1514152216,-1987164010,77450682,1472056436,255039908,1670419492,1877941830,916747140,1374697182,-1368359264,-628935364,-73502056,-102960770,1332735810,708950080,2110596706,941617040,393471574,-167600447,-1319556549,279336660,1843080801,-1912410626,-483949846,-1757595659,362071593,-1955346894,377528632,1062933032,-1943410382,1238598818,41501845, | |
294646501],[-1373445067,-1082964757,-67935922,-1255475590,367820427,102092148,822686134,110981783,1163094176,-290455049,244470097,-558809758,-1819250194,198365906,581955716,-204096907,-390626189,-513494702,-1915545596,447478324,-243041253,-183692085,1156992454,633653959,1503854155,211705894,-1767337844,1237341470,1821716439,616229538,1805501216,1920143533,159858151,-1474997189,275203014,-187830222,-83752785,-712296528,-1198429253,-216151758,-1306052491,-1799365258,560301979,-1504528354,1481021668, | |
-1272254306,1308571891,696540119,351516199,1590318464,-69346381,-667341645,-155911195,-36757467,834017617,-1638363747,631275061,-592916160,-1936247919,1892169876,456068549,613293728,123745130,-1886669809,219833870,219562230,-1557455082,940149007,-2097680150,1825346575,-1175272402,-1235114922,1493298357,1991847414,568022808,-499172627,-112555421,-1980348828,1932904320,-1611071253,-1403174184,-167469628,-1180963542,1072158552,-613816163,-862178509,942387775,-1333808767,-1692354748,1313787485,-309445736, | |
1253468242,2025637473,-1042767220,1910542E3,-1630870511,-1526897811,-1604020582,408618476,1418292627,-2129595381,-724048516,512920646,-103932119,1047722833,-1482947508,-1380367266,1252234489,311768274,-551478972,1650963674,-181098760,-732091586,1595446500,-869801098,-24744625,-1787921266,174263527,1194616635,-1081427855,1126977887,-1562922113,-817301E3,838279323,-1226337575,1578329600,-175920827,-1428918177,-387775629,-1511675097,-892929462,1223926025,-1306891909,1169799152,779858323,-1778126405, | |
-524649920,-830556626,860562629,39944574,1320653483,-1201945930,1833423065,-761183429,1965265963,968842471,1914845989,-1030813421,-1071841724,1343170533,89356747,2020375304,2088053082,1653904173,-240115984,-409773834,-1983585121,-403227385,-277879753,-221402817,-1332130200,-1376343015,9590136,105204472,-834262869,-1617412468,960387492,949404040,1779064565,-1170764813,-764047123,-808316935,388506490,-1918117517,-500393918,698426955,-3647844,400419754,-103405224,285376919,-1003759537,1870759243,102748823, | |
-764696686,1677138858,-1388921396,103162473,1460773365,-1435213501,1965305741,1477945421,1671352758,1830344388,1342111233,109704916,1503123218,-681455781,-1844371092,1568671475,-572370966,509671019,416553660,-596462389,-1615021443,-358086715,1879801394,-817794090,-480992098,317412454,1675412708,499273070,480193155,1039594257,-5695919,974820933,819292324,-988129868,-301784537,252324012,1159121330,-684572776,1417427832,1539978209,-225831486,-536937811,-689407043,-400506339,-82012221,-469210633,-727619600, | |
2040721404,-696644205,-396165370,1421671191,874554992,-1843850645,1418921527,1441287891,-1463495738,-64214062,1940985584,-408776692,-2145511048,-965469418,-86307231,-1255055416,1993466557,741626603,-1623004809,-1142704129,1046088575,1310623322,617875974,539979483,-1683047686,1651692925],[1924355171,-206760028,1446110878,1081851253,889757828,-2002062898,1258590303,791669728,162171282,-568416902,534510333,942129417,1984822584,1548365744,-1578565320,-192856013,-796459990,-1282886816,-22686926,1193290357, | |
-853161062,-1554925756,-1208703306,-300525376,1343651963,307711866,-1256737732,1947362037,1862333257,-626768519,-443842416,1874874196,-2075012790,-2067574092,1896622168,266926156,-1352760840,140855675,1428568313,822733805,331521396,661435715,-1935253866,-377241192,-1201873832,-1255998515,558919673,-1938803056,841625638,-1199858779,1241472079,993956477,-862027225,105704041,-1997401277,1323087596,259892920,717025180,-2038013597,-1085596849,-1797201689,-1929486858,1250756411,1133601648,-1125316543,764343866, | |
-17011992,2050131149,1375397533,882467377,358193559,1519201778,-594587035,723751261,-1403549626,194758789,-441519256,-481123605,1731397408,-48797160,2025543567,-1253954991,1760777991,1196884E3,-1974512863,-1233696075,114168684,-1376959417,-1366679570,-1183077587,-1783097594,1228800044,228444464,-150211475,580686072,-1354431679,314022336,-1738185464,-1936890857,1226645204,452145750,-215523871,138758488,840600910,1330737125,487022727,-1808721063,-315188039,1341738853,-2028822604,-1928965600,2064773845, | |
-1755236176,50946811,-1905726113,-496283022,73124843,-1823411935,1378738155,518746290,-869356552,582635223,816890812,1692371532,-175423502,1454619622,1047635712,1708615111,-2019228107,-1856632757,-2050130774,2080346111,2071570745,1764195786,1518099954,931686965,394043827,-1769529388,-1201030595,472291233,-711915043,1804013381,-911361387,-612162600,175600401,635625261,415663319,1683300784,1487656700,2127163181,297065239,-1374015767,-2065079900,371717891,-1943802771,-257383652,-1907120381,-1324148976, | |
1461964562,-1726091009,-1559979848,49220985,725472239,-745789135,-445361274,-199564465,273260092,-141202994,-1898505054,-1733239760,-1620159711,1122723770,658685164,-1913000112,-1432314969,-110537466,-1567300113,-602748603,259685610,-1642472042,-1412271052,-764527553,330588144,-813467161,-127929197,-1739556394,-1112009470,-1564079012,582365868,1027180270,1166169189,-1360307975,-226240437,-2142146557,-1809113998,-471396475,1066304573,1951719533,833754523,1451918181,601670718,931601240,1623627875,-779578814, | |
1376339650,-1835322746,-648024788,706773824,-1836191182,-1071063207,221618751,15583516,964275929,-1440104441,-2068153545,2117904843,1425017603,1634279292,1479817341,1997256584,-1318913600,1130465025,-1643800204,115734566,217519677,-1142882739,2131782563,1906691491,1883553078,1423678573,-826883353,1306697646,325892400,-364869035,2061199728,-930064422,1890745429,-39988065,1905545865,704051402,-539749121,973552762,1628223491,-163728653,-625666554,496550603,-1901145629,655605251,-1485567849,1099234599, | |
-184841722,1119219236,382492833,1489500752,221924532,1086418682],[-256481494,801110085,-119872799,509783513,-477712071,-835558330,528867490,-2023045500,-123770387,-1178470037,255132311,1566332711,-456057122,-881236788,-513511868,1094564244,1343657617,712344639,-445847980,813451752,-1413515874,417532772,498960643,-308531879,769650731,1861403677,1072729325,1548451633,-1301707574,-1330515990,-1676577970,1745587046,-597222330,797825474,-892389003,-1007232805,954071072,1109263954,-1614914822,-1259062557, | |
-1786789371,-5930123,1428709893,2129228981,836684532,1047799277,-1395475429,-72114665,-375593368,-1008834401,-390317511,-1020792698,-1275926380,332253257,-1478960433,696775528,2143627797,739108967,-1013964626,1805278187,286714636,1459279357,-516006855,377449538,342030324,1561884148,-2103087240,771459302,-803663482,139514954,-822472764,1069121035,841333120,1026806815,1499441365,1068602459,-1797920262,-571528245,1278583513,-818773995,2112796988,-144046283,1824430040,-505204782,1918073884,1766199580, | |
1754925400,713223085,1517335798,-903046961,1342917813,-453565134,830127918,-1693036242,1630506763,-1087226906,2056931367,-469650104,1198940782,-882892537,-333931753,-1801229127,13133446,-636336561,24306924,-1753618462,1161075520,1921432801,420725813,-1947081664,381375699,-419371469,-182159270,-1300283639,632701037,-1583614324,991186338,-2123665216,-7948842,511044531,1471476290,1182211882,1400335455,1649921741,668443243,1957524639,244183410,-92517850,-1885895304,-215591065,-1602133765,-1978449123, | |
572600933,1241616114,1382791416,1606939532,-88724270,1357874804,1045415649,139803957,734817238,114434326,636579560,-1256384725,-1905954686,-788381430,1804460125,581871470,191442317,-974667535,-1287023496,-1422204417,-1049768011,-1242139543,834672046,2013782783,1742830664,1455109779,-1323647487,1254242362,1423359967,-1172351986,-187761029,2140983554,-2101236972,1295161230,-477941790,509847978,-887375925,1200516205,-658453656,-1190667728,96224156,2038902535,1946423187,1592191677,-956250560,-495710990, | |
2106986918,683885619,-1793478912,-1397870406,-772970640,1918205058,1356446925,-1126242162,-1746702593,-868733192,1907826626,1861026577,397436354,951998886,1833378346,-1723810851,874800112,-1737343646,1508666377,333477819,1826433159,1983728277,1373086304,1981139135,2074745613,-2048724808,698437559,-1866716593,362904801,-1782855718,-1741141157,-1773245672,323091746,1690064669,-2056374979,-1836816376,-1111732351,298166591,-1694443349,-372771188,2900670,2042098408,-867889354,275585313,-2096698177,-1277127965, | |
-79026157,-999457889,2096427848,468404578,-20429582,-704742134,-225830798,-1595657218,1591443597,22617057,-615642893,696913403,-969360586,1509515652,-1555772127,968555219,-2096027108,412286088,-2056348324,335367958,-2122306889,2046519694,-1416956959,-1737723199,-245999303,858718077,-791186324,-587740658,1642500890,-175974298,741609689,567739491]]); | |
Fn.Jm=g([-660494265,2176313116,1416121723,-839045805,-1381132614,3076489317,-1750824686,-1445620563,1800353587,106414398,-55703929,1879595236,878713105,3179226769,-472871663,699586219,-916098940,-77882640,1323584925,-856773873,-664499978,637393335,-1327613289,1726668591,2808002686,-294476294,1409764844,-877821011,2056906976,-651500219,-1241716425,648910553,1566661992,-224834686,-429337790,1627725132,-810378076,-1958601416,-633647431,-651335083,-136757049,-1715159933,-1417056647,2009531291,303411786, | |
202292237,-370113870,1803419292,2873522889,-1859646072,-1541233823,1046957386,794964064,2966019713,-1159437909,-385950441,-271129120,1762475667,855301808,463072772,-1096833063,2039996358,-48529371,467959268,764451222,-28803088,1653329889,-1523268064,655389626,-1946606739,1054903350,-194947497,1616727936,3840716642,198674121,-45434397,1525356784,2056092818,1822690470,-659734215,-899776830,2126957776,1430932950,-1169732143,-518826133,-880171331,-211358708,-2023333461,-664906879,2041131815,1515085202, | |
-483385565,-233710239,1862353104,-610192193,1013067784,-704845450,1860068494,3091911084,3119450164,299612349,3240767786,994040417,-850368446,1656681537,321177603,1491205056,956821095,1201043762,-1010568576,-995084615,1589798068,-1803244996,1609538643,-1044839665,-395547718,988061102,-1146338788,2347657914,-1173118286,825424519,3377836921,3886022750,1532589967,-268816798,1518035669,-403833827,-817012773,-969864230,212765583,1394175023,-1399513825,3379970447,2107464022,782642322,871032245,-460202943, | |
2682112307,1164455951,2306022311,-1231550135,24380903,1828150735,1152934902,-543783606,-91585648,875290618,-1828101296,-854654845,-1104584739,1419422153,-2058038501,4197682403,820561805,-312461517,1263006914,64258524,-1947973732,4222574493,906732075,476690067,1440359941,751401112,334548079,1597046497,-161663280,1822787204,-1230905565,782692251,315859216,-238511334,1378593311,-476395597,-1346284591,710300276,1364396870,311507069,364653411,836777756,2384582612,4235264591,2449487292,1124899333,631187694, | |
418743758,3873107894,-1181382411,1831622427,-109755364,323523197,-1335247390,124887960,3352741505,1008103971,-1011101729,1086588634,-2117572687,-350174254,611773780,-1249775550,291547320,-1130255089,-655258465,1888208838,91871292,700097208,1169704430,-1518381703,-449951094,1211520120,-959660108,3015658171,888110206,-186638233,1065846889,1484390204,517974799,2186627181,1661651296,-1412001646,3630597186,-238406889,-1660991278,-1880932477,638328291,-1982133493,-249044509,2107966463,29992993,811022951, | |
-1974044114,-461666609,-1200579874,-1315250886,1185116276,323805572,527636763,-500483594,-372024003,-1721528145,367692793,2965109502,-733867907,189843210,-1179202420,1621433870,-1593351101,559878802,1515439684,-359208402,-369904452,-1168161326,1162569174,753946012,99556623,-853885970,-395929680,2875064567,-336745025,3785102970,1707679501,1645587281,-2014855690,2097938744,1861518926,3365531406,934715964,-852402451,3689597016,3933564480,943938819,-2079630206,600685706,3377771497,-338959859,167434988, | |
-1728077981,382787553,1421238184,-1940336516,-357777760,-359938633,-750536467,1188304636,38263995,3948986193,584774019,1719979903,-1563043338,-989338565,2067172070,1551136012,1206475204,2681187148,-1830518459,-640702285,-1796077080,2295612680,1001060277,2193961019,-404328488,446138072,514850637,69467365,-396311030,1997779636,1751019254,1124598223,1180777079,-86062826,4282598120,-301611745,-725208289,-1681254079,364839967,-1011855731,1825585071,298327635,-1283222561,-1311737006,108856055,-1444578933, | |
1314656422,2030950498,-559801647,1007456447,-1336049088,-22536359,-2094065153,387517724,347999945,2269588877,-32732626,560468902,-264075480,-1043194417,1410374347,1761300923,1062923881,1434446356,127294998,1491247620,1853250316,999133711,-579788416,-586192950,939119733,-1853793073,-1021692741,-1888416014,-220582014,2343090016,1173638787,2136517820,451646459,151909683,-1056102474,-135388413,-131461424,1459818802,-2001734575,1115607068,-240343824,-581603511,221752402,588280411,-921217668,2618231172, | |
1389199953,2088687670,881388889,-989042165,1733563373,1667782717,1472075823,452301409,1180237858,-1530461817,1180234731,-2136600503,2987450999,-1096021544,425381193,1809964613,1861346093,-1197164522,-1048094536,1579775421,-730480671,-868566865,1168874199,2349917682,-1699906002,-1176995742,687066406,-1604879858,1971691214,1248746374,-434227533,-1609691996,1043122588,2397584272,-834619493,398112309,1945223810,2080414944,445365338,-1145536819,372166828,-1917358246,-710077900,2767245172,1103879931,1905766388, | |
3423083954,3358274879,4194228464,-1527749415,1255965834,-371290099,-1082969597,3049994580,157108079,662340189,1265263059,1668011067,-481884736,1710765868,1232781665,305252938,-80195530,615735632,1824127533,-877972583,942826142,465049070,1789555911,-1879432520,1678327592,-1757693291,-2095414891,1219662397,3724783702,381309764,1753740122,-1129259060,-859683293,-95404371,1904842092,1703805866,-90225019,3622866487,2402060604,-1515930247,410705037,-1964005706,-162531798,-2002415430,-485722690,-1547715385, | |
2726462587,-995184654,-2110929414,-1435254315,1110375827,3707025876,-278774202,607738417,-225446776,466849138,661665028,-1623651469,-1499884200,-1965012448,-579868709,3268953145,-806391621,1888265847,-2142439541,-710140766,2064722377,1608537823,632525034,290785349,363170827,2083860643,609551684,-745148976,-352032894,2117914225,631792652,-1767287330,1274503502,806681864,-492036562,497266354,-1237535332,-1634544639,-2053428156,529086784,-293488197,2135098761,-1356021012,262304738,1046245290,1988297319, | |
1691828198,-406478198,-1716035396,1628646192,-615375754,-607665672,3790886060,-728593129,1841024095,1746843240,-1020866887,2302010665,-260980333,1556521100,-95709717,200094813,377835361,843090564,1999855405,-872321307,1289869302,850477211,1703192522,1942852851,1457100782,-1829097321,-1582363235,301775772,1430088660,3352254470,-1296627143,1539899779,3989048382,2848677958,-769546492,176647396,2592676081,-2133600140,1768582397,-1182142479,-358223566,-1566651555,1732998016,195916383,1507153160,-1917579734, | |
4111634,-2028285938,2060329129,-428819835,1138047383,66941171,2710136E3,-1307363395,2031387624,737273789,1625363889,-1920526739,-90989064,-1327162914,201931177,3207880130,-1921330742,2424363103,-822995138,-1268099087,-1646672011,1419456093,1738765445,955776024,-1570114143,453308750,1162928134,-1889661420,1589221676,2227695182,1561995678,1195013569,3872805224,2108776840,-426133752,-1999599622,115625294,-886446823,2013727577,-1133202947,-637058752,1434163510,-2135206530,1112681764,-1868654977,2102889E3, | |
2138631127,-1215046581,139038471,-1971848184,-155455,785006883,-1237818916,-653696914,698697188,1511757714,690990227,-1111046925,-624439803,3920210200,-527579526,-520420569,391466338,1668124736,101896863,-1356528523,-1198123200,-1103215608,988899046,991349895,768045377,4124428921,239113763,-950572166,902494170,178892502,1818176704,598391055,1956912209,-626936489,1093583906,3505452946,4033786148,-1839816397,-201513415,3525196195,-1308260124,859020292,-878996736,-861824791,-2070269953,1055124755,-763608609, | |
-247120679,2235744095,-1662605666,358728125,-1970307577,530815132,1612461120,71344115,-1292718444,-2095339581,1748100077,1549536216,1653214857,656856995,-2101943244,-1222007353,3002295244,-1542349594,1146741764,188646794,135015929,1857961979,-1042920498,984177156,-1718950649,-1051555942,834248483,930519416,-171473304,731201812,3556284681,-1080136067,1103019065,901538749,2011766546,-1987012976,-887638115,-859878875,1046373694,994390513,833577225,41795647,860545703,-1972872592,-668191907,2104738195, | |
-265216903,-402055505,2362776736,-2050049626,1076541385,-1453439674,4203818537,1067458257,138862871,-762267512,-836204292,-487384847,2809824723,2049799098,-494323739,1837462581,-1976629766,-1583638929,938420607,1831532847,-1480335846,-1735575472,604010387,-1186170580,1302955830,-1605454480,1252282244,1898244038,330891886,665595157,-71717485,798272028,-1739032003,-1667384938,2117371861,-1474746580,2421164745,-522489099,1303676220,1934673900,-1318949773,118688351,1130973230,-700307659,-2057756659,273082460, | |
846003028,2107938573,-1370700956,3051084201,-193791840,1006642308,19949502,-930475241,1279008923,2092665779,1107004847,593858995,-594064827,-2043025608,-1748792551,-671131867,1031094131,672302424,-147028085,1897272260,1391983881,1248205622,1652641166,-1143137002,1795652157,1454471812,-2019348041,1804141881,-1345607787,1325328814,-354179855,-1009460787,1593670706,-1313661340,-1792780666,564648466,1901453377,1935848565,910715861,-1451336324,1172862241,-1827037870,611291550,1515721561,3353018398,1017710988, | |
1457149716,-1442093238,147364445,3907446828,-227498236,1908355546,995587886,-68612277,-2013518858,-817808015,1342089452,-273014590,-346824511,-1612994,-2058475288,542591014,-1971830338,-1796630176,-1545170844,912021419,-1091995956,1500222658,-1939959582,122371156,3569776105,4076660380,3962251101,1739124204,616450329,-2115265398,-38718351,-295590751,518219998,-1940536747,-764174336,374560197,581333134,1807008154,4226050524,3975859667,-581467815,526806814,761623905,1189298362,-1954716528,-430188675, | |
-1525734782,1262837027,-1688385429,-1781620317,3432301303,773242498,4018764681,2194958628,515511589,-2063747213,-730013373,-1054523385,484756414,-2142683091,290290521,1691836589,1794035273,-2082695065,922721320,1878749341,-1305513215,1852616082,127892,2699268385,-368902694,1080070758,2136578945,462411162,-1520238756,-1609084730,2023969044,139506436,-194669384,-12971330,702409552,-472950228,-1908143328,-1077985832,1688057226,-997553583,-1745798717,196114755,554134367,-2125202191,2871444998,-2127649646, | |
-66403193,-974461686,2105288958,761182035,1506525513,1790153750,959651354,591127819,2131345853,-322888082,-1503363837,113062829,-686307435,-528601753,646501387,-499239777,-1937812066,1000773826,-346043076,-380752411,1007674591,1430602838,4148396122,565139671,3852311073,398181959,-255434734,716828220,873312462,1923315311,-495825839,909551101,-1037646823,275479761,4019233708,193268365,-710477685,-835250760,-1220994910,1791569505,4236285125,-178655522,880984896,621717038,-111317326,-1305580433,-1822998318, | |
2080682536,-1190478566,-1919090231,1136016173,-521409108,2082575876,-2072414865,-1233955330,-1604955237,-1357030910,3893568590,-778020548,1521217351,2940154802,-1428467119,2026539754,1542736860,3819288606,518318201,1366018198,-843374102,-183255804,-1809418464,1797905089,494374247,-1775900094,596929468,-230871542,1846523,-284028413,-1774580693,447649291,334681480,-1368654162,1233373661,504048287,1734651128,2793038906,-128739999,2885388799,-661807186,744246375,744733413,-1714621237,3857683291,216506644, | |
-880199469,859368867,-417881250,-1231210446,1478989228,-708193271,2098837965,-972115330,-1317439242,2009906410,3341623989,1507828598,920347090,-1769789163,-867954189,3334228589,743761377,-583210684,47787561,491230641,670630064,-1750788404,3118382098,431486917,-1086006153,3200818831,1615284733,638728558,-1581322112,1888187443,1564832304,-318520085,-1471319122,-1982506963,-1779382278,-279856951,208552588,-886158851,-1054127395,1629264597,902944718,1588274806,545004424,490201106,1263876993,1228970266, | |
601487829,844423E3,-1188763182,-1079632624,-2044731633,-1143797743,191556422,-1833663692,459429406,1536464179,479813011,-1724672447,3860650814,1362014812,1413514054,-1601132546,496805369,1191975396,3031537019,-1469938605,911026636,1122267871,4070339594,1820083946,548214811,2104971925,-999654350,1775142240]); | |
var kn=g([[229897818,849839868,-332487530,-907383437,-1140707779,1654199944,1768821727,652357015,623000070,1470604882,-1700802255,325928445,1032404949,1187458971,1923722567,-1203655686,-1390756482,697642389],[-838202984,1582992320,-1714076669,679877749,189010644,1849391637,1294974997,-1459294,-1488742285,-1267499271,726168914,2094845591,754773706,-1978458060,-964803934,127750555,475421891,-1954094281,1930533718,1804524105,394085593,-2051681430,1657887374,-1897984338,-15890258,-495691821,-1572079538, | |
-1249123943,1045945831,-1502595007,1833385681,1320753672,-704191285,-1083120076,99601038,-2126564410,-844996408,-471190585,-95833021,-642258511,-13931089,204284672,363505287,350301540,2096251266,1373144888,630788670,-1816153472,-401154963,-97762171,1780264345,-463978616,-247249674,-1749504896,1661023437,907615021,-12831512,397335952,-1786395721,993476149,-1289892824,-1486484666,-1637501503,1675351685,956816708,-391449187,1892156646,-1927668726,534517972,-2067356029,1379383480,-1110405008,-1415767431, | |
-297252165,-827208828,1370363882,-977108484,1148411618,-424551702,2063167191,174620934,-1391584961,745393472,-333539626,-524786491,-2117597493,-1848292203,161065330,-1666287795,-629597872,-1515716318,279188318,837684612,1390580413,1470418347,-1721969561,1616928068,819446181,113011226,-1137116088,1893567469,1270822224,-1942858657,780944747,-764992437,-5230105,2052542001,-999992473,-1537640841,650047489,1734205268,824706066,-788513771,957925301,-374186585,1533109320,-1173745566,-826461704,2145721040, | |
-357151714,841612069,2114269302,1241753843,-1049389401,2142940283,-1838067471,-1324159491,1905776214,-157297790,-201054091,-540165134,-709698336,-1016771856,-1488430653,-594563498,1731530846,-1798530146,-1606210681,-120326099,-638304073,162704055,1158793164,-1080616086,1632271664,-953274094,1725021944,690842045,1739639665,-44622681,-1967781309,-641513874,-761373643,65745658,-1214426411,-1813964993,645427078,1338844898,-2050732116,1578591624,1083724660,590026151,374619257,-1119927069,919795828,-1845588850, | |
949741829,1681149992,2078866991,27836027,991084966,1816575850,588384585,-1794583888,-1101425630,1569299599,-958842176,1540325237,-888719722,1539346640,509413950,1355091328,969898415,249646189,-297327243,449063944,-701365741,1107499286,-1381919827,-680597934,-778804932,1098355179,921066823,-1666097852,1340413236,1635380422,2096582952,767918068,-2000835789,-1834546588,-1280335848,-278303333,-780249545,461588273,-667101715,-401949267,-1858128041,1434456423,-1750756032,-374815067,195467630,2099495900, | |
-1597721624,-1903156491,-1493112415,-78449633,246041414,252275050,75487554,924386488,-134584506,-1983745120,149251714,-2087652145,1622942259,505617848,587788700,1687633870,841560575,2549740,1514529746,-1765142328,-167150553,1778487572,444538353,4769090,154804769,-760448134,-718437660,1384148803,-823751116,1125707753,-464419398,-597630465,1284194762,-1132703057,-382861132,8794989,623742166,-728917168,102274724,-1816409486,-776347168,-75071976,-440781865,1682065087,2078723742],[-21733635,-306381912, | |
-744029967,-176378044,1429039436,-1164660022,-381547734,-1299991660,1607009042,-402998702,-754759649,-439166825,-710246648,1827069566,95384152,-641266701,1622567497,-1349685950,349194347,-65540781,-294482240,-809162226,1024527238,-2048819911,-1414777854,-1706213789,2015358012,1154205471,-727150729,1910149322,-220239283,1094825782,-684452274,1939354503,-277056907,-494300589,916538274,892016842,-742209427,-1484685128,-1017654794,847680589,932969587,142238672,1099215356,1985912574,-886341855,696524866, | |
2145491540,1058435670,1159229527,999079252,86553755,805114715,1787566030,-91209740,-829271227,1839351800,1401981608,-139328093,1934503773,-1434150918,1964025873,1804658669,-608913682,-921334185,-15173140,-2124493524,-1988743674,1137069043,-177302877,-2040222398,423375948,-481425272,-569706283,206961364,-1995276609,-271767082,703822755,-427391440,-185040687,2128784808,196339784,1762627017,2069139401,-1843691302,736819839,1542164659,-1512726270,1458966678,-385056603,1024786372,1010105275,824382034, | |
-2068651977,477383174,791412835,28915243,-1389343508,577668759,-673413218,1342015518,250058625,246215074,-216638913,414242972,-289953053,-1820650324,1832775439,111065849,-1237666466,1577571453,1826822183,243112583,372960343,-1937708138,2103358009,763214910,1800183795,-1992244437,-478430059,1210796593,1184941843,-1205185367,159027875,-1041734734,-1829498500,2107083548,1717162088,-1973878467,-979334533,-1793931378,85668082,1777533755,981628988,1650968752,695069126,-1039023194,49931267,-82940838,1189597009, | |
28043600,380817357,1018153443,-1258808613,1477041890,-1102691390,817007353,-85096175,1369063118,641924991,-1297538737,466052501,1236104331,1283110662,525901675,-595677004,1267730858,-1311074061,-1367762857,1162231097,-24262407,979403729,-1629480743,943319477,1346742362,1842491538,684231818,1644633962,-734924384,-418702453,-2017213300,-188901916,-2093017368,1433345104,-1469387383,202250897,636101491,926093488,-1073854191,-1275868552,-697868318,-679652007,-439843226,-969688977,260882203,137526431,-705670178, | |
-735332500,-898570095,-202874621,1951633522,1251469271,1358944081,1854037419,-952514179,-221850763,-615500027,-7901447,-1842188195,796332468,-1820356461,1042145500,300996451,985124197,685221834,-333293243,1437878022,-1378933693,307092097,-2052507185,-149857939,-1781671066,294895386,433559162,1422069771,-1738410930,-1239801250,1639309903,-723122509,1546543226,1627266706,-1531749319,1934841867,-334231859,-1926427978,-1592311471,717274623,404420987,1893525710,-1529537637,-917170529,936436263,-1450703610, | |
2047953531,70803453,1124273233,1284478630,1799480282,-905101325,438026463,-59942803,1430045468,-155909065,916399199,1391353235,385801221,-850529431,806123563,39169159,-1463583305,1078258570,1679455913,-249910367,-573522649,-71380760],[1982223603,-1914120326,1673119344,-168093710,1947706464,-934868568,2011192205,-161518924,1095646864,1078536813,1518513073,680733802,868705769,-1164672567,-907727792,-195111916,-723872473,-53086897,-797237490,-1310522730,135608533,-1864755069,505723833,340204661,126389924, | |
-779012581,-1414928074,-1999261634,1626444430,265750136,952664295,1814671453,136123214,-1148729170,-2102244111,-1744560770,166251269,2019206348,675536010,2033139586,1664460932,867947356,415015563,-1949352336,1934943806,1097729844,-215743455,1152939329,-1230477738,-1062002250,-1646094734,-745966900,-1113255229,-1045012556,1898513641,815662513,-1209695412,-1474435823,-759507396,-872643116,-108293793,-572780926,2022587303,-26207250,2045611257,-31016004,-1067849877,-1746594747,-1595407948,445118195,-2022755727, | |
-467239754,-2142137154,1647650691,-492521712,1924021825,-451120621,1007593429,1585867336,566249380,167652736,-997230851,-820510928,1987537237,-77322129,262455164,274897663,1452723459,253350837,1993954181,311086899,415511719,172713492,1598988379,933809783,-464840682,-1782212473,-2022230711,1837947820,1746531791,-206384375,1552574670,1930803788,-195613728,-254531863,2100839943,404263737,2076054570,-1257047081,1122290846,947256648,-357075167,1653644953,-1558596525,479604551,1668133562,472305059,-1332310297, | |
-931671832,-198191009,257794323,1840067446,1332484586,-1686394935,836568977,1059869891,124574933,-1157811146,759298928,-1853108948,1750828,-2054155681,926532184,349063367,737772888,-1935143471,2055341648,-5740653,1123272834,1403698003,427644913,2084653420,53827208,-556580955,-622974526,-718538160,777066131,10642179,-1473927485,42961280,733402084,-1298075695,-330803213,716645118,991501217,1804621255,295909446,699884413,-502219415,-303184296,-983523053,-1926299132,-1270671729,1764727330,-985542033, | |
1070783554,-449455124,950733955,1144604746,-213809266,2113881892,289964390,667808448,-205094838,1829894736,-237492343,1714574299,452117068,687998055,-344931971,473450841,-240555773,921904454,-1947709052,716848713,-923746189,1655336916,-1361111575,1374401370,1351735416,-503841965,-210662912,28550606,-1013775971,-1627755881,-1956449285,-1231132106,-1798511564,1839607845,1333480181,828920720,-550535857,-79200818,-2072427763,-92182117,-1007537560,-531634013,597078630,1019601208,427553351,1358839937,1295606149, | |
1253698240,1321359326,1827036120,-96297979,1961035071,-1449129387,1906218152,-1852074724,830126831,259976739,-480649884,562280542,-849465299,1526639975,1025967841,1384043246,2123956991,-206097982,373358100,-1299736234,-287411656,1139982495,780957194,982178842,1868585192,-342016983,-201343E3,1529621679,-1608908150,-1201917255,1653588554,-236943630,160438843,-1639974092,-1312483576,-359232666,1179000579,-1991728832,-168800292,-195944685,1440643255,-1784478805,1294228634,231058942],[346310866,-760785108, | |
-255773812,462402975,-1991838300,240492811,382342214,-535902431,-1506588573,227308918,-1235754389,1744325636,1494196796,-81336513,-1254187923,1131677180,618125740,-1255254505,-1029117223,1746489860,-400793256,-1790807970,447773130,897514369,1839734262,1931953313,2039336191,250787664,-2025426637,1326940614,-929563768,1936457968,750315571,807450175,1324985591,1730186793,574834892,446538401,-461826422,-1804212375,1272844656,-1597838884,609411969,-918395893,-1091983950,2034242906,-687308265,588920300, | |
1900791685,-1750628192,1141924258,2075806930,1916119262,-1924883801,-1793833298,-744070970,1751868198,-1068060208,-551272117,1934334331,-2122147844,420717243,-1740382679,635830970,-1464421974,-611800772,-1879975247,899221619,235128823,1385409654,76799203,816779713,-926092397,1649034526,1731428310,-1566667886,-544352885,848104315,2068987801,-1501879997,-971648040,597634660,1011756967,-816256336,509827742,2105236561,-2073381484,535587639,1442863916,-259688764,1154162298,-1329147873,1242116280,-674309101, | |
-2129691236,-1590254342,-1776959195,-185688384,149638103,30587288,283319883,-2086106302,1382586556,713320120,159643440,2087908061,1707758771,1408264143,-798412373,1313073328,-980735637,426682037,-1786021936,-1598979960,149656261,-1074946190,562266820,1071849995,203272844,928777036,-1746950025,-738917907,-1864172749,-1027921778,808351611,115564112,451258030,1391532245,974074225,1052258170,1500394287,7472814,-2133625261,864640902,-1996258910,-1513661669,1086557597,835755723,869467621,-663168492,1650292399, | |
-1193685367,-1423305959,-1082638598,604520037,-355064967,-317184772,789017940,-775204512,-449424947,685481445,1875371481,949742154,-1563315671,828175252,-1712992024,-2125014394,-94286895,139800385,-1914750551,-1591004111,1727600768,-70726198,157276910,983607038,1854715835,587547850,71192417,1202500605,313054625,1332967648,2096005486,1915131330,-91820094,-544224602,-292927581,-1335047682,-336867977,-625557152,2072714926,2079774434,769210250,-859846950,-38963052,-1473111984,-1396332027,-559123088,245192377, | |
1430587735,807115516,-1797967089,-605290717,-1832360828,735521680,-119714850,-2041009803,-225999952,-52361340,1532219385,-1753338216,1482882949,-729913722,526862483,1344697426,-1879713815,1420857364,178749626,348151218,1024138671,73407581,201150095,258443307,-1880539428,922289345,-1726210854,-569095356,-1212013925,593943551,1877108094,-1369467026,756404946,1671239417,-1038910312,1028722355,-1464597671,1588106857,-1194587045,-1745622080,408802864,-307788967,-1238595610,1953339802,-175053189,323314842, | |
-1729050542,488025824,846074955,-1859913371,1139433929,-909139537,-400097536,1669572363,348222980,713310757,181818277,-1736954573,-1728472916,-1450741757,-2092843115,-1230542315,-184772168,-1280578355,-1536881661,1341851270,-1756297125,-915020579]]);function Hn(){this.$v=!1;this.Rg={};this.Sg={};this.Kd=null;this.ED=this.Ld=!1;this.UD=[];this.Ty=!1} | |
function In(b){var c=new Hn;c.of=b.adCookieValue;c.Yk=b.adToken;c.wF=b.cmAdParams;c.PE=b.authToken;c.u=b.listenerState;c.tb=b.alertCode;c.Pa=b.username;c.s=b.listenerId;c.Vb=b.hasExplicitContentFilterEnabled;c.Yv=b.allowExplicitContentManagement;c.Vq=b.hasExplicitPINSet;c.qg=b.webAuthToken;c.Y=b.webName;c.Ml=b.fullName;c.tf=b.autoRenew;c.w=b.billingFrequency;c.fs=b.paymentMethod;c.sd=b.subscriptionDaysLeft;c.Bt=b.subscriptionHasExpired;c.Vo=b.accountMessageKey;c.rm=b.isGiftee;c.Hf=b.gender;c.vR=b.zipcode; | |
c.Cg=b.birthYear;c.qh=b.isProfilePrivate;c.Jp=b.disallowProfileNotes;c.Dl=b.emailOptIn;c.Or=b.notifyOnNote;c.Nr=b.notifyOnFollow;c.N3=b.proxyHostname;c.O3=b.proxyPort;c.RK=b.homepageUrl;c.Br=b.monthlyListeningCapHours;c.EE=b.antidote;c.sl=b.complimentarySponsor;c.QK=b.highQualityTrialAudio;c.xz=b.pingAndo;c.lk=b.timeoutCredits;c.Ta=b.isUserAUNZ;c.UL=b.monthlyPrice;c.oe=b.annualPrice;c.ol=b.businessMonthlyPrice;c.nl=b.businessAnnualPrice;c.l3=b.isBusinessEligible;c.wQ=b.isSuspectedBusinessMoreLikely; | |
c.Z3=b.isSuspectedBusinessLessLikely;c.Xb=b.canSubscribeToBusiness;c.JA=b.timeoutDialogBusinessOfferFreqImpressions;c.YO=b.sessionStartDialogFrequencyDays;c.vD=b.hasReceipts;c.uz=b.paymentBackedTrialDuration;c.nh=b.inPaymentBackedTrial;c.xj=b.isMultiDayPassSubscriber;c.xh=b.offerPaymentBackedTrial;c.VN=b.payToPlayPrice;c.hk=b.subscriptionName;c.Jw=b.currentSubscriptionName;c.nL=b.allowPromotedStations;c.hR=b.promotedStationsRecommendedFallback;c.Sh=b.svnTimeoutReward;c.jk=b.svnTimeoutCredit;c.In= | |
b.valueExchangeContext;c.Jn=b.valueExchangeRewards;c.qm=b.isEligibleForProgrammaticAds;c.ED=b.isThumbprintRadioAvailable||!1;c.UD=b.reasonsThumbprintRadioUnavailable||[];c.Ty=b.logTimeToMusicEnabled;c.Ly=b.isWebClientAvailable||!1;c.P3=b.pwc2016||!1;Jn(c,b);c.zn=b.tsck;c.An=b.tscs;c.Ii=b.customSkin;var d=b.twShareUserTokens;ie(d)?(d=d.split("|"),c.de=d[0],c.Xh=d[1]):(c.de=null,c.Xh=null);c.Y3=b.subscriberVendor;c.gk=b.subscriberVendorDisplayName;c.tQ=b.subscriberVendorHidePrice;c.xF=b.collectTrackLifetimeStats; | |
c.gs=b.paypalDisabled;c.QL=b.mdid;c.rh=b.isStreamLimited;c.qE=b.adPodEligible;c.Tq=b.useChronos?b.useChronos:!1;c.Ig=b.dailySkipLimit;c.yt=b.stationSkipLimit;c.Fe=b.offerAnnualSub;c.gB=parseFloat(b.volumeNormalizationMultiplier)||1;c.dw=b.artistAnalyticsHomeURL;c.kL=b.isAdvertiser;c.Ht=b.timeToStartAudioAds;c.Ft=b.timeBetweenAudioAds;c.sG=b.enableArtistAudioMessages;c.Ef=b.enableArtistPromoEmails;c.JB=b.isGPTSampleEnabled;c.rB=b.isAsyncGPTEnabled;c.WK=parseInt(b.inactivityTimeoutSubscribed,10)||10800; | |
c.By=parseInt(b.inactivityTimeoutRegistered,10)||3600;c.VK=parseInt(b.inactivityTimeoutBusiness,10)||18E5;c.Cy=420;c.Rm=b.propAdsExperiments;c.AL=b.kruxToken;c.Sq=!!b.hasBusinessInformation;c.wP=!!b.shouldLogVideoAdUrl;return c} | |
function Jn(b,c){b.Wg=c.fbDisconnected;b.Ea=c.fbId;b.mc=c.fbName;b.Il=c.autoShareEnabled;b.Tg=c.autoShareFollows;b.Ug=c.autoShareLikes;b.Vg=c.autoShareTrackPlay;b.gq=c.fbShowAutoShare;b.Tc=c.fbAccessToken;b.kx=c.facebookSettingChecksum;b.jx=c.fbReauthorize;b.Kd=null;b.Rg={};b.Sg={};b.Xg=null}function Kn(b,c){b.Lr=c.Lr;b.Ea=c.Ea;b.mc=c.mc;b.Rg=c.Rg;b.Sg=c.Sg;b.Kd=c.Kd;b.Xg=c.Xg}f=Hn.prototype;f.tH=function(){return this.u};function Ln(){return v.h.PE}f.pm=function(){return this.sG};f.Jf=function(){return this.Yk}; | |
function Mn(b){b.Vq=!0}f.p=function(){return this.u==m.v.Nn()};f.Sa=function(){return this.u==m.v.Qn()||this.u==m.v.xd()||this.u==m.v.Zh()||this.u==m.v.sg()&&this.nh};f.P=function(){return this.u==m.v.Zh()};function Nn(b){return b.u==m.v.Du()||b.u==m.v.zu()}function On(b){var c=!0;if(b.u==m.v.xd()||b.tH==m.v.Zh()){if(30<b.sd||b.tf&&b.tb!=m.sa.fo())c=!1}else Pn(b)?c=!1:b.nh&&(c=!1);return c}function Qn(b){return!(b.u==m.v.Nn()||b.u==m.v.Ku()||b.u==m.v.GB()||b.u==m.v.sg()&&!b.nh)} | |
function Rn(b){if(b.rh){var c=Sn(A._data.streamNagTimeout);return!isNaN(c)&&c<b.Cy?1E3*c:1E3*b.Cy}c=Sn(A._data.timeout);!isNaN(c)&&c<b.By||(c=b.WK,b.H()?c=b.By:b.P()&&(c=b.VK));return 1E3*c}function Tn(b){return b.s}f.wb=function(){return this.vR};function Un(b){var c="";0<b.Hf.length&&(b=b.Hf.charAt(0),"M"==b||"F"==b)&&(c=b);return c}function Vn(b,c){c!=b.Wg&&(b.Ld=!0);b.Wg=c}f.nH=function(){return this.Ea}; | |
function Wn(b,c){null!=c&&c!=b.Ea&&(b.Ld=!0);b.Ea=c;null==c&&(b.Ld=!1,b.mc=null,b.Kd=null,b.Rg={},b.Sg={},b.Wg=!0,b.Tc=null,b.Xg=null)}function Xn(b,c,d){c!=b.Tc&&(b.Ld=!0);b.Tc=c;b.CG=d?d+"":null}function Yn(b,c){b.Xg=c;c.publish_actions&&(b.Xg.publish_stream=1)}function Zn(b,c){c!=b.mc&&(b.Ld=!0);b.mc=c}function $n(b){return b.mc} | |
function ao(b,c){null==c&&(c=[]);for(var d={},e=[],h=[],l=0;l<c.length;l++){var p=c[l];d[p.name]=p.id;e.push(p.name)}e.sort();p={};for(l=0;l<e.length;l++){var q=e[l],t=d[q];p[t+"f"]=q;h.push(t)}b.Rg=p;b.Kd=h}f.nq=function(b){var c=this.Rg[b+"f"];null==c&&(c=this.Sg[b+"f"]);return c};function bo(b){return b.Ta}function co(b){return b.UL.toString()}f.oy=function(){return this.vD};f.Ky=function(){return("V1"===this.hk||"ANNUAL48"===this.hk)&&!("V1"===this.Jw||"ANNUAL48"===this.Jw)};f.Ly=function(){return!!this.Ly}; | |
function eo(b){return b.H()||null!=b.sl&&0<b.sl.length&&!b.QK||!0==km(Yl)?"aacplus":"mp3-hifi"}function fo(b){return go(b)&&b.tb==m.sa.sB()}f.Za=function(){return this.w};f.H=function(){return this.u!=m.v.xd()&&this.u!=m.v.Zh()&&this.u!=m.v.Qn()&&this.u!=m.v.Tu()&&!(this.u==m.v.sg()||this.u==m.v.Ru())};function ho(b,c,d){if(!b.Sa()){var e;sl?(e=km(Gl),null==e&&(e={}),e=e[c],e=null==e||isNaN(Number(e))?0:Number(e)):e=0;e+=d;var h=km(Gl);null==h&&(h={});h[c]=e;pm(Gl,h);c=Am();pm(Il,c+d);io(b)}} | |
function io(b){!b.p()||jo(b)||b.$v||(b.$v=!0,z.b(mh))}function jo(b){if(b.Sa())return!0;b=600;var c=Sn(A._data.playtime);isNaN(c)||(b=Math.min(b,c));return ym()<b}function Pn(b){return b.u==m.v.Tu()||b.u==m.v.Ru()}function ko(b){return b.xF}function go(b){return b.u==m.v.lu()||b.u==m.v.Du()&&b.Bt}f.xe=function(){return!0===this.qE};function lo(){var b=v.h;return b.gB?b.gB:1}f.lr=function(){return!0};f.ye=function(){return this.rB};function mo(b,c){this.kf=b;this.Lc=c}function no(b){var c=new mo;c.kf=b.attr("data-like-type");c.Lc=b.attr("data-like-objectid");c.ff=b.attr("data-like-id");return c}function oo(b){var c=new mo;c.ff=b.id;c.g3=b.listenerId;c.kf=b.likeType;c.Lc=b.objectId;c.i3=b.stationName;c.h3=b.stationImgUrl;c.f3=b.contextType;c.d3=b.contextId;c.e3=b.contextName;return c}mo.prototype.Mf=function(){return this.kf};function po(b){this.Fa=b.gain;this.zf=b.clickthrough_web?b.clickthrough_web:b.clickthrough;this.qc=b.impression;this.tracker=b.tracker;this.vn=b.tile_tracker_urls;this.Af=b.companion;this.rl=b.companion_web?b.companion_web:b.banner_html;this.TL=b.minutesToNext;this.Lw=b.delayedInStationAd?"true"==(b.delayedInStationAd+"").toLowerCase():!1;this.lb=b.type;this.ig=!0;this.Om=qo(b.adToken);this.cc="0";this.Qb=b.image;this.le=-1;this.kb=this.Ja="audioad";this.bi="";this.To="AudioAd";this.rE=b.adRequestMetaData; | |
this.yD=b.isInStationAd;this.ei=b.lineId;this.Jc=b.creativeId}vd(po,Bn);po.prototype.qL=function(){return this.yD};po.prototype.sm=function(){return this.ig};function ro(b,c){zn.call(this,b,c);this.SC=b.artistMessageButtonText;this.TC=b.artistMessageButtonUrl;this.Hc=b.artistMessageId;this.ke=b.artistUid;this.sv=!1;this.BD=b.artistMessageIsOnDemand;this.UC=b.artistMessageDeepLink;this.DD=b.artistMessageIsSharable;this.fD=b.artistMessageDeliveryType}vd(ro,zn);ro.prototype.ze=function(){return this.BD};function so(b,c){zn.call(this,b,c);this.uo=this.wo=this.Io=null}vd(so,zn);function to(b,c,d,e){this.i=b;this.Yb=c;this.description=d;this.context=e}to.prototype.r=function(){return this.i};to.prototype.o=function(){return this.Yb};to.prototype.Sl=function(){return this.description};to.prototype.getContext=function(){return this.context};function A(){}function uo(){return!(je(vo())&&je(wo())&&isNaN(Sn(A._data.tip))&&$.isEmptyObject(xo()))}var yo=!1; | |
function zo(){if(!yo){yo=!0;var b=vo();if(b&&0<b.length){var c=Ao(),d=Bo();z.b(Fi,{stationCode:b,stationName:A._data.sn,source:A._data.site||"",artistMessageArtistUid:""==c?null:c,artistMessageId:""==d?null:d})}(b=wo())&&0<b.length&&(b="/search/"+escape(b),(c=Co())&&0<c.length&&(b+="/"+escape(c)),$.address.value(b));b=Sn(A._data.tip);isNaN(b)||z.b(Ii,b);b=xo();_.each(b,function(b,c){z.b(hg,[c,b])})}}function Sn(b){return null!=b&&0<b.length?parseInt(b,10):NaN} | |
function Do(b,c){b=Sn(b);return isNaN(b)||!b||b>c?c:b}function xo(){var b={};_.each(A._data,function(c,d){0==d.indexOf("ext_")&&(b[d]=c)});return b}function vo(){var b=A._data.sc;return"sh"!=b?b:null}function wo(){return A._data.search}function Co(){var b=A._data.searchfilter;return null!=b?(b=b.toLowerCase(),"track"==b?"song":b):null}function Eo(){return A._data.tc||""}function Fo(){return A._data.accountBirthYear} | |
function Go(){return"175"==A._data.dc||0==A._data.autoplay||null!=vo()&&0<vo().length}function fn(){return"http://"+A._data.host+("80"!=A._data.port?":"+A._data.port:"")+"/"}function Ho(){return"https://"+A._data.host+("80"!=Io()?":"+Io():"")+"/"}function dn(){var b=A._data.shost,c=Io();return null==b||null==c||A._data.nossl?fn():"https://"+b+":"+c+"/"}function Io(){return A._data.sport}function Jo(){return A._data.facebookShareAppId} | |
function Ko(){var b=A._data.facebookTrackShareBaseUrl;return b?b:dn()}function Lo(){return A._data.createStationHintPath}function Mo(){var b="true"==A._data.tdlFullLyrics;setTimeout(function(){A._data.tdlFullLyrics=null},2500);return b}function No(){var b="true"==A._data.tdlFullTraits;setTimeout(function(){A._data.tdlFullTraits=null},2500);return b}function Oo(){return!0==A._data.paypalShowOrderConfirmScreen} | |
function Po(){var b=A._data.companionAd;-1!=document.location.search.indexOf("onlyFirstForced")&&(A._data.companionAd=null);return b}function Qo(){return A._data.audioAd}function Ro(){return A._data.videoAd}function So(){return null==A._data.maxAdInitiatedRefreshDelaySeconds?60:A._data.maxAdInitiatedRefreshDelaySeconds}function To(){return A._data.useHttpsForceCodeUrls}function Uo(){return A._data.adTestMode}function ln(){return!0===A._data.lsiCookieDisabled||"true"===A._data.lsiCookieDisabled} | |
function Vo(){return Do(A._data.timeToStartAudioAds,420)}function Wo(){return Do(A._data.timeBetweenAudioAds,900)}function Xo(){try{return le(A._data.canDisplayLyrics)}catch(b){return!0}}function Yo(){return je(A._data.countryCode)?"US":A._data.countryCode}function Zo(){return"US"===Yo()}function $o(){return je(A._data.postalCodeValidationRegex)?"^d{5}$":A._data.postalCodeValidationRegex} | |
function ap(){return je(A._data.postalCodeValidationErrorMessage)?"You must have a valid 5 digit U.S. zip code.":A._data.postalCodeValidationErrorMessage}function bp(){return A._data.rt}function Bo(){var b=A._data.am;return b&&2==b.split(":").length?b.split(":")[1]:""}function Ao(){var b=A._data.am;return b&&2==b.split(":").length?b.split(":")[0]:""}function cp(b){return A._data[b]}window.TunerVars=A;var dp=!1,ep=!1;function fp(b){z.b(hg,b)}window.Pandora_onExternalEvent=fp;window.Pandora.sendTunerCommand=function(b,c,d){fp([b,c,d])};function gp(){if(dp&&ep){var b=Pandora.getSecretary();if(null!=b&&Pandora.eiWorking)b.onTunerReady();else k.error("ExternalEventService: could not communicate with secretary (onTunerReady)")}} | |
function ip(b,c,d){var e=Pandora.getSecretary();null!=e&&Pandora.eiWorking?e.sendToLocalConnection(b,c,d):k.error("ExternalEventService: could not communicate with secretary ("+b+":"+c+")")}Pandora.waitForSecretary(function(b){b?(dp=!0,gp()):k.warn("ExternalEventService: can't communicate with secretary")});z.c(Ae,function(){ep=!0;gp()});$(window).bind("unload",function(){var b=Pandora.getSecretary();null!=b&&null!=b.shutdown&&b.shutdown()});function jp(b,c,d){this.position=b;this.size=c;this.Zm=d}var kp=/^pod:(\d+)\/(\d+)\/(\d+)$/;function qo(b){var c=null;if(b=kp.exec(b))if(c=new jp(Number(b[1]),Number(b[2]),Number(b[3])),c.position>c.size||1>c.position)c=null;return c}jp.prototype.Jf=function(){return"pod:"+this.position+"/"+this.size+"/"+this.Zm};jp.prototype.toString=function(){return"[AdPodLocation: "+this.Jf()+"]"};var lp={},lp={SLOT_SIZE_AUTOPLAY_VIDEO:"442x188",SLOT_SIZE_USER_INITIATED_VIDEO:"2000x7",AUDIO_AD_SIZE:"2000x12",AUDIO_IN_STATION_AD_SIZE:"2000x14",PRELOAD_SECONDS:10,PRELOAD_PERCENTAGE:97};var B={}; | |
(function(b){function c(b){k.debug("AdUrlBuilder : "+b)}function d(b,c){return null!=b&&b!=B.O&&(b==B.je||b==q||b==t||b==y||b==l||b==p||b==E||b==J||b==B.ao||b==N||b==pa)&&null!=c&&c!==B.O}function e(b,c,d,e){var h=B.O;if(null!=b)for(var l in b){var p=b[l];if(B.mr(l,p))if(c&&(l=encodeURIComponent(l)),p=p.toString(),e&&-1<p.indexOf(B.he))for(var q=p.split(B.he),t=0;t<q.length;t++)null!=q[t]&&q[t]!==B.O&&(p=q[t],h+=d+l+U+p);else h+=d+l+U+p}return h}function h(b,c,d){var e={};b=b.split(B.Zi());for(var h= | |
0;h<b.length;h++){var l=b[h].split(U);if(1<l.length){var p=l[0],l=l[1];c&&(p=decodeURIComponent(p),l=decodeURIComponent(l));if(d(p,l)){var q=e[p];q?(_.isArray(q)||(e[p]=[q]),e[p].push(l)):e[p]=l}}}return e}var l="mdid",p="ppid",q="sz",t="ord",y="c",E="ref",J="dc_ref",N="ss_req",U="=",pa="iu";B.O="";B.yu="pand";B.je="tile";B.ao="ip";B.iC="msa";B.tg="d_imp";B.he=",";B.ho=";";B.zk="http://";B.init=function(b){B.Ba=!1;B.Ow=b};B.lr=function(){return B.Ba};B.XQ=function(b){b&&(B.Ba=b.lr())};B.Zi=function(){return B.Ba? | |
"&":B.ho};B.Xi=function(){return B.Ba?"adx":"pfadx"};B.Bx=function(){return B.Ba?"adx":"adj"};B.qH=function(){return B.Ba?"adx":"adi"};B.bH=function(b){var c=B.O,c=c=B.O;B.Ba?(c=/^.+?iu=(\/\d+\/.+?\/.+?)&.*/,c=c.exec(b),c=c[1]):(c=/^.+?click\.net\/.+?(\/.+?\/.+?);.*/,c=c.exec(b),c="/"+B.Ow+c[1]);return c};B.mr=function(b,c){return null!=b&&b!=B.O&&b!=B.je&&b!=q&&b!=t&&b!=y&&b!=l&&b!=p&&b!=E&&b!=J&&b!=B.ao&&b!=N&&b!=pa&&"t"!=b&&b!=B.tg&&null!=c&&c!==B.O};B.Hy=function(b,c){var d=c;if(B.Ba){var e=B.Zi(); | |
0==b.indexOf(e)&&(b=b.substring(1));for(d+=e+"t"+U+encodeURIComponent(b);-1<d.indexOf("%2C");)d=d.replace("%2C",B.he)}else d+=b;return d};B.BG=function(b){var c=!1;B.Ba?(c=/&t=(.*?)&/.exec(b),b=decodeURIComponent(c[1]),c=!0):b=b.replace(/^.+?click\.net\/.+?(\/.+?\/.+?);/,B.O);return h(b,c,B.mr)};B.AG=function(b){b=b.replace(B.Ba?/^.+?click\.net\/.+?\/.+?\/\?/:/^.+?click\.net\/.+?\/.+?\/.+?;/,B.O);return h(b,!1,d)};B.bF=function(b){b=b.split(B.Ba?"|":B.he);for(var c=[],d=0;d<b.length;d++){var e=b[d].split("x"); | |
c.push([parseInt(e[0],10),parseInt(e[1],10)])}return c};B.Ax=function(b,c){var d=B.zk,d=B.Ba?d+String.fromCharCode(112)+"ubads.g.doublec"+String.fromCharCode(108)+"ick.net/gampad/":d+String.fromCharCode(97)+"d.doublec"+String.fromCharCode(108)+"ick.net/",d=d+b;return d=B.Ba?d+("?"+pa+U+"/"+B.Ow+"/"+c):d+("/"+c)};B.Bc=function(b,c){var d=B.Zi(),e=b.split(d),h;for(h in c)for(var l=0;l<e.length;l++)0==e[l].indexOf(h+U)&&(e[l]=h+U+c[h]);return e.join(d)};B.Kx=function(){return B.Ba?p:l};B.kw=function(b, | |
d,h,l,p,N,pa,Cb,tb){var Rd=C.Sv,bb=B.Zi();null==l&&(l={});l.sz=N;tb=B.ux(l,B.Ba,bb,Rd,tb,!B.Ba);null!=p&&(tb+=e(p,B.Ba,bb,!B.Ba));p=C.yH();p=p+"."+C.KH();p+="/";p+=C.RH();p+=".";p+=d;p+=h;b=B.Ax(b,p);c("Base Ad URL : "+b);b=B.Hy(tb,b);c("Base Ad URL with Targeting Parameters : "+b);b+=bb+(B.Ba?E:J)+U+B.yu;d=B.Kx();null!=l[d]&&l[d]!=B.O&&(b+=bb+d+U+l[d]);B.Ba&&null!=l[B.tg]&&!0===l[B.tg]&&(b+=bb+B.tg+U+"1");Cb&&null!=l[B.je]&&l[B.je]!=B.O&&(b+=bb+B.je+U+l[B.je]);l=b;Cb=bb+q+U;if(B.Ba)for(;-1<N.indexOf(B.he);)N= | |
N.replace(B.he,"|");b=l+(Cb+N)+(bb+(B.Ba?y:t)+U+pa);c("Final Ad URL : "+b);return b};B.ux=function(b,c,d,h,l,p){var q=B.O;if(null!=b){if(h)for(h=h.split(B.ho),l=0;l<h.length;l++){var t=h[l].split(U);if(1<t.length){q=t[0];t=c?encodeURIComponent(t[1]):t[1];if(q in b)var y=b[q],y=null!=y&&void 0!=y&&y!==B.O?y+B.he+t:t;else y=t;b[q]=y}}else b.d1=l;q=e(b,c,d,p)}return q};b.AdUrlBuilder=B;b.AdUrlBuilder_getBaseAdUrl=B.Ax;b.AdUrlBuilder_getAdUnit=B.bH;b.AdUrlBuilder_isTargetingKeyValue=B.mr;b.AdUrlBuilder_getUrlSeparator= | |
B.Zi;b.AdUrlBuilder_isSimpleUrlEnabled=B.lr;b.AdUrlBuilder_getJsCreativeRequestType=B.Bx;b.AdUrlBuilder_getIFrameCreativeRequestType=B.qH;b.AdUrlBuilder_insertUrlTargetingParameters=B.Hy;b.AdUrlBuilder_extractUrlTargetingParameters=B.BG;b.AdUrlBuilder_extractUrlNonTargetingParameters=B.AG;b.AdUrlBuilder_buildSlotSizesArray=B.bF})(this);var C={}; | |
(function(b){function c(b,c,d,e,h,l){k.debug("Chronos enabled - Ad response");k.debug("Chronos Response - "+JSON.stringify(l));l=l.adList;if(void 0==l||null==l)k.debug("Chronos Web Ad is null or empty"),mp("Ad was blocked",c,"Chronos Web Ad is null or empty",d,C.zd.h),b(null);else if(0===l.length)k.debug("Chronos says it's not time for an ad."),b(null);else{k.debug("Chronos says it's time to play "+l.length+" ads");var p=!1,q=[];_.each(l,function(b){k.debug("Chronos - commence parsing of Ad response");var h= | |
b.success;if(h&&"false"!==h)if(h=b.adType,"AUDIO_AD"===h||"VIDEO_AD"===h){p="AUDIO_AD"===h;var h={},l=b.content,t=b.adType;"AUDIO_AD"===t&&(h=C.Gj(l,d,c));k.debug("Chronos - commence parsing of ad: "+t);void 0!=b[mb]&&(h[mb]=b[mb]);h.adRequestMetaData=b.adRequestMetaData;k.debug("Chronos adRequestMetaData - "+b.adRequestMetaData);k.debug("Chronos adToken - "+b[mb]);h.isInStationAd=e;b={parsedContent:h,content:l,response:b};k.debug("Chronos Got Ad - pushing onto array ",b);q.push(b)}else k.info("Unknown adType...ignoring: "+ | |
h);else k.info("Success is false, don't process current ad")});0===q.length?b(null):"VIDEO"===h&&p?(k.info("Audio Ad was received but the callback does not know how to handle it. Handing it off to AudioAdManager directly for inclusion into queue."),z.b(Nk,{ads:q,callback:_.bind(b,null,q)})):b(q)}}function d(b,c,d,h,l,p,q,t,y,E){if(b=e(b,c,d,l,p,q,t,y,E))c=null!=Qo()||"true"==Uo()||"true"==A._data.audioAdTestMode,d=null!=Ro()||"true"==Uo()||"true"==A._data.videoAdTestMode,_.extend(b,{chronosOptions:h, | |
testMode:c&&d?"all":c?"audio":d?"video":""}),z.b(Ik,b)}function e(b,c,d,e,h,l,p,q,t){h={subzone:c,options:d,slotSize:e,adToken:h,stationId:l,successCallback:p,errorCallback:q};if(t){b=t.split(Cb,2);if(2!=b.length)return q({message:"audioAd tunerVar form is: ?audioAd=AdId:CreativeId"}),null;h[bb]="/util/dartCreative.jsp?ad="+b[0]+"&c="+b[1];h.secondsUntilAd=ta;To()&&(h[bb]=Ho()+h[bb])}else d[B.Kx()]=C.NA,h[bb]=E(b,c,d,e,!0);return h}function h(b){b&&(q(b.of),C.p=b.p(),C.Yk=b.Jf(),C.Sv=b.wF,C.NA=b.QL, | |
C.xe=b.xe(),C.In=b.In||B.O,C.qm=b.qm,C.ye=b.ye(),C.Rm=b.Rm,B.XQ(b))}function l(){C.bl=1}function p(b){k.debug("AdService : "+b)}function q(b){var c=new Date;c.setTime(c.getTime()+2592E6);c="v3ad="+b+"; "+("expires="+c.toGMTString()+"; ");c+="path=/; ";null!=document.domain&&document.domain.match(/pandora.com$/)&&(c+="domain=.pandora.com;");document.cookie=c;b=b.split(Cb);C.Pw=String(b[0])==T;C.cp=b[1];C.Mx=b[2];C.zip=b[3];C.Ki=b[4];C.yy=b[5];C.Bw=b[6];C.cz=String(b[7])==T;C.ix=b[8];C.Tw=b[9];14<= | |
b.length&&(C.Zy=b[10],C.state=b[11],C.county=b[12],C.bx=b[13]);17<=b.length&&(C.Lv=b[14],C.xy=b[15],C.qy=b[16]);18<=b.length&&(C.Xw=b[17]);19<=b.length&&(C.Ay=b[18])}function t(b,c){if(b.D()){var d={};if(c)for(var e=0;e<c.length;e++){var h=c[e];d[h.e()]=h}e=b.te()||[];for(h=0;h<e.length;h++){var l=d[e[h]];if(l){if(l.Pl())break;if(N(l)||t(l,c))return!0}}}return!1}function y(b){if(null!=b)for(var c=0;c<b.length;c++){var d=b[c].If();if("toddler"==d)return 1;if("kids"==d)return 2;if("tween"==d)return 3}return-1} | |
function E(b,c,d,e,h){if(C.ep&&"comedy"==C.bu)return null;var l=C.Nl(),p=C.bu;C.xe&&h&&(p=tb+p,l=Rd);return B.kw(b,c,p,d,null,e,l,!0,J().toString())}function J(){var b=C.cp,c=0;if("number"===typeof b)c=b;else try{c=parseInt(b,10)}catch(d){c=0}return 13<=c&&18>c?1:18<=c&&21>c?2:21<=c&&25>c?3:25<=c&&30>c?4:30<=c&&35>c?5:35<=c&&40>c?6:40<=c&&45>c?7:45<=c&&50>c?8:50<=c&&55>c?9:55<=c&&60>c?10:60<=c&&65>c?11:65<=c&&80>c?12:0}function N(b){if(b=b.Lf())for(var c=0;c<b.length;c++)if("comedy"==b[c].toLowerCase())return!0; | |
return!1}function U(b){var c={};b.each(function(){var b=$(this).find("> name")[0];if(b){var b=$(b).text(),d=$(this).find("value string");1==d.length?c[b]=$(d[0]).text():1<d.length&&(c[b]=d.map(function(){return $.trim($(this).text())}))}});return c}function pa(b,c,d){var e=b,h=e.indexOf("?>");-1<h&&(e=e.substr(h+3));e=e.replace(/<\!\[CDATA\[|\]\]>/g,B.O);(e=U($("member",e)))&&0!=_.size(e)?(fb(b,e),gb("_selectorParse",e)):(p("selector XML parse error"),e=Ja(b,c,d));return e}function Ja(b,c,d){var e= | |
b,h=e.indexOf("?>");-1<h&&(e=e.substr(h+3));for(var h={},l=$.trim(e.replace(/<\!\[CDATA\[|\]\]>/g,B.O)),e="type audio creative_token gain company_name image dimmed tracker companion impression clickthrough minutesToNext gain movie uif aspectRatio logoimage richmedia_companion followon_companion banner_image banner_html delayedInStationAd tile_tracker_urls".split(" "),q=["clickthrough","tracking","tracker"],l=$.trim($(l).text()).split(/\s+/),t=0,y=l.length;t<y;t++){var E=l[t],J=l[t+1];if(_.contains(e, | |
J)||ua(q,J))h[E]=B.O;else if("tile_tracker_urls"==E){var N=$($.trim(J).split(B.zk)).filter(function(b){return!!b});if(1<N.length)h[E]=$.map(N,function(b){return B.zk+b}),t++;else{h[E]=[J];for(t+=2;t<y&&0==l[t].indexOf(B.zk);)h[E].push(l[t++]);t-=1}}else h[E]=J,t++}h&&0!=_.size(h)?(fb(b,h),gb("_bruteForceParse",h)):(p("brute force XML parse error"),mp(b,d,"AdService : XML parse failed",c,C.zd.h));return h}function fb(b,c){var d=/\x3c!-- *[0-9]+ *: *([0-9]+) *--\x3e/.exec(b);d&&2==d.length&&(c.creativeId= | |
d[1])}function gb(b,c){try{s("web_audio_ad_parse",{ua:navigator.userAgent,site_version:window._pandoraVersion,browser:oe(),method:b,creative_id:c&&c.creativeId?c.creativeId:null,ad_type:c&&c.type?c.type:null}),np(null)}catch(d){trackJs.track(d)}}function ua(b,c){for(var d=!1,e=0;e<b.length;e++){if(d)return;d=c&&0==c.indexOf(b[e])}return d}var ta="0",T="1",mb="adToken",Cb=":",tb="__POD__",Rd="__CACHEBUST__",bb="adUrl";C.$h="REQUESTFAILED";C.init=function(b,c){C.Pw=!0;C.Uk=b;C.zd=c;C.cp=ta;C.Mx=ta; | |
C.zip=B.O;C.Ki=B.O;C.yy=ta;C.Bw=ta;C.exp=ta;C.ix=ta;C.wx=null;C.cz=!1;C.ep=!1;C.bu=B.O;C.Tw=ta;C.NN=A._data.organization||B.yu;C.nt=A._data.pub||"default";C.wR=A._data.zone||"prod";C.p=!1;C.Zy=ta;C.state="CA";C.county=ta;C.bx=ta;C.Lv=ta;C.xy=ta;C.qy=ta;C.Xw=ta;C.Ay=ta;C.NA=B.O;C.In=B.O;C.xe=!1;C.qm=!1;C.ye=!1;C.Rm="";C.bl=1;B.init(A._data.dfpNetworkCode||"4204");var d=$.cookie("v3ad");d&&q(d);null!=document.cookie&&document.cookie.match(/v2pub=(\w+)/)&&(C.nt=RegExp.$1);z.c(De,h);z.c(Ee,h);z.c(De, | |
l)};C.XK=function(){C.bl++};C.aP=function(){C.exp="1"};C.Lf=function(){return C.wx};C.B3=function(){return C.p};C.C3=function(){return C.ye};C.yH=function(){return C.NN};C.KH=function(){return C.nt};C.RH=function(){return C.wR};C.Nl=function(){return(new Date).getTime()+B.O+Math.floor(1E6*Math.random())};C.Re=function(c){if(!C.Pw)return null;null==c&&(c={});var d;C.Yk?d=C.Yk:(d=C.Nl(),14<d.length&&(d=d.substring(0,14)));c.l=d;c.ag=C.cp;c.gnd=C.Mx;c.zip=C.zip;c.hours=C.yy;c[B.je]=c[B.je]||1;c.comped= | |
C.Bw;c.exp=C.exp;c.fb=C.ix;c.dma=C.Tw;c.clean=C.cz||C.ep?T:ta;c[B.iC]=C.Zy;c.st=C.state;c.co=C.county;c.et=C.bx;c.pin=!_.isUndefined(b.external)&&_.isFunction(external.msIsSiteMode)&&external.msIsSiteMode()?T:ta;c.aa=C.Lv;c.hisp=C.xy;c.hhi=C.qy;c.dse=C.Xw;c.iat=C.Ay;c.abx=C.Rm;c.vxc=C.In;c.prg=C.qm?T:ta;c.async=C.ye?T:ta;C.Ki=C.Ki.replace(/^\W*/,B.O).replace(/\W*$/,B.O);if(0<C.Ki.length){d=C.Ki.split(B.he);for(var e=0;e<d.length;e++){var h=d[e];h==B.ao&&(h="ios");c[h]="1"}}return c};C.lg=function(c, | |
d,e){null==c&&(c={});c.fam=y(e);if(null!=d){e=N(d)?!0:t(d,e);c.station=d.Ka();d.Ka()&&(c.stationId=d.e());var h=d.wa();c.artist=null==h?B.O:h.musicId;if(C.p)c.gcat="none";else if(!c.gcat){var l=d.Ul();c.gcat=l?l:"none"}h=d.If();C.wx=h;c.genre=h?h:l;C.ep=d.Pl();C.bu=e?"comedy":B.O;c=tn(d)?tn(d).key:B.O;b.gStationSeed=c;b.gStationArtistId=tn(d)&&"artist"==tn(d).type?c:null;c=B.O;tn(d)&&(tn(d).artistName?c=tn(d).artistName:tn(d).stationName&&(c=tn(d).stationName));b.gStationArtistName=c;b.gStationSongName= | |
tn(d)&&tn(d).songName?tn(d).songName:B.O;c=B.O;tn(d)&&(tn(d).artistDetailUrl?c=tn(d).artistDetailUrl:tn(d).songDetailUrl&&(c=tn(d).songDetailUrl));b.gStationSeedUrl=c;b.gGenreSponsorship=d.Ul()}};C.za=function(b){if(!b)return!1;var c=b.Ka(),d=!!b.Ra(),e=!!b.rc();return!b.Z()&&ie(c)||d||e};C.sH=function(b){var c=D.Jx(),d={};C.lg(d,b,c);d=C.Re(d);return B.ux(d,!1,B.ho,C.Sv,J().toString(),!1)};C.aA=function(b,c,d){C.nv=E(B.Bx(),b,c,d,!1)};C.dh=function(){return C.nv};C.gA=function(b){C.kE=b};C.QH=function(){return C.kE}; | |
C.AQ=function(b){return E("adx","radio",b,"2000x2,300x250,300x600",!1)};C.Ps=function(b){C.gD=b};C.yx=function(){var b=C.gD;C.Ps(null);return b};C.$O=function(b){C.mv=b};C.cH=function(){var b=C.mv;C.mv=null;return b};C.FO=function(b,c,d,h,l,q){(b=e(b,F.ji,c,F.df,d,h,l,function(b){p("AudioAd fetch failed: "+b.message);q(C.$h)},F.rv))&&z.b(Hk,b)};C.Um=function(b,c,d,e,h,l){z.b(Jk,{creativeId:b,secondsPlayed:c,adLength:d,isHouseAd:e,successCallback:h,errorCallback:l})};C.cg=function(b,c,d,e,h,l,q){var t= | |
E(b,c,d,e,h);null!=t&&(p("Fetch Ad Url (requestAd) : "+t),op(t,function(b){l(b,t)},function(b){mp(b.name+" : "+e,e,"proxy get failure",c,C.zd.h);q(b)}))};C.EO=function(b,c,d,e,h,l){var q=B.kw(B.Xi(),b,"",c,d,e,C.Nl(),!1,J().toString());null!=q&&(p("Fetch Ad Url (requestAdForZone) : "+q),op(q,function(b){h(b,q)},function(c){mp(q,e,c.name,b,C.zd.h);l(c)}))};C.nx=function(b,c,d,e){b="/sponsorship/?feature=p1TrialSponsor&sponsor="+b;c&&(b+="&st=true");op(b,function(b){b=C.Gj(b,"p1trial","sponsorship"); | |
d(b)},e)};C.ab=function(b,c,d){var e=C.Uk.V(),h=-1;e&&(h=e.n.e());z.b(Kk,{adData:b,stationId:h,onImpressionSuccess:c,onImpressionFailure:d})};C.Gj=function(b,c,d){var e={};b&&(b=$.trim(b));if(null==b||0==b.length)return p("Ad content is null or empty - Ad blocked?"),mp($.trim(b),d,"Ad content is null or empty - Ad blocked?",c,C.zd.h),e;e=null;try{e=$.parseXML(b)}catch(h){return pa(b,c,d)}if(0<$(e).find("parsererror").length)return k.debug("AdService : ","Failed to parse",b),pa(b,c,d);e=U($(e).find("member")); | |
fb(b,e);gb("$.parseXML",e);return e};C.dP=function(){var b=B.Bc(C.dh(),{tile:2,sz:"2000x24"});C.nv=b};C.Wz=function(b){var e=b.currentStationData,h=b.options,l=b[mb],p=b.callback,q=b.forcedAudioAd,t=b.lastDisplayAdTime,y=b.requestType,E=b.subZone,J=b.currentSize,N=b.isInStationAd,U=b.currentStationTrack,T=b.currentStationTrackType,pa=b.isUserInitiated;b=b.handlerType;var ua=Ed(),ta=0,Ja=0;U&&((e=Nm(U.o(),e.e()))&&(ta=e),U.Yc()&&(Ja=U.Yc()));e=Ja-ta;0>e&&(e=lp.PRELOAD_SECONDS);t={secondsUntilAd:pa? | |
0:e,secondsPlayed:null==ta?0:ta,currentStationId:U?U.r().e():B.O,trackToken:U&&U.eb()?U.eb():B.O,trackType:T?T:B.O,userInitTrackEnd:pa,secondsSinceDisplayAd:ua-t};k.debug("chronos elapsed time - "+ta);k.debug("chronos total track length - "+Ja);k.debug("chronos secondsUntilAd - "+e);k.debug("chronos - trackType - "+T);k.debug("chronos - trackToken - "+t.trackToken);(U=C.Uk.V())?(T=B.O,(pa=C.Uk.t)&&(T=pa.r().n.e()),U=U.n,T=U.D()?T:U.e(),N=_.bind(c,null,p,J,E,N,b),d(y,E,h,t,J,l,T,N,function(b){k.debug("GetAdList fetch failed: "+ | |
b.message);p(C.$h)},q)):(k.error("Missing next station data! Skipping call to Chronos service."),p(C.$h))};C.Ca=function(){var b=C.Uk.V(),c=C.zd.h&&C.zd.h.Tq&&!0!=b.Fb()&&!0!=b.Ra()&&!0!=b.Tb();k.debug("Can use chronos - "+c+" \n isChronosEnabled: "+(C.zd.h&&C.zd.h.Tq)+" \n isPromotedStation: "+b.Fb()+" \n isOnDemandStation: "+b.Ra()+" \n isAdvertiserStation: "+b.rc()+" \n isRecommendedStation: "+b.Tb());return c};var Db={};Db.getGenre=C.Lf;b.Patron=Db;b.AdService=C;b.AdService_getDisplayAdUrl=C.dh; | |
b.AdService_getVxDisplayAdUrl=C.QH;b.AdService_getAndClearDisplayAdContent=C.yx;b.AdService_getAndClearDisplayAdCompanionUrls=C.cH;b.AdService_generateCorrelationId=C.Nl})(this);function mp(b,c,d,e,h){if(null!=b)try{var l={};512<b.length&&(b=b.replace(/\s/g,""),b=b.substr(0,512));l.adUrl=b+" : "+oe();l.adType=c;l.reason=d;l.client=e;pp(l,h);qp(l)}catch(p){k.warn("Exception in BrokenAdManager",p),trackJs.track(p)}} | |
function rp(b,c,d,e,h,l,p,q){if(null!=b)try{var t={},y=b,E=b.indexOf(";u=");0<E&&(y=b.substr(0,E));512<y.length&&(y=y.replace(/\s/g,""),y=y.substr(0,512));t.adUrl=y+" : "+oe();t.adType=c;t.reason=d;t.client="radio";t.requestUrl=e;t.creativeId=h;t.lineId=l;t.browserInfo=p;t.hiveRecord=null!=e?"1":"0";pp(t,q);qp(t);"1"==t.hiveRecord&&s("web_broken_ad_error",t,q)}catch(J){k.warn("Exception in BrokenAdManager recordWebBrokenAd",J),trackJs.track(J)}} | |
function pp(b,c){c&&b&&(b.lid=c.s,b.asyncGPT=c.ye()?"1":"0")}function qp(b){k.debug("brokenAdManager :/radio/services/brokenAd.jsp",b);$.ajax({cache:!1,type:"POST",data:b,error:sp,success:tp,timeout:1E4,url:"/radio/services/brokenAd.jsp"})}function sp(b,c){k.warn("BrokenAdManager.error: "+c)}function tp(b,c){"success"!=c&&k.warn("BrokenAdManager: unexpected status: "+c)};function up(b,c,d){d=new flensed.flXHR({instancePooling:!0,noCacheHeader:!1,xmlResponseText:!1,onerror:d,onreadystatechange:function(b){if(4==b.readyState)try{c(b.responseText)}catch(d){trackJs.track(d),k.debug("FlashProxy : Error in handler",d)}}});d.setRequestHeader=vp;d.open("GET",b);d.send()}function vp(b,c){k.debug("FlashProxy defeating header "+b+" with value "+c)};function op(b,c,d){up(b,c,d)}function wp(b,c,d){try{k.debug("CrossDomainProxy : fallback image pingUrl called : "+b);var e=new Image(1,1);e.onload=function(){e.onerror=e.onload=null;c&&c()};e.onerror=function(){e.onerror=e.onload=null;d&&d(null)};e.src=b}catch(h){trackJs.track(h),mp(b,"impression","fallback image ping failed","ads",v.h)}};var xp={},yp=!1,zp=0,Ap=!1,u=100,se="1880";setInterval(function(){zp=0},1E3);setInterval(function(){Ap=!1},6E4);var Bp={};$(window).bind("beforeunload",function(){np(null)});function ne(b,c){Cp();s("script_error",b,c);null!==b.msg&&""!==b.msg&&trackJs.track(Error(b.msg))}var Dp=null;function hn(){jn("page_failed");$.cookie("errorCookieInfo","start")} | |
function gn(){"start"==$.cookie("errorCookieInfo")&&(ke(5)?(z.c(Qg,function(){$.cookie("errorCookieInfo",null)}),Dp=""+(new Date).getTime()+"."+(1E3*Math.random()|0),$.cookie("errorCookieInfo","log")):$.cookie("errorCookieInfo",null));jn("start")}function jn(b){"log"==$.cookie("errorCookieInfo")&&s("cant_load_site",{ua:oe(),flash_ver:pe(),checkpoint:b,site_version:window._pandoraVersion,ticket:Dp})} | |
function s(b,c,d){var e=Ep()+"/v2";Bp[e]||(Bp[e]=setTimeout(function(){np(e)},A._data.statsInterval));try{if(null!=b&&""!=b){var h={type:b};null!=c&&$.each(c,function(b,c){null!==b&&""!==b&&null!==c&&""!==c&&(h[b]=c)});d&&d.s&&(h.listener_id=d.s);Fp(e,h)}}catch(l){trackJs.track(l),k.error("StatsCollectorUtil.logEvent error: "+l)}}function Gp(b,c){try{c&&c.s&&0==c.s%10&&s("promo_box",b,c)}catch(d){trackJs.track(d),k.error("StatsCollectorUtil.logEvent error listenerId % 10 failed: "+d)}} | |
function Hp(b){try{null!=b&&0!=b.length&&$.each(b,function(b,c){s(c,null,null)})}catch(c){trackJs.track(c),k.error("StatsCollectorUtil.logMultipleEvents error: "+c)}} | |
function Fp(b,c){try{if(yp&&(!Ap||"script_error"!=c.type)){var d;a:{for(var e=ud(),h=Ip(b),l=h.length-1;0<=l;l--){var p=h[l].url,q=h[l].data,t=h[l]&&h[l].time&&300>e-h[l].time?!0:!1;if(!t&&!h[l].pending)h.splice(l,1);else if(null!=p&&p==b&&null!=q&&_.isEqual(q,c)&&t){d=!0;break a}}var y=A._data.statsHost;d=c&&c.url&&y&&-1<c.url.indexOf(y)?!0:!1}if(d)k.debug("duplicate request, skipping: "+b,c);else{var E=Ip(b);E.push({time:ud(),data:c,pending:!0});E.length>=A._data.statsBatchSize&&(k.debug("Triggered with "+ | |
E.length+" events."),np(b))}}}catch(J){trackJs.track(J),k.warn("Error sending stats collector log: "+J)}}function Ep(){var b=A._data.statsHost,c=A._data.statsPort;yp=b?!0:!1;return"http://"+b+(null!=c?":"+c:"")}function Jp(b,c){var d="type"+b.count;b.count=++b.count;_.each(c,function(c,h){var l=d;"type"!==h&&(l+="."+h);b.data[l]=c})} | |
function np(b){_.each(xp,function(c,d){if(!b||d===b){Bp[d]&&(clearTimeout(Bp[d]),Bp[d]=null);var e=ud();if(0>=c.length)k.debug("No events in '"+d+"' queue.");else{k.debug("Flushing '"+d+"' queue "+(e-c[0].time)+"ms after 1st event added to queue");for(var h,l;;){l=[];h={data:{},count:0};for(var p=0;p<c.length&&h.count<A._data.statsBatchSize;p++)c[p]&&c[p].time&&300>e-c[p].time||l.unshift(p),c[p].pending&&(c[p].pending=!1,Jp(h,c[p].data));for(p=0;p<l.length;p++)c[l[p]].pending||c.splice(p,1);if(0=== | |
h.count)break;k.debug("Sending "+h.count+" events to "+d,h);$.ajax({cache:!1,type:"GET",data:h.data,dataType:"jsonp",crossDomain:!0,error:Kp,success:Lp,url:d})}}}})}function Ip(b){xp[b]||(xp[b]=[]);return xp[b]}function Kp(b,c){k.warn("StatsCollectorUtil.jsonpError: "+c);Cp()}function Cp(){!Ap&&50<++zp&&(k.info("StatsCollector failing too much... stopping logging for a minute."),Ap=!0)} | |
function Lp(b,c){k.debug("StatsCollectorUtil.jsonpSuccess: success");"success"!=c&&k.warn("StatsCollectorUtil.jsonpSuccess: unexpected status: "+c)};var en;function Mp(b){this.Qk=b.offerName;this.ei=b.lineId;this.Jc=b.creativeId;this.Uo=b.truexInstanceId}Mp.prototype.eh=function(){return null};Mp.prototype.bn=function(){return!1};Mp.prototype.mA=function(){return!1};function Np(b){Mp.call(this,b);this.Qk=b.offerName;this.ei=b.lineId;this.Jc=b.creativeId;this.WD=parseInt(b.secondsRemaining,10);this.XD=parseInt(b.secondsTotalDuration,10);this.iD=b.displayTextByBrand;this.hD=b.displayText;this.YC=b.brandName;this.KD=b.offerButtonLabel;this.LD=b.offerButtonUrl;this.ov=b.displayTextEndRewardLine1;this.pv=b.displayTextEndRewardLine2;this.ID=b.leadInBannerUrl;this.HD=b.leadInAudioUrl}vd(Np,Mp); | |
function Op(b){var c="";b.ov&&(c+=b.ov);b.pv&&(c&&(c+=" "),c+=b.pv);return c}Np.prototype.eh=function(){return this.ID};Np.prototype.bn=function(){return!0};Np.prototype.mA=function(){return!0};function Pp(b){return Qp(["account/sign-in","account/register","account/help","account/welcome","password_reset"],b)||"/"==b?b:!1}function Rp(b){var c="account/info account/privacy account/notices account/upgrade account/audioQuality account/desktopApp /payment".split(" ");return"/one"===b||Qp(c,b)?b:!1}function Qp(b,c){return b.some(function(b){return 0<=c.indexOf(b)})};function Sp(b,c,d,e,h){this.url=b;this.method=c;this.wp=e;this.sE=d;this.timeout=12E4;this.Xz=!0;this.Di=this.gR=!1;this.LO=r(this,this.KO);this.PO=h}var Tp=null,Up=0,Vp=0,Wp=null,Xp=null; | |
Sp.prototype.apply=function(b){var c=this.url;if(!this.gR){var d=Tp+"P",c=c+(0<=c.indexOf("?")?"&":"?"),c=c+("rid="+d.substr(6));null!=Wp&&0>c.indexOf("lid=")&&(c+=0<=c.indexOf("?")?"&":"?",c+="lid="+Wp);d=this.method.substr(this.method.indexOf(".")+1);c+="&method="+d;this.Di&&0>c.indexOf("commerce=true")&&(c+=0<=c.indexOf("?")?"&":"?",c+="commerce=true");if(this.sE)for(d=1;d<b.length;d++)c=c+"&arg"+d+"="+escape(b[d]);1024<c.length&&(c=c.substr(0,1024))}if(this.Xz){d=this.method;0!=d.indexOf("misc.")&& | |
(b=[Up+(Ed()-Vp)].concat(b));var e=[];e.push('<?xml version="1.0"?><methodCall><methodName>');e.push(d);e.push("</methodName><params>");for(d=0;d<b.length;d++)e.push("<param>"),Yp(b[d],e),e.push("</param>");e.push("</params></methodCall>");b=e.join("");b=Xp.encrypt(b)}else b="";this.wp.send(c,b,this.timeout,this.LO)};Sp.prototype.KO=function(b){var c=b;b instanceof xd&&(c=Zp(b.body));this.PO(c)};Sp.prototype.setTimeout=function(b){this.timeout=b}; | |
function Yp(b,c){c.push("<value>");if(td(b))if(b.constructor==Array){c.push("<array><data>");for(var d=0;d<b.length;d++)Yp(b[d],c);c.push("</data></array>")}else{c.push("<struct>");for(d in b)null!=b[d]&&(c.push("<member>"),c.push("<name>"),c.push(d),c.push("</name>"),Yp(b[d],c),c.push("</member>"));c.push("</struct>")}else sd(b)?(c.push("<int>"),c.push(b),c.push("</int>")):"boolean"==typeof b?(c.push("<boolean>"),c.push(b?"1":"0"),c.push("</boolean>")):rd(b)?(c.push("<string>"),rd(b)&&c.push(b.split("&").join("&").split("<").join("<").split(">").join(">").split("'").join("'").split('"').join(""")), | |
c.push("</string>")):k.error("unknown type: value: "+b+", current output: "+c.join(""));c.push("</value>")} | |
function Zp(b){if("methodResponse"!=b.nodeName)return $p("invalid top node: "+b.nodeName);var c=b.firstChild;if(null==c)return $p("no child in methodResponse");if("fault"==c.nodeName){b=aq(c.firstChild);if(null==b)return $p("invalid fault data");c=b.faultString.split("|");return 4!=c.length?new Dd(b.faultString,b.faultCode):new Dd(c[3],c[2])}if("params"==c.nodeName){b=[];for(var d=0;d<c.childNodes.length;d++){var e=c.childNodes[d];if(3!=e.nodeType){if("param"!=e.nodeName)return $p("not a param node"); | |
e=aq(e.firstChild);if(null==e)return $p("invalid item");b.push(e)}}return new yd(b)}return $p("invalid response data: "+c.nodeName)}function $p(b){k.error("XmlRpc parse error: "+b);return new Dd(b,0)} | |
function aq(b){if("value"!=b.nodeName)return k.error("not a value node");if(0==b.childNodes.length)return"";var c=b.firstChild;if(3==c.nodeType)return b.normalize&&(b.normalize(),c=b.firstChild),c.nodeValue;if("struct"==c.nodeName){for(var d={},e=0;e<c.childNodes.length;e++){var h=c.childNodes[e];if(3!=h.nodeType){if("member"!=h.nodeName)return k.error("not a member node");for(var h=h.childNodes,l,p=0;p<h.length;p++){var q=h[p];if(3!=q.nodeType)if("name"==q.nodeName)l=h[p].firstChild.nodeValue;else if("value"== | |
q.nodeName){if(b=aq(h[p]),null==b)return null}else return k.error("unknown node: "+h[p].nodeName)}d[l]=b}}return d}if("array"==c.nodeName){b=c.firstChild;if("data"!=b.nodeName)return k.error("not a data node");d=[];for(e=0;e<b.childNodes.length;e++)if(3!=b.childNodes[e].nodeType){c=aq(b.childNodes[e]);if(null==c)return null;d.push(c)}return d}return"int"==c.nodeName||"i4"==c.nodeName?Number(c.firstChild.nodeValue):"boolean"==c.nodeName?"1"==c.firstChild.nodeValue?!0:!1:"string"==c.nodeName?0==c.childNodes.length? | |
"":c.firstChild.nodeValue:k.error("unknown node: "+c.nodeName)};var G=Fn.Jm(),H=911312399,I="Ed",bq=[11,42,27,20,25,41,40,4,10,24,22,44,58,38,29,53,26,32,36,13,46,56,18,15,45,47,-1,3,21,8,23,48,6,14,30,2,54,57,50,19,51,33,7,12,39,9,28,35,31,37,59,16,0,17,34,52,1,49,5,55,43],K="LT",cq=[30,58,14,25,20,45,27,33,0,32,43,6,41,26,40,8,17,9,50,3,38,19,46,49,12,10,54,48,59,36,52,55,18,37,15,7,47,-1,44,51,39,53,16,1,5,34,28,57,29,21,56,22,2,11,42,4,35,24,23,31,13],L="CP",dq=[30,34,47,2,32,45,0,12,46,21,39,-1,6,49,4,8,36,52,15,20,9,56,50,18,23,40,33,3,29,19,51,53,11,22, | |
1,58,5,41,57,17,44,54,35,13,7,48,55,28,27,10,25,16,31,42,38,59,14,43,37,26,24],M=236273669,eq=[40,46,56,34,27,42,4,59,12,13,35,18,7,11,54,24,32,44,-1,47,39,15,9,48,57,28,52,41,19,45,22,6,1,30,38,37,5,3,21,29,10,49,8,25,51,0,20,17,16,58,26,2,36,53,43,55,14,33,23,31,50],fq=[20,11,5,3,45,47,38,13,41,26,28,23,46,43,31,44,22,53,57,56,32,34,30,4,49,37,54,24,9,1,25,29,0,27,-1,58,10,14,50,15,21,19,17,59,35,2,8,6,42,39,40,52,18,33,48,12,55,36,7,16,51];function gq(){this.dg=!1}f=gq.prototype;f.send=function(b,c,d,e){z.b($f,b);this.dg&&k.error("request pending");this.dg=!0;this.Xa=e;this.SF=b;this.NF=c;-1!=b.indexOf("/jsonp")?$.ajax({cache:!1,contentType:"text/plain",type:"GET",data:{req:c},dataType:"jsonp",processData:!0,crossDomain:!0,error:r(this,this.My),success:r(this,this.zL),timeout:d,url:b}):$.ajax({cache:!1,contentType:"text/xml",type:"POST",data:c,dataType:"xml",processData:!1,error:r(this,this.Em),success:r(this,this.mz),timeout:d,url:b})}; | |
f.My=function(b,c){k.warn("jsonpError: ",c);this.Lg(new Bd(c))};f.zL=function(b,c){if("success"==c){var d=$.parseXML(b.rpcResult);this.mz(d)}else k.warn("jsonp unexpected status: "+c),this.My(0,c)};f.Lg=function(b){this.dg=!1;this.Xa(b)};f.mz=function(b){this.Lg(new xd(b.lastChild))};f.Em=function(b,c,d){k.info("HTTP error",c,d);"timeout"==d?this.Lg(new Cd("load failed",this.SF,this.NF)):this.Lg(new Bd("load failed"))};function hq(b){this.Bd=null==b?[]:b;this.Bd.constructor!=Array&&k.error("call method must have an Array for its args parameter")}hq.prototype.lq=function(){return this.Bd};function O(b){this.Bd=null==b?[]:b;this.Bd.constructor!=Array&&k.error("call method must have an Array for its args parameter")}O.prototype.lq=function(){for(var b=[],c=0;c<this.Bd.length;c++)b.push(this.Bd[c]);v.h&&Ln()?b.unshift(Ln()):me("User not logged in while in AuthorizedRequestArguments. Args="+this.Bd.join(","));return b}; | |
function iq(b,c,d,e,h,l){this.method=b;this.Bd=c;this.zA=d;this.hx=e;this.context=h;this.uL=l;this.mw=0;this.Bi=!1}iq.prototype.getContext=function(){return this.context};iq.prototype.cancel=function(){this.Bi=!0};var v={Gu:"radio/xmlrpc/v35",Fu:"radio/jsonp/v35",VENDOR:"html5tuner",wd:"HTML5",Ci:"",Eu:{misc:"message logTunerDiagnostics logRadioEventMessage sync getCookies setCookie".split(" "),listener:"isUsernameUnique getUsername getArtistBookmarks getSongBookmarks emailPassword addTrackingCode getListenerResult addTiredSong setExplicitContentFilter setExplicitPIN verifyExplicitPIN emailExplicitPINRescue getProfileInfo getExtendedProfileInfo setProfileInfoExtended getProfileInfoWithStations getCountNewFeedPosts publishSongShare publishArtistMessageShare publishStationShare getSVNAds checkSVNAdComplete exerciseTimeoutCredit clearVendorBilledTrialExpiredAlertCode clearVendorBilledSubscriberTimedOutAlertCode acknowledgeSubscriptionExpiration getShowCpa canListen setAwareOfProfile setPrivacySettings setFacebookShareUserTokens setTwitterShareUserTokens like unlike getLikeInfo getFollowInfo search banListener unbanListener deleteListener accountMessageDismissed deleteCreditCard getAvailableFeatures setP1CustomSkin proxyAdRequest getAdList registerImpression registerVideoAdImpression trackPlay getArtistRepInfo startValueExchange insertArtistMessageMetric flagArtistMessage flagArtistMessageWithReason setUserArtistMessageSettings passwordHelp".split(" "), | |
music:"search searchCancelled shareSong shareArtistMessage getSeedSuggestions getRelatedSongInfoForFacebookShare searchTextForArtists getSearchRecommendations".split(" "),playlist:["getFirstFragment","narrative","getFragment"],station:"createStation createStationHexedCode createPromotedStation createMixStation addSeed deleteSeed deleteSeedByMusicId addThumbUp addFeedback deleteFeedback transformShared getStations setStationName removeStation dismissPromotedStation getStation getQuickMix setQuickMix shareStation setStationNameAndDescription getCustomContentStation getPromotedStations forcePromotedStation setStationSettings verifyHybridStationChecksum trackSkip".split(" "), | |
friends:"getServices activity find findByAddress add invite findFans hideFeedItem hideActivityItem hideAllFeedItems reportFeedSpam follow unfollow".split(" "),facebook:["getFriends","addFacebookFriends","disconnect","setAutoSharePreferences"]},wC:{vendor:["getVendor"],listener:"createListener register activateAccount changeAccount resetPassword validateResetToken purchaseSubscription updateBillingInformation updateBusinessInformation migrateToBusiness startPaypalPayment completePaypalPayment getPaypalCheckoutDetails getReceipts authenticateListener logout getCreditCard unsubscribe setPrivacySettings startComplimentaryTrial redeemGiftCode createP1Gift loadGift emailGift startCCBackedTrial startPaypalBackedTrial completePaypalBackedTrial redeemCCBackedGift startRedeemPaypalBackedGift completeRedeemPaypalBackedGift".split(" "), | |
station:["setStationSettings"],facebook:["getSigPlus","getFacebookInfo","connectListener"]},init:function(){v.wp=new gq;v.f={};v.La=[];v.dg=!1;v.Uz=Ud(Gn());null==Xp&&(Xp=Ud(Fn.Jm()),delete Fn.Jm);null==Tp&&(Tp=Fd());v.h=null;v.lG=r(v,v.Lg);v.kr()?v.bp(v.Eu,v.Ex(),!0,!0):v.bp(v.Eu,v.JH(),!0,!0);v.bp(v.wC,v.Ex(),!1,!0);v.f.listener.purchaseSubscription.setTimeout(18E4);v.f.listener.updateBillingInformation.setTimeout(18E4);v.f.listener.startCCBackedTrial.setTimeout(18E4);v.f.listener.redeemCCBackedGift.setTimeout(18E4); | |
v.f.listener.purchaseSubscription.Di=!0;v.f.listener.updateBillingInformation.Di=!0;v.f.listener.startCCBackedTrial.Di=!0;v.f.listener.redeemCCBackedGift.Di=!0;v.f.station.getStations.setTimeout(3E5);v.f.listener.getSVNAds.setTimeout(5E3);v.f.listener.getAdList.setTimeout(8E3);v.Ci=jq},kr:function(){return"https:"==window.location.protocol},Rl:function(){return fn()},Dx:function(){var b=A._data.shost,c=Io();return null==b||null==c||A._data.nossl?v.Rl():"https://"+b+":"+c+"/"},JH:function(){return v.kr()? | |
v.Rl()+v.Fu:v.Rl()+v.Gu},Ex:function(){return v.kr()?v.Dx()+v.Gu:v.Dx()+v.Fu},bp:function(b,c,d,e){for(var h in b)for(var l=b[h],p=0;p<l.length;p++){null==v.f[h]&&(v.f[h]={});var q=l[p];v.f[h][q]=new Sp(c,h+"."+q,d,v.wp,v.lG);e||(v.f[h][q].Xz=!1)}},j:function(b,c,d,e,h){b=v.ts(b,c,d,e,h,!1,!1);v.iq();return b},ts:function(b,c,d,e,h,l,p){k.debug("RPC dispatching request",b.method);null==b&&k.error("dispatchRequest called with null rpc");var q=c.lq();if(null!=q)for(var t=0;t<q.length;t++)null==q[t]? | |
k.error("dispatchRequest called with null, method: "+b.method+" - argument at position: "+t):"object"==typeof q[t]&&q[t].constructor!=Array&&(k.error("dispatchRequest called with non Array object, method: "+b.method+" - argument at position: "+t),k.error("maybe you forgot to use '.getValue()'?"));b=new iq(b,c,d,e,h,p);l?v.La.unshift(b):v.La.push(b);return b},kF:function(){for(var b=0;b<v.La.length;b++)v.La[b].cancel()},iq:function(){if(!v.dg&&0!=v.La.length){var b=v.La[0];b.mw++;b.Bi?(v.La.shift(), | |
v.iq()):(v.dg=!0,b.method.apply(b.Bd.lq()))}},Lg:function(b){var c=!1;try{z.b(ag,"rpc response");if(b instanceof Dd)switch(b.code){case m.d.qC():v.La.shift();z.b(Eh);return;case m.d.wu():v.La.shift();z.b(Mh);return;case m.d.oC():v.La.shift();z.b(Og);return;case m.d.dC():v.La.shift();return;case m.d.KB():v.La.shift();z.b(bh);return;case m.d.lC():v.La.shift();z.b(ch);return;case 12:window.location=v.Rl()+"restricted";return}c=!0;if(v.La[0].uL)if(k.debug("received a response to a re-auth"),v.La.shift(), | |
b instanceof zd){k.debug("got an error performing a re-auth");var d=v.La.shift();d.Bi||v.Wp(d,b);c=!1}else{k.debug("re-auth response is valid, new authtoken value: "+n(b));var e=In(n(b));b=!1;xm()&&(v.h=e,b=!0);v.Oa(e);b&&v.rn(null,null)}else if(b instanceof Dd&&b.code==m.d.pB()&&null!=v.h){k.debug("got an authorization error: "+b.code+", "+(v.h&&Ln()?Ln():""));var h=v.La[0];if(3>h.mw)if(k.debug("putting a re-auth event onto the queue"),xm())v.ts(v.f.listener.getListenerResult,new hq([km(vl),v.VENDOR, | |
v.wd]),null,r(this,function(b){b instanceof zd&&k.error("got error from authenticateAnonymous: "+b.code)}),{},!0,!0);else{var l=km(Cl),p=km(Dl)||"";ln()&&ve("lsc");var q=new hq([v.Ci,l,p,v.VENDOR,"","",v.wd,!1,vm()]);v.ts(v.f.listener.authenticateListener,q,null,null,{Pa:l,K3:p},!0,!0)}else k.debug("failed to run the request after 3 attempts"),v.La.shift(),h.Bi||v.Wp(h,b)}else h=v.La.shift(),b instanceof Dd&&m.d.su(),h.Bi||v.Wp(h,b)}finally{v.dg=!1,c&&v.iq()}},Wp:function(b,c){c instanceof Ad?null!= | |
b.hx&&b.hx.call(v,c,b.getContext()):null!=b.zA&&b.zA.call(v,c,b.getContext())},ed:function(){return null!=v.h},HK:function(){return null!=km(vl)},om:function(){wm(null)},gr:function(){pm(Cl,null);qm(Dl)},rn:function(b,c){b=null!=b?b.toLowerCase():null;null!=b&&v.h.Pa!=b?k.error("Returned username does not match sent username: "+v.h.Pa+" != "+b):v.h.p()?wm(Ln()):(pm(Cl,b),null!=c&&pm(El,c),qm(Dl),!0!==km(zl)&&pm(zl,!0),v.om(),$.cookie("v2lo",null),$.cookie("lua",b))},Oa:function(b){var c=v.h;v.h=b; | |
Wp=null!=b?b.s:null;Xm(null!=b?b.s:null);v.QO(b);null!=c&&null!=b&&c.s==b.s?(Kn(b,c),z.b(Ee,b)):(z.b(De,b),null!=b&&(io(b),v.eH(function(b){z.b(Rg,b)})))},QO:function(b){k.info("Saving at cookie",b);b=null==b?"":escape(b.qg);var c=new Date;c.setTime(c.getTime()+2592E6);b="at="+b+"; path=/; "+("expires="+c.toGMTString()+"; ");null!=document.domain&&(document.domain.match(/pandora.com$/)?b+="domain=.pandora.com;":document.domain.match(/savagebeast.com$/)&&(b+="domain=.savagebeast.com;"));document.cookie= | |
b},mh:function(){return!0===km(zl)&&(!v.h||v.h.p())}};v.xQ=function(b,c){v.j(v.f.misc.sync,new hq([v.Ci]),function(d){var e=v.JQ(n(d));null==e?c(new zd("Invalid sync value from server: "+n(d))):b(e)},c,{})};v.JQ=function(b){b=Xd(v.Uz,b);for(var c=0;4>c;c++)b.shift();b=Zd(Yd(b));b=Number(b);return isNaN(b)?null:b};v.QE=function(b,c){v.j(v.f.listener.getListenerResult,new hq([b,v.VENDOR,v.wd]),v.hz,c,{})};v.Fw=function(b){var c=A._data.af,c=new hq([v.Ci,v.VENDOR,"","",v.wd,!0,null!=c?c:""]);v.j(v.f.listener.createListener,c,v.hz,b,{newUser:!0})}; | |
v.hz=function(b,c){z.b(Pg);var d=In(n(b));d.Lr=c.newUser;v.Oa(d);v.rn(null,null)};v.iF=function(b,c,d){v.j(v.f.listener.canListen,new hq([b,""]),function(b){c(n(b))},d,{})};v.Cd=function(b,c,d,e){null!=b&&null!=c||k.error("null arguments");ln()&&ve("lsc");var h=new hq([v.Ci,b,c,v.VENDOR,"","",v.wd,!0,d]);return v.j(v.f.listener.authenticateListener,h,function(b,c){v.hw(b,c);z.b(lg)},e,{username:b,password:c,keepLoggedIn:d})}; | |
v.pO=function(b,c,d,e,h,l,p,q,t,y,E){v.j(v.f.listener.register,new O(p&&l?[b,c,d,e,h,l,p,q,v.VENDOR,"",v.wd,t]:[b,c,d,e,h,q,v.VENDOR,"",v.wd,t]),function(b,c){v.hw(b,c);y&&0<y.length?window.location=y:z.b(ig,n(b))},E,{username:b,password:c,keepLoggedIn:t})};v.hw=function(b,c){z.b(Pg);var d=In(n(b));v.Oa(d);v.rn(c.username,c.keepLoggedIn)};v.logout=function(b){return v.j(v.f.listener.logout,new O([]),b,b,{})}; | |
v.UN=function(b,c,d,e,h,l){e=new hq([b,c,d,e]);v.j(v.f.listener.passwordHelp,e,h,l,{email:b,birthYear:c,zipCode:d})};v.MH=function(b,c){v.j(v.f.station.getStations,new O([]),function(c){var e=[],h=(new Date).getTime(),l=0;$.each(n(c),function(){v.$e(this,h-l++);var b=kq(this);e.push(b)});b(e)},c,{})};v.CH=function(b){var c=lq,d=mq;v.j(v.f.station.getPromotedStations,new O([b]),function(b){b=v.Cv(n(b));c(b)},d,{})}; | |
v.ZG=function(){var b=lq,c=mq;v.j(v.f.station.forcePromotedStation,new O([nq]),function(c){c=v.Cv(n(c));b(c)},c,{})};v.Cv=function(b){var c=[],d=(new Date).getTime(),e=0;$.each(b,function(){v.$e(this,d-e++);var b=kq(this);c.push(b)});return c}; | |
v.$e=function(b,c){c||(c=(new Date).getTime());b.chronologicalSequence=c;var d=b.initialSeed;null!=d&&(null!=d.song?b.originalSeed={type:"song",key:d.song.musicId,songName:d.song.songTitle,artistName:d.song.artistSummary,songDetailUrl:d.song.songDetailUrl,isComedy:d.song.isComedy}:null!=d.nonGenomeStation?b.originalSeed={type:"nonGenomeStation",stationId:d.nonGenomeStation.stationId,stationName:d.nonGenomeStation.stationName,seedNames:d.nonGenomeStation.seeds,key:d.nonGenomeStation.musicId,isComedy:d.nonGenomeStation.isComedy, | |
redirect:d.nonGenomeStation.isRedirect}:null!=d.artist&&(b.originalSeed={type:"artist",key:d.artist.musicId,artistName:d.artist.artistName,likelyMatch:d.artist.likelyMatch,isComposer:d.artist.isComposer,artistDetailUrl:d.artist.artistDetailUrl,isComedy:d.artist.isComedy}));1==b.isQuickMix&&(0==b.isCreator&&(b.transformType=m.Gc.Ye()),b.stationName&&b.stationName.replace&&(b.stationName=b.stationName.replace("QuickMix","Shuffle")))}; | |
v.jP=function(b,c,d,e,h){v.j(v.f.station.setStationNameAndDescription,new O([b,c,d]),function(b){e(n(b))},h,{})};v.an=function(b,c,d,e){return v.j(v.f.station.setStationName,new O([b,c]),function(){d(b)},e,{})};v.hP=function(b,c,d,e,h,l,p){for(var q=[],t=0;t<c.length;t++)q.push(""+c[t]);v.j(v.f.station.setQuickMix,new O([b,q,"",d,e,h]),function(b){b=n(b);v.$e(b);l(b)},p,{})};v.DH=function(b,c){v.j(v.f.station.getQuickMix,new O([]),function(c){c=n(c);v.$e(c);b(c)},c,{})}; | |
v.az=function(b,c,d){v.j(v.f.music.search,new O([b]),function(b){c(n(b))},d,{})};v.gO=function(b,c,d){var e=b.indexOf("@");-1<e&&(b=b.substring(0,e));v.j(v.f.listener.search,new O([b]),function(b){c(n(b))},d,{})};v.pH=function(b,c,d,e,h,l,p,q){zm(b.e());var t=String(Am()),y=String(Bm()),E=eo(v.h);c=[b.e(),Eo(),E,t,y,e||"",h||"",A._data.testArtistMessage||"",c,d,l];d=v.f.playlist.getFragment;b.hj()&&(c.push(b.pq()),c.push(b.qq()));return v.j(d,new O(c),function(b){p(n(b))},q,{})}; | |
v.iH=function(b,c,d){zm(b.e());v.j(v.f.station.getCustomContentStation,new O([b.e()]),function(b){c(n(b))},d,{})};v.Ei=function(b,c,d,e,h){var l=oq;d||(d="");c||(c="");b=c&&0<c.length||e&&0<e.length?new O([b,c,d,e]):new O([b,d]);v.j(v.f.station.createStation,b,function(b){b=n(b);v.$e(b);h(b)},l,{})};v.Gw=function(b,c,d){var e=null,h=pq,l=oq;e||(e="");b=new O([b,e]);v.j(v.f.station.createStationHexedCode,b,function(b){b=n(b);v.$e(b);b.artistMessageArtistUid=c;b.artistMessageId=d;h(b)},l,{})}; | |
v.JF=function(b,c,d,e,h){b=new O([b,c,d]);v.j(v.f.station.createPromotedStation,b,function(b){b=n(b);v.$e(b);e(b)},h,{})};v.wE=function(b,c,d,e,h){v.j(v.f.station.addFeedback,new O([b,c,d,"",!0,!1,13]),e,h,{})};v.ni=function(b,c,d,e,h){return v.j(v.f.station.addFeedback,new O([b.Nf(c),c.eb(),d]),function(){b.tm(c)&&(c.k.Nc=d?1:-1);e(c)},h,{})};v.zl=function(b,c,d,e,h){return v.j(v.f.station.deleteFeedback,new O([b.Nf(c),c.eb(),d]),function(){b.tm(c)&&(c.k.Nc=0);e(c)},h,{})}; | |
v.Vv=function(b,c,d,e){v.j(v.f.station.addSeed,new O([b,c]),d,e,{})};v.xE=function(b,c,d){v.j(v.f.listener.addTiredSong,new O([b]),c,d,{})};v.Al=function(b,c,d){return v.j(v.f.station.removeStation,new O([b]),c,d,{})};v.kG=function(b,c,d,e,h){v.j(v.f.station.dismissPromotedStation,new O([b,c,d]),e,h,{})};v.rG=function(b,c,d){b=b.redirect?new hq([b.username,b.redirect]):new hq([b.username]);v.j(v.f.listener.emailPassword,b,c,d,{})}; | |
v.E3=function(b,c){return v.j(v.f.listener.getSongBookmarks,new O([]),b,c,{})};v.z3=function(b,c){return v.j(v.f.listener.getArtistBookmarks,new O([]),b,c,{})};v.HH=function(b,c){v.j(v.f.music.getSearchRecommendations,new O([]),function(c){b(n(c))},c,{})};v.UQ=function(b,c,d){v.j(v.f.listener.changeAccount,new O([b.oldusername,b.oldpassword,b.newusername,b.newpassword,b.emailOptIn,b.gender,b.birthYear,b.zipCode]),function(d){c({ldata:n(d),newpass:b.newpassword})},d,{})}; | |
v.$Q=function(b,c,d){var e=[b.isProfilePrivate,b.disallowComments,b.optOut,b.noNotifyOnNote,!1,b.noNotifyOnFollow];null!=b.artistPromoEmailsEnabled&&e.push(b.artistPromoEmailsEnabled);v.j(v.f.listener.setPrivacySettings,new O(e),function(b){c(n(b))},d,{})};v.iG=function(b,c){v.j(v.f.facebook.disconnect,new O([]),function(c){b(n(c))},c,{})};v.cP=function(b,c,d,e,h,l,p){v.j(v.f.facebook.setAutoSharePreferences,new O([b,c,d,e,h]),function(b){l(n(b))},p,{})}; | |
v.WQ=function(b,c,d,e){v.j(v.f.listener.setExplicitContentFilter,new O([b]),function(){d(c)},e,{})};v.bP=function(b,c,d){v.j(v.f.listener.setExplicitPIN,new O([b.pin,b.rescueEmail]),c,d,{})};v.kR=function(b,c,d){v.j(v.f.listener.verifyExplicitPIN,new O([b.pin]),function(b){c(n(b))},d,{})};v.Rp=function(b,c){return v.j(v.f.listener.emailExplicitPINRescue,new O(null),function(c){b(c)},c,{})};v.LH=function(b,c,d,e){v.j(v.f.playlist.narrative,new O([b,c]),function(b){d(n(b))},e,{})}; | |
v.IH=function(b,c,d,e){v.j(v.f.music.getSeedSuggestions,new O([b,c,10]),function(b){d(n(b))},e,{})};v.kO=function(b,c,d,e){v.j(v.f.listener.publishSongShare,new O([b,c]),function(b){d(n(b))},e,{})};v.jO=function(b,c,d,e,h){v.j(v.f.listener.publishArtistMessageShare,new O([b,c,d]),function(b){e(n(b))},h,{})};v.lO=function(b,c,d,e,h,l){null==d&&(d="");v.j(v.f.listener.publishStationShare,new O([""+b,c,d,e]),function(b){h(n(b))},l,{})}; | |
v.AH=function(b,c,d){v.j(v.f.listener.getExtendedProfileInfo,new O([b]),function(b){c(n(b))},d,{})};v.gP=function(b,c,d,e,h,l,p,q,t){v.j(v.f.listener.setProfileInfoExtended,new O([b,c,d,e,h,l,p]),function(b){q(n(b))},t,{})};v.fP=function(b,c,d){v.j(v.f.listener.setP1CustomSkin,new O([b]),function(b){c(n(b))},d,{})};v.fH=function(b,c,d,e){v.j(v.f.listener.getCountNewFeedPosts,new O([b,c]),function(b){d(n(b))},e,{})}; | |
v.BH=function(b,c,d){v.j(v.f.listener.getProfileInfoWithStations,new O([b]),function(b){c(n(b))},d,{})};v.FH=function(b,c,d){v.j(v.f.music.getRelatedSongInfoForFacebookShare,new O([b,3]),function(b){c(n(b))},d,{})};v.mP=function(b,c,d,e){v.j(v.f.listener.setTwitterShareUserTokens,new O([b,c]),function(b){d(n(b))},e,{})};v.IL=function(b,c,d,e,h,l,p){v.j(v.f.listener.like,new O([b,c,d,e,h]),function(b){l(n(b))},p,{})}; | |
v.SQ=function(b,c,d,e){v.j(v.f.listener.unlike,new O([b,c]),function(b){d(n(b))},e,{})};v.RQ=function(b,c,d){v.j(v.f.listener.unlike,new O([b]),function(b){c(n(b))},d,{})};v.oH=function(b,c,d){v.j(v.f.listener.getFollowInfo,new O([b]),function(b){c(n(b))},d,{})};v.oq=function(b,c,d,e){if(v.ed())return v.j(v.f.listener.getLikeInfo,new O([b,c]),function(b){d(n(b))},e,{})}; | |
v.Vs=function(b,c,d,e,h,l,p){b=[b,c,d,e];_.isString(h)&&!_.isEmpty(h)&&b.push(h);return v.j(v.f.station.shareStation,new O(b),l,p,{})};v.Us=function(b,c,d,e,h){return v.j(v.f.music.shareSong,new O([b,d,c]),e,h,{})};v.uP=function(b,c,d,e,h,l){v.j(v.f.music.shareArtistMessage,new O([b,c,e,d]),h,l,{})};v.yE=function(b,c){v.j(v.f.listener.addTrackingCode,new O([b]),c,c,{})};v.gL=function(b,c,d,e,h){v.j(v.f.listener.insertArtistMessageMetric,new O([b,c,d,e,document.referrer,h]),null,null,{})}; | |
v.QG=function(b,c,d,e){v.j(v.f.listener.flagArtistMessage,new O([c,b,d]),e,e,{})};v.RG=function(b,c,d,e){v.j(v.f.listener.flagArtistMessageWithReason,new O([b,c,d]),e,e,{})};v.gH=function(b,c){v.j(v.f.listener.getCreditCard,new O(null),function(c){b(n(c))},c,{})};v.Pj=function(b,c,d,e,h,l,p,q,t,y,E,J,N,U){return v.j(v.f.listener.purchaseSubscription,new O([b,c,d,e,h,l,p,q,t,y,E,J]),function(b){N(n(b))},U,{})}; | |
v.nk=function(b,c,d,e,h,l,p,q,t,y,E,J,N,U){return v.j(v.f.listener.updateBillingInformation,new O(b?[c,d,e,h,l,p,q,t,y,E,J]:[c,y,J]),function(b){N(n(b))},U,{})};v.VQ=function(b,c,d,e,h,l,p,q){v.j(v.f.listener.updateBusinessInformation,new O(d?[b,c,e,h,l]:[b,c]),function(b){p(n(b))},q,{})};v.SL=function(b,c,d,e){v.j(v.f.listener.migrateToBusiness,new O([b,c]),function(b){d(n(b))},e,{})}; | |
v.dQ=function(b,c,d,e,h,l,p,q,t,y,E){v.j(v.f.listener.startCCBackedTrial,new O([b,c,d,e,h,l,p,q,t]),function(b){y(n(b))},E,{})};v.gQ=function(b,c,d,e,h){v.j(v.f.listener.startPaypalPayment,new O([b,c,d]),function(b){e(n(b))},h,{})};v.fQ=function(b,c,d,e){v.j(v.f.listener.startPaypalBackedTrial,new O([b,c]),function(b){d(n(b))},e,{})};v.AF=function(b,c,d){v.j(v.f.listener.completePaypalBackedTrial,new O([b]),function(b){c(n(b))},d,{})}; | |
v.BF=function(b,c,d,e,h,l){v.j(v.f.listener.completePaypalPayment,new O([b,c,d,e]),function(b){h(n(b))},l,{})};v.zH=function(b,c,d){v.j(v.f.listener.getPaypalCheckoutDetails,new O([b]),function(b){c(n(b))},d,{})};v.EH=function(b,c){v.j(v.f.listener.getReceipts,new O([]),function(c){b(n(c))},c,{})};v.IF=function(b,c,d,e,h,l,p,q,t,y,E,J,N,U,pa,Ja,fb){v.j(v.f.listener.createP1Gift,new O([b,c,d,e,h,l,p,q,t,y,E,J,N,U,pa]),function(b){Ja(n(b))},fb,{})}; | |
v.KL=function(b,c,d,e){v.j(v.f.listener.loadGift,new O([b,c]),function(b){d(n(b))},e,{})};v.qG=function(b,c,d,e){v.j(v.f.listener.emailGift,new O([b,c]),function(b){d(n(b))},e,{})};v.TQ=function(b,c){v.j(v.f.listener.unsubscribe,new O([]),function(c){b(n(c))},c,{})};v.KK=function(b,c,d,e){v.j(v.f.friends.hideFeedItem,new O([b,c]),function(b){d(n(b))},e,{})};v.IK=function(b,c,d){v.j(v.f.friends.hideActivityItem,new O([b]),function(b){c(n(b))},d,{})}; | |
v.JK=function(b,c,d){v.j(v.f.friends.hideAllFeedItems,new O([b]),function(b){c(n(b))},d,{})};v.CO=function(b,c,d){v.j(v.f.friends.reportFeedSpam,new O([b]),function(b){c(n(b))},d,{})};v.VG=function(b,c,d){v.j(v.f.friends.follow,new O([b]),function(b){c(n(b))},d,{})};v.Nt=function(b,c,d){return v.j(v.f.friends.unfollow,new O([b]),function(b){c(n(b))},d,{})};v.YE=function(b,c,d){v.j(v.f.listener.banListener,new O([""+b]),c,d,{})}; | |
v.MQ=function(b,c,d){v.j(v.f.listener.unbanListener,new O([""+b]),c,d,{})};v.WF=function(b,c,d,e,h){v.j(v.f.listener.deleteListener,new O([b,c,d]),e,h,{})};v.aG=function(b,c,d){v.j(v.f.station.deleteSeed,new O([""+b]),c,d,{})};v.bG=function(b,c,d,e){v.j(v.f.station.deleteSeedByMusicId,new O([""+b,c]),d,e,{})};v.rF=function(b,c,d,e,h,l){v.j(v.f.listener.checkSVNAdComplete,new O([b,c,d,e]),h,l,{})};v.KG=function(b,c){v.j(v.f.listener.getSVNAds,new O([]),b,c,{})}; | |
v.vG=function(b,c){v.j(v.f.listener.exerciseTimeoutCredit,new O([]),b,c,{})};v.jQ=function(b,c,d,e,h,l,p,q,t,y,E,J,N){v.j(v.f.listener.startValueExchange,new O([b,c,d,e,h,l,p,q,t,y,E]),J,N,{})};v.oO=function(b,c,d){v.j(v.f.listener.redeemGiftCode,new O([b]),function(b){c(n(b))},d,{})};v.eQ=function(b,c,d,e){v.j(v.f.listener.startComplimentaryTrial,new O([b,c,v.VENDOR,v.wd]),function(b){v.Oa(In(n(b)));d()},e,{})};v.nE=function(b){v.j(v.f.listener.accountMessageDismissed,new O([b]),null,null,{})}; | |
v.GF=function(b,c,d,e,h,l){v.j(v.f.facebook.connectListener,new O([b,c,d,e]),h,l,{})};v.mH=function(b,c){v.j(v.f.facebook.getFacebookInfo,new O(null),function(c){b(n(c))},c,{})};v.wK=function(b,c,d){v.j(v.f.listener.trackPlay,new O([b,c]),function(b){d(n(b))},null,{})};v.YF=function(b){v.j(v.f.listener.deleteCreditCard,new O(null),b(),null,{})};v.yn=function(b,c,d){return v.j(v.f.station.transformShared,new O([""+b]),function(b){c(n(b))},d,{})}; | |
v.HO=function(b,c,d){v.j(v.f.listener.resetPassword,new O([A._data.pt,b,v.VENDOR,v.wd]),function(b){b=In(n(b));v.rn(b.Pa,null);v.Oa(b);c()},d,{password:b})};v.jR=function(b,c,d){v.j(v.f.listener.validateResetToken,new hq([b]),function(b){c(n(b))},d,{})};v.eH=function(b){v.j(v.f.listener.getAvailableFeatures,new O([]),function(c){b(n(c))},null,{})};v.pE=function(b){v.j(v.f.listener.acknowledgeSubscriptionExpiration,new O([]),null,b,{})}; | |
v.n3=function(b){return v.j(v.f.listener.clearVendorBilledTrialExpiredAlertCode,new O([]),null,b,{})};v.tF=function(b){v.j(v.f.listener.clearVendorBilledSubscriberTimedOutAlertCode,new O([]),null,b,{})};v.iO=function(b,c,d,e,h){b=Jd(b);v.j(v.f.listener.proxyAdRequest,new O([b,!0,c,d]),function(b){e(n(b))},h,{})}; | |
v.aH=function(b,c,d,e,h,l,p,q,t,y,E,J){b=Jd(b);k.debug("targetUrl - "+b);k.debug("nextStationId - "+c);k.debug("secondsUntil - "+d);k.debug("trackType - "+l);k.debug("currentTrackStationId - "+e);v.j(v.f.listener.getAdList,new O([b,c,d,e,h,l+"",p,q,t,!0,y]),function(b){E(n(b))},J,{})}; | |
v.Um=function(b,c,d,e,h,l){b=b||"";c=c||0;d=d||0;e=!!e;k.debug("Chronos - dispatching video register event");k.debug("creativeId - "+b);k.debug("secondsPlayed - "+c);k.debug("adLength - "+d);k.debug("isHouseAd - "+e);return v.j(v.f.listener.registerVideoAdImpression,new O([b,c,d,e]),function(b){h(n(b))},l,{})};v.ab=function(b,c,d,e,h,l,p){b=Jd(b);return v.j(v.f.listener.registerImpression,new O([b,c,d,e,h]),function(b){l(n(b))},p,{})}; | |
v.kP=function(b,c,d,e){v.j(v.f.station.setStationSettings,new O([b,c]),function(b){d(n(b))},e,{})};v.nP=function(b,c,d,e){v.j(v.f.listener.setUserArtistMessageSettings,new O([b,c]),function(b){d(n(b))},e,{})};v.nO=function(b,c,d,e,h,l,p,q,t,y,E,J){v.j(v.f.listener.redeemCCBackedGift,new O([b,c,d,e,h,l,p,q,t,y]),function(b){E(n(b))},J,{})};v.hQ=function(b,c,d,e,h){v.j(v.f.listener.startRedeemPaypalBackedGift,new O([b,c,d]),function(b){e(n(b))},h,{})}; | |
v.CF=function(b,c,d,e){v.j(v.f.listener.completeRedeemPaypalBackedGift,new O([b,c]),function(b){d(n(b))},e,{})};v.lR=function(b,c,d,e){v.j(v.f.station.verifyHybridStationChecksum,new O([b,c]),function(b){d(n(b))},e,{})};for(L=dq[22];-1!=L;)switch(L){case 39:G[99]=-1282901791;L=dq[0];break;case 16:G[13]=714982793;L=dq[40];break;case 11:L=dq[48];break;case 1:G[152]=791667E3;L=dq[11];break;case 57:G[505]=-444537175;L=dq[1];break;case 33:G[698]=3897845298;L=dq[36];break;case 35:G[192]=1267985868;L=dq[10];break;case 22:G[380]=-1894642054;L=dq[42];break;case 13:G[528]=563589190;L=dq[13];break;case 14:L=dq[23];break;case 48:L=dq[5];break;case 46:G[777]=-2005848005;L=dq[43];break;case 40:G[693]=1689332099;L=dq[47];break; | |
case 28:L=dq[7];break;case 18:G[24]=-1059857244;L=dq[18];break;case 19:L=dq[19];break;case 32:G[98]=-2125661920;L=dq[44];break;case 47:G[1015]=-539412187;L=dq[21];break;case 0:L=dq[54];break;case 25:L=dq[33];break;case 29:G[825]=1211874530;L=dq[57];break;case 44:G[697]=-2050076713;L=dq[30];break;case 3:G[475]=1435906359;L=dq[50];break;case 31:G[584]=-1651054317;L=dq[37];break;case 37:L=dq[38];break;case 41:G[643]=-222883560;L=dq[20];break;case 8:G[738]=-1388127382;L=dq[9];break;case 21:G[821]=3640054195; | |
L=dq[16];break;case 10:G[266]=-1760014917;L=dq[14];break;case 49:G[611]=1746934941;L=dq[53];break;case 17:G[217]=-721530141;L=dq[29];break;case 54:G[160]=1910390267;L=dq[60];break;case 12:L=dq[52];break;case 50:G[263]=-966535934;L=dq[8];break;case 23:L=dq[51];break;case 42:G[733]=-1009081047;L=dq[6];break;case 43:G[401]=1478358082;L=dq[26];break;case 27:G[306]=2086596478;L=dq[35];break;case 55:G[81]=1774074969;L=dq[34];break;case 15:G[391]=-1015258452;L=dq[55];break;case 52:G[937]=-1839895297;L=dq[3]; | |
break;case 24:G[972]=-461819453;L=dq[2];break;case 34:G[416]=1078657027;L=dq[45];break;case 20:L=dq[31];break;case 56:G[860]=2023719060;L=dq[32];break;case 45:G[73]=1831180899;L=dq[12];break;case 5:G[786]=2111075113;L=dq[56];break;case 38:G[974]=895355799;L=dq[15];break;case 26:L=dq[28];break;case 30:L=dq[59];break;case 36:G[178]=-1489317857;L=dq[17];break;case 9:L=dq[58];break;case 58:G[106]=1775366455;L=dq[24];break;case 2:L=dq[27];break;case 59:G[137]=2120164615;L=dq[39];break;case 6:G[183]=-349538053; | |
L=dq[49];break;case 53:L=dq[4];break;case 51:G[415]=1569800660;L=dq[46];break;case 7:G[607]=-1284163114;L=dq[25];break;case 4:G[698]=563511300,L=dq[41]};function qq(b){je(b.username)?(Xm(null),z.b(ah)):(ln()&&ve("lsc"),v.Cd(b.username,b.password,b.keepLoggedIn,function(c){c instanceof zd&&(c.code==m.d.Ve()?z.b(ah):x(c,oi,b))}))}function rq(){console.log("in handle Log out Resuest");v.kF();A._data.pt=null;pm(Cl,null);qm(Dl);Xm(null);$.cookie("v2i",null);$.cookie("v2u",null);$.cookie("v2p",null);$.cookie("v2s",null);ve("lsc")} | |
function sq(b){v.logout(function(){var c="/";b&&b.landing&&(c=b.landing);$.address.value(c);setTimeout(function(){window.location.reload(!0)},1)})}function tq(b){v.pO(b.username,b.password,b.emailOptIn,b.gender,b.birthYear,b.birthMonth,b.birthDay,b.zipCode,b.keepLoggedIn,b.returnTarget,function(c){x(c,qi,b,fh,c)})}function uq(b){var c=b.errorCallback;v.jR(b.resetToken,b.successCallback,function(b){c(b)})} | |
function vq(b){v.HO(b,function(){z.b(Ke)},function(b){b.code==m.d.bo()?z.b(ih,Ca()):b.code==m.d.eo()?z.b(ih,Da()):b.code==m.d.qu()?z.b(ih):z.b(pi)})}function wq(){v.Fw(function(b){k.error("Could not create new user:",b.message)})}function xq(b){v.AH(b,function(b){z.b(Fe,b)},function(c){x(c,Bi,b)})}function yq(b){v.gP(b.webName,b.fullName,b.isProfilePrivate,b.homeTown,b.school,b.employer,b.bio,function(b){z.b(Ge,b)},function(c){x(c,Dj,b)})} | |
function zq(b){v.fH(b.webname,b.lastFeedId,function(b){b&&b.count&&(b=parseInt(b.count,10),0<b&&z.b(Ie,b))},function(){k.info("error while fetching new feedpost count for webname="+b.webname+", lastfeedid="+b.webname)})}function Aq(b){v.BH(b,function(b){b&&b.webName&&z.b(He,b)},function(c){x(c,Ci,b)})}function Bq(b){var c=b.username;v.rG(b,function(){z.b(Je,c)},function(b){z.b(hh,b)})} | |
function Cq(b){if(v.mh())z.b(rh);else{var c=b.stationCode,d=b.source,e=b.stationName||null,h=b.artistMessageArtistUid;b=b.artistMessageId;var l;if(2<c.length)a:{for(var p=0;p<Dq.length;p++)if(l=Dq[p],l.e()==c.substring(2))break a;l=null}else l=null;null!=l?Eq({stationCode:"fs"+l.e(),adId:qn(l.n),correlationId:rn(l.n),trackingUrls:l.n._promotedTrackingUrls}):null!=h&&null!=b?v.Gw(c,h,b):v.Ei(c,e,null,d,pq)}} | |
function Eq(b){v.mh()?z.b(rh):v.JF(b.stationCode,b.adId,b.correlationId,function(c,d){b.trackingUrls&&$.each(b.trackingUrls,function(){var b=this;""!=b&&wp(b,function(){},function(){k.debug("Promoted station tracking url failure: "+b)})});Fq(c,d)},function(b){setTimeout(function(){z.b(Hg)},100);oq(b)})}function Fq(b,c){setTimeout(function(){z.b(Mg,{stationId:b.originalStationId})},250);pq(b,c)}function Gq(b){v.mh()?z.b(rh):v.Ei(b,null,null,null,Hq)} | |
function Hq(b,c){setTimeout(function(){z.b(Ng)},250);pq(b,c)}function Iq(b){var c=b.stationCode,d=b.trackToken,e=b.source;v.mh()?(b.retry_method=Iq,z.b(rh,b)):v.Ei(c,null,null,e,function(b){pq(b,d)})}function Jq(b){v.mh()?(b.retry_method=Jq,z.b(rh,b)):v.Ei(b.stationCode,b.stationName,b.searchText,null,pq)} | |
function Kq(b){if(v.mh())b.retry_method=Kq,z.b(rh,b);else{var c=b.stationCode,d=b.stationName,e=b.source,h=b.artistMessageArtistUid;b=b.artistMessageId;null!=h&&null!=b?v.Gw(c,h,b):v.Ei(c,d,null,e,pq)}} | |
function pq(b,c){k.info("Successfully created station with station and trackToken:",b,c);var d=A._data.fb_ref,e=v.h;if(b.isNew){if(d&&0<d.length){var h={listener_id:e.s,station_id:b.stationId,social_network_id:"facebook",device_os:"web"},l=d.split("_");3<=l.length&&(h.shared_listener_token=l[2]);0==d.indexOf("trackplay__")&&4==l.length&&(h.shared_station_id=l[3]);s("social_autoshare_station_created",h,e)}(d=b.artistMessageId)&&0<d.length&&z.b(qk,{artistMessageId:d,artistUid:b.artistMessageArtistUid, | |
metric:m.Ab.yC(),isOnDemand:!0,shareUrlType:cp("sut")})}D.vE(b);c?z.b(ki,{stationId:b.stationId,trackToken:c}):z.b(ji,{stationId:b.stationId})}function oq(b){z.b(rh,b)}function Lq(b){var c=b.searchText,d=b.searchFilter;v.az(c,function(b){b.searchText=c;b.searchFilter=d;z.b(bf,b)},function(c){x(c,Ji,b)})}function Mq(b){var c=b.searchText,d=b.searchFilter;v.gO(c,function(b){b.searchText=c;b.searchFilter=d;z.b(cf,b)},function(c){x(c,Ji,b)})} | |
function Nq(b){v.az(b,function(c){c.searchText=b;z.b(rf,c)},function(c){x(c,Zi,b)})}function Oq(b){v.Al(b,function(){D.qO(b)},function(c){x(c,Hi,b)})}function Pq(b){v.kG(b.stationId,b.adId,b.correlationId,function(){setTimeout(function(){z.b(Mg,b)},250)},function(c){x(c,Lg,b)})} | |
function Qq(b){v.HH(function(c){k.info("*** Got search suggestions: "+c);b||!v.h||v.h.p()||!(2<=c.length)||c[0]&&0!=c[0].length||c[1]&&0!=c[1].length?z.b(ef,c):(k.info("Trying one more time to get search suggestions."),setTimeout(function(){Qq(!0)},1500))},function(b){"QUICKMIX_NOT_PLAYABLE"!=b.code&&k.warn("Could not get search suggestions.",b);z.b(ef,[])})}function Rq(b){v.jP(b[0],b[1],b[2],function(b){z.b(Qe,b)},function(c){x(c,Pi,b)})} | |
function Sq(b){v.an(b[0],b[1],function(c){z.b(Qe,{stationId:c,stationName:b[1]})},function(c){k.error("Could not update station: ",c);x(c,aj,b)})}function Tq(b){v.WQ(b.contentFilterEnabled,b,function(b){v.UQ(b,function(b){z.b(ff,b);v.Oa(In(b.ldata))},function(d){x(d,ui,b,Hh,d)})},function(c){k.error("Failed to update explicit content filter.",c);x(c,ui,b)})}function Uq(b){v.$Q(b,function(b){z.b(gf,b);v.Oa(In(b))},function(c){k.error("Failed to update privacy settings.",c);x(c,vi,b)})} | |
function Vq(){v.iG(function(){z.b(xg)},function(b){k.error("Failed to disconnect from Facebook.",b);x(b,mj,!1)})}function Wq(b){v.cP(b.autoShareEnabled,b.autoShareTrackPlay,b.autoShareLikes,b.autoShareFollows,b.userInitiated,function(b){z.b(wg,b)},function(b){k.error("Failed to update Facebook auto-share settings.",b);x(b,wi,!1)})}function Xq(b){v.bP(b,function(b){z.b(kf,b)},function(c){k.error("Failed to update explicit PIN.",c);x(c,Si,b)})} | |
function Yq(b){v.kR(b,function(b){z.b(lf,b)},function(c){k.error("Failed to verfiy explicit PIN.",c.message);x(c,Ti,b)})}function Zq(){v.Rp(function(){z.b(mf)},function(b){k.error("Failed to email explicit PIN.",b);x(b,Ui,null)})}function $q(b){var c=b[0],d=b[1];v.wE(c,d,b[2],function(){z.b(hf,[c,d])},function(c){k.error("Failed to add thumb up track.",c);x(c,Qi,b)})}function ar(b){var c=b[0],d=b[1];v.Vv(c,d,function(){z.b(jf,[c,d])},function(c){k.error("Failed to add seed.",c);x(c,Ri,b)})} | |
function br(b){v.xE(b.eb(),function(){z.b(nf,b)},function(c){k.error("Failed to add tired track.",c);z.b(nf,b)})}function cr(b){v.LH(b.track.e(),b.track.o(),function(c){z.b(of,{narrative:c,track:b.track,allowActions:b.allowActions})},function(c){k.error("Failed to add tired track.",c);x(c,Wi,b.track)})}function dr(b){v.IH(b.stationId,b.musicId,function(b){z.b(qf,b)},function(b){k.error("Failed to get seed suggestions.",b)})} | |
function er(b){v.Vv(b.r().e(),b.o(),function(){z.b(sf,b)},function(c){x(c,$i,b)})}function fr(b){v.FH(b,function(c){c.stationId=b;z.b(xf,c)},function(c){k.warn("Error loading related track info for facebook share: "+c.message);z.b(xf,{stationId:b})})}function gr(b){var c=b&&b.twitterShareUserKey?b.twitterShareUserKey:"",d=b&&b.twitterShareUserSecret?b.twitterShareUserSecret:"";v.mP(c,d,function(){v.h.de=c;v.h.Xh=d;z.b(Bg,b)},function(b){v.h.de=null;v.h.Xh=null;z.b(oh,b.message)})} | |
function hr(b){var c=b.shareName||null;b.doEmail&&v.Vs(b.stationToken,b.emails.split(" ").join(""),0==b.userMessage.length?b.defaultMessage:b.userMessage,Eo(),c,function(){z.b(Dg,{email:!0})},function(c){x(c,jj,b,nh)});b.doProfile&&v.lO(b.stationId,b.stationName,b.stationInitialSeed,0==b.userMessage.length?b.defaultMessage:b.userMessage,function(){z.b(Dg,{profile:!0})},function(c){x(c,jj,b,nh)})} | |
function ir(b){if(b.doEmail){var c=b.musicId,d=b.emails,e=0==b.userMessage.length?b.defaultMessage:b.userMessage,h=b.artistMessageArtistUid;h?v.uP(c,h,d.split(" ").join(""),e,function(){z.b(Dg,{email:!0})},function(c){x(c,kj,b,nh)}):v.Us(c,d.split(" ").join(""),e,function(){z.b(Dg,{email:!0})},function(c){x(c,kj,b,nh)})}b.doProfile&&(c=b.musicId,d=0==b.userMessage.length?b.defaultMessage:b.userMessage,(h=b.artistMessageArtistUid)?v.jO(c,h,d,function(){z.b(Dg,{profile:!0})},function(c){x(c,kj,b,nh)}): | |
v.kO(c,d,function(){z.b(Dg,{profile:!0})},function(c){x(c,kj,b,nh)}))}function jr(b){v.IL(b.type,b.objectId,b.context,b.contextId,String(b.contextName),function(b){b.objectId&&z.b(zf,b)},function(c){x(c,qj,b)})}function kr(b){v.SQ(b.Mf(),b.Lc,function(b){z.b(Bf,b)},function(c){x(c,uj,b)})}function lr(b){v.RQ(b,function(b){z.b(Af,b)},function(c){x(c,rj,b)})}function mr(b){v.oq(b.Mf(),b.Lc,function(c){b.ff=c.likeId;z.b(Df,b)},function(c){x(c,sj,b)})} | |
function nr(b){v.oH(b,function(b){z.b(Cf,b)},function(c){x(c,tj,b)})}function or(b){null!=v.h&&Qn(v.h)?v.gH(function(c){z.b(Ef,{cdata:c,ctx:b})},function(c){c&&"CREDIT_CARD_NO_RECORD_FOUND"==c.code?z.b(Ef,{cdata:null,ctx:b}):(k.error("Failed to get card information.",c),x(c,vj,b))}):z.b(Ef,{cdata:null,ctx:b})} | |
function pr(b){v.Pj(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9],b[10],b[11],function(b){v.Oa(In(b));z.b(Lf,b)},function(c){k.error("Failed to purchase subscription.",c);x(c,Bj,b,zh,c)})}function qr(b){v.nk(!0,b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9],b[10],function(b){v.Oa(In(b));z.b(Hf,b)},function(c){k.error("Failed to set billing information.",c);x(c,xj,b,vh,c)})} | |
function rr(b){v.nk(!1,b[1],null,null,null,null,null,null,null,b[0],null,b[2],function(b){v.Oa(In(b));z.b(If,b)},function(c){k.error("Failed to set billing information.",c);x(c,yj,b,wh,c)})}function sr(b){v.VQ(b[0],b[1],2<b.length,b[2],b[3],b[4],function(b){v.Oa(In(b));z.b(Jf,b)},function(c){k.error("Failed to update business information.",c);x(c,zj,b,xh,c)})} | |
function tr(b){v.SL(b[0],b[1],function(b){v.Oa(In(b));z.b(Kf,b)},function(c){k.error("Failed to update business information.",c);x(c,Aj,b,yh,c)})}function ur(b){v.gQ(b[0],b[1],b[2],function(b){k.info("returned startPaypalPayment.");z.b(fk,b)},function(c){k.error("Failed startPaypalPayment.",c);x(c,ek,b,Ph,c)})}function vr(b){v.zH(b[0],function(b){k.info("returned getPaypalCheckoutDetails.");z.b(jk,b)},function(c){k.error("Failed getPaypalCheckoutDetails.",c);x(c,ik,b,Rh,c)})} | |
function wr(b){v.EH(function(b){k.info("returned getReceipts.");z.b(nl,b)},function(c){k.error("Failed getReceipts.",c);x(c,ll,b,ml,c)})}function xr(b){v.BF(b[0],b[1],b[2],b[3],function(b){k.info("returned completePaypalPayment.");v.Oa(In(b));z.b(hk,b)},function(c){k.error("Failed completePaypalPayment.",c);x(c,hk,b,Qh,c)})}function yr(b){v.fQ(b[0],b[1],function(b){k.info("returned startPaypalBackedTrial.");z.b(nk,b)},function(c){k.error("Failed startPaypalBackedTrial.",c);x(c,mk,b,Th,c)})} | |
function zr(b){v.AF(b[0],function(b){k.info("returned completePaypalBackedTrial.");v.Oa(In(b));z.b(pk,b)},function(c){k.error("Failed startPaypalBackedTrial.",c);x(c,ok,b,Uh,c)})}function Ar(b){v.dQ(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],function(b){v.Oa(In(b));z.b(lk,b)},function(c){k.error("Failed to start credit-card backed trial.",c);x(c,kk,b,Sh,c)})} | |
function Br(b){v.IF(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9],b[10],b[11],b[12],b[13],b[14],function(b){v.Oa(In(b));b.p1gift=!0;z.b(Ff,b)},function(c){x(c,ak,b)})}function Cr(b){var c=b[0];v.KL(c,b[1],function(b){z.b(ng,b)},function(b){x(b,bk,c)})}function Dr(b){var c=b[0];v.qG(c,b[1],function(b){z.b(og,b)},function(b){x(b,ck,c)})}function Er(){v.TQ(function(b){z.b(Pf,In(b))},function(b){k.error("Failed to unsubscribe",b);x(b,Cj,null,th)})} | |
function Fr(b){var c=b.feedId,d=b.deleteCompletely;b.isActivityDelete?v.IK(c,function(b){z.b(bg,In(b))},function(c){k.error("Failed to unsubscribe",c);x(c,gj,b,Bh)}):v.KK(c,d,function(b){z.b(bg,In(b))},function(c){k.error("Failed to unsubscribe",c);x(c,gj,b,Bh)})}function Gr(b){v.CO(b,function(b){z.b(cg,In(b))},function(c){k.error("Failed to unsubscribe",c);x(c,ij,b,Ch)})}function Hr(b){v.JK(b,function(b){z.b(dg,In(b))},function(c){k.error("Failed to unsubscribe",c);x(c,hj,b,Dh)})} | |
function Ir(b){v.VG(b.webName,function(){z.b(Nf,b)},function(c){x(c,Ej,b)})}function Jr(b){v.Nt(b.webName,function(){z.b(Of,b)},function(c){x(c,Fj,b)})}function Kr(b){v.YE(b,function(){z.b(Qf,b)},function(c){x(c,Gj,b)})}function Lr(b){v.MQ(b,function(){z.b(Rf,b)},function(c){x(c,Hj,b)})}function Mr(b){v.WF(b.password,b.email,b.accountType,function(){z.b(Vg)},function(b){x(b,Ij,null,$h)})} | |
function Nr(b){var c=b.stationID,d=b.seedID,e=b.musicID;e?v.bG(c,e,function(){z.b(Eg,[c,e])},function(c){x(c,Jj,b)}):v.aG(d,function(){z.b(Eg,[c,d])},function(c){x(c,Jj,b)})}function Or(b){v.oO(b,function(b){v.Oa(In(b));z.b(Wf,b)},function(c){k.error("Failed to redeem gift code: ",c.message);x(c,Qj,b,sh,c)})} | |
function Pr(b){v.rF(b.svnName,b.activityBenefit,b.hoursEarned,b.probablyCompleted,function(c){z.b(Vf,{success:n(c),activity:b})},function(b){k.error("Failed to check SVN complete: ",b.message);x(b,Mj,[],Pj)})}function Qr(){dp?v.KG(function(b){b=n(b);b=null!=b&&0<b.length?b.pop():null;z.b(Tf,b)},function(b){k.error("Failed to fetch SVN ads: ",b.message);z.b(Tf,null);x(b,Kj,[],Nj)}):setTimeout(function(){z.b(Tf,null)},500)} | |
function Rr(){v.vG(function(b){z.b(Uf,parseInt(n(b),10))},function(b){k.error("Failed to exercise timeout credit: ",b.message);x(b,Lj,[],Oj)})}function Sr(b){v.jQ(b.offerName,b.brandName,b.lineId,b.creativeId,b.offerButtonLabel,b.offerButtonUrl,b.leadInBannerUrl,b.leadInAudioUrl,b.signature?b.signature:"",b.vxOffer?b.vxOffer:"",b.truexInstanceId?""+b.truexInstanceId:"",function(b){z.b(fl,n(b))},function(b){k.error("Failed to start value exchange: ",b.message);x(b,dl,[],el)})} | |
function Tr(b){v.eQ(b.sponsor||"",b.referrer||"unknown",function(){z.b(Xf,b)},function(c){k.error("Failed to start complimentary trial",c);var d=v.h,e="";switch(c.code){case m.d.vu():e=d&&null!=d.sl?ob():d&&!d.H()?pb():qb();break;case m.d.Ak():e=rb();break;case m.d.FC():e=sb();break;case m.d.TB():e=ub([b.sponsor||""]);break;case m.d.AB():e=vb();break;default:e=wb()}c.ng=e;x(c,Rj,b)})}function Ur(b){v.fP(b,function(){},function(){})}function Vr(b){v.nE(b)} | |
function Wr(b){v.GF(b.id,b.name,b.accessToken,b.accessTokenExpiration,function(){z.b(vg);b.callback&&b.callback()},function(b){z.b(ph,b)})}function Xr(b){if(null!=b&&!(b.Ho||b instanceof Bn||b.Kc)){var c="";null!=v.h&&(c=v.h.kx||"");v.wK(b.eb(),c,function(c){b.Ho=!0;c&&c.updateFacebookInfo&&(k.info("trackPlay response: need to do sync"),v.mH(function(b){z.b(yg,b)},function(){}))})}}function Yr(){v.YF(function(){z.b(Mf)})} | |
function Zr(b){var c=b.stationId,d=b.context;v.yn(c,function(b){z.b(Fg,{oldStationId:c,station:b,context:d})},function(b){x(b,Wj,c)})}function $r(){v.pE(function(b){x(b,$k,null)})}function as(){v.tF(function(b){x(b,al,null)})}function bs(b){0<b?(pm(Al,b),pm(Bl,!1)):pm(Bl,!0)} | |
function cs(b){var c=b.adUrl,d=b.adToken||"",e=b.stationId,h=b.errorCallback,l=b.successCallback,p=b.chronosOptions.secondsUntilAd,q=b.chronosOptions.currentStationId,t=b.chronosOptions.trackToken,y=b.chronosOptions.trackType,E=b.chronosOptions.secondsPlayed,J=b.chronosOptions.userInitTrackEnd,N=b.chronosOptions.secondsSinceDisplayAd||0,U=b.testMode;k.debug("Attempting chronos call..");k.debug("Chronos variables \n url: "+c+" \n adToken: "+d+" \n nextStationId: "+e+" \n secondsUntilAd: "+p+" \n currentStationId: "+ | |
q+" \n trackToken: "+t+" \n secondsPlayed: "+E+" \n userInitTrackEnd: "+J+" \n secondsSinceDisplayAd: "+N+"\n trackType: "+y);if(null!=c){var pa=JSON.stringify({url:c,nextStationId:e,secondsUntilAd:p,currentStationId:q,trackToken:t,trackType:y,secondsPlayed:E,userInitTrackEnd:J,secondsSinceDisplayAd:N,videoAdReady:!0,testMode:U}),Ja=v.h,fb="track_complete";J&&(fb=q!=e?"station_change":"track_skip");var gb={ad_unit_id:null,event_type:"request",event_sub_type:fb,event_description:null,correlation_id:null, | |
line_id:null,creative_id:null,request_string:pa,listener_id:Ja.s,vendor_id:u,device_id:se,accessory_id:null,app_version:z.ba,device_os:oe(),device_model:null,client_timestamp:(new Date).format("yyyy-mm-dd HH:MM:ss",!0),is_pandora_link:!1,bluetooth_device_name:null,ad_id:null};s("chronos_lifecycle",gb,Ja);k.debug("Fetch Ad Url : "+c);v.aH(c,e,p,q,t,y,E,J,N,U,function(b){k.debug("Chronos call successful");k.debug("Response - "+JSON.stringify(b));var e={};e.adList=b;e.url=c;e.adToken=d;l(e)},function(c){c instanceof | |
Cd?(k.info("Chronos call timed out"),gb={ad_unit_id:null,event_type:"timeout",event_sub_type:null,event_description:v.f.listener.getAdList.timeout,correlation_id:null,line_id:null,creative_id:null,request_string:pa,listener_id:Ja.s,vendor_id:u,device_id:se,accessory_id:null,app_version:z.ba,device_os:oe(),device_model:null,client_timestamp:(new Date).format("yyyy-mm-dd HH:MM:ss",!0),is_pandora_link:!1,bluetooth_device_name:null,ad_id:null},s("chronos_lifecycle",gb,Ja)):k.info("Chronos call failed"); | |
c={name:"getAdListError: "+c.message,message:c.ng,description:c.ng};mp(c.name+" : "+b.slotSize,b.slotSize,"getAdList get failure",b.subzone);h(c)})}else k.debug("AdService : ","Ad url is null")}function ds(b){var c=b.errorCallback,d=b.successCallback;v.Um(b.creativeId,b.secondsPlayed,b.adLength,b.isHouseAd,function(b){d(b)},function(b){c(b)})} | |
function es(b){var c=b.adUrl,d=b.adToken||"",e=b.stationId,h=b.errorCallback,l=b.successCallback;null!=c?(k.debug("Fetch Ad Url : "+c),v.iO(c,d,e,function(d){"true"!=d.success?(d={name:"serverProxyError",message:"ServerProxy failed to proxy the ad request",description:"ServerProxy failed to proxy the ad request"},mp(d.name+" : "+b.slotSize,b.slotSize,"server proxy get failure",b.subzone),h(d)):l(d.content,c,d.adToken,d.adRequestMetaData)},function(c){c={name:"serverProxyError: "+c.message,message:c.ng, | |
description:c.ng};mp(c.name+" : "+b.slotSize,b.slotSize,"server proxy get failure",b.subzone);h(c)})):k.debug("AdService : ","Ad url is null")} | |
function fs(b){var c=b.adData,d=b.onImpressionSuccess,e=b.onImpressionFailure||$.noop,h=b.stationId||0,l=c.Om?c.Om.Jf():"",p=c.rE;b=[];b.push(["impression",c.rH?c.qc:c.impression]);b.push(["tracking",c.tracker]);if(v.h.xe()){var q=c.NH?c.vn:c.tile_tracker_urls;q&&(q="string"===typeof q||q instanceof String?[q]:q,$.merge(b,$.map(q,function(b){return[["tile_tracker",b]]})))}c.qc=null;c.vn=null;$.each(b,function(b,q){try{var E=q[0],J=q[1];je(J)?k.info("empty "+E+" URL"):c.type&&"CPA_PROVIDER"==c.type? | |
wp(J,d,e):v.ab(J,E,p,l,h,function(b){"true"!=b.success?e({name:"serverProxyError",message:"ServerProxy failed to proxy "+E+" url",description:"ServerProxy failed to proxy "+E+" url"},E):d(E)},function(b){e({name:"serverProxyError on "+E+" url: "+b.message,message:b.userMessage,description:b.userMessage},E)})}catch(N){e(N,E)}})}function gs(b){v.gL(b.artistMessageId,b.artistUid,b.metric,b.isOnDemand||!1,b.shareUrlType)} | |
function hs(b){v.QG(b.artistMessageId,b.artistUid,b.stationId,function(){z.b(Ug,b)})}function is(b){v.RG(b.artistUid,b.artistMessageId,b.flagReason,function(){z.b(Ug,b)})}function js(b){v.kP(b[0],b[1],function(b){z.b(Sg,b)},function(c){x(c,tk,b)})}function ks(b){v.nP(b[0],b[1],function(b){var d=b.listenerData;void 0!=d&&(z.b(gf,d),v.Oa(In(d)));z.b(Tg,b)},function(c){k.error("Failed to update artist audio message settings.",c);x(c,uk,b)})} | |
function ls(b){v.hQ(b[0],b[1],b[2],function(b){k.info("returned startRedeemPaypalBackedGift.");z.b(xk,b)},function(c){k.error("Failed startRedeemPaypalBackedGift.",c);x(c,wk,b,Wh,c)})}function ms(b){v.CF(b[0],b[1],function(b){k.info("returned completeRedeemPaypalBackedGift.");z.b(Wf,b)},function(c){k.error("Failed completeRedeemPaypalBackedGift.",c);x(c,yk,b,Xh,c)})} | |
function ns(b){v.nO(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9],function(b){v.Oa(In(b));z.b(Wf,b)},function(c){var d=Nb();if(c.code==m.d.Un()||c.code==m.d.Vn()||c.code==m.d.HB()||c.code==m.d.mu())d=c.message;k.error("Failed to redeem credit-card backed gift.",c);x(c,vk,b,Vh,d)})}function os(b){var c=b[0];v.UN(c,b[1],b[2],b[3],function(b){k.debug("callback fired for success");z.b(Ck,[b,c])},function(b){z.b(Dk,b)})};function ps(b,c){this.Ad=b;this.Ad["class"]="Track";this.i=c;this.k="ArtistMessage"==this.Ad.trackType?new ro(b,qs(b.audioURL),qs(b.audioReceiptURL)):"LiveStream"==this.Ad.trackType?new Dn(b):"IntroductoryMessage"===this.Ad.trackType&&c.Ha()?new so(b,qs(b.audioURL),qs(b.audioReceiptURL)):new zn(b,qs(b.audioURL),qs(b.audioReceiptURL));this.Sb=b.audioTokenId;this.Ks=b.isSeed;this.Xt=b.userSeed;this.MA=b.trackToken;this.Yz=this.Ma=this.ub=!1;this.wm=null;this.Be()&&(z.se().ti=2)}f=ps.prototype; | |
f.load=function(){null==this.g&&(this.g=rs(this));this.g instanceof ss||this.g.rL?this.g.load(this.Ql(),this.Vc(),this.eL):this.k instanceof Dn&&this.g.load(this)};f.Se=function(b,c){null!=this.g&&this.g.Se(b,c)};f.play=function(){this.Ma=!0;null==this.g&&this.load();this.Se(this.oc());this.g.play()};f.stop=function(){null!=this.g&&(this.g.stop(),this.g=null)};f.Gh=function(){this.Ma?this.g.Gh():this.play()};f.pause=function(b){this.g&&this.g.pause(b)}; | |
f.suspend=function(){null!=this.g&&(this.g.pf(r(this,function(){this.g&&this.g.pf(null);this.i&&!this.i.active&&this.i.Qh()})),this.g.suspend())};f.Ee=function(b){if(this.k&&!this.k.ki&&this.k.Vk&&this.g){var c=this.Yc()||this.g.totalTime||0,d=this.g.Kf(),c=c-d;(this.i.ph()||"thumbed_down"===b||"skipped"===b)&&"discarded"!==b&&ts(this,b,d);z.b(Se,{reason:b,audio_token:this.Sb,elapsed_seconds:d,remaining_seconds:0<=c?c:0,track:this});this.k.ki=!0}}; | |
function us(b){b.k.ki&&b.Yz&&b.i.ph()&&ts(b,"completed",b.g.Kf());b.k&&!b.k.ki&&b.k.Vk&&b.g&&(z.b(Se,{reason:"completed",audio_token:b.Sb,elapsed_seconds:b.g.totalTime?b.g.totalTime:0,remaining_seconds:0,track:b}),b.k.ki=!0)}function vs(b){b.k&&!b.k.Vk&&(z.b(Te,{is_prefetch:!1,audio_token:b.Sb}),b.k.Vk=!0)}f.r=function(){return this.i};f.o=function(){return this.k.o()};f.Lx=function(){return this.Xt};f.eb=function(){return this.MA};f.Yc=function(){return this.k.Yc()}; | |
f.lL=function(){return this.k instanceof ro};function ws(b){return b.k instanceof Dn}f.Be=function(){return this.k.Be()};f.oc=function(){return this.k instanceof zn?this.k.oc():0};f.Ql=function(){return this.k.Ql()};f.Vc=function(){return this.k instanceof zn?this.k.Vc():null};f.Iy=function(){return!1};function qs(b){if(null!=b){var c=b.substr(b.length-48,48);b=b.substr(0,b.length-48);b+=v.Uz.decrypt(c)}return b} | |
function ts(b,c,d){if("undefined"!==typeof b.k.bv){d|=0;var e=qs(b.k.bv);c=xs(c);$.ajax({type:"GET",url:e+("&reason="+c+"&sec="+d),dataType:"jsonp",success:r(b,function(){this.Yz=!0})})}}function xs(b){if("completed"===b)return 0;if("skipped"===b)return 1;if("station_changed"===b)return 2;if("thumbed_down"===b)return 3;if("error"===b)return 4;if("discarded"===b)return 5;if("expired"===b)return 6;k.warn("Unidentified skip reason: "+b);return 7} | |
function ys(b,c){ws(b)&&(s("live_tracking",{station_id:b.r().e(),track_token:b.eb(),track_start:(new Date(1E3*c)).format("yyyy-mm-dd HH:MM:ss",!0),event_type:"start",platform:"web",vendor_id:u,device_code:se,app_version:z.ba,device_os:oe(),client_timestamp:(new Date).format("yyyy-mm-dd HH:MM:ss",!0)},v.h),Zm({trackToken:b.eb(),stationId:b.r().e(),start:c}),$m({trackToken:b.o(),stationId:b.r().e(),seconds:1}),b.wm=setInterval(r(b,function(){$m({trackToken:this.eb(),stationId:this.r().e(),seconds:Ed()- | |
c})}),1E4))}function zs(b,c,d,e,h){ws(b)&&(s("live_tracking",{station_id:b.r().e(),track_token:b.eb(),track_start:(new Date(1E3*c)).format("yyyy-mm-dd HH:MM:ss",!0),track_end:(new Date(1E3*d)).format("yyyy-mm-dd HH:MM:ss",!0),elapsed_seconds:e,event_type:"end",platform:"web",vendor_id:u,device_code:se,app_version:z.ba,device_os:oe(),client_timestamp:(new Date).format("yyyy-mm-dd HH:MM:ss",!0),bitrate:h},v.h),Zm(null),$m(null),null!=b.wm&&clearInterval(b.wm))};function As(b){this.url=b;this.k={}}As.prototype=Object.create(ps.prototype);As.prototype.Vc=function(){return"m4a"};As.prototype.Be=function(){return!0};function P(b){this.wh=b.isNew;this.Xd=!1;this.Ie=this.os=null;this.Dc=!1;this.I=[];this.active=!1;this.Me=this.Yg=this.paused=!0;this.Qc=this.Jb=this.He=!1;this.hn=!0;this.rr=null;this.stationData=this.n=new on(b);this.Vp=null;this.Gf=Bs;this.tx=this.Ep=0;this.L=this.t=null;this.ns=0;this.ce={};this.Py=this.mn=null;this.Ue=!1;this.zw=b.checksum;Cs[this.e()]=this;this.ls();z.c(Lk,r(this,this.gM));z.Eh(Rk,r(this,this.QD));this.Tm(Ae,"app_start",this.yc);this.Tm(fg,"station_changed",this.yc);this.Tm(Ne, | |
"station_created",this.yc);this.Tm(Qk,"video_ad",this.yc)}var kq,Bs,Ds; | |
(function(b){function c(b,c,d){var q=F.Vi(c);c&&!F.rf||q||!F.uh()?(b.qs(q),d()):(b.Ue=!0,setTimeout(function(){b.Ue&&(b.Ue=!1,d())},e),k.debug("Station: Waiting for ad to load before playing next track."))}function d(b,c,d){var q=!c||F.rf,t=F.xH(),y=[];for(0<t&&k.debug("Chronos - we're about to cycle through "+t+" ads.");0<t;){var E=F.Vi(c);y.unshift(E);t--}_.each(y,function(c){null!==c&&(q&&!c&&F.uh()?(b.Ue=!0,setTimeout(function(){b.Ue&&(b.Ue=!1,d())},e),k.debug("Chronos - Station: Waiting for ad to load before playing next track.")): | |
(k.debug("Chronos - pushing audio ad onto playlist (1)... "),b.qs(c)))});d()}var e=3E3;P.prototype.Tm=function(b,c,d){z.c(b,r(this,_.bind(function(b){d(b)},this,c)))};P.prototype.ls=function(){var b=sl?mm(om(Pl,this.e())):null,c=sl?mm(om(Ql,this.e())):null;if(null!=b||null!=c)"AudioAdTrack"!=b["class"]||this.Ka()?this.Ka()||(c&&this.ap(c,!0),b&&this.ap(b,!1)):(b=new Es(b,this),this.I.push(b),F.xs())};P.prototype.ap=function(b,c,d){c=Nm(b.musicId,this.e(),c);null==c&&(c=0);b=new ps(b,this);b.eL=c; | |
b.k.Ho=!0;d?this.I.splice(d,0,b):this.I.push(b);this.Cn(b.oc())};P.prototype.update=function(b){this.wh=b.isNew;this.n.update(b)};Bs=1E3;Ds=!1;P.prototype.hH=function(){return this.active?this.t:null};P.prototype.ph=function(){return this.active&&!this.paused};P.prototype.suspend=function(){k.info("Station.suspend",this.fa());this.active=!1;null!=this.t&&this.t.suspend()};P.prototype.pL=function(){return null!=this.t};P.prototype.start=function(b,c){_.isUndefined(c)&&(c=!0);this.Jb?(k.warn("Tried to start a station that is pending a restart. (Call restart() instead.)"), | |
this.vf(!0,!1)):this.ck(b,c)};P.prototype.Rz=function(){this.ck(null,!1)};P.prototype.ck=function(b,c){_.isUndefined(c)&&(c=!0);k.info("Station.start",this.fa(),this);this.active=!0;this.paused=!1;b?(this.Jb=this.He=this.Qc=!1,this.I=[],this.paused=!1,this.t&&(this.Ee("skipped"),z.b(Ze,this.t.k)),this.xc(r(this,function(){this.oa(c)}),b)):this.hj()?(this.I=[],this.xc(r(this,function(){this.oa(c)}))):null==this.t||this.Jb?(this.Jb=!1,0==this.I.length?this.xc(r(this,function(){this.oa(c)})):this.oa(c)): | |
this.pk()};P.prototype.Dz=function(){this.active&&(0==this.I.length?this.xc():this.fB(r(this,function(){this.I=[];this.xc()}),null))};P.prototype.Cz=function(){this.active&&F.uh()};P.prototype.oa=function(b,c){_.isUndefined(b)&&(b=!0);c=c||"Normal";0==this.I.length&&(this.Qc=!0);this.active&&(this.Dc=!0,this.rr=!this.t||this.t.k instanceof Bn||this.t.k.Kc?null:this.t.o(),this.L=this.t,this.Qh(),this.He?(this.He=this.Qc=!1,this.Jb=!0,this.Me?z.b(rg,this.e()):this.vf(!1,!1)):Fs({userInitiated:b},r(this, | |
function(d){d&&d.siteLocked?this.Mg(b,c):this.mx(b,r(this,function(){this.Mg(b,c)}))})))};P.prototype.zD=function(){if(!this.L)return!1;var b=this.L.k;return b instanceof ro||b instanceof so};P.prototype.tD=function(b,c){if(!this.Yg)return!1;this.Yg=!1;if(this.Ka()){var d;d=C.Ca()?function(b){if(b){k.debug("Chronos - adding "+b.length+" in-station ads to beginning of playlist");for(var d=0;d<b.length;d++){var e=b[d];e.i=this;this.I.splice(d,0,e)}}c()}:function(b){b&&!b.k.Lw&&(b.i=this,this.I.splice(0, | |
0,b));c()};F.Vl(b,r(this,d))}else c();return!0};P.prototype.mx=function(b,e){this.tD(b,e)||(this.zD()?(k.info("Not loading audio ad, because a station audio message just played"),e()):C.Ca()?d(this,b,e):c(this,b,e))};P.prototype.XP=function(){this.t.k instanceof Bn&&this.oa(!1)};P.prototype.Mg=function(b,c){if(this.active)if(0<this.I.length){var d=this.I.shift();d.k instanceof po&&(this.rc()&&F.YK(this.e()),this.yc("audio_ad"));if(d.k instanceof ro){if(null!=Gs){k.info("Discarding artist audio message because we are in a value exchange"); | |
this.oa(!1);return}if(Ds){k.info("Discarding artist audio message because a video ad just played");this.oa(!1);return}if(this.L&&this.L.k instanceof po){k.info("Discarding artist audio message because an audio ad just played");this.oa(!1);return}this.yc("non_ad_interruption");D.SG()}Ds=!1;d instanceof Es||this.tm(d)?(this.t=this.ce[d.o()]=d,d=this.t.k,this.Py=d.eb()?d.eb():null,this.pk(),this.paused||(vs(this.t),this.t.load(),this.t.play()),this.Dc=!1,d.Wj(b)):(k.info("Dumping Track - it doesn't belong on the current station"), | |
this.oa(!1))}else b&&(this.hn=!0),this.xc(r(this,function(){this.oa(b)}),null,c)};P.prototype.qs=function(b){b&&(b.i=this,this.I.splice(0,0,b))};P.prototype.gM=function(){this.Ue&&(this.Ue=!1,k.debug("Chronos - pushing ad to playlist (2) ... "),this.qs(F.Vi(!1)),this.Mg(!1),k.debug("Station: The ad we were waiting for was loaded."))};P.prototype.QD=function(){Ds=!0};P.prototype.Ur=function(b){if(b==m.d.Au()){b=$.isEmptyObject(this.ce);var c=this.Ra();this.Me&&b&&c?(this.Me=!1,this.xc(r(this,function(){this.oa(!1)}))): | |
!c||b||this.hn?this.vf(!1,b):this.He=!0}else b==m.d.Ak()?z.b(Kh):b==m.d.Ve()?z.b(Yj):this.handleError()};P.prototype.vf=function(b,c,d){var e=r(this,function(){!c&&this.Ra()&&(this.Jb=!0);F.GO(this);var b=$.extend({},{stationStart:c,isOnDemand:this.Ra(),stationId:this.e()});z.b(Jh,b);z.b(ci);d&&d()});b?Hs(new Is({initiateEvent:Xe,eventArgs:{},responseEvent:Ye,callback:e})):e()};P.prototype.Gm=function(c){this.I=_.reject(this.I,function(b){return b.ub?(b.stop(),!0):!1});null!=this.t&&this.t.ub&&(ne({msg:c, | |
ua:navigator.userAgent,flash_ver:pe(),browser:oe(),site_version:b._pandoraVersion}),this.t.pause(),this.Qh());this.handleError()};P.prototype.zh=function(b,c){this.Gf=Bs;if(-1==b.k.le){var d=this.ns++;b.k.le=d}this.active&&D.zh(b);this.ks(b,c);this.zr()};P.prototype.ks=function(b,c){if(b==this.t&&b!=this.XN){var d=b.Ad;d.narrative=null;0==c?c=600:this.XN=b;if(b.k instanceof ro&&b.k.ze()){if(sl){var e=1E3*c;nm(om(Ql,this.e()),d,e)}}else sl&&(e=1E3*c,nm(om(Pl,this.e()),d,e))}};P.prototype.handleError= | |
function(){null==this.Vp&&(this.Vp=setTimeout(r(this,this.MO),this.Gf),3E4>this.Gf&&(this.Gf*=1.5,3E4<this.Gf&&(this.Gf=3E4)))};P.prototype.MO=function(){this.Vp=null;null==this.t&&this.oa(!1)};P.prototype.pk=function(b){if(this.active&&null!=this.t){var c=this.t.oc();null==c&&(c=this.Ep);this.t.Se(c,b)}};P.prototype.play=function(){this.paused=!1;this.active&&(null!=this.t?(this.t.Gh(),this.yc("resume")):this.Jb&&this.start())};P.prototype.pause=function(b){this.paused=!0;this.active&&null!=this.t&& | |
this.t.pause(b)};P.prototype.Co=function(b){b?this.Ee("error"):this.Ee("skipped");this.Xs()&&!b?this.lv("Skip"):(this.paused=!1,this.oa(!b));z.b(Ze,this.t?this.t.k:null)};P.prototype.bk=function(b,c){b=!!b;if(this.active&&this.Jb)this.start();else if(this.active&&!this.Dc&&(this.OL(),this.yc("track_skipped"),b||this.nw())){this.UG();this.pause();var d=this.t&&this.t.k instanceof ro;b||d?this.Co(b):(d="skip",c&&(d="tired"),C.Ca()&&this.rc()?F.Vl(!0,r(this,function(c){if(c){k.debug("Chronos - adding "+ | |
c.length+" in-station ads to beginning of playlist after skip",this,this.I);for(var d=0;d<c.length;d++){var e=c[d];e.i=this;this.I.splice(d,0,e)}}this.Co(b)})):Js(d,_.bind(this.Co,this,b)))}};P.prototype.nw=function(b){if(this.Ra())return!0;var c=this.t?this.t.k:null;if(c&&c.PC)return!0;if((null==v.h||0<=v.h.Ig)&&Jm()>=(null!=v.h&&null!=v.h.Ig?v.h.Ig:24))return b||z.b(kh),!1;if(Ks(this))return b||z.b(jh),!1;Ls(this);b=Hm(this.e());Im(this.e(),b+1);Lm(Jm()+1);return!0};P.prototype.xc=function(b,c, | |
d){d=d||"Normal";this.Ie=b;if(this.Xd)if(c&&this.mn!==c)this.os.cancel();else return;this.Xd=!0;this.mn=c?c:null;this.os=v.pH(this,this.wh,0==this.ns,this.Py,this.mn,d,r(this,function(b){this.mn=this.os=null;var c=this,d=null;b.checksum&&this.$z(b.checksum);var e=b.tracks,h=!1,l=!1;$.each(e,r(this,function(b,e){var p=new ps(e,c);0==b&&this.Ra()&&0<this.ns&&p.o()==this.rr?d=p:(c.I.push(p),c.Cn(p.oc()));p.k instanceof ro&&(h=!0,p.k.ze()&&(l=!0))}));if(c.hj())if(h){if(c.sF(),l){var p=sl?mm(om(Pl,this.e())): | |
null;p&&this.ap(p,!1,1)}}else z.b(Zh);null!=d&&(c.I.push(d),c.Cn(d.oc()));this.Xd=!1;this.wh&&0<this.I.length&&(this.Rt(),this.wh=!1);this.Ie&&(this.Ie(),this.Ie=null);this.hn=this.Me=!1;Ms(e[0]);if(b.shouldLogDisplayAds){if(b.stationAdParams)var pa=this.OA(b.stationAdParams);if(b.listenerAdParams)var Ja=this.OA(b.listenerAdParams);b=$.extend({},pa,Ja);b=C.AQ(b);e=C.dh();""!=b&&""!=e&&s("ad_urls_comparing",{server_ad_url:b,client_ad_url:e,ad_type:"display"},v.h)}}),r(this,function(b){k.warn("Station.loadPlaylist got ERROR on playlist", | |
b);this.Xd=!1;this.Ur(b instanceof Dd?b.code:null)}))};P.prototype.Rt=function(){var b=null,c=this.I[0];c.Ks||(this.Ha()?k.info("no narrative for Thumbprint Station's introductory message"):null!=this.wa().song?b='"'+this.wa().song.songTitle+'"':null!=this.wa().nonGenomeStation?b='"'+this.wa().nonGenomeStation.stationName+'"':null!=this.wa().artist?b=this.wa().artist.artistName:k.error("Unknown initial seed type",this.wa()));null!=b&&0<b.length&&(c.k.Bv=b)};P.prototype.cl=function(){k.info("Station.audioPlayerLost"); | |
this.Qh()};P.prototype.Qh=function(){null!=this.t&&(this.t.stop(),this.t=null)};P.prototype.Cn=function(b){null!=b&&(this.Ep=(this.tx*this.Ep+b)/++this.tx)};P.prototype.GA=function(b){this.ni(b,!0)};P.prototype.Et=function(b){this.yc("thumbs_down");this.ni(b,!1)};P.prototype.fG=function(b){this.zl(b,!0)};P.prototype.eG=function(b){this.zl(b,!1)};P.prototype.ni=function(b,c){var d=this.ce[b],e=c?"thumbs_up":"thumbs_down";if(null!=d){var t=D.Xc(this.Nf(d));t&&t.Ka()&&t.ue()==m.Gc.Ye()?this.jy(d):!this.Z()&& | |
!this.D()||this.D()&&!t.Z()?z.b(gg,{event:c?ei:fi,musicId:d.o(),stationId:this.Nf(d)}):(this.Sy(e,this.Nf(d)),v.ni(this,d,c,r(this,function(b){this.active&&z.b($e,{track:b.k,stationId:this.e()});-1==b.k.Nc&&this.jy(b)}),function(b){z.b(dh,b)}))}};P.prototype.zl=function(b,c){var d=this.ce[b];if(null!=d){var e=D.Xc(this.Nf(d));e&&e.Ka()&&e.ue()==m.Gc.Ye()||!this.Z()&&!this.D()||this.D()&&!e.Z()||v.zl(this,d,c,r(this,function(b){this.active&&z.b($e,{track:b.k,stationId:this.e()});0!=b.k.Nc&&k.error("ERROR: unThumb didn't result in 0 rating.")}), | |
function(b){z.b(eh,b)})}};P.prototype.jy=function(b){b==this.t&&this.active&&!this.Dc&&(this.nw(!0)?(this.Ee("thumbed_down"),this.lv("ThumbDown")):z.b(lh))};P.prototype.lv=function(b){this.Kl();this.paused=!1;this.oa(!0,b)};P.prototype.destroy=function(){z.pa(this);this.Kl();this.ce={};var b=Ns[this.e()];b&&clearInterval(b);Ns[this.e()]=null};P.prototype.Kl=function(b){b||(this.Qh(),$.each(this.I,function(b,c){c.Ee("discarded");c.stop()}));this.I=[]};P.prototype.UG=function(){if(1<=this.I.length&& | |
this.I[0].k instanceof ro){var b=this.I[0].k.fD;"AFTER_TRACK"!=b&&"AFTER_OTHER_ARTIST_TRACK"!=b||this.I.splice(0,1)}};P.prototype.TG=function(){this.I=_.reject(this.I,function(b){return b.k instanceof ro})};P.prototype.fB=function(b,c){this.fm()&&v.lR(this.e(),this.mq(),r(this,function(d){d&&d.updateNeeded?(this.$z(d.checksum),b()):c&&c()}),c)};P.prototype.Sy=function(b,c){s("playback_interactions",{action:b,station_id:c,control_source:"web_playback_controls",user_initiated:!0,vendor_id:u,device_code:se, | |
app_version:z.ba,device_os:oe(),client_timestamp:(new Date).format("yyyy-mm-dd HH:MM:ss",!0)},v.h)};P.prototype.yc=function(b){this.fl||(this.gl=Fd(),this.fl=b,k.debug("Start timer to track time to audio for "+this.fl+" at "+this.gl))};P.prototype.zr=function(){if(this.gl){var b=Fd()-this.gl,c=this.fl;k.info("Time to audio for "+c+" is "+b);v.h.Ty&&s("time_to_music_web",{action:c,time_to_music_msec:b,vendor_id:u,device_id:se,app_version:z.ba,browser:oe(),client_timestamp:(new Date).format("yyyy-mm-dd HH:MM:ss", | |
!0)},v.h);this.fl=this.gl=null}};P.prototype.OL=function(){try{if(k.info("in log skip"),null!=this.t){var b=this.t.k;if(null!=b){var c=null==v.h||0<=v.h.Ig?Jm()>=(null!=v.h&&null!=v.h.Ig?v.h.Ig:24):!1,d=Ks(this);s("tuner_skips",{song_uid:b.o(),user_seed:b.Lx(),station_id:b.e(),W3:this.t&&this.t.g?this.t.g.elapsedTime:0,skip_successful:!c&&!d,out_of_station_skips:d,redesign:"true"},null);s("skip_limit",{station_id:b.e(),at_station_skip_limit:d,at_daily_skip_limit:c,vendor_id:u,device_code:se,app_version:z.ba, | |
device_os:oe(),client_timestamp:(new Date).format("yyyy-mm-dd HH:MM:ss",!0)},v.h);this.Sy("skip",b.e());var e=Hm(b.e()),t=Jm();6!=e&&24!=t||s("skip_limit_experiment",{station_id:b.e(),hourly_station_skip_count:e,daily_skip_count:t,vendor_id:u,device_id:se,app_version:z.ba,device_os:oe(),client_timestamp:(new Date).format("yyyy-mm-dd HH:MM:ss",!0)},v.h)}}}catch(y){trackJs.track(y)}};P.prototype.Ee=function(b){null!=this.t&&this.t.Ee(b)};P.prototype.OA=function(b){b=b.split("&");for(var c={},d=0;d< | |
b.length;d++){var e=b[d].split("=");e[0]&&e[1]&&(c[e[0]]=e[1])}return c};P.prototype.e=function(){return this.n.e()};P.prototype.Md=function(){return this.n.Md()};P.prototype.Nf=function(b){return this.D()?b.k.e():this.e()};P.prototype.tm=function(b){b=this.Nf(b);return this.D()?he(this.te(),b):b==this.e()};P.prototype.Xl=function(){return this.Z()&&this.D()};P.prototype.Z=function(){return this.n.Z()};P.prototype.Zl=function(){return this.n.Zl()};P.prototype.D=function(){return this.n.D()};P.prototype.te= | |
function(){return this.n.te()};P.prototype.$m=function(b){this.n.$m(b)};P.prototype.Ha=function(){return this.n.Ha()};P.prototype.sq=function(){return this.n.sq()};P.prototype.ih=function(b){return this.ce[b]};P.prototype.If=function(){return this.n.If()};P.prototype.Lf=function(){return this.n.Lf()};P.prototype.Ul=function(){return this.n.Ul()};P.prototype.Pl=function(){return this.n.Pl()};P.prototype.fa=function(){return this.n.fa()};P.prototype.wa=function(){return this.n.wa()};P.prototype.ir= | |
function(){return this.n.ir()};P.prototype.Ra=function(){return this.n.Ra()};P.prototype.ue=function(){return this.n.ue()};P.prototype.Wi=function(){return this.n.Wi()};P.prototype.gh=function(){return this.n.gh()};P.prototype.Ka=function(){return this.n.Ka()};P.prototype.nA=function(){return!this.Ka()};kq=function(b){return b.promotedStationCampaignId?new Os(b):b.isCustomContentStation?new Ps(b):new P(b)};P.prototype.Fb=function(){return this.n.Fb()};P.prototype.Tb=function(){return this.n.Tb()}; | |
P.prototype.rc=function(){return this.n.rc()};P.prototype.lp=function(){return this.n.lp()};P.prototype.Xs=function(){return this.n.Xs()};P.prototype.fm=function(){return this.n.fm()};P.prototype.$z=function(b){this.zw=b};P.prototype.mq=function(){return this.zw};P.prototype.hj=function(){return this.n.hj()};P.prototype.qq=function(){return this.n.qq()};P.prototype.pq=function(){return this.n.pq()};P.prototype.sF=function(){this.n.Rs(null);this.n.Qs(null)};P.prototype.Rs=function(b){this.n.Rs(b)}; | |
P.prototype.Qs=function(b){this.n.Qs(b)}})(this);var D={}; | |
(function(b){function c(b){0<D.da.length&&hp();D.da.push.apply(D.da,b)}function d(b){var c=b.station;c&&c.stationId&&(b=_.find(D.da,function(b){return b.e()===c.stationId}))&&b.update(c)}function e(){0==D.da.length&&(D.Mk=null)}function h(b){var c=b.stationId,d=b.stationId,e=b.trackToken;b=b.source;0==c.indexOf("s")&&(d=c.substr(2));var h=D.Xc(d);null==h&&(h=bb(d));null==h?(0!=c.indexOf("s")&&(c="sh"+c),e?z.b(Ei,{stationCode:c,trackToken:e,source:b}):z.b(Di,{stationCode:c,source:b})):(d=h.e(),e?z.b(ki, | |
{stationId:d,trackToken:e}):z.b(ji,{stationId:d}))}function l(b,c){var d=D.V();null!==d&&(d.e()===b?(c&&d.start(c),z.b(ai)):(z.b(fg),d.Ee("station_changed"),d.suspend()))}function p(b,c,d,e){var h=D.V();if(C.Ca()){if(!d&&h&&c&&c.e()===h.e()){k.warn("Ignoring station change to prevent a chronos ad.");e();return}}else if(h&&h.pL()){e();return}b?Js("station",e):e()}function q(b){var c=b.stationId,d=b.trackToken,e=b.userInitiated||!1;l(c,d);var h=D.Xc(c);h?(b=D.V(),D.Mk=h,pm(Kl,h.e()),z.b(eg),c=function(){h.start(d, | |
e);s("change_station",{station_id:h.e(),new_station:vn(h.n)},v.h);z.b(fg)},C.Ca()&&h.rc()&&!h.Yg&&h.e()!=b.e()?F.Vl(!0,c):p(e,b,d,c)):k.error("Could not find station with id",c)}function t(b){q({stationId:b.stationId,trackToken:null,userInitiated:b.userInitiated||!1})}function y(b){var c=D.V();c.e()==b&&c.Rz()}function E(b){var c=D.V();if(null!=c){var d=b.noSkip;c.Kl(d);d||c.bk(b.appSkip)}}function J(b){var c=Rd();if(c){Sj&&clearTimeout(Sj);var d=b.stationIdArray,e=b.isExplicitSave,h=b.shuffleType, | |
l=b.genre||"",d=_.filter(d,function(b){return(b=D.Xc(b))&&!b.D()&&!b.Ra()&&!b.rc()});c.$m(d);Sj=setTimeout(function(){Sj=null;v.hP(c.Zl(),d,l,e,h,function(){Db(null)},function(b){k.error("set quickmix failed: "+b.message);Db(null)})},IB)}}function N(b){var c=D.V();null!=c&&c.pk(b)}function U(){var b=D.V();null!=b&&b.play()}function pa(){var b=D.V();null!=b&&(b.pause(),D.t=null)}function Ja(b){var c=D.V();null!=c&&c.pause(b)}function fb(b){b=b||{};var c=!!b.isTiredOfSongSkip,d=D.V();null!=d&&(d.fm()? | |
d.fB(function(){d.Kl();d.bk(b.appSkip,c)},function(){d.bk(b.appSkip,c)}):d.bk(b.appSkip,c))}function gb(b){b=b||{};b=b.artistMessageId;var c=D.V();if(null!=c){var d=D.t;null!=d&&d.lL()&&d.k.Hc==b&&c.bk(!0,!1)}}function ua(b){var c=D.V();null!=c&&c.GA(b)}function ta(b){var c=D.V();null!=c&&c.Et(b)}function T(b){var c=D.V();null!=c&&c.fG(b)}function mb(b){var c=D.V();null!=c&&c.eG(b)}function Cb(b){var c=D.Xc(b[3]),d=D.Xc(b[0]),e=D.Xc(b[1]),h=c.D()?c:d,l=h.ih(b[2]);l&&(h&&h.Et(l.o()),v.ni(e,l,!0,function(b){z.b(pf, | |
[h,e,b])},function(){z.b(Ah,l)}))}function tb(){var b=D.V();null!=b&&b.XP()}function Rd(){return _.find(D.da,function(b){return b.Xl()})||null}function bb(b){return _.find(D.da,function(c){return c.Wi()===b})||null}function Db(b){v.DH(function(c){c=new P(c);var d;a:{for(d=0;d<D.da.length;d++)if(D.da[d].Xl())break a;d=-1}0>d&&D.da.push(c);null!=b&&b(c.n);z.b(Pe,{quickMixStationIds:c.te(),quickMixType:c.Zl(),isComedy:c.ir()})},function(b){k.info("Could not get QuickMix from server",b)})}function hp(){D.Mk= | |
null;_.each(D.da,function(b){b.destroy()});D.da.length=0}var IB=3E3,Sj=null;D.Mk=null;D.da=[];D.init=function(){z.c(Le,r(D,c));z.c(De,r(D,hp));z.c(Fg,r(D,d));z.hb(Oe,r(D,e));z.c(ii,r(D,h));z.c(ji,r(D,t));z.c(ki,r(D,q));z.c(rg,r(D,y));z.c(bi,r(D,E));z.c(li,r(D,J));z.c(mi,r(D,N));z.c(ai,r(D,U));z.c(Xj,r(D,pa));z.c(ci,r(D,Ja));z.c(di,r(D,fb));z.c(ei,r(D,ua));z.c(fi,r(D,ta));z.c(gi,r(D,T));z.c(hi,r(D,mb));z.c(Xi,r(D,Cb));z.c(il,r(D,tb));z.c(Ug,r(D,gb))};D.reset=function(){z.pa(D);pa();hp()};D.j3=function(b){b= | |
kq(b);D.da.push(b);z.b(Ne,b.n);1==D.da.length&&Db(function(b){z.b(Ne,b)})};D.vE=function(b){var c=kq(b),d=D.Xc(c.e());d?d.update(b):(D.da.push(c),z.b(Ne,c.n),1==D.da.length&&Db(function(b){z.b(Ne,b)}))};D.qO=function(b){for(var c=0;c<D.da.length;c++){var d=D.da[c];if(d.e()==b){d.destroy();D.da.splice(c,1);d=[b];if(1==D.da.length&&D.da[0].Xl()){var e=D.da[0];e.destroy();D.da=[];d.push(e.e())}z.b(Oe,d)}}};D.V=function(){return D.Mk};D.Jx=function(){return _.map(D.da,function(b){return b.n})};D.Xc=function(b){return _.find(D.da, | |
function(c){return c.e()===b})||null};D.zh=function(b){b!=D.t&&(D.t=b,z.b(Re,b.k))};D.SG=function(){_.each(D.da,function(b){b.TG()})};b.StationManager=D})(this);function ss(b,c){this.g=b;this.A=this.g.attr("id").substr(7);this.kp=this.seekPercent=null;this.g.bind($.jPlayer.event.playing,r(this,function(){}));this.g.bind($.jPlayer.event.stalled,r(this,function(b){ue(this.track,b,"stall detected");b.jPlayer.status.paused||(100==b.jPlayer.status.seekPercent?(me("PLAYLOG004: JPlayer.event.stall detected. Skipping","","0",v.h),k.info("TRACK IS TRUNCATED - SKIPPING"),this.yh("stuck audio on fully loaded file")):(k.info("Attempting to recover from stuck audio at ", | |
this.Vd),this.kc(this.Vd)))}));this.g.bind($.jPlayer.event.timeupdate,r(this,function(b){!this.Ia&&this.ee&&0<b.jPlayer.status.currentTime&&(k.info("*** AudioPlayer("+this.A+"): event(timeupdate) -> willPlay == true"),this.ee=!1,this.Bj());var c=b.jPlayer.status.duration;b.jPlayer.flash.active&&"mp3"==b.jPlayer.status.formatType&&100>b.jPlayer.status.seekPercent&&(c=this.jb);z.b(Ak,{currentTime:b.jPlayer.status.currentTime,duration:c});var h=Fd();this.Mj||this.seekPercent==b.jPlayer.status.seekPercent|| | |
(this.tr=h);this.seekPercent=b.jPlayer.status.seekPercent;if(b.jPlayer.flash.active&&!b.jPlayer.status.paused&&95>this.seekPercent&&null!=this.tr&&25E3<h-this.tr)k.info("TRACK IS STUCK - SKIPPING"),me("PLAYLOG003: Flash Player stall detected, partially loaded file, skipping","","0",v.h),this.yh("stuck audio on partially loaded file");else{if(b.jPlayer.flash.active&&!b.jPlayer.status.paused)if(b.jPlayer.status.currentTime==this.Vd){if(this.Rh++,1<=b.jPlayer.status.currentTime&&null!=this.Dd&&(this.Dd.zt= | |
!0),1<=b.jPlayer.status.currentTime&&null!=this.track&&null!=this.track.Sb&&(null==this.kp||this.kp!=this.track.Sb)&&(this.kp=this.track.Sb,z.b(Ue,{audio_token:this.track.Sb})),3==this.Rh){if(100==b.jPlayer.status.seekPercent){h=100*b.jPlayer.status.currentTime/c;if(99<=h&&30>=c){k.info("Track is stalled near the end. Continuing with next track. Elapsed percentage: "+h);this.Rh=0;this.gv();return}k.info("TRACK IS TRUNCATED - SKIPPING");trackJs.console.log(["Truncated track skipping. - duration: "+ | |
c," - currentTime: "+b.jPlayer.status.currentTime," - elapsedPercentage: "+h+"% "," - format: "+b.jPlayer.status.formatType].join(""));me("PLAYLOG001: Flash Player stall detected fully loaded file, skipping","","0",v.h);this.yh("stuck audio on fully loaded file");return}k.info("Attempting to recover from stuck audio at ",this.Vd);this.kc(this.Vd);this.Rh=0}}else this.Rh=0;this.Vd=b.jPlayer.status.currentTime;this.Cj(b.jPlayer.status.currentTime,c,b.jPlayer.status.currentPercentAbsolute);this.seeking&& | |
b.jPlayer.status.currentTime>=this.Da&&Qs(this)}}));this.g.bind($.jPlayer.event.loadedmetadata,r(this,function(b){k.info("*** AudioPlayer("+this.A+"): event(loadedmetadata)");z.b(Wg);this.Cj(b.jPlayer.status.currentTime,b.jPlayer.status.duration,b.jPlayer.status.currentPercentAbsolute);Qs(this)}));this.g.bind($.jPlayer.event.canplaythrough,r(this,function(){k.info("*** AudioPlayer("+this.A+"): event(canplaythrough)",this.seeking,this.Bh);Qs(this)}));this.g.bind($.jPlayer.event.progress,r(this,function(b){this.seeking&& | |
0<this.totalTime&&(k.info("*** AudioPlayer("+this.A+"): event(progress)",this.seeking,this.totalTime),b.jPlayer.status.seekPercent>this.Da/this.totalTime*100&&Qs(this))}));this.g.bind($.jPlayer.event.seeked,r(this,function(){k.info("*** AudioPlayer("+this.A+"): event(seeked)");Qs(this)}));this.g.bind($.jPlayer.event.ended,r(this,function(){k.info("*** AudioPlayer("+this.A+"): event(ended)");this.yj()}));this.g.bind($.jPlayer.event.error,r(this,function(b){k.info("*** AudioPlayer("+this.A+"): event(error)"); | |
this.yh(b)}));this.g.bind($.jPlayer.event.flashreset,r(this,function(){k.warn("jPlayer detected a Flash reset")}));this.g.bind($.jPlayer.event.play,r(this,function(){this.sf&&this.sf()}));this.Rd=!1;this.Dy&&this.Dy(b,c)}f=ss.prototype; | |
f.gg=function(b,c){k.info("*** AudioPlayer("+this.A+"): setInUse",b);this.Rd=b;this.track=c;this.gd=b?(new Date).getTime():null;this.ha=this.sf=null;this.Fa=0;this.hd=null;this.ub=this.Lj=this.Nj=!1;this.Rh=this.Vd=0;this.Dd=null;this.vj=!1;this.jb=0;null!=c&&(c.Be()||(this.Dd=new Rs),this.jb=c.Yc())};f.Cm=function(){var b=this.track;this.stop();b&&b.r().cl()}; | |
f.load=function(b,c,d){k.info("*** AudioPlayer("+this.A+"): load",b,c,d);var e={};c||(c="m4a");null!=d&&(b+="&lo="+d);this.gw=b;e[c]=b;this.seekPercent=0;this.tr=null;this.Mj=!0;this.totalTime=this.elapsedTime=0;this.g.jPlayer("setMedia",e);null!=d&&0<d?(this.Da=d,this.g.jPlayer("pause",d),this.seeking=!0,this.mk=this.Bh=!1,this.g.jPlayer("volume",0)):(this.Da=null,this.mk=this.Bh=this.seeking=!1);(window._isInAudioJplayerHTML5Experiment||window._isInAudioHoldoutGroup)&&s("audio_track_playback_event", | |
{event_type:"LOADING",test_group:window._isInAudioHoldoutGroup?"holdout":"jPlayerHtml5",player_type:this.Si?"flash":"html5",listener_id:window._listenerIdFromCookie,audio_token_id:this.track.Sb,audio_type:c,current_time:0,percent_loaded:0,track_length:this.jb},null);return this};f.Se=function(b,c){void 0!==b&&sd(b)&&!isNaN(b)&&(this.Fa=b);this.updateVolume(c)};f.updateVolume=function(b){this.seeking||(b=this.wf(b),this.En?this.En(b):this.Ng(b))}; | |
f.Ng=function(b){this.g.jPlayer("volume",b/100);0<b&&(this.gd=(new Date).getTime(),this.Ia=!1,this.ac())};f.wf=function(b){null==b&&(b=Fm()?0:Em());this.hd=b;var c=Math.round(Math.pow(10,this.Fa/20)*b*lo());k.info("VOLUME--\x3e gain:",this.Fa,", volume:",b,", old adjusted:",Math.round(Math.pow(10,this.Fa/20)*b),", new adjusted:",c);return Math.min(100,c)};f.suspend=function(){k.info("*** AudioPlayer("+this.A+"): suspend");this.Ia=!0;this.g.jPlayer("volume",0);this.play();this.Na();this.mk=!1}; | |
f.play=function(){k.info("*** AudioPlayer("+this.A+"): play",this.seeking,this.Da);this.seeking?this.mk=this.Bh=!0:(this.Mj=!1,this.ac(),null!=this.Da?(this.kc(this.Da),this.Da=null):this.kc())};f.stop=function(){k.info("*** AudioPlayer("+this.A+"): stop");this.Na();this.ub||this.g.jPlayer("clearMedia");this.gg(!1)};f.Gh=function(){k.info("*** AudioPlayer("+this.A+"): resume",this.seeking);this.seeking?this.Bh=!0:(this.track.r().yc("playback_resumed"),this.ac(),this.kc())}; | |
f.pause=function(b){b=!!b;k.info("*** AudioPlayer("+this.A+"): pause",this.seeking);this.seeking?this.Bh=!1:(this.Na(),this.Gl&&!b?this.Gl():this.g.jPlayer("pause"))};f.Tv=function(b){this.sf=b};f.pf=function(b){this.ha=b}; | |
f.Cj=function(b,c,d){b=Math.floor(b);0==this.totalTime&&0<c&&(this.totalTime=Math.floor(c),this.Wr());if(b!=this.elapsedTime&&this.track){c=Math.floor(c);this.elapsedTime=b;if(this.track.r().active){z.b(af,{elapsedTime:null!=this.Da?Math.max(this.Da,b):b,totalTime:c,percentPlayed:d});var e=this.track.k instanceof ro&&this.track.k.ze();Mm(this.track.o(),this.track.r().e(),b,c,e);null!=this.Dd&&this.Dd.uw(b,d,this.seekPercent);!this.vj&&10<this.elapsedTime&&null!=this.track&&null!=this.track.r()&&null!= | |
v.h&&(s("volume_setting",{volume:this.hd,gain:this.track.oc(),multiplier:lo(),station_genre:this.track.r().If(),music_id:this.track.o()},v.h),this.vj=!0)}!this.Nj&&75<d&&1<z.se().ti&&(this.track.r().Dz(),this.Nj=!0);!(this.Lj||this.track instanceof Es)&&(0<this.totalTime?this.totalTime-this.elapsedTime<=F.Cu:d>=F.Bu)&&(this.track.r().Cz(),this.Lj=!0)}}; | |
function Qs(b){k.info("*** AudioPlayer("+b.A+"): onSeekComplete",b.seeking,b.Ia);b.seeking&&(b.mk&&(b.Ia=!1),b.seeking=!1,b.Ia||(b.Bh&&b.play(),b.updateVolume()))}f.yj=function(){k.info("*** AudioPlayer("+this.A+"): onAudioEnded",this.track);this.track&&us(this.track);this.Na();this.track&&this.track.r().oa(!1);this.ha&&this.ha()}; | |
f.yh=function(b){var c=_.isObject(b)&&b.jPlayer&&b.jPlayer.error||{message:c};ue(this.track,b);0!==this.Kf()||!this.track||this.track instanceof Es||c.type===$.jPlayer.error.URL||z.b(Nh,{url:this.track.OE});(window._isInAudioJplayerHTML5Experiment||window._isInAudioHoldoutGroup)&&s("audio_track_playback_event",{event_type:c.type,test_group:window._isInAudioHoldoutGroup?"holdout":"jPlayerHtml5",player_type:this.Si?"flash":"html5",listener_id:window._listenerIdFromCookie,audio_token_id:this.track.Sb, | |
audio_format:this.track.Vc(),current_time:this.Vd,percent_loaded:this.seekPercent,track_length:this.jb},null);z.b(Xg,c);k.info("*** AudioPlayer("+this.A+"): onAudioError",this.track);this.ub=!0;this.track&&(this.track.ub=!0,this.track.r().Gm("Attempting to pause audio player"));this.ha&&this.ha(c)};f.Bj=function(){k.info("*** AudioPlayer("+this.A+"): onPlaying",this.track);this.track&&this.track.r().zh(this.track,this.totalTime);this.track.r().zr()}; | |
f.Wr=function(){k.info("*** AudioPlayer("+this.A+"): onTotalTimeUpdated",this.track,this.totalTime);this.track&&this.track.r().ks(this.track,this.totalTime)};f.ac=function(){null!=this.ma||this.Ia||(this.ma=Ed())};f.Na=function(){if(null!=this.ma){var b=Ed()-this.ma;this.ma=null;null!=v.h&&this.track&&this.track.r()&&ho(v.h,this.track.r().e(),b)}};f.kc=function(b){k.info("*** AudioPlayer("+this.A+"): doPlay",b);this.ee=!0;this.g.jPlayer("play",b)}; | |
f.Kf=function(){var b=null!=this.elapsedTime?this.elapsedTime:0;null!=this.Da&&(b=Math.max(this.Da,b));return b};f.gv=function(){this.track&&this.track.pause();this.yj()};function Ss(b){this.rL=!0;this.g=b;this.A=this.g.getAttribute("id").substr(7);this.np=!1;this.seekPercent=null;this.g.addEventListener("playing",r(this,function(){}));this.g.addEventListener("timeupdate",r(this,function(){var b=this.g.duration,d=this.g.currentTime;this.track&&(this.seekPercent=100*Ts(this)/this.track.Yc());!this.Ia&&this.ee&&0<d&&(k.info("*** MediaElement("+this.A+"): event(timeupdate) -> willPlay == true"),this.ee=!1,this.Bj());z.b(Ak,{currentTime:d,duration:b});this.Vd=d;this.Cj(d, | |
b,d/b*100)}));this.g.addEventListener("loadeddata",r(this,function(){k.info("*** MediaElement("+this.A+"): event(loadeddata)");var b=this.g.duration,d=this.g.currentTime;z.b(Wg);this.Cj(d,b,d/b*100)}));this.g.addEventListener("canplay",r(this,function(){k.info("*** MediaElement("+this.A+"): event(canplay)",Ts(this));this.Mj=!1;this.np=!0;this.play()}));this.g.addEventListener("progress",r(this,function(){this.Rd&&k.info("*** MediaElement("+this.A+"): event(progress)",Ts(this))}));this.g.addEventListener("seeked", | |
r(this,function(){k.info("*** MediaElement("+this.A+"): event(seeked)")}));this.g.addEventListener("ended",r(this,function(){k.info("*** MediaElement("+this.A+"): event(ended)");this.yj()}));this.g.addEventListener("error",r(this,function(b){var d=null;null!=b&&null!=b.target&&(d=b.target.error);k.info("*** MediaElement("+this.A+"): event(error)",b);this.yh(d)}));this.g.addEventListener("play",r(this,function(){k.info("*** MediaElement("+this.A+"): event(play)");this.sf&&this.sf()}));this.Rd=!1} | |
f=Ss.prototype;f.gg=function(b,c){k.info("*** MediaElement("+this.A+"): setInUse",b);this.Rd=b;this.track=c;this.gd=b?(new Date).getTime():null;this.ha=this.sf=null;this.Fa=0;this.hd=null;this.ub=this.Lj=this.Nj=!1;this.Rh=this.Vd=0;this.Dd=null;this.vj=!1;this.jb=0;null!=c&&(c.Be()||(this.Dd=new Rs),this.jb=c.Yc())};f.Cm=function(){var b=this.track;this.stop();b&&b.r().cl()}; | |
f.load=function(b,c,d){k.info("*** MediaElement("+this.A+"): load",b,c,d);c||(c="m4a");null!=d&&(b+="&lo="+d);this.gw=b;this.seekPercent=0;this.Mj=!0;this.totalTime=this.elapsedTime=0;this.np=!1;this.g.setSrc(this.gw);this.g.load();null!=d&&0<d?(this.Da=d,this.g.setVolume(0)):this.Da=null;s("audio_track_playback_event",{event_type:"LOADING",test_group:"MediaElement",player_type:"native"==this.g.pluginType?"html5":"flash",listener_id:window._listenerIdFromCookie,audio_token_id:this.track.Sb,audio_format:c, | |
current_time:0,percent_loaded:0,track_length:this.jb},null);this.g.play();return this};f.Se=function(b,c){void 0!==b&&sd(b)&&!isNaN(b)&&(this.Fa=b);this.updateVolume(c)};f.updateVolume=function(b){b=this.wf(b);this.En?this.En(b):this.Ng(b)};f.Ng=function(b){this.g.setVolume(b/100);0<b&&(this.gd=(new Date).getTime(),this.Ia=!1,this.ac())}; | |
f.wf=function(b){null==b&&(b=Fm()?0:Em());this.hd=b;var c=Math.round(Math.pow(10,this.Fa/20)*b*lo());k.info("VOLUME--\x3e gain:",this.Fa,", volume:",b,", old adjusted:",Math.round(Math.pow(10,this.Fa/20)*b),", new adjusted:",c);return Math.min(100,c)};f.suspend=function(){k.info("*** MediaElement("+this.A+"): suspend");this.Ia=!0;this.g.setVolume(0);this.play();this.Na()}; | |
f.play=function(){k.info("*** MediaElement("+this.A+"): play",this.seeking,this.Da);this.np&&(this.Mj=!1,this.ac(),null!=this.Da?(this.kc(this.Da),this.Da=null):this.kc())};f.kc=function(b){k.info("*** MediaElement("+this.A+"): doPlay",b);this.ee=!0;0<b&&this.g.setCurrentTime(b);this.g.play()};f.stop=function(){k.info("*** MediaElement("+this.A+"): stop");this.Na();this.gg(!1)};f.Gh=function(){this.track.r().yc("playback_resumed");this.ac();this.kc()}; | |
f.pause=function(b){b=!!b;k.info("*** MediaElement("+this.A+"): pause");this.Na();this.Gl&&!b?this.Gl():this.g.pause()};f.Tv=function(b){this.sf=b};f.pf=function(b){this.ha=b}; | |
f.Cj=function(b,c,d){b=Math.floor(b);0==this.totalTime&&0<c&&(this.totalTime=Math.floor(c),this.Wr());if(b!=this.elapsedTime&&this.track){c=Math.floor(c);this.elapsedTime=b;if(this.track.r().active){z.b(af,{elapsedTime:null!=this.Da?Math.max(this.Da,b):b,totalTime:c,percentPlayed:d});var e=this.track.k instanceof ro&&this.track.k.ze();Mm(this.track.o(),this.track.r().e(),b,c,e);null!=this.Dd&&this.Dd.uw(b,d,this.seekPercent);!this.vj&&10<this.elapsedTime&&null!=this.track&&null!=this.track.r()&&null!= | |
v.h&&(s("volume_setting",{volume:this.hd,gain:this.track.oc(),multiplier:lo(),station_genre:this.track.r().If(),music_id:this.track.o()},v.h),this.vj=!0)}!this.Nj&&75<d&&1<z.se().ti&&(this.track.r().Dz(),this.Nj=!0);!(this.Lj||this.track instanceof Es)&&(0<this.totalTime?this.totalTime-this.elapsedTime<=F.Cu:d>=F.Bu)&&(this.track.r().Cz(),this.Lj=!0)}}; | |
f.yj=function(){k.info("*** MediaElement("+this.A+"): onAudioEnded",this.track);this.track&&us(this.track);this.Na();this.track&&this.track.r().oa(!1);this.ha&&this.ha()}; | |
f.yh=function(b){var c=Us(null!=b?b.code:0);k.info("*** MediaElement("+this.A+"): onAudioError",c);s("audio_track_playback_event",{event_type:c,test_group:"MediaElement",player_type:"native"==this.g.pluginType?"html5":"flash",listener_id:window._listenerIdFromCookie,audio_token_id:this.track.Sb,audio_format:this.track.Vc(),current_time:this.g.currentTime,percent_loaded:100*Ts(this)/this.jb,track_length:this.jb},null);ue(this.track,null,c);0!==this.Kf()||!this.track||this.track instanceof Es||z.b(Nh, | |
{url:this.track.OE});z.b(Xg,b);this.ub=!0;this.track&&(this.track.ub=!0,this.track.r().Gm("Attempting to pause audio player"));this.ha&&this.ha(b)};f.Bj=function(){k.info("*** MediaElement("+this.A+"): onPlaying",this.track);this.track&&this.track.r().zh(this.track,this.totalTime);this.track.r().zr()};f.Wr=function(){k.info("*** MediaElement("+this.A+"): onTotalTimeUpdated",this.track,this.totalTime);this.track&&this.track.r().ks(this.track,this.totalTime)}; | |
f.ac=function(){null!=this.ma||this.Ia||(this.ma=Ed())};f.Na=function(){if(null!=this.ma){var b=Ed()-this.ma;this.ma=null;null!=v.h&&this.track&&this.track.r()&&ho(v.h,this.track.r().e(),b)}};f.Kf=function(){var b=null!=this.elapsedTime?this.elapsedTime:0;null!=this.Da&&(b=Math.max(this.Da,b));return b};function Us(b){switch(b){case 1:return"MEDIA_ERR_ABORTED";case 2:return"MEDIA_ERR_NETWORK";case 3:return"MEDIA_ERR_DECODE";case 4:return"MEDIA_ERR_SRC_NOT_SUPPORTED";default:return"UNKNOWN"}} | |
function Ts(b){var c=0;0<b.g.buffered.length&&(c=b.g.buffered.end(0));return c}f.gv=function(){this.track&&this.track.pause();this.yj()};AudioPlayerFadeExtension={Sn:1,CB:2}; | |
_.extend(ss.prototype,{re:null,volume:0.8,Hd:!1,Hl:null,Qj:50,Yp:200,rx:50,vQ:ss.prototype.Bj,AA:ss.prototype.kc,BA:ss.prototype.stop,CA:ss.prototype.suspend,enabled:!1,Si:!1,Dy:function(b,c){if(this.enabled=cp("enableAudioFade"))this.Qj=cp("quickFadeLength"),this.Yp=cp("extendedFadeLength"),this.rx=cp("flashPlayFadeLength"),this.dx=cp("extendedFadeType"),this.Si=c,this.re=b.jPlayerFade(k.enabled),this.g.bind($.jPlayer.event.play,r(this,function(){this.Hd&&(this.g.jPlayer("volume",0),this.re.updateVolume(0))}))}, | |
Gl:function(){this.enabled?(this.Hd=!0,this.Hl=AudioPlayerFadeExtension.CB,this.re.out(this.Yp,this.volume/100,0,function(){this.g.jPlayer("pause")}.bind(this),this.dx)):this.g.jPlayer("pause")},suspend:function(){this.enabled?(this.Hd=!0,this.Hl=AudioPlayerFadeExtension.Sn,this.re.out(this.Qj,this.volume/100,0,function(){this.CA()}.bind(this))):this.CA()},kc:function(b){0<b&&(this.Hd=!0,this.Hl=AudioPlayerFadeExtension.Sn);window._isInAudioJplayerHTML5Experiment?this.AA(b):this.AA()},stop:function(){this.enabled? | |
(this.Hd=!1,this.re.out(this.Qj,this.volume/100,0,function(){this.BA()}.bind(this))):this.BA()},Bj:function(){if(this.enabled&&this.Hd){var b,c;this.Hl===AudioPlayerFadeExtension.Sn?(b=this.Qj,c="linear"):(b=this.Si?this.rx:this.Yp,c=this.Si?"linear":this.dx);this.Hd=!1;this.re["in"](b,0,this.volume/100,null,c)}this.vQ()},En:function(b){this.enabled?(this.volume=b,this.Hd&&b?(this.re["in"](this.Qj,0,this.volume/100,function(){this.Ng(this.volume)}.bind(this)),this.Hd=!1):(this.re.updateVolume(b/100), | |
this.Ng(this.volume))):this.Ng(b)}});function Vs(b){this.g=b;this.A=this.g.attr("id").substr(7);this.track=null;this.Fa=0;this.hd=null;this.gd=(new Date).getTime();this.ha=null;this.seeking=this.Ia=!1;this.elapsedTime=null;this.ee=!1;this.fg=null;this.zc=0;this.Rd=!1;this.g.bind($.jPlayer.event.playing,r(this,function(b){k.info("*** JPlayerLivePlayer("+this.A+"): event(playing)",b);Ws(this)}));this.g.bind($.jPlayer.event.stalled,r(this,function(b){k.info("*** JPlayerLivePlayer("+this.A+"): event(stalled)",b)}));this.g.bind($.jPlayer.event.timeupdate, | |
r(this,function(b){b=b.jPlayer.status;if(this.track.r().active){this.ee&&!this.Ia&&(this.ee=!1,Ws(this));var d=Math.floor(b.currentTime);this.elapsedTime=d;z.b(af,{isLive:!0,elapsedTime:d,totalTime:b.duration,percentPlayed:b.currentPercentAbsolute})}}));this.g.bind($.jPlayer.event.loadedmetadata,r(this,function(b){k.info("*** JPlayerLivePlayer("+this.A+"): event(loadedmetadata)",b)}));this.g.bind($.jPlayer.event.canplaythrough,r(this,function(b){k.info("*** JPlayerLivePlayer("+this.A+"): event(canplaythrough)", | |
b)}));this.g.bind($.jPlayer.event.progress,r(this,function(b){k.info("*** JPlayerLivePlayer("+this.A+"): event(progress)",b)}));this.g.bind($.jPlayer.event.ended,r(this,function(b){k.info("*** JPlayerLivePlayer("+this.A+"): event(ended)",b)}));this.g.bind($.jPlayer.event.error,r(this,function(b){k.info("*** JPlayerLivePlayer("+this.A+"): event(error)");b=b.jPlayer.error;this.ub=!0;this.track&&(this.track.ub=!0,this.track.r().Gm("JPlayerLivePlayer ERROR:"+b));this.ha&&this.ha(b)}));this.g.bind($.jPlayer.event.flashreset, | |
r(this,function(b){k.info("*** JPlayerLivePlayer("+this.A+"): event(flashreset)",b)}));this.g.bind($.jPlayer.event.play,r(this,function(b){k.info("*** JPlayerLivePlayer("+this.A+"): event(play)",b)}))}f=Vs.prototype;f.ph=function(){return null!=this.g&&!this.g.paused};f.gg=function(b,c){k.info("*** JPlayerLivePlayer("+this.A+"): setInUse",b);this.Rd=b;this.track=c;this.gd=b?(new Date).getTime():0;this.ha=null}; | |
f.load=function(b){this.track=b;var c=b.Yc();b.k instanceof Dn&&(c-=Ed()-b.k.Ev);c*=1E3;null!=this.g&&(this.g.jPlayer("setMedia",{m3u8a:b.k.wD}),b=Math.min(864E5,c),this.zc=c-b,this.fg=setTimeout(r(this,this.Dj),b))};f.play=function(){null!=this.g&&this.g.jPlayer("play");this.ee=!0};f.pause=function(){null!=this.g&&this.g.jPlayer("pause");this.Na()};f.Gh=function(){this.play()};f.suspend=function(){this.Ia=!0;this.g.jPlayer("volume",0);this.play();this.Na();this.mk=!1}; | |
f.stop=function(){null!=this.g&&this.g.jPlayer("pause");this.Na()};f.pf=function(b){this.ha=b};function Ws(b){b.track&&b.track.r().active&&b.track.r().zh(b.track,0)}f.Dj=function(){if(0<this.zc){var b=Math.min(864E5,1E3*this.zc);this.zc-=b;setTimeout(r(this,this.Dj),b)}else null!=this.fg&&clearTimeout(this.fg),this.track&&this.track.r().active&&(this.Na(),this.track&&this.track.r().oa(!1),this.ha&&this.ha())};f.Se=function(b,c){void 0!==b&&sd(b)&&!isNaN(b)&&(this.Fa=b);this.updateVolume(c)}; | |
f.updateVolume=function(b){this.seeking||(b=this.wf(b),this.g.jPlayer("volume",b/100),0<b&&(this.gd=(new Date).getTime(),this.Ia=!1,this.ac()))};f.wf=function(b){null==b&&(b=Fm()?0:Em());this.hd=b;var c=Math.round(Math.pow(10,this.Fa/20)*b*lo());k.info("VOLUME--\x3e gain:",this.Fa,", volume:",b,", old adjusted:",Math.round(Math.pow(10,this.Fa/20)*b),", new adjusted:",c);return Math.min(100,c)};f.ac=function(){null!=this.ma||this.Ia||(this.ma=Ed(),ys(this.track,this.ma))}; | |
f.Na=function(){if(null!=this.ma){var b=Ed(),c=b-this.ma;zs(this.track,this.ma,b,c,0);this.ma=null;null!=v.h&&this.track&&this.track.r()&&ho(v.h,this.track.r().e(),c)}};f.Kf=function(){return null!=this.elapsedTime?this.elapsedTime:0};f.Cm=function(){this.stop();this.track&&this.track.r().cl()};function Xs(b){this.g=b;this.ha=this.track=null;this.hd=this.Fa=0;this.gd=(new Date).getTime();this.Td=this.Ia=!1;this.jb=0;this.fg=this.elapsedTime=null;this.Pe=!1;this.tz=0;this.wm=this.ma=null;this.zc=this.Up=this.wn=this.xn=this.kl=0;this.Rd=!1}function Ys(b){return b.g&&b.g.getState?b.g&&b.g.getState():""}f=Xs.prototype;f.ph=function(){return"playing"==Ys(this)};f.gg=function(b,c){k.info("*** StrobePlayer: setInUse",b);this.Rd=b;this.track=c;this.gd=b?(new Date).getTime():0;this.ha=null}; | |
f.load=function(b){this.track=b;this.jb=b.Yc();b.k instanceof Dn&&(this.jb-=Ed()-b.k.Ev);var c=1E3*this.jb;this.Td=!0;this.g.setMediaResourceURL(b.k.tv);b=Math.min(864E5,c);this.zc=c-b;this.fg=setTimeout(r(this,this.Dj),b)};f.reload=function(){this.Td||(this.Td=!0,this.g.setMediaResourceURL(this.track.k.tv))};f.handleError=function(b){this.Td=!1;3<=this.Up++?(this.track&&(this.track.ub=!0,this.track.r().Gm("StrobePlayer ERROR:"+b)),this.ha&&this.ha(b),this.Up=0):setTimeout(r(this,this.reload),1E3)}; | |
function Zs(b){try{var c=b.g.getBitrateForDynamicStreamIndex(b.g.getCurrentDynamicStreamIndex()),d=Ed();b.xn+=0==b.kl?1:d-b.kl;b.kl=d;b.wn+=c}catch(e){}}f.play=function(){this.Pe=!0;if(!this.Td&&null!=this.g&&this.g.play2)try{this.g.play2()}catch(b){}};f.pause=function(){this.Td||(this.tz=this.hd,this.updateVolume(0),this.Pe=!1,this.Na())};f.Gh=function(){this.Pe=!0;this.Td||(this.updateVolume(this.tz),this.ac())};f.suspend=function(){this.Pe=!1;this.Ia=!0;if(null!=this.g&&this.g.pause)try{this.g.pause()}catch(b){}this.Na()}; | |
f.stop=function(){this.Pe=!1;if(!this.Td){if(null!=this.g&&this.g.pause)try{this.g.pause()}catch(b){}this.Na()}};f.pf=function(b){this.ha=b};f.Dj=function(){if(0<this.zc){var b=Math.min(864E5,1E3*this.zc);this.zc-=b;setTimeout(r(this,this.Dj),b)}else null!=this.fg&&clearTimeout(this.fg),this.track&&this.track.r().active&&(this.Na(),this.track&&this.track.r().oa(!1),this.ha&&this.ha())};f.Se=function(b,c){void 0!==b&&sd(b)&&!isNaN(b)&&(this.Fa=b);this.updateVolume(c)}; | |
f.updateVolume=function(b){if(this.Pe||this.Ia)b=this.wf(b),null!=this.g&&this.g.setVolume&&this.g.setVolume(b/100),0<b&&(this.gd=(new Date).getTime(),this.Ia&&(this.Pe=!0,this.reload()),this.Ia=!1)};f.wf=function(b){null==b&&(b=Fm()?0:Em());this.hd=b;var c=Math.round(Math.pow(10,this.Fa/20)*b*lo());k.info("VOLUME--\x3e gain:",this.Fa,", volume:",b,", old adjusted:",Math.round(Math.pow(10,this.Fa/20)*b),", new adjusted:",c);return Math.min(100,c)}; | |
f.ac=function(){null!==this.ma||this.Ia||(this.ma=Ed(),ys(this.track,this.ma))};f.Na=function(){if(null!=this.ma){var b=Ed(),c=b-this.ma;zs(this.track,this.ma,b,c,this.wn/this.xn);this.kl=this.xn=this.wn=0;this.ma=null;null!=v.h&&this.track&&this.track.r()&&ho(v.h,this.track.r().e(),c)}};f.Kf=function(){return null!=this.elapsedTime?this.elapsedTime:0};f.Cm=function(){this.stop();this.track&&this.track.r().cl()};function Rs(){this.zt=!1;this.$t=this.Oy=0}Rs.prototype.uw=function(b,c,d){0<b&&0==b%10&&99>d&&(b=d-c,c=5>b&&b<this.Oy,0.5>b||c||this.zt?(this.$t++,3==this.$t&&z.b(mg)):this.$t=0,this.Oy=b,this.zt=!1)};var $s=!1,at=[],bt=[],ct={},dt=!1,et=null,ft=0,gt=0; | |
function ht(){var b=km(em),c=km(fm);if(null!=b&&null!=c){var d=b.start,c=c.seconds;s("live_tracking",{station_id:b.stationId,track_token:b.trackToken,track_start:(new Date(1E3*d)).format("yyyy-mm-dd HH:MM:ss",!0),track_end:(new Date(1E3*(d+c))).format("yyyy-mm-dd HH:MM:ss",!0),elapsed_seconds:c,event_type:"end",platform:"web",vendor_id:u,device_code:se,app_version:z.ba,device_os:oe(),client_timestamp:(new Date).format("yyyy-mm-dd HH:MM:ss",!0)},v.h);Zm(null);$m(null)}} | |
function it(){var b=$.jPlayer.prototype.play;$.jPlayer.prototype.play=function(c){if(this.status.cQ){var e=this.status.media.mp3;null==e&&(e=this.status.media.m4a);if(!isNaN(c)&&-1==e.indexOf("&lo="+c))return}b.call(this,c)};var c=$.jPlayer.prototype.pause;$.jPlayer.prototype.pause=function(b){if(this.status.cQ){var e=this.status.media.mp3;null==e&&(e=this.status.media.m4a);if(!isNaN(b)&&-1==e.indexOf("&lo="+b))return}c.call(this,b)}} | |
function jt(b){window._isInAudioMediaElementExperiment?kt(b):(ft++,$('<div id="jPlayer'+ft+'"></div>').css({width:0,height:0}).appendTo("body").jPlayer({wmode:"window",swfPath:z.se().fw,solution:z.se().dl,supplied:b,ready:function(c){setTimeout(r(this,function(){lt($(this),b,c)}),0)},error:function(b){dt||(dt=!0,b.jPlayer.error.type==$.jPlayer.error.NO_SOLUTION&&z.b($g,b.jPlayer.error.message))}}))} | |
function kt(b){ft++;var c="MediaElement"+ft;$("<audio preload='auto' id='"+c+"'></audio>").css({width:0,height:0}).appendTo("body");var d="native";0>z.se().dl.indexOf("html")&&(d="shim");new MediaElement(c,{enablePluginDebug:!0,plugins:["flash"],type:"audio/"+b,pluginPath:"/js/libs/MediaElement-2.20.1/",flashName:"flashmediaelement.swf",defaultVideoWidth:1,defaultVideoHeight:1,pluginWidth:1,pluginHeight:1,pluginVars:"isvideo=true&autoplay=true&wmode=window",mode:d,timerRate:500,success:function(c){setTimeout(r(this, | |
function(){if("m4a"==b||"mp3"==b){var d=new Ss(c);"m4a"==b?bt.push(d):"mp3"==b&&at.push(d);!$s&&0<bt.length&&0<at.length&&($s=!0,et&&et())}}),0)},error:function(){dt||(dt=!0,z.b($g,"something wrong?..."))}})} | |
function mt(){ft++;var b="strobePlayer"+ft,c="strobeMediaPlayback"+ft;$('<div id="'+c+'"></div>').css({width:0,height:0,position:"absolute"}).appendTo("body");swfobject.embedSWF("/include/3rd-party/strobe/StrobeMediaPlayback.swf",c,1,1,"10.1.0",{},{src:"about:blank",controlBarMode:"none",streamType:"liveOrRecorded",verbose:!1,autoPlay:!1,expandedBufferTime:30,minContinuousPlayback:30,javascriptCallbackFunction:"strobeCallback"},{allowFullScreen:"false"},{id:b,name:b,"class":"strobeMediaPlayer"})} | |
function lt(b,c,d){"m4a"==c||"mp3"==c?(b=new ss(b,d.jPlayer.flash.used),"m4a"==c?bt.push(b):"mp3"==c&&at.push(b),$s||(d.jPlayer.flash.used&&k.info("AudioPlayer initialized: Using Flash audio for "+c),d.jPlayer.html.used&&k.info("AudioPlayer initialized: Using native HTML5 audio for "+c),0<bt.length&&0<at.length&&($s=!0,et&&et()))):"m3u8"==c?(b.attr("id"),new Vs(b)):"f4m"==c&&(ct[b.id]=new Xs(b))} | |
function rs(b){var c=null,d=null,e;if(b&&ws(b))e=_.map(ct,function(b){return b});else{d=b&&b.Vc()?b.Vc():"mp3";if("m4a"!=d&&"mp3"!=d)return k.error("No AudioPlayer for type "+d),null;e="m4a"==d?bt:at}var h=_.select(e,function(b){return!b.Rd});0<h.length?c=h.shift():(c=_.min(e,function(b){return b.gd}),c.Cm());b instanceof As?c.gg(!0,null):c.gg(!0,b);0==h&&e.length<z.se().ti&&(b&&ws(b)?mt():null!=d&&jt(d));return c} | |
function nt(){k.info("jplayer successfully initialized, resetting consecutive error count to 0");gt=0}function ot(b){k.warn("jPlayer error (count: "+gt+"): "+b.message);gt++;5<=gt&&(k.warn("too many consecutive jplayer errors. re-initializing jplayer"),z.b(Yg),gt=0)}function pt(){z.b(ci)} | |
window.strobeCallback=function(b,c,d){ct[b]?(b=ct[b],"timeupdate"!=c&&k.info("*** StrobePlayer: state="+b.g.getState()+", handleCallbackEvent",c,d),"emptied"==c?"ready"==Ys(b)&&(b.Td=!1,b.Pe&&(b.play(),b.updateVolume(),Zs(b))):"play"==c?b.track&&b.track.r().active&&(b.ac(),b.track.r().zh(b.track,0)):"timeupdate"==c&&b.track.r().active&&(b.Up=0,b.elapsedTime=Math.floor(d.currentTime),z.b(af,{isLive:!0,elapsedTime:b.elapsedTime,totalTime:b.jb,percentPlayed:d.currentTime/b.jb}))):((c=$("#"+b))&&0<c.length&& | |
lt(c[0],"f4m",null),c[0].addEventListener("switchingChange","onStrobeDynamicStreamSwitch"),c[0].addEventListener("mediaError","onStrobeMediaError"))};window.onStrobeDynamicStreamSwitch=function(){Zs(ct)};window.onStrobeMediaError=function(b,c,d){ct.handleError(d)};var Ns={},Cs={};function Ls(b){if(null!=Cs[b.e()]){Cs[b.e()]=null;var c=Gm(b.e()),d=Fd()-c;null==c||36E5<d?qt(b.e()):setTimeout(function(){qt(b.e())},36E5-d)}}function Ks(b){Ls(b);var c;(c=null==v.h)||(c=0<=v.h.yt);return c?Hm(b.e())>=(null!=v.h&&null!=v.h.yt?v.h.yt:6):!1}function qt(b){rt(b);Ns[b]=setInterval(function(){rt(b)},36E5)}function rt(b){var c=Fd(),d=sl?km(Ml):null;null==d&&(d={});d[b]=c;pm(Ml,d);Im(b,0)};function Ms(b){var c=b.listeningTimestamp;b=b.monthlyListening;pm(Il,0);pm(Jl,c);z.b(uf,b);c=v.h;null!=c&&"REGISTERED"==c.u&&(b=Math.round(Number(b)/60/60),b>=c.Br?(pm(wl,c.qg),z.b(wf,b)):310<=b&&z.b(vf,b))};var st,tt=null,ut=null;function vt(b){st=!1;var c=D.V();null!=c&&(st=c.ph());z.b(ci);wt();var c=new As(b.url),d=rs(c);d.Se(b.gain);d.pf(function(c){b.reachedEnd=!0;null!=c&&(b.isError=!0);z.b(df,b);st&&z.b(ai)});d.load(c.url,"m4a").play();tt=d;ut=b}function wt(){null!=tt&&(tt.stop(),tt=null,ut.reachedEnd=!1,z.b(df,ut),st&&z.b(ai))}function xt(b){null!=tt&&tt.updateVolume(b)};function yt(){this.hf=0;this.ec=null;this.uc=!1;z.c(De,r(this,function(b){clearTimeout(this.ec);this.Cb=null;null!=b&&b.xz&&this.Qf()}));z.c(af,r(this,function(){this.uc=!0}));z.c(ai,r(this,function(){this.uc=!0}));z.c(ci,r(this,function(){this.uc=!1}));z.c(Xj,r(this,function(){this.uc=!0}))}f=yt.prototype; | |
f.Qf=function(){var b=v.h;null!=b&&(clearTimeout(this.ec),this.Cb=null,b=hex_md5(b.s).toUpperCase(),this.ab("http://lt150.tritondigital.com/lt?sid=9718&vid="+b,r(this,function(b){b=this.gi(b);var d=b.valid;this.jd(!d,"newSession",null);d?(this.hf=0,this.Cb=b.guid,this.gf=b.intervalSeconds,this.ec=ae(this,this.mf,1E3*b.intervalSeconds)):(this.hf++,10>this.hf&&ae(this,this.Qf,5E3))})))}; | |
f.gi=function(b){var c;null!=b&&rd(b)&&0!=b.indexOf(",")?(c=b.split(","),b=parseInt(c[0],10),c=c[1]):c=b=null;var d=!(isNaN(b)||null==c||0==c.length);d&&c.indexOf("\n")==c.length-1&&(c=c.substring(0,c.length-1));return{intervalSeconds:b,guid:c,valid:d}}; | |
f.mf=function(){if(this.uc)if(null==this.Cb)this.Qf();else{var b=(new Date).getTime();this.ab("http://lt150.tritondigital.com/lt?guid="+escape(this.Cb),r(this,function(c){c=this.gi(c);c.valid?(this.jd(!1,"ping",this.Cb),this.gf=c.intervalSeconds):this.jd(!0,"ping",this.Cb);this.ec=ae(this,this.mf,1E3*this.gf-((new Date).getTime()-b))}));this.di=(new Date).getTime()}else null!=this.di&&18E4<(new Date).getTime()-this.di&&(this.Cb=null),this.ec=ae(this,this.mf,1E3*this.gf)}; | |
f.ab=function(b,c){var d="",e=v.h;null!=e&&(d=e.H()?1:0,d="&yob="+e.Cg+"&gender="+Un(e)+"&zip="+e.wb()+"&hasads="+d+"&devcat=WEB&devtype=WEB");b+=d+"&cb="+ge();up(b,c,c)};f.jd=function(b,c,d){var e=v.h;null!=e&&5>e.s%100&&s("ando",{event:c,is_error:b,birth_year:e.Cg,gender:Un(e),zip:e.wb(),guid:d,vendor_id:"100",device_code:"1880",app_version:z.ba,device_os:oe(),client_timestamp:(new Date).format("yyyy-mm-dd HH:MM:ss",!0)},e)};function zt(){this.hf=0;this.ec=null;this.uc=!1;z.c(De,r(this,function(b){clearTimeout(this.ec);this.Cb=null;null!=b&&b.xz&&this.Qf()}));z.c(af,r(this,function(){this.uc=!0}));z.c(ai,r(this,function(){this.uc=!0}));z.c(ci,r(this,function(){this.uc=!1}));z.c(Xj,r(this,function(){this.uc=!0}))} | |
zt.prototype.Qf=function(){var b=v.h;null!=b&&(clearTimeout(this.ec),this.Cb=null,b=hex_md5(b.s).toUpperCase(),this.ab("http://lt.andomedia.com/lt?sid=9718&vid="+b,r(this,function(b){b=this.gi(b);b.valid?(this.hf=0,this.Cb=b.guid,this.gf=b.intervalSeconds,this.ec=ae(this,this.mf,1E3*b.intervalSeconds)):(this.hf++,10>this.hf&&ae(this,this.Qf,5E3))})))}; | |
zt.prototype.gi=function(b){var c;null!=b&&rd(b)&&0!=b.indexOf(",")?(c=b.split(","),b=parseInt(c[0],10),c=c[1]):c=b=null;var d=!(isNaN(b)||null==c||0==c.length);d&&c.indexOf("\n")==c.length-1&&(c=c.substring(0,c.length-1));return{intervalSeconds:b,guid:c,valid:d}}; | |
zt.prototype.mf=function(){if(this.uc)if(null==this.Cb)this.Qf();else{var b=(new Date).getTime();this.ab("http://lt.andomedia.com/lt?guid="+escape(this.Cb),r(this,function(c){c=this.gi(c);c.valid&&(this.gf=c.intervalSeconds);this.ec=ae(this,this.mf,1E3*this.gf-((new Date).getTime()-b))}));this.di=(new Date).getTime()}else null!=this.di&&18E4<(new Date).getTime()-this.di&&(this.Cb=null),this.ec=ae(this,this.mf,1E3*this.gf)}; | |
zt.prototype.ab=function(b,c){var d="",e=v.h;null!=e&&(d=e.H()?1:0,d="&yob="+e.Cg+"&gender="+Un(e)+"&zip="+e.wb()+"&hasads="+d+"&devcat=WEB&devtype=WEB");b+=d+"&cb="+ge();up(b,c,c)};var At=0;function Is(b){this.Gy=b.initiateEvent;this.uG=b.eventArgs;this.Wo=b.ackEvent;this.Mv=b.ackEventCallback;this.Is=b.responseEvent;this.iw=b.bailOutEvent;this.WE=b.bailOutPeriod?b.bailOutPeriod:2E3;this.Xa=b.callback||$.noop;this.hL=++At;k.debug("UIActivityManager : creating instance: "+this.hL);this.Px=!1} | |
function Hs(b){b.Px?k.error("UIActivityManager : handoff called more than once!"):(b.Px=!0,b.Is&&b.Gy?(b.yi=setTimeout(r(b,function(){this.Xa?(k.debug("UIActivityManager : bailing out.."),this.iw&&z.b(this.iw),this.Xa(),this.Xa=null):k.debug("UIActivityManager : bailout cancelled since the callback has already been handled.")}),b.WE),b.Wo&&z.c(b.Wo,r(b,function(){k.debug("UIActivityManager : ACK event ..");clearTimeout(this.yi);this.yi=null;z.pa(this,this.Wo);this.Mv&&this.Mv()})),z.c(b.Is,r(b,function(){this.Xa? | |
(k.debug("UIActivityManager : RESPONSE event .."),this.yi&&(clearTimeout(this.yi),this.yi=null),z.pa(this,this.Is),this.Xa.apply(null,arguments),this.Xa=null):k.debug("UIActivityManager : RESPONSE event cancelled, callback has been handled.")})),z.b(b.Gy,b.uG)):b.Xa())}function Fs(b,c){Hs(new Is({initiateEvent:Ve,eventArgs:b,responseEvent:We,callback:c}))};var F={}; | |
(function(b){function c(b){if(b.callback){var c=b.callback;if(b.ads){var d=D.V(),e=d.n;Ja(function(b){b?(p(e,b),d.mx(!0,c)):(k.debug("No AudioAdTracks to add to queue: "+b),c())},b.ads)}else c()}else k.error("AudioAdReadyForCache handler did not receive a callback for indicating when process completes! This could potentially block playback.")}function d(b){return 0>=F.rb.length?!1:C.Ca()?!0:b&&!F.rf?(k.debug(0<"Have cached ad - "+F.rb.length),k.debug("isnt User init - "+!b),k.debug("is test mode - "+F.rf), | |
k.debug("Returning null - no ad will be played"),!1):!0}function e(b,c){var d=[];if(_.isArray(c))for(var e=0;e<c.length;e++){var h=c[e];h.lb==mb?ua(h.k):h.lb!=Cb&&h.lb!=tb||d.push(h)}0<d.length?b(d):b(null)}function h(b,c){if(null===c)b(null);else{var d=D.V().n,e=!1;d.Eb()?d._delayedInStationAd&&(e=!0):c.k.Lw&&(e=!0);e?(F.ef=c,F.yd=Ed()):F.xs();c.lb==mb?(ua(c.k),b(null)):c.lb==Cb||c.lb==tb?(e=d.Eb()&&d._adIntervalMinutes?d._adIntervalMinutes:c.k.TL,d=F.Wl(d.e()),1==d.Bf&&(d.Pv=e),b(c)):b(null)}}function l(b){F.Ag= | |
Ed();F.yd=0;F.jf=0;F.zg=0;F.yg=0;F.xo=0;F.Kk=0;F.Jk=!1;null!=b&&(b.Ft&&(F.po=b.Ft,F.Ik=b.Ft),b.Ht&&(F.oo=b.Ht,F.Hk=b.Ht))}function p(b,c){if(C.Ca()?!F.No:1){var d=C.za(b);if(C.Ca())if(null!=c){k.debug("Chronos - Fetch Audio Ad has returned a chronos related response, pushing it onto the _cachedAds array... ("+c.length+")");for(var e in c){var h=c[e];k.debug("pushing - ",h);F.rb.push(h)}}else k.debug("Chronos - Fetch Audio Ad has returned "+c);else F.rb.push(c);d?(d=!1,d=C.Ca()?null!=c&&0<c.length&& | |
c[0].lb==mb:null==c||c.lb==mb,e=F.Wl(b.e()),1<e.Bf&&d?(k.debug("Advertiser station: resetting ad index "+(C.Ca()?"(Chronos)":"(non-chronos)")),e.Bf=1,pa(!1,null,function(b){C.Ca()?(k.debug("Advertiser station: Pushing "+b.length+" ads onto _cachedAds"),0<b.length&&F.rb.push(b[0])):(k.debug("Advertiser station: Pushing 1 ad onto _cachedAds"),F.rb.push(b));J()})):J()):(C.Ca()||E(c),J())}else J()}function q(b){b&&b instanceof po||(F.Ze=[]);b&&(b instanceof po?(F.yo=!0,ua(b)):F.Ok&&(T("Playlist playback continued before Ad was received. Will ignore audio ad response until next opportunity."), | |
F.No=!0))}function t(b){b&&!b.gb()&&(F.zg=Ed(),ta())}function y(){ta();var b=D.V();b&&C.za(b.n)?F.li(Db):F.li(bb)}function E(b){if(b){var c=b.k.Om,d=qo(F.Ze[0]);if(c&&(!d||d.Zm!=c.Zm||d.position<=c.position)){c=[];b=b.k.Om;for(d=b.position;d<b.size;d++)c.push((new jp(d+1,b.size,b.Zm)).Jf());F.Ze=c;T("Generated "+c.length+" _adPodTokens: ",F.Ze)}}}function J(){z.b(Lk);F.Ok=!1;F.No=!1;C.Ca()||F.uh()}function N(){if(!v.h||!v.h.H())return!1;var b=v.h.xe();if(!C.Ca()&&b&&0!=F.Ze.length)return!0;var c= | |
Ed(),d=!1,e=D.V().n;C.Ca()?(T("Chronos is enabled"),d=F.Bg):C.za(e)?(b=F.xg[e.e()])&&c>F.yd+60*b.Pv&&(d=!0):(d=b?F.Hk:F.oo,b=b?F.Ik:F.po,d=F.Bg&&c>F.yg+F.ro&&c>F.Ag+d&&c>F.yd+b&&c>F.zg+F.so&&c>F.jf+F.qo);!F.rf||D.t instanceof Es||(T("Test mode enabled"),d=!0);T("Ready for Audio ad: : now : "+c+" : since start : "+(c-F.Ag)+" : since sv : "+(c-F.yg)+" : since lv : "+(c-F.zg)+" : since la : "+(c-F.yd)+" : since ld : "+(c-F.jf)+" : _userActive : "+F.Bg+" : _cachedAds : "+F.rb.length+" : delayed ISA : "+ | |
(null!=F.ef)+" : ready : "+d);return d}function U(b,c,d,e,h){if(null==c||0==c.length)T("Web audio ad is null or empty"),mp("Audio ad was blocked",F.df,"Web audio ad is null or empty",F.ji),b(null);else if(c==C.$h)b(null);else{F.CL=Ed();d=C.Gj(c,F.ji,F.df);var l=d.moathearability;null!=l&&(F.ld=l);d.adToken=e;d.adRequestMetaData=h;d.isInStationAd=F.df==Db;c=F.zx(d,c);T("Got AudioAdTrack: ",c);b(c)}}function pa(b,c,d){if(v.h&&v.h.H()){var e=v.h.s,e={segment:e.charAt(e.length-1)},h=!C.za(D.V().n),l= | |
v.h,l=v.ed()&&!l.p();h&&l&&(e.index=C.bl);if(h=D.V()){C.za(h.n)&&(l=F.Wl(h.e()),e.isa=l.Bf,k.debug("_sendAdRequest, isa="+e.isa));l=h.n;l.Ka()&&(e.playlist=l.Ka());C.lg(e,D.V().n,D.Jx());C.Re(e);d=C.Ca()?_.bind(Ja,null,d):_.bind(U,null,d);var p=B.Xi();C.Ca()?(h=h.hH(),h||(h=D.t),C.Wz({currentStationData:l,options:e,adToken:c,callback:d,forcedAudioAd:F.rv,lastDisplayAdTime:F.jf,requestType:p,subZone:F.ji,currentSize:F.df,isInStationAd:F.df==Db,currentStationTrack:h,currentStationTrackType:null==h? | |
"":h.k.To,isUserInitiated:b,handlerType:Rd})):C.FO(p,e,c,h.n.e(),d,d)}else T("No station available for ad flow."),d(null)}else T("Attempt to send audio ad request when ads are disabled"),d(null)}function Ja(b,c){if(c===C.$h)return b(null),!1;var d=[];_.each(c,function(b){var c=b.response;"AUDIO_AD"!==c.adType?k.error("Received Audio Ad of incorrect type: "+c.adType):d.push(F.zx(b.parsedContent,b.content))});b(d);return 0<d.length}function fb(b,c){T("Impression of urlType '"+c+"' failed: "+b.message)} | |
function gb(b){T("Impression of urlType '"+b+"' succeeded.");"tracking"==b&&(C.Ca()||F.uh())}function ua(b){F.EA&&(F.hp||(F.hp=0),F.hp+=1);C.za(D.V().n)||C.XK();C.ab(b,gb,fb)}function ta(){F.rb=[];F.ef=null;T("Flush")}function T(b){if(!k.enabled){var c=Array.prototype.slice.call(arguments,0);"Chrome"==BrowserDetect.browser||"Firefox"==BrowserDetect.browser?(c.unshift("color:green"),c.unshift("%cAudioAdManager : ")):c.unshift("AudioAdManager : ");"Explorer"!=BrowserDetect.browser&&k.debug.apply(k, | |
c)}}var mb="HOUSE",Cb="PLAYLIST",tb="DEVICE_AD",Rd="AUDIO",bb=lp.AUDIO_AD_SIZE,Db=lp.AUDIO_IN_STATION_AD_SIZE;F.init=function(){F.rf=!!Qo()||"true"==Uo()||"true"==A._data.audioAdTestMode;F.Cu=F.rf?1E4:lp.PRELOAD_SECONDS;F.Bu=F.rf?0:lp.PRELOAD_PERCENTAGE;F.Ag=Ed();F.oo=Vo();F.Hk=Vo();F.qo=Do(A._data.timeBetweenDisplayAndAudioAd,5);F.so=Do(A._data.timeBetweenVideoAndAudioAd,60);F.po=Wo();F.Ik=Wo();F.ro=120;F.yd=0;F.jf=0;F.zg=0;F.yg=0;F.Bg=!0;F.ji="tuner";F.li(bb);F.rv=Qo()||"";F.rb=[];F.ef=null;F.Ze= | |
[];F.Ok=!1;F.xg={};F.yo=!1;F.Kk=0;F.LC="pandora5413215442154";F.KC=document.getElementById("playerBar");F.ld=null;F.qf=0;F.Lt=!1;F.Oc=!1;F.Xo=!1;F.Yo=!1;F.Zo=!1;F.ym=null;F.xo=0;F.Jk=!1;F.No=!1;z.c(De,r(F,l));z.c(ji,r(F,y));z.c(Ek,r(F,function(b){F.Bg=b}));z.c(Vf,r(F,function(){F.yg=Ed();ta()}));z.c(Rk,r(F,t));z.c(Qk,r(F,t));z.c(Fk,r(F,function(){F.jf=Ed()}));z.Eh(Re,r(F,q));z.c(Nk,r(F,c));z.c(Re,r(this,function(b){b&&b instanceof po&&null!=F.ld?F.Lt=!0:F.Qz()}));z.c(Ak,r(this,function(b){if(F.Lt&& | |
null!=F.ld){var c=Math.floor(b.currentTime);!F.Oc&&0==F.qf&&1>c?(F.qf=b.duration,F.ym=F.dL(),F.Oc=!0,F.Gd("AdAudioStart",Em()/100)):F.Oc&&!F.Xo&&c==Math.floor(F.qf/4)?(F.Xo=!0,F.Gd("AdAudioFirstQuartile",Em()/100)):F.Oc&&!F.Yo&&c==Math.floor(F.qf/2)?(F.Yo=!0,F.Gd("AdAudioMidpoint",Em()/100)):F.Oc&&!F.Zo&&c==Math.floor(3*F.qf/4)&&(F.Zo=!0,F.Gd("AdAudioThirdQuartile",Em()/100))}}));z.c(Se,r(this,function(b){F.Oc&&null!=F.ld&&(0==b.remaining_seconds?F.Gd("AdAudioComplete",Em()/100):F.Gd("AdStopped", | |
Em()/100),F.Qz())}));z.c(ai,r(this,function(){F.Oc&&null!=F.ld&&F.Gd("AdPlaying",Em()/100)}));z.c(ci,r(this,function(){F.Oc&&null!=F.ld&&F.Gd("AdPaused",Em()/100)}));z.c(mi,r(this,function(b){F.Oc&&null!=F.ld&&F.Gd("AdVolumeChange",b/100)}))};F.Qz=function(){F.Lt=!1;F.Oc=!1;F.Xo=!1;F.Yo=!1;F.Zo=!1;F.ld=null;F.ym=null;F.qf=0};F.uH=function(){return{level1:F.fh("Level1"),level2:F.fh("Level2"),level3:F.fh("Level3"),level4:F.fh("Level4"),slicer1:F.fh("Slicer1"),slicer2:F.fh("Slicer2")}};F.fh=function(b){try{var c= | |
F.ld.indexOf(b),d=F.ld.substring(c+b.length+1),c="&";"Slicer2"==b&&(c='"');return d.substring(0,d.indexOf(c))}catch(e){return""}};F.Gd=function(b,c){null!=F.ym&&F.ym.dispatchEvent({type:b,adVolume:c})};F.dL=function(){var b=F.KC,c=F.uH(),d=F.qf,e=F.LC,h=window.location.protocol,l="https:"===h?"z":"js",p=document.createElement("script"),q=[],c={adData:{ids:c,duration:d,url:""},dispatchEvent:function(b){this.sendEvent?(q&&(q.push(b),b=q,q=!1),this.sendEvent(b)):q.push(b)}},d="_moatApi"+Math.floor(1E8* | |
Math.random());window[d]=c;p.type="text/javascript";b&&b.insertBefore(p,b.childNodes[0]||null);p.src=h+"//"+l+".moatads.com/"+e+"/moatvideo.js#"+d;return c};F.reset=function(){z.pa(F)};F.li=function(b){F.df=b;z.b(Mk,{size:b})};F.Wl=function(b){var c=F.xg[b];c||(c=new Bt,F.xg[b]=c);return c};F.YK=function(b){var c=F.Wl(b);c.Bf++;k.debug("Incremented current ad index to "+c.Bf+" (on "+b+")")};F.uh=function(){if(F.Ok)return!0;if(!N())return T("loadAudioAd: not ready for ads yet."),!1;if(0<F.rb.length&& | |
0==F.Ze.length)return T("loadAudioAd: audio ad(s) have been cached"),!1;if(F.ef)return F.rb=[F.ef],F.ef=null,T("loadAudioAd: had a _delayedInStationAd, moving it to _cachedAds."),!0;var b="none",c=D.V(),d=c.n,e=C.za(d);!C.Ca()&&v.h.xe()&&c.nA()?b=F.Ze.shift():e&&F.li(Db);F.Ok=!0;pa(!1,b,_.bind(p,null,d));return!0};F.jH=function(b){F.Vl(!1,function(c){null!=c?b(c):b(null)})};F.GO=function(b){var c=b.n,d=F.xg[c.e()];d?(d.Bf=1,F.rb=[],F.ef=null,F.xg[c.e()]=d,T("Reset the ISA sequence for ",b,F),F.uh()): | |
T("Tried to reset the ISA sequence for a station, but it had no ad data.",b,F.xg)};F.xH=function(){return F.rb.length};F.Vi=function(b){if(!d(b))return null;b=F.rb.shift();if(!b)return k.debug("Ad is null"),k.debug("Returning null - no ad will be played"),null;F.xs();var c=b.k;if(b.lb==mb)return k.debug("house ad, registering impression"),ua(c),k.debug("Returning null - no ad will be played"),null;if(b.lb!==Cb&&b.lb!==tb)return k.debug("ad isn't correct type"),k.debug("Returning null - no ad will be played"), | |
null;T("Elapsed time since ad fetch and playback: "+(Ed()-F.CL)+" seconds");F.yo=!1;F.xo++;F.Jk||setTimeout(function(){!F.yo&&c&&(F.Kk++,mp("Audio ad fail","Audio","Audio ad failed to play - "+c.lb+" - "+c.Af,"radio",v.h),!F.Jk&&F.xo==F.Kk&&2700<Ed()-F.Ag&&(F.Jk=!0,mp("Audio ads failed","Audio","Audio ads failed - "+F.Kk+" - "+v.h.s,"radio",v.h)))},8E3);k.debug("Returning an ad for playback");return b};F.xs=function(){F.yd=Ed()};F.Vl=function(b,c){F.li(Db);var d;d=C.Ca()?_.bind(e,null,c):_.bind(h, | |
null,c);pa(b,"none",d)};F.D3=function(){return F.yd};F.zx=function(b,c){var d=new Es(b,D.V());if(b.type==Cb){T("PLAYLIST audioAd",b);d.hl=d.hl.replace("__AUTH_TOKEN__",encodeURIComponent(""+Ln()));var e=d.k.vb().replace("__AUTH_TOKEN__",encodeURIComponent(""+Ln()));d.k.Qb=e}else b.type==mb?T("HOUSE audioAd",b):b.type==tb?b.creative_token&&0!==b.creative_token.length?(T("DeviceAd audioAd : "+b.creative_token,b),e="/util/mediaserverPublicRedirect.jsp?at="+encodeURIComponent(""+Ln())+"&ct="+encodeURIComponent(b.creative_token), | |
d.hl=e+"&type=audio",d.k.Qb=e+"&type=tile"):(T("DeviceAd audioAd : HOUSE - Converting to TYPE house",b),d.lb=mb):(T("chronos - UNKNOWN audioAd: "+b.type,b),c&&0!=c.indexOf("<a target=")&&(T("chronos - Unknown Web AudioAd type "+c),mp(c,F.df,"chronos - Unknown Web AudioAd type ",F.ji)));return d};F.A3=function(){var b=Math.floor((new Date).getTime()/1E3);return"Ready for Audio ad:\n : now : "+b+"\n : since start : "+F.Ag+"\n : since sv : "+F.yg+"\n : since lv : "+F.zg+"\n : since la : "+F.yd+"\n : since ld : "+ | |
F.jf+"\n : _userActive : "+F.Bg+"\n : _cachedAds : "+F.rb.length+"\n : RPCService.listenerData.isAdPodEligible() :"+v.h.xe()+"\n : AudioAdManager._TIME_BETWEEN_AUDIO_AD_PODS: "+F.Ik+"\n : AudioAdManager._TIME_BETWEEN_AUDIO_ADS:"+F.po+"\n : AudioAdManager._MIN_AD_POD_START_INTERVAL : "+F.Hk+"\n : AudioAdManager._MIN_AD_START_INTERVAL : "+F.oo+"\n : AudioAdManager._TIME_BETWEEN_DISPLAY_AUDIO_ADS : "+F.qo+"\n : AudioAdManager._TIME_BETWEEN_VIDEO_AUDIO_ADS : "+F.so+"\n : AudioAdManager._TIME_BETWEEN_SVN_AUDIO_ADS : "+ | |
F.ro+"\n ready = AudioAdManager._userActive \n\t&& now > AudioAdManager._lastSvnInteractionTime + AudioAdManager._TIME_BETWEEN_SVN_AUDIO_ADS \n&& now > AudioAdManager._startTime + minAdStartInterval \n&& now > AudioAdManager._lastAudioAdTime + timeBetweenAudioAds \n&& now > AudioAdManager._lastVideoAdTime + AudioAdManager._TIME_BETWEEN_VIDEO_AUDIO_ADS \n&& now > AudioAdManager._lastDisplayAdTime + AudioAdManager._TIME_BETWEEN_DISPLAY_AUDIO_ADS \n \tready ="+F.Bg+" \n \t \t"+b+" > "+(Number(F.yg)+ | |
Number(F.ro))+" \n \t \t"+b+" > "+(Number(F.Ag)+Number(F.Hk))+" \n \t \t"+b+" > "+(Number(F.yd)+Number(F.Ik))+" \n \t \t"+b+" > "+(Number(F.zg)+Number(F.so))+" \n \t \t"+b+" > "+(Number(F.jf)+Number(F.qo))+" \n"};b.AudioAdManager=F})(this);var Ct=null,Dt=!0,Et=null;function Ft(){z.c(Ok,Gt);z.c(Pk,Ht);z.c(Rk,It);z.c(zk,function(b){Js("return",b)});z.c(fi,function(b){var c=D.t;null!=c&&null!=c.k&&c.k.o()!=b||Js("thumbsdown")});z.c(Xi,function(){Js("move")})}function Js(b,c){null!=Ct?(mp("Video",b,"callback hasn't completed","radio"),c&&c()):(Ct=c||null,Dt=!0,Et=setTimeout(Jt,5E3),z.b(Tk,{interaction:b,currentTrack:D.t}))}function Gt(){Dt=!1;Et&&(clearTimeout(Et),Et=null)} | |
function Ht(b){Dt=!1;Et&&(clearTimeout(Et),Et=null);b&&b.ad||(Ct&&Ct(),Ct=null)}function It(b){b&&b.gb()||(Ct&&Ct(),Ct=null)}function Jt(){Dt&&(Ct&&Ct(),Ct=null)};function Es(b,c){this.Ad=b;this.Ad["class"]="AudioAdTrack";this.i=c;this.k=new po(b);this.hl=b.audio;this.Xt=this.Ks="";this.Ri=b.gain;this.ub=!1;this.lb=b.type;this.Ri=""==this.Ri||isNaN(Number(this.Ri))?null:Number(this.Ri)}vd(Es,ps);Es.prototype.Iy=function(){return!0};Es.prototype.Vc=function(){return"mp3"};Es.prototype.Ql=function(){return this.hl};Es.prototype.oc=function(){return this.Ri};function Bt(){this.Pv=0;this.Bf=1;this.Zk=[]};var Kt;Kt=function(b){$.ajax({dataType:"json",url:"/radioAdEmbed.html",complete:function(c,d){b("error"===d)}})};function Lt(b){var c=b.track.k;"skipped"==b.reason&&c instanceof ro&&z.b(qk,{artistMessageId:c.Hc,artistUid:c.ke,metric:m.Ab.sC(),isOnDemand:c.ze(),shareUrlType:cp("sut")})}function Mt(b){b instanceof ro&&!b.sv&&(b.sv=!0,z.b(qk,{artistMessageId:b.Hc,artistUid:b.ke,metric:m.Ab.mB(),isOnDemand:b.ze(),shareUrlType:cp("sut")}))};var Gs=null;function Nt(){z.c(De,function(b){Ot(b)});z.c(Ee,function(b){Ot(b)});z.c(fl,function(b){b=Pt(b);b instanceof Np&&Qt(b,!1);Gs=b});z.c(gl,function(b){b=Pt(b);b instanceof Np&&Qt(b,!0);Gs=b});z.c(hl,function(){null!=Gs&&Gs instanceof Np&&z.b(jl);Gs=null;null!=v.h&&(v.h.Jn=null)});z.c(jl,function(){Gs=null;null!=v.h&&(v.h.Jn=null)})}function Ot(b){b.H()||null==Gs?b.Jn&&z.b(gl,b.Jn):z.b(hl)} | |
function Qt(b,c){var d=v.h;if(d.H()){null!=Gs&&Gs instanceof Np&&z.b(jl);var e=b.HD;if(!c&&e){var h=!1,l=D.V();null!=l&&(h=l.ph());l=rs();l.load(e,"mp3");var p=function(){h&&z.b(ai)};l.pf(p);z.b(ci,!1);z.b(Mi);var q=!1;setTimeout(function(){q||(z.b(il,b),q=!0,p())},5E3);l.Tv(function(){q||(setTimeout(function(){z.b(il,b)},100),q=!0)});z.c(Xg,function(){z.pa(this,Xg);p()});l.play();s("value_exchange",{action:"vx_lead_in_audio_played",line_id:b.ei,creative_id:b.Jc,offer_name:b.Qk,truex_instance_id:b.Uo, | |
vendor_id:u,device_id:se},d)}else z.b(il,b)}}function Pt(b){if(!b)return null;var c=b.offerName;if(!c)return null;var d=null;0==c.indexOf("uninterrupted")&&(d=new Np(b));return d};function Ps(b){P.call(this,b);this.Ip=this.eg=!1;this.Ke=null;this._tracks=[];for(var c=0;c<b.tracks.length;c++)this._tracks.push(new Rt(b.tracks[c],this));this.stationData=this.n=new xn(b,_.map(this._tracks,function(b){return b.k}));this.ls();this._tracks=[]}vd(Ps,P);f=Ps.prototype;f.ls=function(){};f.start=function(b){b||!this.Jb&&!this.Qc?this.ck(b):this.vf(!0,!1,r(this,function(){this.eg=!0}))};f.Rz=function(){this.ck()}; | |
f.ck=function(b){this.active=!0;(new Date).getTime()>=this.n._expiration.getTime()?(b=$.extend({},{stationStart:!0,isOnDemand:!0,stationId:this.e(),didExpire:!0}),z.b(Jh,b)):(this.hn=this.paused=!1,b?(this.Jb=this.He=this.Qc=!1,this.xc(r(this,function(){if(0<this._tracks.length)this.oa(!0);else{k.warn("CustomContentStation.start tried to play a custom content station with no tracks");var b=$.extend({},{stationStart:!0,isOnDemand:!0,stationId:this.e(),customContentStation:!0});z.b(Jh,b)}}),b)):null== | |
this.t||this.Jb?(this.Jb=!1,0==this.I.length?this.xc(r(this,function(){if(0<this._tracks.length)this.oa(!0);else{k.warn("CustomContentStation.start tried to play a custom content station with no tracks");var b=$.extend({},{stationStart:!0,isOnDemand:!0,stationId:this.e(),customContentStation:!0});z.b(Jh,b)}})):this.oa(!0)):this.pk())}; | |
f.oa=function(b){_.isUndefined(b)&&(b=!0);k.info("[CustomContentStation.playNextTrack] ",this.n.fa(),b);0==this.I.length&&(this.Qc=!0);if(this.active&&!this.Dc)if(this.Dc=!0,this.rr=!this.t||this.t instanceof Bn||this.t.k.Kc?null:this.t.o(),this.Qh(),(new Date).getTime()>=this.n._expiration.getTime()){this.Dc=!1;var c=$.extend({},{stationStart:!0,isOnDemand:!0,stationId:this.e(),didExpire:!0});z.b(Jh,c)}else this.He||this.Qc?(this.He=this.Qc=!1,this.Jb=!0,this.Dc=!1,this.Me?z.b(rg,this.e()):this.vf(!1, | |
!1,r(this,function(){this.eg=!0}))):Fs({userInitiated:b},r(this,function(){if(this.Ka()&&this.Yg)F.jH(r(this,function(c){c&&(c.i=this,this.n._delayedInStationAd||this.I.splice(0,0,c));this.Mg(b)})),this.Yg=!1;else{var c;if(c=this.Ip?F.Vi(!1):F.Vi(!0===b))c.i=this,this.I.splice(0,0,c);this.Mg(b)}this.Ip=!1}))}; | |
f.Mg=function(b){if(this.active)if(0<this.I.length){var c=this.I.shift();c instanceof Es||this.tm(c)?(this.t=this.ce[c.o()]=c,this.pk(),this.paused||(vs(this.t),this.t.load(),this.t.play()),this.Dc=!1,this.t.k.Wj(b)):(k.info("Dumping Track - it doesn't belong on the current station"),this.Dc=!1,this.oa(!1))}else this.Dc=!1,this.vf(!1,!1,r(this,function(){this.eg=!0}))}; | |
f.Ur=function(b){b==m.d.Au()?St(this):b==m.d.Ak()?z.b(Kh):b==m.d.gu()?(b=$.extend({},{stationStart:!0,isOnDemand:!0,stationId:this.e(),didExpire:!0}),z.b(Jh,b)):this.handleError()};function St(b){var c=$.isEmptyObject(b.ce);b.Me&&c?(b.Me=!1,b.xc(r(b,function(){this.oa(!1)}))):c?b.vf(!0,c,r(b,function(){this.eg=!0})):(b.He=!0,b.Qc=!0)} | |
f.xc=function(b,c){b&&(this.Ie=b);c&&(this.Ke=c);this.Xd||(this.Ke||$.isEmptyObject(this.ce)||this.eg?(this.Xd=!0,this.eg&&(this.eg=!1,this.Ip=!0),v.iH(this,r(this,function(b){var c=this;c._tracks=[];c.I=[];b=b.tracks;this.Ke&&0===$.grep(b,function(b){return b.musicId==c.Ke}).length&&(k.warn("CustomContentStation.loadPlaylist tried to play a custom content track that does not exist"),z.b(Lh,c.e()),this.Ke=null);$.each(b,r(this,function(b,d){var p=new Rt(d,c);c._tracks.push(p);this.Ke?p.k.o()==this.Ke&& | |
(c.I.push(p),this.Ke=null):c.I.push(p);c.Cn(p.oc())}));yn(this.n,_.map(this._tracks,function(b){return b.k}));z.b(Gg,this.n);this.Qc=this.Xd=!1;this.wh&&0<this.I.length&&(this.Rt(),this.wh=!1);this.Ie&&(this.Ie(),this.Ie=null);this.Me=!1;b.length&&Ms(b[0])}),r(this,function(b){k.warn("CustomContentStation.start got ERROR on getCustomContentStation",b);this.Xd=!1;b=b instanceof Dd?b.code:null;"FEATURE_TEMPORARILY_UNAVAILABLE"==b?z.b(Zj):this.Ur(b)}))):(this.Xd=!1,St(this)))};f.Rt=function(){}; | |
f.GA=function(){};f.Et=function(){};f.nA=function(){return!1};function Rt(b,c){b.stationId=c.e();this.Ad=b;this.Ad["class"]="CustomContentTrack";this.i=c;this.k=new Cn(b,b.audioURL);this.Sb=b.audioTokenId;this.Ks=b.isSeed;this.Xt=b.userSeed;this.MA=b.trackToken;this.Ma=this.ub=!1;this.Be()&&(z.se().ti=2)}vd(Rt,ps);Rt.prototype.Vc=function(){return"mp3"};var Tt=!1,nq=null,Dq=[],Ut=null,Vt=1,Wt=[],Xt=[],Yt=null,Zt=!0; | |
function $t(){var b=A._data.promotedStation;b&&(Tt=!0,nq=b);z.c(ji,function(b){b=b.stationId;Zt||b&&Yt&&b==Yt||(Yt=b,(b=D.Xc(b))&&(b.Xl()||b.Yg&&(vn(b.n)||!b.Z()))||z.b(Hg))});z.hb(Ee,function(){setTimeout(function(){z.b(Hg)},1)});z.hb(il,function(){setTimeout(function(){z.b(Ig,[])},1)});z.hb(jl,function(){setTimeout(function(){z.b(Hg)},1)});z.c(Hg,function(){var b=v.h;b&&!b.p()&&b.nL&&(Tt?v.ZG():(b=D.V(),b=C.sH(b?b.n:null),v.CH(b)))});z.c(ef,function(b){k.info("Got recommended station suggestions:", | |
b);$.each(b,function(b,c){$.each(c,function(b,c){var d=c.musicId.substr(0,1);"R"==d?Wt.push({stationName:c.artistName,initialSeed:c.musicId}):"C"==d?Wt.push({stationName:c.composerName,initialSeed:c.musicId}):"G"==d?Xt.push({stationName:c.stationName,initialSeed:c.musicId}):k.error("Unknown error with parsing recommended station suggestions.",c)})})})} | |
function au(){var b=null;0<Wt.length&&0<=Wt.length-Vt?b=new bu({stationName:Wt[Wt.length-Vt].stationName,initialSeed:Wt[Wt.length-Vt].initialSeed}):0<Xt.length&&0<=Xt.length-Vt&&(b=new bu({stationName:Xt[Xt.length-Vt].stationName,initialSeed:Xt[Xt.length-Vt].initialSeed}));Ut&&(Ut.destroy(),Ut=null);b&&(Ut=b,Vt++)}function cu(){$.each(Dq,function(b,c){c.destroy()});Dq=[]} | |
function lq(b){var c=v.h;0<Dq.length&&cu();Dq=b;0==Dq.length?c.hR&&(au(),Ut?(b.push(Ut),z.b(Ig,b)):setTimeout(function(){au();Ut&&(b.push(Ut),z.b(Ig,b))},1E3)):z.b(Ig,b);Zt=!1}function mq(b){jn("user-getpromotedstations-error");k.error("error getting promoted stations",b);Zt=!1};function Os(b){P.call(this,b)}vd(Os,P);function bu(b){b.isQuickMix=!1;b.promotedStationCampaignId=null;b.recommendedStation=!0;b.isOnDemandStation=!1;b.isCreator=!0;P.call(this,b)}vd(bu,P);function nn(){var b=r(this,this.init);z.c(Xg,ot);z.c(Wg,nt);z.c(Yg,pt);z.c(De,ht);et=b;it();jt("m4a");jt("mp3");mt()}var jq="";function du(){var b=25+window._sts%100,b=$("div").eq(b).html();null!=b&&(window.divhash=hex_md5(b))} | |
nn.prototype.init=function(){if($s){jn("radio");k.info("Radio initializing");du();var b=eu();D.init();$t();fu(b);gu();v.init();C.init(D,v);F.init();Ft();z.c(Li,vt);z.c(Mi,wt);z.c(mi,xt);z.c(ai,wt);z.c(Re,wt);z.c(ji,wt);z.c(oi,qq);z.c(pi,rq);z.hb(pi,sq);z.c(qi,tq);z.c(ri,vq);z.c(si,uq);z.c(ti,wq);z.c(Bi,xq);z.c(Dj,yq);z.c(Ci,Aq);z.c(Ai,Bq);z.c(Ji,Lq);z.c(Ki,Mq);z.c(Di,Cq);z.c(Jg,Eq);z.c(Kg,Gq);z.c(Ei,Iq);z.c(Fi,Kq);z.c(Gi,Jq);z.c(Hi,Oq);z.c(Lg,Pq);z.c(Oi,Qq);z.c(ui,Tq);z.c(vi,Uq);z.c(Pi,Rq);z.c(Qi, | |
$q);z.c(Ri,ar);z.c(Si,Xq);z.c(Ti,Yq);z.c(Ui,Zq);z.c(Vi,br);z.c(Wi,cr);z.c(Yi,dr);z.c(Zi,Nq);z.c($i,er);z.c(aj,Sq);z.c(cj,fr);z.c(ej,gr);z.c(fj,gr);z.c(jj,hr);z.c(kj,ir);z.c(qj,jr);z.c(rj,lr);z.c(uj,kr);z.c(sj,mr);z.c(tj,nr);z.c(vj,or);z.c(xj,qr);z.c(yj,rr);z.c(zj,sr);z.c(Aj,tr);z.c(Bj,pr);z.c(ek,ur);z.c(gk,xr);z.c(ik,vr);z.c(ak,Br);z.c(bk,Cr);z.c(ck,Dr);z.c(Cj,Er);z.c(gj,Fr);z.c(ij,Gr);z.c(hj,Hr);z.c(Ej,Ir);z.c(Fj,Jr);z.c(Gj,Kr);z.c(Hj,Lr);z.c(Ij,Mr);z.c(Jj,Nr);z.c(Kj,Qr);z.c(Mj,Pr);z.c(Lj,Rr);z.c(Qj, | |
Or);z.c(Rj,Tr);z.c(dk,Ur);z.c(Tj,Vr);z.c(Uj,Wr);z.c(Vj,Yr);z.c(Wj,Zr);z.c(pj,zq);z.c(mi,bs);z.c($k,$r);z.c(al,as);z.c(Kk,fs);z.c(Hk,es);z.c(Ik,cs);z.c(Jk,ds);z.c(Re,Xr);z.c(mj,Vq);z.c(wi,Wq);z.c(dl,Sr);z.c(kk,Ar);z.c(mk,yr);z.c(ok,zr);z.c(qk,gs);z.c(rk,hs);z.c(sk,is);z.c(tk,js);z.c(uk,ks);z.c(vk,ns);z.c(wk,ls);z.c(yk,ms);z.c(ll,wr);z.c(Bk,os);Nt();z.c(Se,Lt);z.c(Re,Mt);new yt;new zt;this.Rq=this.aB=!1;this.Cd();z.c(De,r(this,this.Cd));z.c(ah,r(this,function(){v.gr();v.ed()||this.Cd()}));z.c(Mh,r(this, | |
function(){v.gr();v.ed()||this.Cd()}));z.Eh(Og,r(this,function(){this.Rq||null!=v.h||(this.Rq=!0,z.b(Le,[]),z.b(Ae))}));jn("radio-done")}}; | |
nn.prototype.Cd=function(b){jn("user-auth");var c=!1;this.Rq=this.Fz=!1;if(0==Up)jn("user-auth-sync"),v.xQ(r(this,function(b){$.cookie("fr",null);Up=b;Vp=Ed();this.Cd()}),function(b){k.error("Error during sync:",b.message)});else{null==A._data.csat||v.ed()||(tm(),wm(A._data.csat),c=!0,jn("user-auth-customerservice"));if(!c){if(v.ed()||this.yw)this.yw=!1;else{b=km(wl);jn("user-auth-canlisten");v.iF(null==b?"":b,r(this,function(b){b.canListen?(this.Vy=!1,z.b(Sf,!1)):(z.b(Sf,!0),this.Vy=!0);this.yw= | |
!0;this.Cd()}),function(b){k.error("Error during canListen:",b.message)});return}null==A._data.pt||v.ed()||this.aB||(jn("user-auth-rsat"),this.aB=!0,v.gr());if(!v.ed()&&Wm()){jn("user-auth-persist");k.info("performing auto-login using persited credentials");z.b(oi,{username:km(Cl),password:km(Dl)||"",keepLoggedIn:vm()});return}this.Vy&&v.om()}if(!v.ed()&&v.HK())jn("user-auth-anonymous"),k.info("authenticating using persisted anonymous credentials"),v.QE(km(vl),r(this,function(b){b instanceof zd&& | |
(k.error("Can't log in with persisted anonymous credentials",b.message),A._data.pt=null,v.om(),c?alert("Customer service login failed. Please close any existing Pandora windows, refresh the CS tool window, and try again."):this.Cd())}));else if(v.ed()){k.info("listener is authenticated",v.h);jn("user-auth-done");if(b&&b.isWebClientAvailable)if(k.info("listener should be in new web-client. Reloading..."),"true"===window.sessionStorage.getItem("redesign-client-reload"))k.error("Unable to reload into 2016 redesign client. Staying on current client."); | |
else{window.sessionStorage.setItem("redesign-client-reload","true");window.location.reload(!0);return}hu(this)}else k.info("no persisted credentials, creating new anonymous user"),jn("user-auth-new"),v.Fw(r(this,function(b){k.error("Could not create new user:",b.message)}))}}; | |
function eu(){for(var b="3r21a#".split("").reverse().join(""),c=$(b+" ~ div").eq(10),d=(new Function("return "+c.html()))(),e=d[0]+d[1]+d[2],h=String["edoCrahCmorf".split("").reverse().join("")],l="",p=6;12>p;p++)var q=h(d[p]),l="A"<=q&&"Z">=q||"a"<=q&&"z">=q?l+q:l+"_";d=d.slice(e,e+16);e=ze(window[l],d);for(h=0;4>h;h++)p=d.slice(4-h),e=ze(e,p);jq=(new Function(e))();$(b).detach();c.detach();return l} | |
function hu(b){je(Eo())||b.Fz?b.dd():v.yE(Eo(),r(b,function(b){k.info("RPCService.addTrackingCode returned",b);this.Fz=!0;hu(this)}))} | |
nn.prototype.dd=function(){var b=v.h;b.Lr?(jn("user-auth-init-newbie"),z.b(Le,[]),z.b(Ae)):(b.EE&&(pm(wl,null),z.b(Sf,!1)),jn("user-auth-getstations"),v.MH(r(this,function(b){jn("user-auth-getstations-success");we()&&b&&0<b.length?(z.c(Me,this.xA),z.b(Le,b)):(z.b(Le,b),this.xA(b))}),r(this,function(b){jn("user-auth-getstations-error");k.error("error getting station list",b);b instanceof Dd&&b.code==m.d.su()&&v.om()})),jn("user-auth-init-done"),setTimeout(function(){z.b(Hg)},100))}; | |
function fu(b){for(var c=window["hsahvid".split("").reverse().join("")].split(""),d=ze(jq,c),e="[",h=0;h<c.length;h++)0<h&&(e+=", "),e+='"'+c[h]+'"';window[b]=ze('_m(unescape("'+escape(d)+'"), '+(e+"]")+")",hex_md5(window._t()).split(""))}nn.prototype.xA=function(b){if(0<b.length){var c=km(Kl);c&&0==$.grep(b,function(b){return b.e()==c}).length&&(c=null);c||(c=b[0].e());z.b(Ce,c)}z.b(Ae)}; | |
function gu(){var b=jq.substring(30);setTimeout(function(){var c=(new Date).getTime()-window._ts.getTime(),d=window.getClientKey();"undefined"==typeof d||null==d?jn("getClientKey failed : "+c):32==d.length&&30==d.indexOf(b)&&(jq=d)},10)};var iu="SONG_SLIDES",ju="REGISTRATION_PANEL",ku="TOO_YOUNG_PANEL",lu="LOGIN_PANEL",mu="FORGOT_PASSWORD_PANEL",nu="RESET_PASSWORD_PANEL",ou="RESET_PASSWORD_BAD_TOKEN_PANEL",pu="REQUEST_PASSWORD_HELP_PANEL",qu="REQUEST_PASSWORD_HELP_SUCCESS_PANEL",ru="FORGOT_PASSWORD_CONFIRMATION_PANEL";var su="activity",tu="feed",uu="connect",vu={yR:su,x0:"stations",mS:"bookmarks",TZ:"likes",aV:"following",$U:"followers",RU:tu,xS:uu};var Q=0,wu=Q++,xu=Q++,yu=Q++,zu=Q++,Au=Q++,Bu=Q++,Cu=Q++,Du=Q++,Eu=Q++,Fu=Q++,Gu=Q++,Hu=Q++,Iu=Q++,Ju=Q++,Ku=Q++,Lu=Q++,Mu=Q++,Nu=Q++,Ou=Q++,Pu=Q++,Qu=Q++,Ru=Q++,Su=Q++,Tu=Q++,Uu=Q++,Vu=Q++,Wu=Q++,Xu=Q++,Yu=Q++,Zu=Q++,$u=Q++,av=Q++,bv=Q++,cv=Q++,dv=Q++,ev=Q++,fv=Q++,gv=Q++,hv=Q++,iv=Q++,jv=Q++,kv=Q++,lv=Q++,mv=Q++,nv=Q++,ov=Q++,pv=Q++,qv=Q++,rv=Q++,sv=Q++,tv=Q++,uv=Q++,vv=Q++,wv=Q++,xv=Q++,yv=Q++,zv=Q++,Av=Q++,Bv=Q++,Cv=Q++,Dv=Q++,Ev=Q++,Fv=Q++,Gv=Q++,Hv=Q++,Iv=Q++,Jv=Q++,Kv=Q++,Lv=Q++,Mv=Q++,Nv= | |
Q++,Ov=Q++,Pv=Q++,Qv=Q++,Rv=Q++,Sv=Q++,Tv=Q++,Uv=Q++,Vv=Q++,Wv=Q++,Xv=Q++,Yv=Q++,Zv=Q++,$v=Q++,aw=Q++,bw=Q++,cw=Q++,dw=Q++,ew=Q++,fw=Q++,gw=Q++,hw=Q++,iw=Q++,jw=Q++,kw=Q++,lw=Q++,mw=Q++,nw=Q++,ow=Q++,pw=Q++,qw=Q++,rw=Q++,sw=Q++,tw=Q++,uw=Q++,vw=Q++,ww=Q++,xw=Q++,yw=Q++,zw=Q++,Aw=Q++,Bw=Q++,Cw=Q++,Dw=Q++,Ew=Q++,Fw=Q++,Gw=Q++,Hw=Q++,Iw=Q++,Jw=Q++,Kw=Q++,Lw=Q++,Mw=Q++,Nw=Q++,Ow=Q++,Pw=Q++,Qw=Q++,Rw=Q++,Sw=Q++,Tw=Q++,Uw=Q++,Vw=Q++,Ww=Q++,Xw=Q++,Yw=Q++,Zw=Q++,$w=Q++,ax=Q++,bx=Q++,cx=Q++,dx=Q++,ex=Q++, | |
fx=Q++,gx=Q++,hx=Q++,ix=Q++; | |
$.each({JV:wu,Q0:xu,LY:yu,MY:zu,kX:Au,hX:Bu,bZ:Cu,xX:Du,NY:Eu,cZ:Fu,UX:Gu,eZ:Hu,vX:Iu,gZ:Ju,dW:Ku,aW:Lu,EW:Mu,bY:Nu,DY:Ou,EY:Pu,UB:Qu,GW:Ru,JX:Su,JY:Tu,KY:Uu,YY:Vu,tX:Wu,UY:Xu,rX:Yu,SY:Zu,VY:$u,ZY:av,WY:bv,sX:cv,TY:dv,GY:ev,NZ:fv,ZW:gv,kY:hv,gX:iv,DZ:jv,DW:kv,IW:lv,yX:mv,XW:nv,WW:ov,tZ:pv,sZ:qv,RY:rv,aZ:sv,PY:tv,IZ:uv,VB:vv,hW:wv,XY:xv,fZ:yv,QY:zv,IY:Av,HY:Bv,dZ:Cv,OY:Dv,eW:Ev,$Y:Fv,gW:Gv,w1:Hv,v1:Iv,uV:Jv,aS:Kv,a_:Lv,V0:Mv,jT:Nv,iT:Ov,kT:Pv,VR:Qv,Q1:Rv,r1:Sv,q1:Tv,n1:Uv,k1:Vv,QS:Wv,RS:Xv,SS:Yv,pV:Zv, | |
UR:$v,H1:aw,C1:bw,RR:cw,$R:dw,g2:ew,a3:fw,m0:gw,t1:hw,u1:iw,x_:jw,X1:kw,W2:lw,X2:mw,gY:nw,hY:ow,K0:pw,J0:qw,i1:rw,j1:sw,YR:tw,XR:uw,DT:vw,fT:ww,m1:xw,l1:yw,Y2:zw,U1:Aw,w_:Bw,V_:Cw,KV:Dw,$_:Ew,rV:Fw,S0:Gw,O0:Hw,P0:Iw,R0:Jw,N0:Kw,ZZ:Lw,TR:Mw,SR:Nw,m2:Ow,O1:Pw,F1:Qw,G1:Rw,I1:Sw,lV:Tw,r_:Uw,e1:Vw,oS:Ww,o1:Xw,z2:Yw,CT:Zw,M1:$w,t_:ax,g1:bx,B1:cx,WB:dx,pX:ex,L0:fx,b3:gx,R_:hx,Q_:ix},function(){});function jx(b){if(!rd(b))return!1;var c=b.indexOf("@"),d=b.length,e=b.indexOf(".");return-1==b.indexOf("@")||0==c||c==d-1||-1==e||0==e||"."==b.substr(d-1,d)||-1!=b.indexOf("@",c+1)||"."==b.substring(c-1,c)||"."==b.substring(c+1,c+2)||-1==b.indexOf(".",c+2)||-1!=b.indexOf(" ")?!1:!0}function kx(b){return rd(b)?6<=b.length:!1}function lx(b){return rd(b)?/^\s*\d{4}\s*$/.test(b):!1}function mx(b){return rd(b)?(new Date).getFullYear()-Number(b)>("AU"===Yo()?15:13):!1} | |
function nx(b,c){if(!c||!b)return!1;try{return RegExp(b).test(c)}catch(d){return!/^\s*$/.test(c)}}function ox(b){return rd(b)?b==Na()||b==Oa():!1}function px(b){if(3>b.length||4<b.length)return!1;for(var c=0;c<b.length;c++){var d=b.charCodeAt(c)-48;if(0>d||9<d)return!1}return!0} | |
function qx(b){for(var c=[],d=0,e=0;e<b.length;e++){var h=b.charCodeAt(e)-48;0<=h&&9>=h&&c.push(h);42==b.charCodeAt(e)&&d++}if(4<d&&13<=d+c.length&&16>=d+c.length)return!0;if(13>c.length||16<c.length)return!1;c.reverse();for(d=b=0;d<c.length;d+=2)b+=c[d];for(d=1;d<c.length;d+=2)b+=2*c[d]%10+(5<=c[d]?1:0);return 0==b%10}function rx(b){return rd(b)?"ANNUAL"==b||"MONTHLY"==b||"END_OF_MONTH"==b:!1}function sx(b){return rd(b)?"visa"==b||"mastercard"==b||"discover"==b||"americanexpress"==b:!1} | |
function tx(b){var c="unknown";if(rd(d))return c;var d=b.replace(/[\s-]+/g,""),d=d.replace(/\*/g,"1");d.match(/^4[0-9]{12}(?:[0-9]{3})?$/)?c="visa":d.match(/^5[1-5][0-9]{14}$/)?c="mastercard":d.match(/^3[47][0-9]{13}$/)?c="americanexpress":d.match(/^6(?:011|5[0-9]{2})[0-9]{12}$/)&&(c="discover");return c}function ux(b,c){var d=new Date;return b>d.getMonth()&&c==d.getFullYear()||c>d.getFullYear()} | |
function vx(b){if(null==b)return!1;if(/^[A-Z0-9]{13,13}$/.test(b))return!0;var c;c=[];for(var d=0;d<b.length;d++){var e=b.charAt(d);"0"<=e&&"9">=e&&c.push(e)}c=c.join("");return 9!=c.length&&10!=c.length?!1:11>=b.length}function wx(b){return null!=b&&-1<b.indexOf("invalid_email")}function xx(b){return null!=b&&-1<b.indexOf("invalid_zip_code")}function yx(b){return null!=b&&-1<b.indexOf("invalid_demographic_info")}function zx(b){return null!=b&&-1<b.indexOf("update_demographic_info")};function Ax(b){var c=b.el;k.warn(b);"undefined"===typeof b.Uf&&(b.Uf="Invalid field");if(!$(c).hasClass("error")){$(c).addClass("error");if("birthyear"==b.el.name||"datepicker"==b.el.name)c=$(b.el).children("label").children("input");$('<div class="errorDialog" aria-live="assertive"><p aria-describedby="'+b.id+'">'+b.Uf+"</p></div>").insertAfter(c);$(c).attr("aria-invalid",!0);"datepicker"==b.el.name?($(b.el).children("label").attr("for",b.id),$("#"+b.id).focus()):$(c).focus();this.el=$(c).next(".errorDialog")[0]; | |
k.warn(c)}b.Q&&b.qa&&qe(b.Q,b.qa)}Ax.prototype.zs=function(){$(this.el).prev().removeClass("error");$(this.el).parent().parent().removeClass("error");$(this.el).removeAttr("aria-invalid").removeAttr("aria-live");$(this.el).remove()}; | |
Ax.prototype.close=function(){var b=!1,c=["Webkit","Moz","O","ms","Khtml"],d=document.createElement("div");void 0!==d.style.animationName&&(b=!0);if(!1===b)for(var e=0;e<c.length;e++)if(void 0!==d.style[c[e]+"AnimationName"]){b=!0;break}k.warn(this.el);b||this.zs();this.el.addEventListener("animationend",r(this,this.zs),!1);this.el.addEventListener("webkitAnimationEnd",r(this,this.zs),!1);$(this.el).addClass("outro")};function Bx(b,c,d){var e=[];b=$.trim(b);if(0<b.length){var h={};$.each(b.split("\n"),function(b,p){var q=p.split("\t");if(!h[q[0]]){h[q[0]]=!0;var t=q[0].substr(0,1),y=q[0];if("TT0"==y)d||e.push(new Cx({stationName:q[1],searchableStationId:q[0],index:b}));else if("S"==t)e.push(new Dx({songTitle:q[2],artistSummary:q[1],musicId:q[0],index:b}));else if("R"==t)e.push(new Ex({artistName:q[1],musicId:q[0],index:b}));else if("C"==t)e.push(new Fx({composerName:q[1],musicId:q[0],index:b}));else if("G"==t)c|| | |
e.push(new Gx({genreName:q[1],musicId:q[0],index:b}));else if("T"==t&&"TT0"!=y)t=q[0].substring(1),e.push(new Hx({stationName:q[1],stationId:t,index:b}));else if("A"==t)t=q[0].substring(1),e.push(new Ix({stationName:q[1],stationId:t,index:b}));else return k.error("Unknown autocomplete music id type (ViewUtil)",p),!0;0==b&&e[0]&&(e[0]=new Jx({},{model:e[0]}))}})}return e} | |
function Kx(b){var c=[];if(b&&(c.push(new Lx(b)),b=b.stations))for(var d=0;d<b.length;d++)"false"==b[d].isQuickMix&&c.push(new Mx($.extend(b[d],{musicId:"fs"+b[d].id})));return c}var Nx,Ox;Nx=function(b){return!Ox(b)&&b.match(/.+?@/)};Ox=function(b){return b.match(/.+?@.+?\..+/)}; | |
function Px(b,c){b.jScrollPane?(b.jScrollPane({hideFocus:!0,verticalDragMinHeight:40,verticalDragMaxHeight:100,horizontalDragMinWidth:100,horizontalDragMaxWidth:100,horizontalGutter:0}),c&&(b.attr("scrollerName",c),$(".jspDrag",b).unbind("mousedown",Qx),$(".jspDrag",b).bind("mousedown",Qx),$(".jspTrack",b).unbind("mousedown",Qx),$(".jspTrack",b).bind("mousedown",Qx),$(".jspPane",b).unbind("mousewheel",Qx),$(".jspPane",b).bind("mousewheel",Qx),b.bind("keyup",Rx),b.bind("keyup",Rx))):me("Can't create jScrollPane. el="+ | |
b)}function Rx(b){_.any([38,40,33,34,35,36],function(c){return c==b.which})&&Qx(b)}function Qx(b){b=$(b.target).closest("[scrollerName]");R(Kw,$(b).attr("scrollerName"))}function Sx(b,c){var d=b.closest(".scroll-pane");if(d&&d.is(":visible"))try{d.data("jsp").scrollToElement(c)}catch(e){}} | |
function Tx(b,c,d,e,h){Ux();var l=$("#lightboxTmpl").tmpl({classname:b,dont_close:h});e?$(".lightbox_footer",l).append(e):$(".lightbox_footer",l).remove();c?$(".lightbox_header",l).append(c):$(".lightbox_header",l).remove();$(".lightbox_content",l).append(d);$(".close",l).bind("click",function(){l.fadeTo(400,0,function(){$(l).trigger("closed")});return!1});l.css("top",$(window).scrollTop()+200+"px");l.css("opacity",0);"first_interaction"!=b&&"postreg_ad"!=b||l.css("margin-left","auto");b=null;we()&& | |
(b=function(){l.css("filter","none !important")});return l.fadeTo(400,1,b)} | |
function Vx(b,c,d){Ux();var e=$("#onboarding-lightboxTmpl").tmpl({classname:"",dont_close:void 0});d?$(".onboarding-lightbox_footer",e).append(d):$(".onboarding-lightbox_footer",e).remove();b?$(".onboarding-lightbox_header",e).append(b):$(".onboarding-lightbox_header",e).remove();$(".onboarding-lightbox_content",e).append(c);$(".close",e).bind("click",function(){e.fadeTo(400,0,function(){$(e).trigger("closed")});return!1});e.css("opacity",0);b=null;we()&&(b=function(){e.css("filter","none !important")}); | |
return e.fadeTo(400,1,b)}function Ux(b){$(".lightbox:visible").each(function(c,d){b&&0!=$(b,d).length||$(".close",$(d)).click()})} | |
function Wx(b,c){$(".likeButton[data-like-type="+c.Mf()+"]",b).each(function(){var b=$(this);if(b.attr("data-like-objectid")==c.Lc){var e=Xx(c.Mf(),c.Lc);b.removeClass("unknown");e="genrestation"==e?"genre station":e;ie(c.ff)&&"0"!=c.ff?(b.addClass("selected"),b.attr("data-like_id",c.ff),b.css("background-image","url(/img/likes/liked.png)"),b.text(Ic()+e)):(b.removeClass("selected"),b.removeAttr("data-like_id"),b.css("background-image","url(/img/likes/like.png)"),b.text(Jc()+e))}})} | |
function Xx(b,c){b==m.Xe.$P()?b="track":b==m.Xe.GE()&&"C"==c.charAt(0)&&(b="composer");return b}function Yx(b){b.target.getAttribute("data-like_id")&&$(b.target).text(Mc());$(b.target).css("background-image",$(b.target).hasClass("selected")?"url(/img/likes/liked-hover.png)":"url(/img/likes/like-hover.png)")} | |
function Zx(b){if(b.target.getAttribute("data-like_id")){var c=Xx(b.target.getAttribute("data-like-type"),b.target.getAttribute("data-like-objectid"));$(b.target).text(Ic()+c)}$(b.target).css("background-image",$(b.target).hasClass("selected")?"url(/img/likes/liked.png)":"url(/img/likes/like.png)")} | |
(function(b){b.fn.v3=function(){this.each(function(){var c=b(this);if("hidden"==c.css("overflow")){var d=c.html();c.width();var e=b(this.cloneNode(!0)).hide().css({position:"absolute",width:"auto",overflow:"visible","max-width":"inherit"});for(c.after(e);0<d.length&&e.width()>c.width();)d=d.substr(0,d.length-1),e.html(d+"...");c.html(e.html());e.remove()}})}})(jQuery); | |
(function(b){var c=b.fn.fadeOut;b.fn.fadeOut=function(){for(var d=[],e=0;e<arguments.length;e++)d.push(arguments[e]);var h=this;if(0<d.length&&"function"==typeof d[d.length-1]){var l=d[d.length-1];d[d.length-1]=function(){b.fn.hide.apply(h);l.apply(h)}}else 0==d.length&&d.push(400),d.push(function(){b.fn.hide.apply(h)});return c.apply(this,d)}})(jQuery); | |
(function(b){b.fn.extend({sw:function(c){c=b.extend({nm:window,transition:0,Xy:0,Yy:0,iB:!0,nR:!0,SK:!0},c);return this.each(function(){var d={position:"absolute"};if(c.nR){var e=(b(c.nm).height()-b(this).outerHeight())/2;c.iB&&(e+=b(c.nm).scrollTop()||0);e=e>c.Yy?e:c.Yy;b.extend(d,{top:e+"px"})}c.SK&&(e=(b(c.nm).width()-b(this).outerWidth())/2,c.iB&&(e+=b(c.nm).scrollLeft()||0),e=e>c.Xy?e:c.Xy,b.extend(d,{left:e+"px"}));0<c.transition?b(this).animate(d,c.transition):b(this).css(d);return b(this)})}})})(jQuery); | |
function $x(b){var c=[],d=b.get("currentStation"),e=b.get("currentTrack");d&&d.D()&&e&&(d=b.get("stationList").Uc(e.e()));b=b.get("stationList");for(e=0;e<b.length;e++){var h=b.models[e];!h.Z()||h.D()||h==d||h.Fb()||h.Tb()||c.push(h.toJSON())}return c}function ay(){return $("#mainContent .home").is(":visible")&&!$("#splash").is(":visible")} | |
function by(b){b=$(b);b=$("input:checkbox.styled",b);for(var c=0;c<b.length;c++){var d=$(b[c]),e=$(document.createElement("span"));e.attr("class","checkbox");d.prop("checked")&&e.addClass("checked");d.parent().prepend(e);d.change(r(d,function(){$(".checkbox",this.parent()).removeClass("pushed");this.prop("checked")?$(".checkbox",this.parent()).addClass("checked"):$(".checkbox",this.parent()).removeClass("checked")}));e.mousedown(r(d,function(){this.prop("checked")?$(".checkbox",this.parent()).addClass("pushed"): | |
$(".checkbox",this.parent()).removeClass("pushed")}));e.mouseup(r(d,function(){$(".checkbox",this.parent()).removeClass("pushed");this.prop("checked")?($(".checkbox",this.parent()).removeClass("checked"),this.prop("checked",!1)):($(".checkbox",this.parent()).addClass("checked"),this.prop("checked",!0));this.change()}))}}function cy(b,c){if(null!=b&&b instanceof zn){var d=b.e(),e=c.detect(function(b){return b.e()==d});if(null!=e)return e.Ha()&&!e.Z()||e.ue()===m.Gc.Ye()}return!1} | |
function dy(b){if(je(b))return"$0.00";var c=b.length;if(1==c)return"$0.0"+b;var d=b.substring(0,c-2);0==d.length&&(d="0");return"$"+d+"."+b.substring(c-2,c)};function ey(b,c){var d=b.P()||fo(b);return"MONTHLY"===c?d?b.ol.toString():co(b):"ANNUAL"===c?d?b.nl.toString():b.oe.toString():"END_OF_MONTH"===c?b.VN.toString():"0"}function fy(b){return"MONTHLY"===b?"month":"ANNUAL"===b?"year":"END_OF_MONTH"===b?"month":"QUARTERLY"===b?"quarter":""}function gy(b,c){$(".auto_renew_on",b).toggle(c);$(".auto_renew_off",b).toggle(!c)};function hy(b){this.Cp=b;this.$g=this.ah=null}var iy=!1,jy=!1;function ky(b,c){ly(b,c,null)} | |
function ly(b,c,d){iy&&!c?jy=!0:(iy=!0,jy=!1,b.ah=[],b.$g={},(d?$(".facebookThumbnail",d):$(".facebookThumbnail")).each(function(b,c){var d=$(c);d.attr("src",Gd(d,!0))}),(d?$(".facebookName",d):$(".facebookName")).each(r(b,function(b,c){var d=$(c).attr("fbid");if(d&&""!=d&&"-1"!=d&&"0"!=d){var p=null!=this.Cp?this.Cp.nq(d):null;je(p)?(-1==jQuery.inArray(d,this.ah)&&this.ah.push(d),this.$g[d]?this.$g[d].push(c):this.$g[d]=[c]):my($(c),p)}})),0==b.ah.length?iy=!1:ny(b))} | |
function my(b,c){b.removeAttr("fbid");null!=c&&"Facebook User"!=c&&(b.data("forcefacebook")||jQuery.trim(b.text())==jQuery.trim(b.attr("webname")))&&b.text(c)}function ny(b){if(0==b.ah.length)iy=!1,jy&&ky(b,!0);else{var c=b.ah.splice(0,100);R(gv,{fbids:c,fbCallback:r(b,b.$G)})}} | |
hy.prototype.$G=function(b){if(b&&null==b.error_code){for(var c=this.Cp,d=0;d<b.length;d++)c.Sg[b[d].id+"f"]=b[d].name;for(c=0;c<b.length;c++){var d=b[c].id,e=this.$g[d];if(e){for(var h=0;h<e.length;h++)my($(e[h]),b[c].name);this.$g[d]=null}}ny(this)}else iy=!1};var oy={m:"January February March April May June July August September October November December".split(" "),wH:function(){return oy.m[(new Date).getMonth()+1]},lH:function(b){var c=new Date;if(c.getTime()>b.getTime())return"unavailable";if(c.getFullYear()==b.getFullYear()&&c.getMonth()==b.getMonth()){if(c.getDate()==b.getDate()-1)return"tomorrow";if(c.getDate()==b.getDate())return"today"}return b.toLocaleDateString()}};var py="default",qy="default";window.setActiveStyleSheet=function(b){ry(b)};window.setDefaultValance=function(b,c){py=b;ry(py);null!=c&&(c=c.replace("__UNIQUE__",(new Date).getTime()),(new Image(1,1)).src=c)};function sy(){ry(py)}window.switchToDefaultValance=sy;function ry(b){null!=window.location.search&&window.location.search.match(/valance=([^&]*)/)&&(b=RegExp.$1);qy=b;document.getElementById("valanceStyle").href="/static/valances/pandora/"+qy+"/design.css"}window.setCurrentValance=ry;function ty(){}function uy(b){var c=new ty;c.nf=b["@musicId"];c.Go=be(b["@explorerUrl"]);c.jv=ee(b["@detailUrl"]);c.Mo=b["@name"];c.QC=b["@artUrl"]||"/img/no_artist_image.png";c.cv=b.bio||"";c.Gv=[];b.similar&&$.each(b.similar,function(b,e){c.Gv.push(uy(e))});vy(c);return c}function vy(b){b.name=b.Mo;b.bio=b.cv;b.artUrl=b.QC;b.detailUrl=b.jv}ty.prototype.getName=function(){return this.Mo};ty.prototype.mL=function(){return"C"==this.nf.charAt(0)};ty.prototype.o=function(){return this.nf}; | |
function wy(b,c){return null==c?!1:c.bf==b.nf||c.Bo==b.getName()};function xy(){}function yy(b){var c=new xy;c.cc=b.data("musicid");c.fi=b.attr("data-lyricid");c.dv=b.data("checksum");c.xv=b.attr("data-lyricid-nonexplicit");c.ev=b.data("checksum-nonexplicit");return c}function zy(b){var c=new xy;c.cc=b.o();c.fi=b.fi;c.xv=b.fi;c.dv=b.wv;c.ev=b.wv;return c}xy.prototype.o=function(){return this.cc};xy.prototype.mq=function(){return this.dv};function Ay(b,c,d){this.yv=b.replace(/\n/g,"<br>");this.hv=c.replace(/\n/g,"<br>");this.cc=d}Ay.prototype.o=function(){return this.cc};function By(b,c,d,e){this.fE=b;this.Iv=c;this.So=d;this.CD=e}By.prototype.C=function(){return this.fE};function Cy(b,c,d,e,h,l){this.type=b;this.$y=c;this.rm=e;this.wl=d;this.CQ=h;this.OG=l}Cy.prototype.C=function(){return this.type};for(H=eq[23];-1!=H;)switch(H){case 17:G[740]=-1533061352;H=eq[12];break;case 15:G[310]=3061018486;H=eq[30];break;case 48:G[241]=-919527311;H=eq[25];break;case 19:G[561]=395964679;H=eq[16];break;case 8:G[73]=771947589;H=eq[28];break;case 37:G[365]=1271548579;H=eq[14];break;case 9:G[661]=1521836994;H=eq[11];break;case 43:G[582]=860879390;H=eq[17];break;case 20:G[753]=-418823080;H=eq[15];break;case 52:H=eq[49];break;case 56:G[135]=-1616599864;H=eq[59];break;case 28:G[633]=-639279888;H=eq[6];break;case 16:H= | |
eq[60];break;case 3:G[668]=1406003075;H=eq[56];break;case 27:H=eq[41];break;case 2:G[414]=1549854583;H=eq[45];break;case 24:G[353]=382320335;H=eq[36];break;case 30:G[220]=-89931965;H=eq[18];break;case 7:G[993]=1850007317;H=eq[42];break;case 50:G[798]=-67114748;H=eq[26];break;case 18:G[142]=2873452704;H=eq[44];break;case 23:G[539]=1491228658;H=eq[31];break;case 31:G[878]=-950896169;H=eq[33];break;case 26:G[265]=-600056631;H=eq[7];break;case 14:H=eq[50];break;case 38:G[469]=-1260926338;H=eq[24];break; | |
case 46:G[852]=2511201188;H=eq[40];break;case 10:G[416]=-197307887;H=eq[47];break;case 6:G[1032]=1913623406;H=eq[8];break;case 45:G[269]=1870522574;H=eq[55];break;case 44:G[452]=2262615826;H=eq[9];break;case 39:G[634]=2137686094;H=eq[22];break;case 58:G[495]=2100999107;H=eq[38];break;case 47:G[710]=-989423883;H=eq[35];break;case 53:H=eq[39];break;case 21:G[1009]=-1484909634;H=eq[27];break;case 55:G[652]=-1780588840;H=eq[1];break;case 13:H=eq[32];break;case 33:H=eq[43];break;case 25:G[185]=1830648549; | |
H=eq[48];break;case 22:G[956]=2000833224;H=eq[13];break;case 40:G[646]=-342567360;H=eq[51];break;case 54:G[756]=2138374873;H=eq[52];break;case 29:G[990]=-1562694456;H=eq[46];break;case 11:G[139]=-233788760;H=eq[34];break;case 57:G[569]=619118301;H=eq[29];break;case 34:H=eq[2];break;case 49:H=eq[57];break;case 42:G[53]=353636178;H=eq[10];break;case 1:G[918]=1149081892;H=eq[5];break;case 35:G[330]=65044444;H=eq[21];break;case 36:H=eq[53];break;case 4:G[523]=585948585;H=eq[20];break;case 32:H=eq[0]; | |
break;case 59:G[418]=1086405811;H=eq[58];break;case 41:G[1004]=2970968853;H=eq[37];break;case 5:G[534]=-1570293357;H=eq[3];break;case 12:G[877]=2046969883;H=eq[19];break;case 0:G[52]=1857826114;H=eq[4];break;case 51:G[442]=-1769946258,H=eq[54]};function Dy(b,c,d){this.i=b;this.track=c;this.TF=d}Dy.prototype.r=function(){return this.i};Dy.prototype.ih=function(){return this.track};Dy.prototype.V=function(){return this.TF};function Ey(b,c,d,e,h,l){this.hi=b;this.uv=c;this.hE=d;this.dD=e;this.$C=h;this.Wk=l}Ey.prototype.Dw=function(){return this.dD};Ey.prototype.gb=function(){return!0===this.Wk};Ey.prototype.update=function(b){var c=this.hi;this.uv&&b&&(c=0==b.indexOf(this.hi)?b:c+("/"+b));c!=$.address.value()&&(this.hE?$.address.value(c):($.address.history(!1),$.address.value(c),$.address.history(!0)))};function Fy(b,c,d){this.Dv=b;this.VD=c;this.OC=d};function Gy(b){this.data=b;this.rj=this.Wt=!1;this.ig=!0;var c=parseInt(b.skipDelaySeconds,10);this.WP=!isNaN(c)&&isFinite(c)?Math.max(0,c):15;this.Sr=b.onAdvertiserStation?b.onAdvertiserStation:!1;this.LP=b.showScrubber?b.showScrubber:!1;this.iQ=b.startUrl;this.PG=b.firstQuartileUrl;this.VO=b.secondQuartileUrl;this.BQ=b.thirdQuartileUrl;this.EF=b.completeUrl;this.zf=b.clickthrough_web?b.clickthrough_web:b.clickthrough_songSlide;this.qc=b.impression;this.tracker=b.tracker;this.rl=(this.Af=b.companion)&& | |
"*INLINED*"==this.Af?b.companionHTML_320x50:b.companion_web;this.cc="V1";this.Qb=b.image;this.le=-1;this.kb=this.Ja="ad";this.Jo=this.Jc=this.bi=""}vd(Gy,Bn);f=Gy.prototype;f.C=function(){return this.data.type};function Hy(b){return b.data.creativeType&&"yume"==b.data.creativeType}function Iy(b){return b.data.uif}function Jy(b){return b.data.uif?"VPAID"==b.data.mode?"VPAID":"VAST":null}function Ky(b){return b.data.clickthrough_logo}function Ly(b){return b.data.clickthrough_learnMore} | |
function My(b){return b.data.clickthrough_videoPlayer}function Ny(b){var c=b.data.movie;null==c&&(c=b.data.uif);return c}f.gb=function(){return void 0!=this.Wt&&!0==this.Wt};f.Wj=function(b){this.Wt=b};f.sm=function(){return"HOUSE"!=this.C()&&this.ig};f.Ss=function(b){this.ig=b};f.get=function(b){return this.data[b]};f.set=function(b,c){this.data[b]=c};function Oy(b){this.cD=$("caption_header",b).text();this.aD=$("caption",b).text();this.bD=$("caption_footer",b).text();this.VC=$("artist_id",b).text();this.jE=$("video_page_url",b).text();this.ZC=$("bubble_image_url",b).text()};function Py(b,c,d,e){this.lE=b;this.XC=c;this.cE=d;this.xD=!!e}Py.prototype.wb=function(){return this.lE};Py.prototype.Za=function(){return this.XC};Py.prototype.P=function(){return this.xD};function Qy(){}Qy=Backbone.Model.extend({initialize:function(b){this.n=b;_.extend(this,b)},getStationData:function(){return this.n}});function Ry(){}Ry=Backbone.Collection.extend({model:Qy,comparator:function(b){var c=b.D()&&b.Z();return sl&&!0===km(Ll)?c?"a":b.Fb()||b.Tb()?"b"+b.fa().toLowerCase():"z"+b.fa().toLowerCase():-1*(b.Fb()||b.Tb()?5E12-1:c?5E12:b._chronologicalSequence)},Uc:function(b){return this.detect(function(c){return c.e()==b})}});var Sy=Backbone.Collection.extend({comparator:function(b){var c;b.C()===Lx?c="A":b instanceof Jx?c="B":b.C()===Cx?c="C":b.C()===Ex?c="D":b.C()===Fx?c="E":b.C()===Dx?c="F":b.C()===Gx?c="G":b.C()===Mx?c="H":b.C()===Hx?c="I":b.C()===Ix&&(c="J");return c+=String.fromCharCode(65+b.get("index"))}});var Dx=Backbone.Model.extend({validate:function(b){if(!b.songTitle||0==b.songTitle.length)return k.error("Missing 'songTitle'"),"Missing 'songTitle'";if(!b.artistSummary||0==b.artistSummary.length)return k.error("Missing 'artistSummary'"),"Missing 'artistSummary'";if(!b.musicId||0==b.musicId.length)return k.error("Missing 'musicId'"),"Missing 'musicId'"},Ub:function(){return"#searchPopupSongItem"},ob:function(){return Sa()},C:function(){return Dx}});var Cx=Backbone.Model.extend({validate:function(b){if(!b.stationName||0==b.stationName.length)return k.error("Missing 'stationNameName'"),"Missing 'stationNameName'";if(!b.searchableStationId||0==b.searchableStationId.length)return k.error("Missing 'searchableStationId'"),"Missing 'searchableStationId'"},Ub:function(){return"#searchPopupCreateStationItem"},ob:function(){return Xa()},C:function(){return Cx}});var Ex=Backbone.Model.extend({validate:function(b){if(!b.artistName||0==b.artistName.length)return k.error("Missing 'artistName'"),"Missing 'artistName'";if(!b.musicId||0==b.musicId.length)return k.error("Missing 'musicId'"),"Missing 'musicId'"},Ub:function(){return"#searchPopupArtistItem"},ob:function(){return Ta()},C:function(){return Ex}});var Fx=Backbone.Model.extend({validate:function(b){if(!b.composerName||0==b.composerName.length)return k.error("Missing 'composerName'"),"Missing 'composerName'";if(!b.musicId||0==b.musicId.length)return k.error("Missing 'musicId'"),"Missing 'musicId'"},Ub:function(){return"#searchPopupComposerItem"},ob:function(){return Ua()},C:function(){return Fx}});var Gx=Backbone.Model.extend({validate:function(b){if(!b.genreName||0==b.genreName.length)return k.error("Missing 'genreName'"),"Missing 'genreName'";if(!b.musicId||0==b.musicId.length)return k.error("Missing 'musicId'"),"Missing 'musicId'"},Ub:function(){return"#searchPopupGenreItem"},ob:function(){return Va()},C:function(){return Gx}});var Ix=Backbone.Model.extend({Ub:function(){return"#searchPopupAdvertiserItem"},ob:function(){return Wa()},C:function(){return Ix}});function Hx(){}Hx=Backbone.Model.extend({initialize:function(){},validate:function(){},Ub:function(){return"#searchPopupArtistStationItem"},ob:function(){return Ya()},C:function(){return Hx}});function Jx(){}Jx=Backbone.Model.extend({initialize:function(b,c){this.vs=c.model;this.set($.extend({tophit:!0},this.vs.attributes))},Ub:function(){return this.vs.Ub()},ob:function(){return Ra()},C:function(){return this.vs.C()}});var Mx=Backbone.Model.extend({Ub:function(){return"#searchPopupStationItem"},ob:function(){return Xa()},C:function(){return Mx}});var Lx=Backbone.Model.extend({Ub:function(){return"#searchPopupProfileItem"},ob:function(){return""},C:function(){return Lx}});function Ty(){}Ty=Backbone.View.extend({initialize:function(){z.c(Be,r(this,this.gx));z.c(Ae,r(this,this.gx));setTimeout(function(){z.b($f,"splash")},1)},gx:function(){z.b(ag,"splash");$(this.el).fadeOut("fast")},el:$("#splash").get(0)});function Uy(){} | |
Uy=Backbone.View.extend({initialize:function(){this.be=this.model.get("stationList");S(aw,r(this,this.oQ));this.model.bind("change:currentStation",r(this,this.QA));this.model.bind("change:currentUser",r(this,this.Gn));this.model.bind("change:hasStations",r(this,this.Gn));this.model.bind("change:facebookAuthenticated",r(this,this.Gn));this.model.bind("change:siteLocked",r(this,this.ot));this.model.bind("change:poisoned",r(this,this.IM));this.model.bind("change:modalPanel",r(this,this.ia));this.model.bind("change:videoAdPlaying", | |
r(this,this.oR));this.va=new Vy($(".user_activator",this.el),null,$("#user_menu_dd"))},el:$("#brandingBar").get(0),Zj:!1,oQ:function(b){this.model.get("currentStation").e()==b.e()&&this.QA()},QA:function(){var b=this.model.get("currentUser"),c=this.model.get("currentStation");null!=c?(b=$("#stationChangeSelectorTmpl").tmpl({currentStation:c.fa(),currentStationId:c.e(),stations:this.be.toJSON(),showDropDownMenu:b&&!b.H()}),$(".middlecolumn",this.el).empty().append(b).fadeIn(400,function(){var b=$(".middlecolumn .stationChangeList", | |
this.el);b.css("visibility","hidden").show();Px($(".scroll-pane",b),"station_list");b.hide().css("visibility","visible")})):$(".middlecolumn",this.el).fadeOut().text("")},Gn:function(){var b=this.model.get("currentUser");if(null==b)this.Xq();else if(b.p())$(".registeredUser",this.el).hide(),$(".subscribedUser",this.el).hide(),$(".anonymousUser",this.el).show();else{$(".anonymousUser",this.el).hide();this.model.get("facebookAuthenticated")&&b.gq?($(".userName",this.el).text(b.mc),$(".userNameImage", | |
this.el).empty().append('<img src="http://graph.facebook.com/v2.2/'+b.Ea+'/picture?type=square" width="20" height="20">').show()):($(".userName",this.el).text(b.Pa),$(".userNameImage",this.el).hide());$("a.helpMenuItem",this.el).attr("href","/help?un="+b.Pa);var c=$(".user_activator",this.el).width()+30;$("#user_menu_dd",this.el).width(Math.max(c,100));$(".notAnonymousUser",this.el).show();b.H()?($("#rightColumnDivider",this.el).show(),$(".registeredUser",this.el).show()):($(".registeredUser",this.el).hide(), | |
$("#rightColumnDivider",this.el).hide());b.dw?0==$("#user_menu_dd .aaMenuItem",this.el).length&&($("#user_menu_dd .profileMenuItem",this.el).parent().after('<li class="menu able"><a class="aaMenuItem">Artist Insights</a></li>'),$("#user_menu_dd .aaMenuItem",this.el).attr("href",b.dw).show()):0<$("#user_menu_dd .aaMenuItem",this.el).length&&$("#user_menu_dd .aaMenuItem",this.el).remove()}$(".logosubscriber",this.el).css("display","none");$(".logobusiness",this.el).css("display","none");null==b||b.H()? | |
$(".logo",this.el).css("display","block"):($(".logo",this.el).css("display","none"),b.P()?$(".logobusiness",this.el).css("display","block"):$(".logosubscriber",this.el).css("display","block"))},Xq:function(){$(".anonymousUser",this.el).hide();$(".notAnonymousUser",this.el).hide();$(".registeredUser",this.el).hide();$(".middlecolumn",this.el).fadeOut()},ot:function(){this.model.get("siteLocked")?($(".able",this.el).hide(),$(".middlecolumndisabled",this.el).show()):($(".able",this.el).show(),$(".middlecolumndisabled", | |
this.el).hide())},oR:function(){this.model.get("videoAdPlaying")?$(".disabled",this.el).show():$(".disabled",this.el).hide()},IM:function(){this.model.get("poisoned")?$(".registerLink",this.el).removeClass("underline").css("cursor","default"):$(".registerLink",this.el).addClass("underline").css("cursor","pointer")},ia:function(){this.model.get("modalPanel")==ku?this.Xq():this.Gn()},events:{"click .logo":"logoClick","click .logosubscriber":"logoClick","click .logobusiness":"logoClick","click .signoutMenuItem":"signoutMenuItemClick", | |
"click .helpMenuItem":"helpMenuItemClick","click .profileMenuItem":"profileMenuItemClick","click .upgradeLink":"upgradeLinkClick","mouseenter .stationChangeSelector":"mouseEnterStationSelector","mouseleave .stationChangeSelector":"mouseLeaveStationSelector","click .stationChangeSelector":"clickStationSelector","mouseenter .stationChangeList":"mouseEnterStationList","mouseleave .stationChangeList":"mouseLeaveStationList","click .stationChangeItem":"stationItemClick"},mouseEnterStationSelector:function(){this.Zj|| | |
$(".stationChangeSelector").addClass("highlight")},mouseLeaveStationSelector:function(){this.Zj||$(".stationChangeSelector").removeClass("highlight")},clickStationSelector:function(b){if(0<$(b.target).parents(".scroll-pane").length)return!1;null!=this.model.get("currentStation")&&(this.Zj?this.uy():$(".middlecolumn .stationChangeList",this.el).fadeIn("fast",r(this,function(){this.Zj=!0})))},stationItemClick:function(b){b=$.tmplItem(b.target).data;z.b(ji,{stationId:b.e(),userInitiated:!0});return!1}, | |
uy:function(){$(".middlecolumn .stationChangeList",this.el).fadeOut("fast",r(this,function(){this.Zj=!1;$(".stationChangeSelector").removeClass("highlight")}))},mouseEnterStationList:function(){this.ya&&(clearTimeout(this.ya),this.ya=null)},mouseLeaveStationList:function(){this.ya||(this.ya=setTimeout(r(this,function(){this.ya=null;this.uy()}),1E3))},logoClick:function(){this.model.get("modalPanel")!=ku&&R(yu);return!1},upgradeLinkClick:function(){var b=this.model.get("currentUser"),c=Wy(),d="other"; | |
if("/"==c||0==c.indexOf("/station/play"))d="nowplaying";else if(0==c.indexOf("/account"))d="account";else if(0==c.indexOf("/one")||0==c.indexOf("/payment"))d="p1";s("p1_web_upgrade_clicks",{trial_eligible:b.xh,url_path:c,url_type:d},b);return!0},signoutMenuItemClick:function(){z.b(pi);return!1},helpMenuItemClick:function(){R(Dw);return!0},profileMenuItemClick:function(){var b=this.model.get("currentUser");return null!=b&&ie(b.Y)?(V("/profile/"+b.Y,!0,!0),!1):!0}});function Xy(){} | |
Xy=Backbone.View.extend({initialize:function(){this.$d=!1;$(".searchInput",this.el).val(Pa());this.va=new Yy(this.model,$(".cd_activator",this.el),$("#cd_menu_dd"));this.ms=new Zy({model:this.model});new $y({});this.Jh=null;this.model.bind("change:currentTrack",r(this,this.Dn));this.model.bind("change:currentUser",r(this,this.zq));this.model.bind("change:currentStation",r(this,this.rI));this.model.bind("change:searchText",r(this,this.Ne));this.model.bind("change:modalPanel",r(this,this.ia));this.model.bind("change:forceRegistration", | |
r(this,this.Bn));this.model.bind("change:audioAdPlaying",r(this,this.ME));this.model.bind("change:videoAdPlaying",r(this,this.pR));this.model.bind("change:siteLocked",r(this,this.Bn));this.model.bind("change:showingSearchResults",r(this,this.Yj));this.model.bind("change:hasStations",r(this,this.qk));this.model.bind("change:capped",r(this,this.qk));z.c($e,r(this,this.gj));$.address.bind("change",r(this,this.Rr))},el:$("#playerBar").get(0),Dn:function(){var b=this.model.get("currentTrack");if(null!= | |
b){if(b instanceof ro)$(".playerBarSong",this.el).removeAttr("href").css("text-decoration","none").text("Message From"),$(".playerBarArtist",this.el).removeAttr("href").css("text-decoration","none").text(b.W()),$(".playerBarAlbum",this.el).removeAttr("href").css("text-decoration","none").text(""),$(".playerByText",this.el).text(""),$(".playerOnText",this.el).text("");else{if(b instanceof Dn)$(".playerBarSong",this.el).removeAttr("href").css("text-decoration","none").text("Live Now"),$(".playerBarArtist", | |
this.el).removeAttr("href").css("text-decoration","none").text(b.W()),$(".playerBarAlbum",this.el).removeAttr("href").css("text-decoration","none").text(b.kb),$(".playerByText",this.el).text(b.sb?b.sb:"by");else if(b.Yl())$(".playerBarSong",this.el).removeAttr("href").css("text-decoration","none").text(b.Ja),$(".playerBarArtist",this.el).removeAttr("href").css("text-decoration","none").text(b.W()),$(".playerBarAlbum",this.el).removeAttr("href").css("text-decoration","none").text(b.kb),$(".playerByText", | |
this.el).text(b.sb?b.sb:"from");else{if(b instanceof Bn&&!b.sm())return;$(".playerBarSong",this.el).css("text-decoration","").text(b.Ja).attr("href",b.hh());$(".playerBarArtist",this.el).css("text-decoration","").text(b.W()).attr("href",b.bh());b.fv?$(".playerBarAlbum",this.el).removeAttr("href").css("text-decoration","none").text(b.kb):$(".playerBarAlbum",this.el).css("text-decoration","").text(b.kb).attr("href",b.Ol());$(".playerByText",this.el).text(b.sb?b.sb:"by")}$(".playerOnText",this.el).text(b.Mc? | |
b.Mc:"on")}$(".info",this.el).toggle(!0);this.XA(b);$(".albumArt img",this.el).fadeOut("default",function(){$(this).remove()});var c=$("#playerBarArtTmpl").tmpl(b.vb()),c=$(c).hide().bind("imgpreload",function(){b instanceof Bn&&$("#mainContent .home").is(":visible")&&$(this).fadeOut();b instanceof Bn?($(this).fadeIn(),$(this).addClass("backstage_ad_icon")):$(this).fadeIn()});$(".albumArt",this.el).append(c);$(".albumArt",this.el).show();$(".rightcolumn .nowplaying",this.el).stop(!0,!0).fadeIn(); | |
$(".rightcolumn .nowplaying",this.el).show();(b instanceof Bn||b.Kc)&&$(".info",this.el).fadeOut(200);this.mp(b)?this.va.enable():this.va.disable()}else $(".middlecolumn",this.el).fadeOut(),$(".rightcolumn .nowplaying",this.el).fadeOut()},Rr:function(b){this.model.get("currentTrack")instanceof Bn&&("/"==b.path?($(".albumArt img",this.el).hide(),$(".albumArt img",this.el).removeClass("backstage_ad_icon")):($(".albumArt img",this.el).show(),$(".albumArt img",this.el).addClass("backstage_ad_icon")))}, | |
XA:function(b){1==b.Nc?this.ms.aL():-1==b.Nc?this.ms.$K():this.ms.ZK()},gj:function(b){var c=b.track;b=b.stationId;var d=this.model.get("currentTrack"),e=this.model.get("currentStation");null!=d&&c.o()==d.o()&&null!=e&&e.e()==b&&this.XA(c)},rI:function(){null==this.model.get("currentStation")?$(".middlecolumn",this.el).fadeOut():$(".middlecolumn",this.el).fadeIn();$(".rightcolumn .nowplaying",this.el).fadeOut();this.qk()},Ne:function(){var b=this.model.get("searchText");null!=b&&0!=b.length||this.$d|| | |
$(".searchInput",this.el).val(Pa())},zq:function(){this.qk();var b=this.model.get("currentUser");null!=b&&b.H()?$("#skinTab",this.el).hide():$("#skinTab",this.el).show()},ia:function(){this.model.get("modalPanel")==iu?this.tG():this.hG();this.qk()},qk:function(){var b=this.model.get("modalPanel"),c=this.model.get("currentStation");this.model.get("currentTrack");this.model.get("capped")||"WELCOME_SEARCH"==b||"REDEMPTION_PANEL"==b||b==nu||"REGISTERED_PANEL"==b||null==c&&_.include([lu,ju,ku,mu,ru,pu, | |
qu],b)?($("#playerBar").stop(!0,!0).fadeOut(),$("#mainContainer").addClass("no_player_bar")):($("#mainContainer").removeClass("no_player_bar"),$("#playerBar").stop(!0,!0).fadeIn(),az(this.model)?$(".leftcolumn",this.el).fadeOut():$(".leftcolumn",this.el).fadeIn())},mp:function(b){return!b||!(b instanceof Bn||b instanceof Cn||b instanceof Dn||b.Kc||b.Ao)&&b.Zu&&b.$u&&b.vo?!0:!1},ME:function(){this.Bn();if(this.model.get("audioAdPlaying"))$(".info",this.el).fadeOut(),this.va.disable();else{this.model.get("videoAdPlaying")|| | |
$(".info",this.el).fadeIn();var b=this.model.get("currentTrack");this.mp(b)?this.va.enable():this.va.disable()}},pR:function(){this.Bn();var b=this.model.get("videoAdPlaying");null!=b?($(".info",this.el).fadeOut(),$(".albumArt img",this.el).hide(),this.va.disable(),b.gb()||$(".middlecolumn .progress",this.el).hide()):(b=this.model.get("currentTrack"),this.Dn(),this.mp(b)?this.va.enable():this.va.disable(),$(".middlecolumn .progress",this.el).show())},Bn:function(){this.model.get("siteLocked")||this.model.get("forceRegistration")|| | |
this.model.get("audioAdPlaying")||this.model.get("videoAdPlaying")||this.model.get("liveStreamPlaying")?($(".disabled",this.el).css("opacity",0.01).show(),we()?$(".columns",this.el).fadeTo(400,0.6):($(".columns .leftcolumn",this.el).fadeTo(400,0.6),$(".columns .middlecolumn",this.el).fadeTo(400,0.6),this.model.get("audioAdPlaying")||$(".columns .rightcolumn",this.el).fadeTo(400,0.6)),this.model.set({playerBarEnabled:!1})):($(".disabled",this.el).hide(),we()?$(".columns",this.el).fadeTo(400,1):($(".columns .leftcolumn", | |
this.el).fadeTo(400,1),$(".columns .middlecolumn",this.el).fadeTo(400,1),$(".columns .rightcolumn",this.el).fadeTo(400,1)),this.model.set({playerBarEnabled:!0}))},Yj:function(){this.model.get("showingSearchResults")||(this.$d=!1,setTimeout(function(){$(".searchInput",this.el).blur()},1))},hG:function(){$(".searchInput",this.el).attr("disabled","true");$(".searchInput",this.el).val("")},tG:function(){$(".searchInput",this.el).prop("disabled",!1);$(".searchInput",this.el).val(Pa())},events:{"click .cd_icon":"albumArtClick", | |
"click .searchBox":"searchBoxClick","focus .searchInput":"searchInputFocus","blur .searchInput":"searchInputBlur","keyup .searchInput":"searchInputKeyup","click .disabled":"handleAdPause","click .playerBarSong":"songClick","click .playerBarAlbum":"albumClick","click .playerBarArtist":"artistClick","click #skinTab":"skinsMenuItemClick"},skinsMenuItemClick:function(){R(Fu);return!1},handleAdPause:function(){this.model.get("audioAdPlaying")&&(this.model.get("musicPlaying")?z.b(ci):z.b(ai))},songClick:function(){R(Ow, | |
"song")},albumClick:function(){R(Ow,"album")},artistClick:function(){R(Ow,"artist")},searchBoxClick:function(){if(this.model.get("searchText"))return!1;$(".searchInput",this.el).focus()},albumArtClick:function(){var b=this.model.get("currentTrack");b instanceof Bn?b.zf&&window.open(b.zf):R(yu);return!1},searchInputFocus:function(b){this.$d=!0;b.target.value==Pa()&&(b.target.value="",$("#playerBar .searchSubText").show());$(b.target).addClass("focus");null==this.Jh&&(this.Jh=setTimeout(r(this,function(){this.model.set({showingSearchResults:!0}); | |
this.Jh=null}),100))},searchInputBlur:function(b){this.qw();this.$d=!1;""==b.target.value&&(b.target.value=Pa(),$("#playerBar .searchSubText").hide());$(b.target).removeClass("focus")},searchInputKeyup:function(b){this.qw();this.model.set({showingSearchResults:!0});R(xu,b);""===b.target.value?$("#playerBar .searchSubText").show():$("#playerBar .searchSubText").hide()},qw:function(){this.Jh&&(clearTimeout(this.Jh),this.Jh=null)},Qo:function(b){var c=Math.floor(b/60);b="0"+(b-60*c);return c+":"+b.substring(b.length- | |
2)}});function Zy(){} | |
Zy=Backbone.View.extend({initialize:function(){this.model.bind("change:trackProgress",r(this,this.dR));this.model.bind("change:musicPlaying",r(this,this.ZQ));this.model.bind("change:currentTrack",r(this,this.Dn))},el:$("#playbackControl").get(0),Dn:function(){var b=this.model.get("currentTrack");null!=b&&(b instanceof ro||b instanceof so?($(".thumbUpButton",this.el).addClass("disabledThumb"),$(".thumbDownButton",this.el).addClass("disabledThumb"),$(".skipButton",this.el).removeClass("disabledSkip")):b instanceof | |
Dn?($(".thumbUpButton",this.el).addClass("disabledThumb"),$(".thumbDownButton",this.el).addClass("disabledThumb"),$(".skipButton",this.el).addClass("disabledSkip")):b instanceof zn&&(cy(b,this.model.get("stationList"))?($(".thumbUpButton",this.el).addClass("disabledThumb"),$(".thumbDownButton",this.el).addClass("disabledThumb")):($(".thumbUpButton",this.el).removeClass("disabledThumb"),$(".thumbDownButton",this.el).removeClass("disabledThumb")),$(".skipButton",this.el).removeClass("disabledSkip")))}, | |
dR:function(){var b=this.model.get("trackProgress");if(b.isLive)$(".elapsedTime",this.el).text("--:--"),$(".remainingTime",this.el).text("LIVE"),$(".progressMiddle",this.el).attr("width",0);else{var c=b.totalTime,d=b.elapsedTime,b=b.percentPlayed;$(".elapsedTime",this.el).text(this.Qo(d));$(".remainingTime",this.el).text("-"+this.Qo(0<c?c-d:0));$(".progressMiddle",this.el).attr("width",Math.floor(345*b/100))}},ZQ:function(){this.model.get("musicPlaying")?($(".playButton",this.el).hide(),$(".pauseButton", | |
this.el).show()):($(".pauseButton",this.el).hide(),$(".playButton",this.el).show())},$K:function(){$(".thumbDownButton",this.el).addClass("indicator");$(".thumbUpButton",this.el).removeClass("indicator")},aL:function(){$(".thumbUpButton",this.el).addClass("indicator");$(".thumbDownButton",this.el).removeClass("indicator")},ZK:function(){$(".thumbUpButton",this.el).removeClass("indicator");$(".thumbDownButton",this.el).removeClass("indicator")},events:{"click .playButton":"playButtonClick","click .pauseButton":"pauseButtonClick", | |
"click .skipButton":"skipButtonClick","click .thumbDownButton":"thumbDownButtonClick","click .thumbUpButton":"thumbUpButtonClick"},playButtonClick:function(b){$(b.target).blur();z.b(ai,{userInitiated:!0});s("link",{click:"playButton",source:"PlayBackView",station_id:this.model.get("currentStation").e()},this.model.get("currentUser"));return!1},pauseButtonClick:function(b){$(b.target).blur();z.b(ci);s("link",{click:"pauseButton",source:"PlayBackView",station_id:this.model.get("currentStation").e()}, | |
this.model.get("currentUser"));return!1},skipButtonClick:function(b){$(b.target).blur();if($(b.currentTarget).hasClass("disabledSkip"))return!1;z.b(di);b=this.model.get("currentTrack");null!=b&&(b="/song/skip/"+b.o(),bz(b),cz(b));return!1},thumbDownButtonClick:function(b){$(b.target).blur();if($(b.currentTarget).hasClass("disabledThumb"))return!1;b=$(b.currentTarget).hasClass("indicator");var c=this.model.get("currentTrack");null!=c&&(b?R(qv,{isPositive:!1,musicID:c.o()}):R(pv,{isPositive:!1,musicId:c.o()})); | |
return!1},thumbUpButtonClick:function(b){$(b.target).blur();if($(b.currentTarget).hasClass("disabledThumb"))return!1;b=$(b.currentTarget).hasClass("indicator");var c=this.model.get("currentTrack");null!=c&&(b?R(qv,{isPositive:!0,musicID:c.o()}):R(pv,{isPositive:!0,musicId:c.o()}));return!1},Qo:function(b){var c=Math.floor(b/60);b="0"+(b-60*c);return c+":"+b.substring(b.length-2)}});function $y(){} | |
$y=Backbone.View.extend({ai:20,Vu:102,ya:null,Tf:!1,Op:!1,initialize:function(){S(uv,r(this,this.DN));z.c(mi,r(this,this.Vj));this.Vj(null);$(".volumeKnob",this.el).draggable({axis:"x",containment:$(".volumeBar",this.el),start:r(this,this.Mp),stop:r(this,this.Np),drag:r(this,this.Lp)});dz("/volume/")},ml:function(b){this.ZA(b);z.b(mi,b)},DN:function(){var b=Em();pm(Bl,!1);this.Vj(b);this.ml(b)},Mp:function(){this.Op=!0},Np:function(b,c){this.Op=!1;var d=this.tq(c.position.left);this.ml(d);this.Vj(d); | |
R(zw);this.Tf||this.ln()},Lp:function(b,c){var d=this.tq(c.position.left);this.ml(d)},el:$("#playerBar .volumeControl").get(0),Vj:function(b){null==b?b=Fm()?0:Em():0>b?b=0:100<b&&(b=100);this.ZA(b);b=this.ai+b/100*(this.Vu-this.ai);$(".volumeKnob",this.el).css("left",b)},ZA:function(b){0>=b?$(".volumeButton").addClass("muted"):$(".volumeButton").removeClass("muted")},tq:function(b){null==b&&(b=$(".volumeKnob",this.el).position().left);return Math.round((b-this.ai)/(this.Vu-this.ai)*100)},cr:1E3,ln:function(){this.Op|| | |
(this.qn(),this.ya=setTimeout(r(this,function(){$(".volumeBackground",this.el).fadeOut(200)}),this.cr))},qn:function(){null!=this.ya&&(clearTimeout(this.ya),this.ya=null)},events:{"click .volumeBackground":"volumeBackgroundClick","mouseenter .volumeButton":"volumeButtonMouseEnter","mouseleave .volumeButton":"volumeButtonMouseLeave","click .volumeButton":"volumeButtonClick","mouseenter .volumeBackground":"volumeBackgroundMouseEnter","mouseleave .volumeBackground":"volumeBackgroundMouseLeave"},volumeBackgroundClick:function(b){b= | |
b.pageX-$(".volumeBar",this.el).offset().left;var c=$(".volumeKnob",this.el).width();b=Math.max(c/2,b);b=Math.min($(".volumeBar",this.el).width()-c/2,b);b-=c/2;$(".volumeKnob",this.el).css("left",this.ai+b);b=this.tq();this.ml(b);this.Vj(b);R(zw);return!1},volumeButtonMouseEnter:function(){this.Tf=!0;this.qn();$(".volumeBackground",this.el).fadeIn(200);return!1},volumeButtonMouseLeave:function(){this.Tf=!1;this.ln();return!1},volumeButtonClick:function(){$(".volumeBackground",this.el).is(":visible")? | |
(this.cr=1E3,this.Tf=!1,$(".volumeBackground",this.el).fadeOut(200),this.ln()):(this.cr=1E4,this.Tf=!1,this.qn(),$(".volumeBackground",this.el).fadeIn(200));return!1},volumeBackgroundMouseEnter:function(){this.Tf=!0;this.qn();return!1},volumeBackgroundMouseLeave:function(){this.Tf=!1;this.ln();return!1}});function ez(){} | |
ez=Backbone.View.extend({initialize:function(){this.$d=!1;$(".searchInput",this.el).val(Qa());$(".onboarding__register").fadeIn();this.model.bind("change:searchText",r(this,this.Ne));this.model.bind("change:modalPanel",r(this,this.ia));this.model.bind("change:showingSearchResults",r(this,this.Yj));this.model.bind("change:currentUser",r(this,this.VA))},el:$("#welcomeSearch").get(0),Ne:function(){var b=this.model.get("searchText");null!=b&&0!=b.length||this.$d||$(".searchInput",this.el).val(Qa())},ia:function(){var b= | |
this.model.get("modalPanel");if("WELCOME_SEARCH"==b||b==lu){if("WELCOME_SEARCH"==b){R(fw);var c=this.model.get("currentUser");(null==c||c.p())&&qe("anonymous_listening","standard")}else b==lu&&R(hw);this.VA();"hidden"==$(this.el).css("visibility")&&($(this.el).hide(),$(this.el).css("visibility","visible"));$(this.el).is(":visible")?this.RA(b):$(this.el).stop(!0,!0).fadeIn(400,r(this,function(){this.RA(b)}));$("#footer").addClass("footer_welcome_margin")}else $(this.el).stop(!0,!0).hide(),$("#footer").removeClass("footer_welcome_margin")}, | |
RA:function(b){b==lu&&($(".searchBox",$(this.el)).stop(!0,!0).hide(),$(".bottom",$(this.el)).stop(!0,!0).show(),$(".onboarding__login").fadeOut(),$(".onboarding__register").fadeIn())},VA:function(){var b=this.model.get("currentUser");az(this.model)&&"WELCOME_SEARCH"==this.model.get("modalPanel")?($(".onboarding__register").fadeIn(),this.model.set({modalPanel:lu})):null==b||b.p()?($(".bottom",this.el).show(),$(".onboarding__register").fadeIn()):($(".bottom",this.el).hide(),$(".onboarding__register").fadeOut())}, | |
Yj:function(){this.model.get("showingSearchResults")||(this.$d=!1,setTimeout(function(){$(".searchInput",this.el).blur()},1))},events:{"focus .searchInput":"searchInputFocus","blur .searchInput":"searchInputBlur","keyup .searchInput":"searchInputKeyup"},searchInputFocus:function(b){this.$d=!0;b.target.value==Qa()&&(b.target.value="");$(b.target).addClass("focus");this.model.set({showingSearchResults:!0})},searchInputBlur:function(b){this.$d=!1;""==b.target.value&&(b.target.value=Qa());$(b.target).removeClass("focus")}, | |
searchInputKeyup:function(b){R(xu,b);b=this.model.get("currentUser");(null==b||b.p())&&qe("anonymous_listening","station_search")}});function fz(){} | |
fz=Backbone.View.extend({initialize:function(){this.Kn=!1;this.model.get("searchResults").bind("refresh",r(this,this.aR));this.model.bind("change:searchText",r(this,this.Ne));this.model.bind("change:searchItemSelectedIndex",r(this,this.Hh));this.model.bind("change:showingSearchResults",r(this,this.Yj));this.model.bind("change:modalPanel",r(this,this.ia));this.model.set({searchSelectedIndex:-1});this.Ib=this.lj=null;var b=Lo();b&&0<b.length&&$.ajax({type:"HEAD",async:!0,url:b,success:r(this,function(){this.lj= | |
Lo();this.Ib=A._data.createStationHintGenre||"top_stations"})});this.render()},Ne:function(){var b=this.model.get("searchText");if(this.model.get("showingSearchResults")){var c=$(".content",this.el);null==b||0==b.length?(c.empty().append($("#searchPopupEmptyContent").tmpl(this.model.get("searchSuggestions"),{hintPath:this.lj,hintGenre:this.Ib})),R(Iw)):Nx(b)&&c.empty().append($("#searchPopupIncompleteEmail").tmpl({query:this.model.get("searchText")},{hintPath:this.lj,hintGenre:this.Ib}))}},Hh:function(){$(".item", | |
this.el).removeClass("selected");var b=this.model.get("searchItemSelectedIndex");if(0<=b){b>=$(".item",this.el).length&&(b=$(".item",this.el).length-1,this.model.set({searchItemSelectedIndex:b}));$(".item",this.el).eq(b).addClass("selected");var b=".items .scrollPoint.selected",c=$(b,this.el);c.prev().hasClass("heading")&&(b=".items .scrollPoint:eq("+(c.index()-1)+")");Sx($(".items",this.el),b)}},Yj:function(){if(this.model.get("showingSearchResults")){R(Gw);this.model.set({searchSequenceNum:0}); | |
var b={action:"access",listener_id:v.h.s,vendor_id:u,device_id:se,device_os:oe(),URL:Wy(),app_version:z.ba,sequence_number:this.model.get("searchSequenceNum"),page_view:"search",view_mode:"search_prompt",source:"station_list_top",client_timestamp_ms:Date.now()};s("search_action",b,null);this.Ne();this.SA();$(".searchPopupContainer",this.el).fadeIn("fast");this.model.set({searchSelectedIndex:-1})}else{R(Hw);$(".searchPopupContainer",this.el).fadeOut("fast",r(this,function(){this.model.set({searchText:""}); | |
this.SA()}));b=(this.model.get("serverSearchResults")&&this.model.get("serverSearchResults").length?this.model.get("serverSearchResults").split(","):"").length;if(this.model.get("searchItemSelectedIndex")==b){this.model.set({searchSequenceNum:this.model.get("searchSequenceNum")+1});var c=void 0===this.model.get("clientSearchResults")?0:this.model.get("clientSearchResults").split(",").length,b={action:"search_for",listener_id:v.h.s,vendor_id:u,device_id:se,device_os:oe(),app_version:z.ba,sequence_number:this.model.get("searchSequenceNum"), | |
page_view:"search",view_mode:"search_results",client_timestamp_ms:Date.now(),query:this.model.get("searchText"),num_results_shown:c,num_results_returned:b,server_result_list:this.model.get("serverSearchResults"),client_result_list:this.model.get("clientSearchResults")};s("search_action",b,null)}0<=this.model.get("searchSequenceNum")&&0>this.model.get("searchItemSelectedIndex")&&(this.model.set({searchSequenceNum:this.model.get("searchSequenceNum")+1}),b=Wy(),c="back",-1<b.indexOf("/music/top-stations")? | |
c="browse_before_search":"/"!=b&&(c=b),b={action:"exit_navigate_away",listener_id:v.h.s,vendor_id:u,device_id:se,device_os:oe(),app_version:z.ba,sequence_number:this.model.get("searchSequenceNum"),page_view:"search",view_mode:"search_prompt",client_timestamp_ms:Date.now(),exit_path:c},s("search_action",b,null),this.model.set({searchSelectedIndex:-1}))}},SA:function(){$(this.el).detach();$(this.Kn?"#searchPopupWelcomePosition":"#searchPopupNavPosition").append(this.el)},ia:function(){"WELCOME_SEARCH"== | |
this.model.get("modalPanel")?this.Kn=!0:this.Kn=!1},aR:function(b){var c=$(".content",this.el);c.empty();c.append('<div class="items scroll-pane vertical-only"></div>');if(0<b.length){var d=null;$.each(b.models,function(b,h){d!=h.ob()&&(d=h.ob(),0<d.length&&$(".items",c).append($("#searchPopupHeading").tmpl(h.ob())));$(".items",c).append($(h.Ub()).tmpl(h))});c.append($("#searchPopupFooterTmpl").tmpl({query:this.model.get("searchText")},{hintPath:this.lj,hintGenre:this.Ib}));R(Iw);b=this.Kn?"#searchPopupWelcomePosition": | |
"#searchPopupNavPosition";b=$(window).height()-parseInt($(b).css("top"),10)-105;$(".items",this.el).css("max-height",b)}else c.append($("#searchPopupNoSearchResults").tmpl({query:this.model.get("searchText")},{hintPath:this.lj,hintGenre:this.Ib})),R(Iw);setTimeout(r(this,function(){Px($(".scroll-pane",this.el))}),1);this.Hh()},render:function(){$(this.el).append($("#searchPopupTmpl").tmpl());return this},events:{"click .item":"searchResultItemClick","click .profileName":"profileClick","click .showAllResults":"performExtendedSearch", | |
"click .createStationHint":"browseGenresClick","click .browseGenres":"browseGenresClick","mouseenter .item":"searchResultItemMouseEnter","mouseleave .item":"searchResultItemMouseLeave"},searchResultItemClick:function(b){var c,d,e,h=null,l=null,p=-1,q=void 0===this.model.get("clientSearchResults")?0:this.model.get("clientSearchResults").split(",").length,t=void 0===this.model.get("serverSearchResults")?0:this.model.get("serverSearchResults").split(",").length;$(b.currentTarget).data("search")?(s("link", | |
{click:"extendedSearchLink",source:"SearchPopupView"},this.model.get("currentUser")),this.performExtendedSearch(),this.model.set({searchSelectedIndex:t})):$(b.currentTarget).data("genres")?(s("link",{click:"browseGenreLink",source:"SearchPopupView"},this.model.get("currentUser")),l=$("a",$(b.currentTarget)).attr("href"),b=fn(),0==l.indexOf(b)&&(l=l.substr(b.length-1)),V(l,!0,!0),this.model.set({searchSelectedIndex:t+1})):(c=$.tmplItem(b.currentTarget).data,d=c.get("musicId"),p=-1,$.each(c.collection.models, | |
function(b,c){c.get("musicId")==d&&(p=b)}),this.model.set({searchSelectedIndex:p}),e=c.get("stationId"),h=null,c=c.get("searchableStationId"),null!=c?h=c:null!=e?h=En.StationKeyType.FRIENDS_STATION+e:null!=d&&(h=$(b.currentTarget).data("genre-suggest")?En.StationKeyType.GENRE_SUGGEST+d:$(b.currentTarget).data("artist-suggest")?En.StationKeyType.ARTIST_SUGGEST+d:$(b.currentTarget).data("facebook-suggest")?En.StationKeyType.FACEBOOK_SUGGEST_SEARCH_VIEW+d:d),this.trigger("createStationRequest",h));b= | |
$(".showAllResults",this.el).text();h=!1;(c=this.model.get("currentStation"))&&(c=tn(c))&&c.key!=d&&(h=!0);c=d&&d.length?d.substr(0,1):null;e={action:"select",listener_id:v.h.s,vendor_id:u,device_id:se,device_os:oe(),app_version:z.ba,sequence_number:this.model.get("searchSequenceNum"),page_view:"search",view_mode:"search_autocomplete",source:"station_list_top",URL:l,client_timestamp_ms:Date.now(),selected_result_id:d,selected_result_unique_id:e,selected_index:p,select_result_type:c,client_result_list:this.model.get("clientSearchResults"), | |
server_result_list:this.model.get("serverSearchResults"),num_results_shown:q,num_results_returned:t,selected_result_action:d?"play":"view",query:b,new_station:h};s("search_action",e,null);return!1},profileClick:function(b){b=$.tmplItem(b.target).data.get("webName");this.trigger("openProfilePageRequest",b)},performExtendedSearch:function(){s("link",{click:"extendedSearchRequest",source:"SearchPopupView"},this.model.get("currentUser"));this.trigger("extendedSearchRequest");return!1},browseGenresClick:function(){$(".searchPopupContainer", | |
this.el).fadeOut("slow",r(this,function(){this.model.set({showingSearchResults:!1});this.model.set({searchText:""})}))},searchResultItemMouseEnter:function(b){b=$(".item",this.el).index(b.target);this.model.set({searchItemSelectedIndex:b})},searchResultItemMouseLeave:function(){this.model.set({searchItemSelectedIndex:-1})}});function gz(){} | |
gz=Backbone.View.extend({initialize:function(){this.model.bind("change:siteLocked",r(this,this.ot));z.c(Rg,r(this,this.yq));S(ax,r(this,this.$x))},el:$("#mainContentContainer .contentnav").get(0),ot:function(){this.model.get("siteLocked")?$(".disabled",this.el).show():$(".disabled",this.el).hide()},events:{"click .home":"homeClick","click .myprofile":"profileClick","click .friends":"friendsClick"},profileClick:function(){s("link",{click:"my_profile"},this.model.get("currentUser"));var b=this.model.get("currentUser"); | |
null!=b&&ie(b.Y)?V("/profile/"+b.Y,!0,!0):V("/profile",!0,!1);return!1},homeClick:function(){R(yu);R(Bw);return!1},friendsClick:function(){s("link",{click:"music_feed"},this.model.get("currentUser"));V("/feed",!0,!0);return!1},yq:function(b){b.NEW_SITE_FEED?$(".friends",this.el).show():this.$x()},$x:function(){$(".friends",this.el).hide();0<=Wy().indexOf("/feed")&&this.homeClick()}});function hz(){} | |
(function(){function b(b){return b.map(function(b){var c=b.get("_originalSeed");return _.extend(b.toJSON(),{allowAddVariety:b.get("_isCreator")&&b.get("canTransform")&&!(null!=c&&null!=c.key&&null!=c.xt)&&!b.get("_isThumbprintStation")})})}hz=Backbone.View.extend({initialize:function(){this.nn=this.options.station_menu;z.c(Ee,r(this,this.render));S(Ju,r(this,this.render));S(aw,r(this,this.bR));S(yu,r(this,this.Wa));S(Pv,r(this,this.wI));S(Ov,r(this,this.Bq));this.be=this.model.get("stationList");this.model.get("promotedStationList"); | |
this.be.bind("refresh",r(this,this.render));this.be.bind("add",r(this,this.lh));this.be.bind("change",r(this,this.lh));this.be.bind("remove",r(this,this.render));this.model.bind("change:currentStation",r(this,this.wy));this.model.bind("change:currentTrack",r(this,function(){this.vy(!0)}));this.model.bind("change:currentShuffleType",r(this,this.UA));this.model.bind("change:currentStationViewIsShuffle",r(this,this.render));this.$F=W("/stations/delete",!0,!1,!0,r(this,this.Nw));W("/stations/remove", | |
!0,!1,!0,r(this,this.Nw));W("/stations/dismiss",!0,!1,!0,r(this,this.jG));$("#stationSortDate").click(r(this,this.rQ));$("#stationSortAlpha").click(r(this,this.qQ))},el:$("#stationList").get(0),render:function(){var c=2<this.model.get("stationList").length,d=this.model.get("currentStationViewIsShuffle");if(!c&&d)this.model.set({currentStationViewIsShuffle:!1});else return c=d?"#stationShuffleTmpl":"#stationTmpl",this.be.each(r(this,function(b){b.set({canTransform:b.ue()!=m.Gc.Ye(),sortAlpha:this.model.get("stationSortOrderAlpha"), | |
stationIsAdvertiserStation:b.rc()},{silent:!0});if(b.Tb())b.set({stationIsRecommendedStation:!0},{silent:!0}),this.model.get("stationSortOrderAlpha")||b.n._impressionTracked||(s("promoted_stations",{action:"rec_shown",device_os:"web",vendor_id:100,token_type:"music",token:b.wa()},this.model.get("currentUser")),b.n._impressionTracked=!0);else if(b.Fb()){var c=b.n._promotedSponsorText;b.set({stationIsPromotedStation:!0,promotedSponsorText:c,promotedSponsorTextIsLengthy:21<c.length?!0:!1},{silent:!0}); | |
this.model.get("stationSortOrderAlpha")||(null!=b.n._promotedImpressionUrls&&setTimeout(function(){$.each(b.n._promotedImpressionUrls,function(){var b=this;""!=b&&wp(b,function(){},function(){k.debug("Promoted station impression url failure: "+b)})});b.n._promotedImpressionUrls=null},100),b.n._impressionTracked||(s("promoted_stations",{action:"promo_shown",device_os:"web",vendor_id:100,token_type:"station",token:b.e()},this.model.get("currentUser")),b.n._impressionTracked=!0))}else b.Eb()&&(b.set({stationIsCustomContentStation:!0}, | |
{silent:!0}),(c=b._expiration)&&6048E5>=c-(new Date).getTime()?b.set({isExpiring:!0,expirationDate:oy.lH(c)},{silent:!0}):b.set({isExpiring:!1},{silent:!0}))})),$(this.el).empty().append($(c).tmpl(b(this.be))),$(".inactiveHoverArrow",this.el).hide(),this.wy(),this.UA(),this.model.get("currentStationViewIsShuffle")&&($(".shuffleStationLabel").removeClass("shuffleStationLabelCurrent"),c=this.model.get("currentStation"),null!=c&&c.D()&&c.Z()&&(c=c.te(),null!=c&&(this.xw(c),this.vy(!1)))),2<this.be.length|| | |
$("#shuffleContainer").parent().hide(),this.ri(),this.St(),by(this.el),this},UA:function(){var b=this.model.get("currentShuffleType"),b="my"==b?"My Shuffle":"Shuffle "+b+" stations";$("#shuffleTypeLabel",this.el).text(b)},Wa:function(){setTimeout(r(this,function(){this.ri()}),200)},bR:function(b){_.each($(".stationNameText",this.el),r(this,function(d){$.tmplItem(d).data.e()==b.e()&&(we()?$(d).text(b.fa()):d.textContent=this.PQ(b.fa()))}))},PQ:function(b){var d={"/":"/"},e;for(e in d)b=b.replace(e, | |
d[e]);return b},ri:function(b){setTimeout(r(this,function(){Px($(".stationListHolder"),"station_list");$(".stationListHolder .jspPane").css("padding-bottom",0);b&&b()}),1)},lh:function(){this.render()},Bq:function(){this.Pp=!1;this.hm();$(".stationName_hover",this.el).removeClass("stationName_hover")},wI:function(b){"station_menu_dd"==b.attr("id")&&(this.Pp=!0)},wy:function(){this.hm();$("#shufflePicker").fadeOut(1);var b=null,d=this.model.get("currentStation");null!=d&&(b=d.e());$(".stationListItem", | |
this.el).each(function(){$.tmplItem(this).data.e()==b?$(this).addClass("selected"):$(this).removeClass("selected")});this.ri(r(this,function(){var b=$("#stationList .stationListItem.selected");b&&0<b.index()&&Sx($(this.el),"#stationList .stationListItem.selected")}));iz(this.nn,d,$("#stationList .stationListItem.selected .optionsItem"))},scrollTo:function(b,d){var e=$(".scroll-pane",this.el).data("jsp");e&&e.scrollTo(b,d)},xw:function(b){$(".shuffleStation",this.el).prop("checked",!1);for(var d=0;d< | |
b.length;d++)$("#shuffleStation_"+b[d]).prop("checked",!0);var d=this.model.get("currentShuffleType"),e=$(".stationListItem .stationNameText.notSelectableStation",this.el).length;"all"==d&&b.length!=this.model.get("stationList").length-1-e&&this.model.set({currentShuffleType:"my"})},vy:function(b){$(".shuffleStationLabel").removeClass("shuffleStationLabelCurrent");var d=this.model.get("currentTrack");null!=d&&this.model.get("currentStationViewIsShuffle")&&(d="#shuffleStationLabel_"+d.e(),$(d).addClass("shuffleStationLabelCurrent"), | |
b&&Sx($(".stationListHolder"),d),this.ri())},fy:function(b){this.xw(b.te())},jG:function(b){b=b.pathNames[2];var d=null,e=null,h=this.model.get("menuStation");null==b&&null!=h&&(b=h.e(),d=qn(h),e=rn(h));b&&d&&z.b(Lg,{stationId:b,adId:d,correlationId:e});jz()},Nw:function(b){b=b.pathNames[2];null==b&&null!=this.model.get("menuStation")&&(b=this.model.get("menuStation").e());b?this.Al(b):(b=this.model.get("currentStation"),null!=b&&this.Al(b.e()));jz()},Al:function(b){R(Su,b)},rQ:function(){$("#stationSortDate").hasClass("selected")|| | |
(s("link",{click:"sortStationsDate",source:"StationListView"},this.model.get("currentUser")),this.model.set({stationSortOrderAlpha:!1}),this.St())},qQ:function(){$("#stationSortAlpha").hasClass("selected")||(s("link",{click:"sortStationsAlpha",source:"StationListView"},this.model.get("currentUser")),this.model.set({stationSortOrderAlpha:!0}),this.St())},St:function(){this.model.set({stationSortOrderAlpha:sl?!0===km(Ll):!1});this.model.get("stationSortOrderAlpha")?($("#stationSortDate").removeClass("selected"), | |
$("#stationSortAlpha").addClass("selected")):($("#stationSortDate").addClass("selected"),$("#stationSortAlpha").removeClass("selected"))},events:{"click #shuffleButtonHoverArea":"shuffleButtonHoverArea_click","mouseover #shuffleContainer":"shuffleContainer_mouseOver","mouseout #shuffleContainer":"shuffleContainer_mouseOut","click .stationListItem":"stationItemClick","click .addVariety":"addVarietyClick","mouseover .stationListItem .inactiveHoverArrow":"stationListItemMouseEnter","mouseout .stationListItem .inactiveHoverArrow":"stationListItemMouseLeave", | |
"mouseover .stationListItem":"stationListItemMouseEnter","mouseout .stationListItem":"stationListItemMouseLeave"},deleteButtonClicked:function(b){b=$.tmplItem(b.target).data.stationId;this.$F.update("/stations/delete/"+b);return!1},hm:function(){$(".inactiveHoverArrow:visible",this.el).hide()},stationListItemMouseEnter:function(b){if(!0!=this.Pp){b=$(".stationName",$(b.target).parents(".stationListItem"));var d=this.model.get("currentStation"),e=-1;null!=d&&(e=d.e());d=$.tmplItem(b[0]).data;try{if(d.e()!= | |
e){$(".stationName_hover").removeClass("stationName_hover");b.addClass("stationName_hover");this.hm();var h=$(".inactiveHoverArrow",b.parents(".stationListItem"));h.show();iz(this.nn,d,h)}else iz(this.nn,this.model.get("currentStation"),$("#stationList .stationListItem.selected .optionsItem"))}catch(l){}}},stationListItemMouseLeave:function(){!0!=this.Pp&&($(".stationName_hover",this.el).removeClass("stationName_hover"),this.hm(),iz(this.nn,this.model.get("currentStation"),$("#stationList .stationListItem.selected .optionsItem")))}, | |
stationItemClick:function(b){setTimeout(r(this,function(){var d=[],e=$.tmplItem(b.target).data;if($(b.target).hasClass("checkbox"))$(".shuffleStation:checked",this.el).each(function(b,c){var e=c.id.indexOf("_");d.push(c.id.substr(e+1))}),0<d.length?e.D()&&e.Z()?this.model.set({currentStationViewIsShuffle:!1}):(this.model.set({currentShuffleType:"my"}),pm($l,d.join(",")),z.b(li,{stationIdArray:d,isExplicitSave:!0,shuffleType:this.model.get("currentShuffleType")})):this.model.set({currentStationViewIsShuffle:!1}); | |
else if($(b.target).hasClass("stationNameText")||!this.model.get("currentStation").D()||!this.model.get("currentStation").Z())if(this.model.get("currentShuffleType")||this.model.set({currentShuffleType:"all"}),e.Fb()&&ie(e.e())){var h=this.model.get("currentUser");e.gh()==h.s?(new X({message:mc()})).render():(z.b(Jg,{stationCode:"fs"+e.e(),adId:qn(e),correlationId:rn(e),trackingUrls:e._promotedTrackingUrls}),s("promoted_stations",{action:"promo_added",device_os:"web",vendor_id:100,token_type:"station", | |
token:e.e()},this.model.get("currentUser")))}else e.Tb()&&ie(e.wa())?(z.b(Kg,"mi"+e.wa()),s("promoted_stations",{action:"rec_added",device_os:"web",vendor_id:100,token_type:"music",token:e.wa()},this.model.get("currentUser"))):z.b(ji,{stationId:e.e(),userInitiated:!0})}),1);this.ri();return!1},shuffleContainer_mouseOver:function(){2<this.model.get("stationList").length&&$("#shuffleButtonHoverArea",this.el).addClass("shuffleButtonHoverAreaHover")},shuffleContainer_mouseOut:function(){2<this.model.get("stationList").length&& | |
0==$("#shufflePicker:visible").length&&$("#shuffleButtonHoverArea",this.el).removeClass("shuffleButtonHoverAreaHover")},shuffleButtonHoverArea_click:function(){2<this.model.get("stationList").length&&R(Cu);return!1},shuffleButtonHoverArea_mouseOut:function(){2<this.model.get("stationList").length&&R(Du)},addVarietyClick:function(){this.trigger("addvariety");return!1}})})();function kz(){} | |
kz=Backbone.View.extend({initialize:function(){S(Du,r(this,this.ar));S(Cu,r(this,this.MP));this.model.bind("change:currentStation",r(this,this.ar));this.model.bind("change:currentStationViewIsShuffle",r(this,this.ar));this.render()},el:$("#shufflePicker").get(0),render:function(){$(this.el).empty().append($("#shufflePickerTmpl").tmpl());$(this.el).hide();return this},ar:function(){clearTimeout(kz.hideTimeout);kz.hideTimeout=setTimeout(r(this,function(){$(this.el).fadeOut(100);setTimeout(function(){$("#shuffleButtonHoverArea").removeClass("shuffleButtonHover")},120)}), | |
1E3)},MP:function(){clearTimeout(kz.hideTimeout);var b=this.PH();$("#shufflePickerItemContainer",this.el).empty().append($("#shufflePickerItemTmpl").tmpl(b));$(this.el).fadeIn(100)},PH:function(){for(var b={},c=[],d=this.model.get("stationList").select(function(b){return!b.D()&&!b.Ra()&&!b.rc()&&un(b)}),e=0;e<d.length;e++){var h=d[e],l=h.e();if(h=h.Lf()){c.push(l);for(var p=0;p<h.length;p++){var q=h[p],t=b[q];null==t&&(t=[],b[q]=t);t.push(l)}}}e=Um();d=null==e||0==e.length?c:e.split(",");e=this.model.get("currentShuffleType"); | |
c=[{genreName:"all",genreLabel:"Shuffle All",stationIdArray:c.join(","),selected:"all"==e},{genreName:"my",genreLabel:"My Shuffle",stationIdArray:d.join(","),selected:"my"==e}];c.push({genreName:"line",genreLabel:null,stationIdArray:null,selected:!1});for(q in b)c.push({genreName:q,genreLabel:"Shuffle "+q+" stations",stationIdArray:b[q].join(","),selected:e==q});if(!this.model.get("currentStationViewIsShuffle"))for(e=0;e<c.length;e++)c[e].selected=!1;return c},events:{"click .shufflePickerItem":"shufflePickerItemClick", | |
"mouseover #shufflePickerContainer":"shufflePicker_mouseOver","mouseout #shufflePickerContainer":"shufflePicker_mouseOut"},shufflePickerItemClick:function(b){R(Du);var c=$(b.target).attr("stationIdArray");c&&(c=c.split(","),b=""+$(b.target).attr("genreName"),this.model.set({currentShuffleType:b}),z.b(li,{stationIdArray:c,isExplicitSave:!0,genre:"all"===b?null:b,shuffleType:"all"===b?b:"my"}),this.model.get("currentStation").D()||(b=this.model.get("stationList").select(function(b){return b.D()&&b.Z()})[0], | |
z.b(ji,{stationId:b.e(),userInitiated:!0}),this.model.set({currentStationViewIsShuffle:!0})))},shufflePicker_mouseOver:function(){clearTimeout(kz.hideTimeout)},shufflePicker_mouseOut:function(){R(Du)}});function lz(){} | |
lz=Backbone.View.extend({initialize:function(){new mz;this.ul=null;this.model.bind("change:selectedTrack",r(this,this.Ms))},el:$("#videoPageInfo").get(0),Ms:function(){var b=this.model.get("selectedTrack"),c=this.model.get("currentUser");if(null!=b&&null!=c&&c.H()){b=b.bf;c=nz[b];if(null!=c){this.ul=b;$(".caption",this.el).text(c.aD);$(".caption_header",this.el).text(c.cD);$(".caption_footer",this.el).text(c.bD);$("a",this.el).attr("href",c.jE);$("img",this.el).attr("src",c.ZC);$(this.el).slideDown();s("video_bubble_display", | |
{arist_id:b},this.model.get("currentUser"));return}$(this.el).slideUp()}$(this.el).hide();this.ul=null},events:{"click a":"linkClicked"},linkClicked:function(){z.b(ci);null!=this.ul&&s("video_bubble_click",{arist_id:this.ul},this.model.get("currentUser"));return!0}});function oz(){} | |
oz=Backbone.View.extend({initialize:function(){var b=$(".buyButton",this.el);this.dF=new pz({buyButton:b,buyMenu:$("#buy_menu_dd"),cssBeforeOpen:function(){var c=b.offset(),e=$("#buy_menu_dd").parent().offset().top,h=c?c.top:0;return{left:(c?c.left:0)-($("#buy_menu_dd").width()-b.outerWidth()),top:h-e+b.outerHeight()}},model:this.model});var c=$(".autoshareButton",this.el);this.SE=new Vy(c,null,$("#autoshare_menu_dd"));this.SE.Dm=r(this,function(){var b=c.offset(),e=$("#autoshare_menu_dd").parent().offset().top;$("#autoshare_menu_dd").css({left:(b? | |
b.left:0)-($("#autoshare_menu_dd").width()-c.outerWidth()),top:(b?b.top:0)-e+c.outerHeight()})});$("#autoshare_menu_dd .autoshareOn").click(r(this,this.UE));$("#autoshare_menu_dd .autoshareOff").click(r(this,this.TE));$("#autoshare_menu_dd .autoshareOptions").click(r(this,this.VE));this.PA();this.model.bind("change:autoShare",r(this,this.PA));this.model.bind("change:selectedTrack",r(this,this.Ms));this.model.bind("change:currentUser",r(this,this.ww));z.c($e,r(this,this.gj));z.c(Sk,r(this,this.lf)); | |
z.c(Rk,r(this,this.Ej))},el:$("#trackInfoContainer").get(0),PA:function(){this.model.get("autoShare")?($(".autoshareButton",this.el).addClass("on"),$(".autoshareOn").addClass("checked"),$(".autoshareOff").removeClass("checked")):($(".autoshareButton",this.el).removeClass("on"),$(".autoshareOn").removeClass("checked"),$(".autoshareOff").addClass("checked"))},ww:function(){var b=this.model.get("currentUser"),c=this.model.get("currentStation");b&&b.gq&&c&&c.lp()?$(".autoshareButton",this.el).show(): | |
$(".autoshareButton",this.el).hide()},Ms:function(){this.ww();var b=this.model.get("selectedTrack");if(b&&b instanceof Bn){var c=this.model.get("currentTrack")?this.model.get("currentTrack").o():null;b.o()!=c||b instanceof po&&b.qL()?this.Zq(!0):this.Zz(!0);$("#trackInfoButtons").slideUp("fast")}else b&&b.Kc?($("#trackInfoButtons").slideUp("fast"),this.Zq(!0)):b&&b instanceof ro?($(".liveNow",this.el).hide(),$(".audioAdInfo",this.el).hide(),$("#audioAdDetail").hide(),b.DD?($(".buyButton",this.el).hide(), | |
$("#trackInfoButtons").slideDown("fast")):$("#trackInfoButtons").slideUp("fast"),$(".info",this.el).hide(),$(".artistMessageInfo",this.el).show(),$(".artistSummary",this.el).text(b.W())):null!=b?($(".liveNow",this.el).hide(),this.Zz(!1),b instanceof Dn?($("#trackInfoButtons").slideDown("fast"),$(".artistSummary",this.el).css("text-decoration","").text(b.W()).attr("href",b.bh()),$(".albumTitle",this.el).css("text-decoration","").text(b.kb).attr("href",b.Ol()),$(".byText",this.el).text(b.sb?b.sb:"by"), | |
$(".onText",this.el).text(b.Mc?b.Mc:"on"),$(".featured",this.el).toggle(!1),this.model.get("currentTrack")==b?($(".songTitle",this.el).hide(),$(".liveNow",this.el).show(),this.Zv()):$(".songTitle",this.el).css("text-decoration","").text(b.Ja).attr("href",b.hh()).show()):b.Yl()?($(".songTitle",this.el).removeAttr("href").css("text-decoration","none").text(b.Ja).show(),$(".artistSummary",this.el).removeAttr("href").css("text-decoration","none").text(b.W()),$(".albumTitle",this.el).removeAttr("href").css("text-decoration", | |
"none").text(b.kb),$(".byText",this.el).text(b.sb?b.sb:"from"),$(".onText",this.el).text(b.Mc?b.Mc:"on"),$(".featured",this.el).toggle(!1)):($(".featured",this.el).toggle(b.oh()),$(".songTitle",this.el).css("text-decoration","").text(b.Ja).attr("href",b.hh()).show(),$(".artistSummary",this.el).css("text-decoration","").text(b.W()).attr("href",b.bh()),b.fv?$(".albumTitle",this.el).removeAttr("href").css("text-decoration","none").text(b.kb):$(".albumTitle",this.el).css("text-decoration","").text(b.kb).attr("href", | |
b.Ol()),$(".byText",this.el).text(b.sb?b.sb:"by"),$(".onText",this.el).text(b.Mc?b.Mc:"on")),this.dF.lP(b),b.Jy()?$(".buyButton",this.el).show():$(".buyButton",this.el).hide(),$("#trackInfoButtons").slideDown("fast"),this.WA(b)):$("#trackInfoButtons").slideUp("fast");this.td()},gj:function(b){var c=b.track;b=b.stationId;var d=this.model.get("currentTrack"),e=this.model.get("currentStation");null!=d&&c.o()==d.o()&&null!=e&&e.e()==b&&this.WA(c)},WA:function(b){1==b.Nc?($("#thumbup",this.el).show(), | |
$("#thumbdown",this.el).hide()):-1==b.Nc?($("#thumbup",this.el).hide(),$("#thumbdown",this.el).show()):($("#thumbup",this.el).hide(),$("#thumbdown",this.el).hide())},Zz:function(b){this.Zq(b);b?$(".audioAdInfo",this.el).show():($(".audioAdInfo",this.el).hide(),$("#audioAdDetail").hide())},Zq:function(b){$(".artistMessageInfo",this.el).hide();$(".liveNow",this.el).hide();b?($("#trackInfoButtons").slideUp("fast"),$(".info",this.el).hide()):($("#trackInfoButtons").slideDown("fast"),$(".info",this.el).show())}, | |
td:function(){if(!this.fc){var b=this.model.get("selectedTrack"),c=$(".contents",this.el);null!=b?c.is(":visible")||(this.fc=!0,c.fadeIn(400,r(this,function(){this.fc=!1;$(this.el).is(":visible")&&this.td()}))):c.is(":visible")&&(this.fc=!0,c.fadeOut(200,r(this,function(){this.fc=!1;this.td()})))}},Zv:function(){this.model.get("currentTrack")instanceof Dn&&($(".liveNowStatusIcon").animate({opacity:"0.4"},2E3),$(".liveNowStatusIcon").animate({opacity:"1.0"},2E3,"swing",r(this,this.Zv)))},lf:function(b){b&& | |
"ANIMATEDOVERLAY"==b.C()&&$(".contents",this.el).fadeOut(200)},Ej:function(b){b&&"ANIMATEDOVERLAY"==b.C()&&$(".contents",this.el).fadeIn(200)},UE:function(){z.b(oj);return!1},TE:function(){if(this.model.get("facebookAuthenticated")){var b=this.model.get("currentUser");z.b(wi,{autoShareEnabled:!1,autoShareTrackPlay:b.Vg,autoShareLikes:b.Ug,autoShareFollows:b.Tg,userInitiated:!0})}return!1},VE:function(){var b=this.model.get("currentUser");null!=b&&b.p()?R(rv,{onSuccessRedirect:"/account/privacy"}): | |
V("/account/privacy",!0,!0);return!1},events:{"click .buyButton":"buyButtonClick","click .shareButton":"shareButtonClick","click .whyAdsButton":"whyAdsClick","click .songTitle":"songTitleClick","click .artistSummary":"artistSummaryClick","click .albumTitle":"albumTitleClick"},whyAdsClick:function(){s("ad",{action:"why_ads_tapped",device_os:"web"},this.model.get("currentUser"));$("#audioAdDetail").toggle();return!1},shareButtonClick:function(){var b=this.model.get("currentUser");if(null==b||b.p())R(rv); | |
else{var b=this.model.get("selectedTrack"),c=this.model.get("currentStation");b&&c&&(c.D()&&(c=this.model.get("stationList").Uc(b.e())),R(Ou,{mode:"station_and_song",station:c,track:b}),s("link",{click:"shareButton",source:"TrackInfoView"},this.model.get("currentUser")))}return!1},menuButtonClick:function(){return!1},buyButtonClick:function(){s("link",{click:"buyButton",source:"TrackInfoView"},this.model.get("currentUser"))},songTitleClick:function(){R(Ow,"song")},artistSummaryClick:function(){R(Ow, | |
"artist")},albumTitleClick:function(){R(Ow,"album")}});function qz(){} | |
qz=Backbone.View.extend({eC:4,e_:4,bc:300,EB:"offensive",DB:"irrelevant",FB:"unwanted",yB:/\/station\/start\/([\w-]+)/,initialize:function(){this.um=null;this.vl=0;this.model.bind("change:selectedTrack",r(this,this.Ns));this.model.bind("change:selectedArtist",r(this,this.WO));z.c(Ug,r(this,this.dI));S(Ov,r(this,this.Bq));window.pandoraCustomContentLoaded=this.UF;this.render();$("#flag_menu_dd .offensive").click(r(this,this.bI));$("#flag_menu_dd .irrelevant").click(r(this,this.aI));$("#flag_menu_dd .unwanted").click(r(this, | |
this.cI))},el:$("#trackDetailContainer").get(0),render:function(){$("#trackDetail",this.el).append($("#trackDetailItemThumbInfo").tmpl());$("#trackDetail",this.el).append($("#trackDetailItemTmpl").tmpl({heading:Vc(),className:"lyrics"}));$("#trackDetail",this.el).append($("#trackDetailNoContentItemTmpl").tmpl({noContentText:Wc(),className:"nolyrics"}));$("#trackDetail",this.el).append($("#trackDetailFeaturedTmpl").tmpl({className:"featured"}));A._data.isAAMFlaggingV2?$("#trackDetail",this.el).append($("#trackDetailArtistMessageTmplV2").tmpl({className:"artistMessage"})): | |
$("#trackDetail",this.el).append($("#trackDetailArtistMessageTmpl").tmpl({className:"artistMessage"}));$("#trackDetail",this.el).append($("#trackDetailItemTmpl").tmpl({heading:Xc(),className:"artistBio"}));$("#trackDetail",this.el).append($("#trackDetailItemTmpl").tmpl({heading:$c(),className:"aboutEpisode"}));$("#trackDetail",this.el).append($("#trackDetailItemTmpl").tmpl({heading:ad(),className:"moreShows"}));$("#trackDetail",this.el).append($("#trackDetailItemTmpl").tmpl({heading:Yc(),className:"relatedArtists"})); | |
k.debug("sending google analytics event: backstage");window.ga("send","backstage");return this},FD:function(b){if(!b)return!1;b=b.qv||b.vv;return b?(b=this.model.get("stationList").Uc(b))?b.Ha():!1:!1},AD:function(b){if(!b)return null;b=b.e();if(!b)return null;b=this.model.get("stationList").Uc(b);if(!b)return!1;var c=this.model.get("currentUser");return c?b.gh()===c.s:!1},gE:function(b){var c=this.AD(b),d=this.FD(b),e=$(".tpr-coachmark",this.el);!c||0>=b.JD||d?e.hide():(c=this.qD(b)||this.rD(b))? | |
(b=[Hd(c.Ni),"<span class='tpr-coachmark__text__details'>",Hd(b.Ja),"</span>on <span class='tpr-coachmark__text__details'>",Hd(c.xt),"</span>on <span class='tpr-coachmark__text__details'>",Hd(c.Kw.format("mmm dd, yyyy")),"</span>"],e.find(".tpr-coachmark__text").html(b.join(" ")),e.show()):e.hide()},rD:function(b){var c=this.model.get("stationList"),d=b.vv;b=b.GD;return d&&b?(c=c.Uc(d))?{Ni:"You last thumbed up ",xt:c.fa(),Kw:b}:null:null},qD:function(b){var c=this.model.get("stationList"),d=b.qv; | |
b=b.oD;return d&&b?(c=c.Uc(d))?{Ni:"You first thumbed up ",xt:c.fa(),Kw:b}:null:null},dI:function(b){var c=this.model.get("selectedTrack");c&&c instanceof ro&&c.Hc==b.artistMessageId&&$(".artistMessage .icon",this.el).removeClass("icon-flag-outline").addClass("icon-flag-filled")},Ns:function(){var b;this.L=this.model.get("selectedTrack");var c=this.model.get("currentTrack");this.gE(this.L);b=$(".item.featured",this.el);null==this.L||this.L.me||null==c||this.L.o()!=c.o()?b.toggle(!1):b.toggle(this.L.oh()); | |
this.L&&this.L instanceof ro?(_.contains(bn(),this.L.Hc)?$(".artistMessage .icon",this.el).removeClass("icon-flag-outline").addClass("icon-flag-filled"):$(".artistMessage .icon",this.el).removeClass("icon-flag-filled").addClass("icon-flag-outline"),(c=this.L.TC)&&0<c.length?(b=this.L.SC,$(".artistMessage .btns a",this.el).attr("href",c).text(b),-1<c.indexOf(fn())&&$(".artistMessage .btns a",this.el).removeAttr("target"),$(".artistMessage .btns",this.el).show()):$(".artistMessage .btns",this.el).hide(), | |
$(".artistMessage",this.el).show(),z.b(qk,{artistMessageId:this.L.Hc,artistUid:this.L.ke,metric:m.Ab.oB(),isOnDemand:this.L.ze(),shareUrlType:cp("sut")})):$(".artistMessage",this.el).hide();c=$(".lyrics .itemContent",this.el);c.empty();null==this.L||this.L.me||(b=this.L.Lo,null!=b&&(b=b.replace(/\n/g,"<br>"),b=$("#lyricsContentTmpl").tmpl({lyricSnippet:b}),c.empty().append(b)));$(".nolyrics",this.el).hide();$(".lyrics",this.el).hide();c=this.L?this.L.bf:null;c!=this.DL&&(this.DL=c,$(".artistBio .itemContent", | |
this.el).prev().empty(),$(".artistBio .itemContent",this.el).empty(),$(".artistBio",this.el).hide(),$(".relatedArtists .itemContent",this.el).empty(),$(".relatedArtists .itemContent",this.el).prev().empty(),$(".relatedArtists",this.el).hide());if(this.L&&this.L.me){var d=this.L.me;if(null!=d&&0<d.length){this.vl=(this.vl+1)%2;$.get(d,r(this,function(b){$("#trackDetail").hide();b+="<script>$(document).ready(function() {setTimeout(function() { pandoraCustomContentLoaded("+this.vl+")}, 500)});\x3c/script>"; | |
var c=$("#customContentTrackDetailFrame"+this.vl);c.hide();try{c.html(b)}catch(l){k.error("Bad HTML for template "+d)}$("#customContentTrackDetail").show();this.td()}));return}k.warn("No station template for "+this.L.o())}else $("#customContentTrackDetail").hide();this.td();this.YQ()},UF:function(b){$("#customContentTrackDetailFrame"+b).show();$("#customContentTrackDetailFrame"+(b+1)%2).hide()},td:function(){if(!this.fc){var b=this.model.get("selectedTrack");if(null!=b)b instanceof Bn||b.Kc?$("#trackDetail").hide(): | |
$("#trackDetail").show(),$("#detailContainer").is(":visible")||(this.fc=!0,$("#detailContainer").fadeIn(400,r(this,function(){this.fc=!1;$("#home").is(":visible")&&this.td()})));else{var b=this.model.get("currentStation"),c=this.model.get("narrative"),b=b&&b.Ra()&&null!=c?!1:!0;$("#detailContainer").is(":visible")?b&&(this.fc=!0,$("#detailContainer").fadeOut(200,r(this,function(){$(".lyrics",this.el).css({opacity:"hide",height:"hide"});this.fc=!1;this.td()}))):b||(this.fc=!0,$("#detailContainer").fadeIn(400, | |
r(this,function(){this.fc=!1;this.td()})))}}},im:function(){setTimeout(r(this,function(){$(".itemContent:visible",this.el).next(".divider").removeClass("last").last().addClass("last")}),50)},YQ:function(){var b=this.model.get("selectedTrack"),c=Xo();null!=b&&(c&&!b.me?(null!=b.Lo?(this.Pf($(".nolyrics",this.el)),this.dt($(".lyrics",this.el))):(this.Pf($(".lyrics",this.el)),this.Pf($(".nolyrics",this.el))),this.im()):($(".nolyrics",this.el).hide(),$(".lyrics",this.el).hide()))},WO:function(){var b= | |
this.model.get("selectedArtist");if(null!=b){var c=this.model.get("selectedTrack"),c=c&&c instanceof ro,d=b.cv;null!=d&&0<d.length&&wy(b,this.L)?($(".artistBio .itemContent",this.el).prev().text(Xc()+" "+b.getName()),d=$("#artistBioContentTmpl").tmpl(b),$(".artistBio .itemContent",this.el).empty().append(d),this.dt($(".artistBio",this.el)),this.im()):this.Pf($(".artistBio",this.el));d=b.Gv;if(!c&&0<d.length&&wy(b,this.L)){var e=$(".relatedArtists .itemContent",this.el);e.empty();var h=this.eC;$.each(d, | |
function(b,c){if(b==h)return!1;var d=$("#relatedArtistItemTmpl").tmpl(c);e.append(d)});this.dt($(".relatedArtists",this.el));this.im()}else this.Pf($(".relatedArtists",this.el));b=b.mL()?Zc():Yc();$(".relatedArtists .itemContent",this.el).prev().text(b)}else this.Pf($(".artistBio",this.el)),this.Pf($(".relatedArtists",this.el));this.im()},showFullLyrics:function(b){var c=b.hv;b=b.yv;var d=$(".lyrics",this.el).height();$(".lyrics",this.el).css({overflow:"hidden","max-height":d});$(".lyrics",this.el).data("snippetHeight", | |
d);$(".lyrics .lyricsText",this.el).empty().append(b);$(".lyrics .lyricsText",this.el).after($("#fullLyricsCreditsTmpl").tmpl(c));c=$(".lyrics .itemContent",this.el).height();$(".lyrics",this.el).animate({"max-height":c},r(this,function(){$(".lyrics",this.el).css({overflow:"","max-height":""})}));$(".showLessLyrics",this.el).show()},LK:function(){var b=$(".lyrics",this.el).data("snippetHeight");$(".lyrics",this.el).animate({height:b},r(this,function(){var b=this.model.get("selectedTrack");null!=b&& | |
(b=b.Lo,b=null!=b?b.replace(/\n/g,"<br>"):"",$(".lyrics .lyricsText",this.el).empty().append(b));$(".lyrics",this.el).css({height:""})}));$(".fullLyricsCredit",this.el).fadeOut(r(this,function(){$(".fullLyricsCredit",this.el).remove()}));$(".gracenote_copyright",this.el).fadeOut(r(this,function(){$(".gracenote_copyright",this.el).remove()}));$(".showLessLyrics",this.el).hide();$(".showMoreLyrics",this.el).show()},showFullContent:function(b){var c=$(b.target);b=c.parent();var d=b.find(".snippetAndContentContainer"), | |
e=d.find(".snippet"),h=d.find(".fullContent"),c=c.attr("data-link-click"),l=d.height();d.css({overflow:"hidden","max-height":l});d.data("snippetHeight",l);e.hide();h.show();e=h.height();d.animate({"max-height":e},r(this,function(){d.css({overflow:"","max-height":""})}));s("link",{click:c,source:"TrackDetailView"},this.model.get("currentUser"));"showFullEpisodeList"==c&&(this.um=[this.model.get("currentStation").e(),l]);$(".showFullContent",b).hide();$(".showSnippet",b).show()},showSnippet:function(b){var c= | |
$(b.target);b=c.parent();var d=b.find(".snippetAndContentContainer"),e=d.find(".snippet"),h=d.find(".fullContent"),c=c.attr("data-link-click"),l=d.data("snippetHeight"),l=l?l:this.um?this.um[1]:e.innerHeight();d.animate({height:l},r(this,function(){e.show();h.hide();d.css({height:""})}));s("link",{click:c,source:"TrackDetailView"},this.model.get("currentUser"));"showLessEpisodeList"==c&&(this.um=null);$(".showSnippet",b).hide();$(".showFullContent",b).show()},zm:function(){null==this.model.get("narrative")&& | |
null==this.model.get("songNarrative")?$("#trackDetail",this.el).fadeIn():$("#trackDetail",this.el).fadeOut();this.td()},events:{"click .showMoreLyrics":"showMoreLyricsClick","click .showLessLyrics":"showLessLyricsClick","click .showFullBio":"showFullBioClick","click .getRelatedArtist":"handleRelatedArtistClick","click .showFullContent":"showFullContent","click .showSnippet":"showSnippet","click .featured_learn_more_link":"featuredTrackLearnMoreClick","click .artistMessage a.js-cta":"artistMessageButtonClick", | |
"click .artistMessage p.flag a.js-flag-message":"artistMessageFlagClick","mouseover .artistMessage p.flagWithReason a.js-flag-message":"artistMessageFlagWithReasonMouseover","click .artistMessage p.flagWithReason a.js-flag-message":"artistMessageFlagWithReasonClick","click .artistMessage .js-cta.button":"handleArtistMessageStationCreate"},showMoreLyricsClick:function(){var b=this.model.get("selectedTrack");null!=b&&this.trigger("getFullLyrics",zy(b));$(".showMoreLyrics",this.el).hide();R(xw);s("link", | |
{click:"showMoreLyrics",source:"TrackDetailView"},this.model.get("currentUser"));return!1},showLessLyricsClick:function(){this.LK();R(yw);s("link",{click:"showLessLyrics",source:"TrackDetailView"},this.model.get("currentUser"));return!1},showFullBioClick:function(){R(Ow,"artist");s("link",{click:"showFullBio",source:"TrackDetailView"},this.model.get("currentUser"))},handleRelatedArtistClick:function(){R(Ow,"artist");s("link",{click:"getRelatedArtist",source:"TrackDetailView"},this.model.get("currentUser"))}, | |
featuredTrackLearnMoreClick:function(){s("link",{click:"featuredTrackLearnMore",source:"TrackDetailView"},this.model.get("currentUser"))},artistMessageButtonClick:function(){z.b(qk,{artistMessageId:this.L.Hc,artistUid:this.L.ke,metric:m.Ab.nB(),isOnDemand:this.L.ze()});return!0},Bq:function(){z.b(ai)},artistMessageFlagClick:function(){var b=this.L.Hc;_.contains(bn(),b)||(an(b),z.b(rk,{artistMessageId:b,artistUid:this.L.ke,stationId:this.L.e()}))},artistMessageFlagWithReasonClick:function(){this.va.open(); | |
this.model.get("currentTrack")instanceof ro&&z.b(ci)},artistMessageFlagWithReasonMouseover:function(){var b=$(".item.artistMessage");r(this,function(){b.fadeIn(200);this.gp(b)})();return!1},handleArtistMessageStationCreate:function(b){if(!b||!b.target||!b.target.href)return!0;b=b.target.href.match(this.yB);if(null===b)return!0;z.b(Di,{stationCode:"st"+b[1],source:"track_detail"});return!1},wq:function(b){var c=this.L.Hc;_.contains(bn(),c)||(an(c),z.b(sk,{artistMessageId:c,artistUid:this.L.ke,flagReason:b}))}, | |
bI:function(){this.wq(this.EB)},aI:function(){this.wq(this.DB);(new X({message:vc()})).render()},cI:function(){this.wq(this.FB);(new X({message:wc()})).render()},gp:function(b){this.va=new Vy($(".artistMessage p.flagWithReason a.js-flag-message"),null,$("#flag_menu_dd"));this.va.zi=function(){return!1};var c=b.offset(),d=c?c.top:0,c=c?c.left:0;$("#flag_menu_dd").css({top:d-$("#flag_menu_dd").height(),left:c-$("#flag_menu_dd").width()/2+b.width()/4})},Pf:function(b,c){b.stop(!0,!0).animate({opacity:"hide", | |
height:"hide"},this.bc,c)},dt:function(b,c){b.stop(!0,!0).animate({opacity:"show",height:"show"},this.bc,function(){we()&&b.css("filter","none !important");c&&c()})}});function rz(){} | |
rz=Backbone.View.extend({BC:250,Yh:7,zB:$("#currentSlideArrow").height(),gC:300,hC:15,pC:500,Ju:1E3,ku:215,initialize:function(){this.th={};this.un=null;this.md=this.selectedIndex=0;this.Kr=null;this.Nh=!1;this.jn={};this.Cf=this.Ws=!1;this.model.bind("change:currentTrack",r(this,this.ql));z.c(eg,r(this,this.tw));this.model.bind("change:keyPressed",r(this,this.lJ));this.model.bind("change:currentContextualTip",r(this,this.pI));z.c(De,r(this,this.lF));z.c($e,r(this,this.gj));z.c(nf,r(this,this.DQ)); | |
z.c(pf,r(this,this.aQ));z.c(ci,r(this,this.HQ));z.c(pg,r(this,this.oM));z.c(ai,r(this,this.LA));z.c(mi,r(this,this.Hm));z.c(Fk,r(this,this.bq));z.c(Ze,r(this,this.zN));z.c(jh,r(this,this.lz));z.c(kh,r(this,this.lz));z.c(di,r(this,this.ay));z.c(rg,r(this,this.ay));z.c(Xe,r(this,this.$J));z.c(Sk,r(this,this.lf));z.c(Rk,r(this,this.Ej));S(Rv,r(this,this.pQ));S(Vv,r(this,this.TJ));S(Sv,r(this,this.ey));S(Tv,r(this,this.dy));S(yu,r(this,this.Er));S(cw,r(this,this.Ot));$("#track_menu_dd .newStationFromSong").click(r(this, | |
this.Jr));$("#track_menu_dd .newStationFromArtist").click(r(this,this.Ir));$("#track_menu_dd .tiredOfSong").click(r(this,this.Jt));$("#track_menu_dd .whySelected").click(r(this,this.tR));$("#track_menu_dd .moveSong").click(r(this,this.Dr));dz("/song/sleep/");this.cL();this.Hm(Em())},el:$(".slidesForeground").get(0),cL:function(){this.Qy=this.S=Sm();this.Og=null;this.qr=this.S;this.Ot();$("#trackInfo .slideDragHandle").draggable({axis:"y",containment:$(".slideDragLimit"),helper:"clone",start:r(this, | |
this.Mp),stop:r(this,this.Np),drag:r(this,this.Lp)});$("#trackInfo .slideDragHandle").hover(function(){$("#trackInfo .slideDrag").addClass("hover")},function(){$("#trackInfo .slideDrag").removeClass("hover")})},Mp:function(b,c){R(Qv);this.Ww=c.offset.top-this.S;this.bA();s("link",{click:"resizeAlbumArt",source:"AlbumSlidesView"},this.model.get("currentUser"))},bA:function(){null!=this.Og&&clearTimeout(this.Og);this.Og=setTimeout(r(this,function(){this.S!=this.qr&&(this.S=this.qr,this.kg());this.bA()}), | |
1E3/60)},Np:function(b,c){null!=this.Og&&clearTimeout(this.Og);this.Og=null;this.S=c.offset.top-this.Ww;this.Ot();pm(Wl,this.S)},Lp:function(b,c){this.qr=c.offset.top-this.Ww},lf:function(b){this.Qy=this.S;b&&"ANIMATEDOVERLAY"==b.C()&&(this.S!=this.ku&&(this.S=this.ku,this.kg()),$(".slides",this.el).fadeOut(200))},Ej:function(b){b&&"ANIMATEDOVERLAY"==b.C()&&(this.S=this.Qy,this.kg(),$(".slides",this.el).fadeIn(200))},Ot:function(){this.Fv();this.Jv($(".stationSlides",this.el))},kg:function(){this.Fv(); | |
var b=this.model.get("currentStation");null!=b&&this.Jv($("#stationSlides"+b.e()))},Fv:function(){$(".slides",this.el).height(this.S);var b=this.S+this.Yh;$("#mainContentContainer .slidesBackground div").height(b);$(".slides",this.el).css("margin-top",-(b+this.zB+1));$("#currentSlideArrow").css("margin-right",Math.floor(this.S/2)-this.Yh)},Jv:function(b){b.each(r(this,function(b,d){$("img",d).attr({width:this.S,height:this.S});$(".slide",d).css({width:this.S,height:this.S});var e=0.8*this.S;$(".pauseWatermark", | |
d).css({width:e,height:0.3*this.S,right:this.S+Math.floor((this.S-e)/2)+2*this.Yh});$(".muteWatermark",d).css({width:e,height:0.3*this.S,right:this.S+Math.floor((this.S-e)/2)+2*this.Yh});$(".replayWatermark",d).css({width:e,height:0.3*this.S,right:this.S+Math.floor((this.S-e)/2)+2*this.Yh});this.$j($(d))}))},Wc:function(){var b=this.model.get("currentStation");return null!=b?$("#stationSlides"+b.e()):null},ql:function(){if(this.Nh)ae(this,this.ql,100);else{this.vp();var b=this.model.get("currentTrack"), | |
c=this.model.get("currentStation");if(null!=c&&null!=b){if(b instanceof Bn&&!b.sm())return;var d=c.e(),e=this.th[d]?this.th[d].o():null;if(null==e||"0"==e||e!=b.o()){var e=$("#stationSlides"+d),h=$(".slide",e).eq(1),l=$(".slide",e).eq(0);if(!c.Ka()&&h.data("track")instanceof po&&b instanceof po){h.data("track",b);$(".art",h).attr("src",b.vb());return}null==this.jn[d]&&(this.jn[d]=0);l.data("track",b);l.data("slideIndex",this.jn[d]++);c=$("#songSlideTmpl").tmpl(this.S);e.prepend(c);this.NO(h);$(".pauseWatermark", | |
h).fadeOut();$(".muteWatermark",h).fadeOut();this.paused=!1;this.muted&&this.ft();var p=$(".art",l).attr("src",b.vb());p&&p.bind("imgpreload",function(){$(this).fadeIn("fast").prev().hide()});$(".treatment.current",l).stop(!0,!0).fadeIn(400,function(){$(this).show()});$(".treatment.previous",l).stop(!0,!0).fadeOut(400,function(){$(this).hide()});0<h.length&&($(".treatment.current",h).stop(!0,!0).fadeOut(400,function(){$(this).hide()}),h.data("track")instanceof Bn||this.cq(h,400));0==this.selectedIndex? | |
(c.animate({width:this.S}),this.hg(b)):(this.selectedIndex++,c.css({width:this.S}));this.th[d]=b;this.$j(e);this.YA(l,b);$(".featuredTrackArtBanner",h).fadeOut();b.oh()&&$(".featuredTrackArtBanner",l).show()}this.Cf=b instanceof Dn}this.rk();0==this.selectedIndex?this.hg(b):(b.gb()&&this.Er(),this.Aw(),this.Kr=setTimeout(r(this,function(){this.Er()}),1E3*this.hC))}},NO:function(b){if(b.data("track")instanceof Bn){var c=this.model.get("currentStation");c&&!c.Ka()&&(this.model.get("displayingCompanion")? | |
(this.bq(),this.sh=b):(this.sh=b,this.bq()))}},bq:function(){var b=this.model.get("currentStation");if(this.sh&&!b.Ka()){var c=this.sh.data("track");if(null!=c){c.zf="";c.Qb="/img/ads/generictile.png";var d=$(".art",this.sh);this.cq(this.sh,200,function(){d.attr("src",c.vb())})}this.sh=null}},hg:function(b){var c=this.model.get("selectedTrack");null!=c&&null!=b&&c.o()==b.o()||this.model.set({selectedTrack:b})},Aw:function(){null!=this.Kr&&clearTimeout(this.Kr)},tw:function(){this.vp();var b=null, | |
c=this.model.get("currentStation");null!=c&&(b=c.e());b!=this.ka&&(this.selectedIndex=0,this.MF(b),null!=this.ka?(this.ZP(this.ka,r(this,function(){this.ka=null;this.tw()})),this.PK(),R(uv)):(this.ka=b,this.YP(b),this.rk()))},lF:function(){$(".stationSlides",this.el).remove();this.ka=null;this.th={};this.jn={};this.S=Sm()},gj:function(b){var c=b.track,d=this;$("#stationSlides"+b.stationId).find(".slide").each(function(){d.YA(this,c)})},YA:function(b,c){var d=$(b).data("track");cy(d,this.model.get("stationList"))? | |
($(".thumbUp",b).addClass("thumbUpDis").empty(),$(".thumbDown",b).addClass("thumbDownDis").empty()):d&&d.o()==c.o()&&($(".thumbUp",b).removeClass("indicator"),$(".thumbDown",b).removeClass("indicator"),1==c.Nc?$(".thumbUp",b).addClass("indicator"):-1==c.Nc&&$(".thumbDown",b).addClass("indicator"),$(b).data("track",c))},ZP:function(b,c){if(null!=b){this.Nh=!0;var d=$("#stationSlides"+b);if(0<d.length){var e=d.width(),h=e-(this.Cx()+this.Hx(d));d.animate({width:h},r(this,function(){d.hide();d.width(e); | |
this.$j(d);this.Nh=!1;c()}));return}}c()},YP:function(b){if(null!=b){this.Nh=!0;$(".stationSlides",this.el).hide();var c=$("#stationSlides"+b);this.$j(c);var d=this.$l(c),e=this.S*(d+3);c.css("left",e);c.show();c.animate({left:-e},r(this,function(){ae(this,function(){var c=this.model.get("currentStation");c&&c.e()==b&&0<d&&null==this.model.get("selectedTrack")&&(this.th[b]?this.hg(this.th[b]):this.hg(this.model.get("currentTrack")))},500);this.Ws&&this.Nv();this.kg();this.Nh=!1}))}},MF:function(b){if(null!= | |
b){var c=$("#stationSlides"+b);if(0==c.length){var c=$("#stationSlidesTmpl").tmpl().appendTo($(".slides",this.el)),d=$("#songSlideTmpl").tmpl(this.S);d.width(this.S);c.append(d);this.$j(c);c.attr("id","stationSlides"+b);c.show()}}},$j:function(b){var c="none"!=b.css("display"),d=this.$l(b);b.width(this.Cx()+this.S*(d+4));c=this.S*(d+3)*(c?-1:1);d=this.Ix(b);b.css({left:c,"padding-left":d})},Cx:function(){return $("#mainContentContainer").width()-$(".stationContent").outerWidth()},lJ:function(){var b= | |
this.model.get("keyPressed");if(null!=b&&"INPUT"!=b.target.tagName&&"TEXTAREA"!=b.target.tagName&&$("#mainContent .home").is(":visible")){if(37==b.which){this.mm(1);return}if(39==b.which){this.mm(-1);return}}this.uq()},mm:function(b){this.Fr||(this.md=b,this.Cr=0,this.Kp())},moveTo:function(b){this.Cr=this.md=0;this.cA(b)},Er:function(){this.moveTo(0)},Kp:function(){if(!this.Fr)if(0!=this.md)this.cA(this.selectedIndex+this.md);else{var b=this.Wc(),c=$(".slide",b).eq(this.selectedIndex+1);c&&($(".treatment.previous", | |
c).stop(!0,!0).fadeOut(200,function(){$(this).hide()}),null!=this.Hr&&clearTimeout(this.Hr),this.Hr=setTimeout(r(this,function(){this.Hr=null;this.hg(c.data("track"))}),this.pC),(b=c.data("track"))&&s("template_impression",{station_id:b.e(),track_id:b.o()},this.model.get("currentUser")));this.rk()}},uq:function(){0!=this.md&&(this.md=0,this.Kp())},cA:function(b){var c=this.Wc();if(c)if(b=Math.max(b,0),b=Math.min(b,this.$l(c)-1),b!=this.selectedIndex){var d=$(".slide",c).eq(this.selectedIndex+1);if(d){var e= | |
this.model.get("currentStation"),h=d.data("track");(e=e.Ka())&&(!e||h instanceof Bn)||this.cq(d,200)}this.hg(null);this.Aw();this.selectedIndex=b;b=0==this.Cr?"easeInQuad":"linear";this.Fr=!0;c.animate({"padding-left":this.Ix(c)},this.gC,b,r(this,function(){this.Fr=!1;0>this.md?this.md--:0<this.md&&this.md++;this.Cr++;this.Kp()}))}else this.uq()},cq:function(b,c,d){we()?$(".treatment.previous",b).stop(!0,!0).animate({opacity:0.75},c,function(){$(this).show();d&&d()}):$(".treatment.previous",b).stop(!0, | |
!0).fadeIn(c,function(){$(this).show();d&&d()})},$l:function(b){return null!=b?$(".slide",b).length-1:0},Ix:function(b){return Math.max(0,this.Hx(b)*this.selectedIndex)},Hx:function(b){return $(".slide",b).last().outerWidth(!0)},Jr:function(){if(this.Df){var b=this.Df.data("track");b&&z.b(Di,{stationCode:"mi"+b.o(),source:"track_action"})}return!1},Ir:function(){if(this.Df){var b=this.Df.data("track");b&&z.b(Di,{stationCode:"mi"+b.bf,source:"track_action"})}return!1},Jt:function(){var b=this.Df.data("track"); | |
b&&z.b(Vi,b);return!1},DQ:function(b){var c=this.model.get("currentTrack");null!=b&&b.o()==c.o()&&(this.qt=!0,z.b(di,{isTiredOfSongSkip:!0}),b="/song/sleep/"+b.o(),bz(b),cz(b))},zN:function(){this.qt&&((new X({message:uc()})).render(),this.qt=!1)},lz:function(){this.qt=!1},tR:function(){var b=this.Df.data("track");if(b){var c=!0,d=this.model.get("currentStation");d&&(d.D()&&!d.Z()||d.Ra())&&(c=!1);z.b(Wi,{track:b,allowActions:c})}return!1},Dr:function(){var b=this.Df.data("track");new sz({model:this.model, | |
track:b});return!1},aQ:function(b){this.model.get("currentTrack");var c=b[2];if(b=this.Wc()){var d=this;$(".slide",b).each(function(){var b=$(this).data("track");if(b&&b.o()==c.o())return $(this).data("disableMenu",!0),d.br($(this)),!1})}},Hm:function(b){0==b?(this.muted=!0,this.ft()):(this.muted=!1,this.kj())},kj:function(){var b=this.Wc(),b=$(".slide",b).eq(1);$(".muteWatermark",b).fadeOut()},ft:function(){if(!this.paused){var b=this.Wc(),b=$(".slide",b).eq(1);$(".muteWatermark",b).css("visibility", | |
"visible").fadeIn();this.kg()}},ay:function(){this.Es&&this.LA()},$J:function(){this.Nh?this.Ws=!0:this.Nv()},Nv:function(){this.Ws=!1;z.b(Ye)},LA:function(){this.$q();this.jm()},$q:function(){this.paused=!1;var b=this.Wc(),b=$(".slide",b).eq(1);$(".pauseWatermark",b).fadeOut();this.muted&&this.ft()},FP:function(){this.paused=!0;if(!this.Es){this.kj();this.jm();var b=this.Wc(),b=$(".slide",b).eq(1);$(".pauseWatermark",b).css("visibility","visible").fadeIn();this.kg()}},HQ:function(){this.FP()},oM:function(){this.KP()}, | |
KP:function(){this.kj();this.$q();this.Es=!0;var b=this.Wc(),b=$(".slide",b).eq(1);$(".replayWatermark",b).css("visibility","visible").fadeIn();this.kg()},jm:function(){this.Es=!1;var b=this.Wc(),b=$(".slide",b).eq(1);$(".replayWatermark",b).fadeOut()},PK:function(){this.$q();this.kj();this.jm()},pQ:function(b){b&&b.ih()&&b.r()&&b.ih().o()&&z.b(Xi,[b.ih().e(),b.r().e(),b.ih().o(),b.V().e()])},dy:function(){var b=$(".slide",this.el);1==b.length?this.$s($(b[0]),!0):1<b.length&&this.$s($(b[1]),!0)}, | |
pI:function(){this.model.get("currentContextualTip")||$(".submenu").removeClass("submenu_force_visible")},TJ:function(){this.ey();setTimeout(r(this,function(){$(".submenu").addClass("submenu_force_visible")}),100)},ey:function(){this.dy();this.va.open()},rk:function(){if(this.Cf)$(".slides_left_scroll",this.el).stop(!0,!0).fadeOut(200);else if(this.cw){var b=$(".slides",this.el).height(),c=$(".slides_right_scroll",this.el).height(),b=Math.floor(b/2)+c;$(".slides_right_scroll",this.el).css("margin-top", | |
-1*b);$(".slides_left_scroll",this.el).css("margin-top",-1*b);0<this.selectedIndex?$(".slides_right_scroll",this.el).stop(!0,!0).fadeIn(200):$(".slides_right_scroll",this.el).stop(!0,!0).fadeOut(200);this.selectedIndex<this.$l(this.Wc())-1?$(".slides_left_scroll",this.el).stop(!0,!0).fadeIn(200):$(".slides_left_scroll",this.el).stop(!0,!0).fadeOut(200)}else $(".slides_right_scroll",this.el).stop(!0,!0).delay(this.Ju).fadeOut(200),$(".slides_left_scroll",this.el).stop(!0,!0).delay(this.Ju).fadeOut(200)}, | |
events:{mouseover:"allSlidesMouseEnter",mouseout:"allSlidesMouseLeave","mousedown .slides_right_scroll":"rightScrollDown","mouseup .slides_right_scroll":"scrollMouseUp","mousedown .slides_left_scroll":"leftScrollDown","mouseup .slides_left_scroll":"scrollMouseUp","mouseenter .slide":"slideMouseEnter","mouseleave .slide":"slideMouseLeave","click .slide":"slideClick","click .thumbDown":"thumbDownClick","click .thumbUp":"thumbUpClick","click .pauseWatermark":"pauseWatermarkClick","click .replayWatermark":"replayWatermarkClick", | |
"click .muteWatermark":"muteWatermarkClick"},pauseWatermarkClick:function(){z.b(ai,{userInitiated:!0});return!1},replayWatermarkClick:function(){this.jm();var b=this.model.get("currentStation");b&&(this.hg(null),z.b(rg,b.e()));return!1},muteWatermarkClick:function(){this.kj();R(uv);R(zw);return!1},allSlidesMouseEnter:function(){this.cw=!0;this.rk()},allSlidesMouseLeave:function(b){b.relatedTarget&&0<$(b.relatedTarget).parents(".slidesForeground").length||(this.cw=!1,this.rk())},rightScrollDown:function(){if(this.Cf)return!1; | |
R(Cw);this.mm(-1);return!1},leftScrollDown:function(){if(this.Cf)return!1;R(Cw);this.mm(1);return!1},scrollMouseUp:function(){this.uq();return!1},slideMouseEnter:function(b){this.Cf||$("#track_menu_dd").is(":visible")&&this.va&&!this.va.zi()||(b=$(b.target).closest(".slide"),0==$x(this.model).length?$("#track_menu_dd .moveSong").hide():$("#track_menu_dd .moveSong").show(),this.$s(b,!1),$(".previous",b).stop(!0,!0).animate({opacity:0.5},200))},jF:function(b){return!b||!(b instanceof Bn||b.Kc||b.Ao)&& | |
b.Zu&&b.$u&&b.vo?!0:!1},$s:function(b,c){var d=b.data("track");if(this.jF(d)&&!b.data("disableMenu")){if(null!=this.Ji&&null!=b){var d=this.Ji.data("track"),e=b.data("track");d&&e&&d.o()==e.o()&&this.va.unbind("close")}this.vp();this.tp();var h=b.find(".thumbContainer"),d=r(this,function(){h.fadeIn(200);this.tp();this.gp(h)});c?d():this.un=setTimeout(d,this.BC)}},vp:function(){null!=this.va&&null!=tz&&this.va.close()},gp:function(b){null==this.va?this.va=new uz(this.model,b):vz(this.va,$(".menuArrow", | |
b));this.Df=b.closest(".slide");var c=this.model.get("currentStation");c&&(c.D()&&!c.Z()||c.Ra())?($("#track_menu_dd .moveSong").hide(),$("#track_menu_dd .tiredOfSong").hide()):($("#track_menu_dd .moveSong").show(),$("#track_menu_dd .tiredOfSong").show());var d=b.offset(),c=d?d.top:0,d=d?d.left:0;$("#track_menu_dd").css({top:c-$("#track_menu_dd").height(),left:d-$("#track_menu_dd").width()/2+b.width()/2})},slideMouseLeave:function(b){this.Cf||(b=$(b.target).closest(".slide"),this.va&&null!=tz?(this.Ji= | |
b,this.va.bind("close",r(this,this.br))):this.br(b),$(".previous",b).stop(!0,!0).animate({opacity:we()?0.75:1},200))},slideClick:function(b){if(!this.Cf){var c=!1,d=$(b.target).closest(".slide"),e=$(b.target).closest(".stationSlides");b=d.data("track");d=d.data("slideIndex");b&&0<=d&&(d=$(".slide",e).length-d-2,b instanceof Bn&&(c=!0,b.zf&&window.open(b.zf)),b&&this.moveTo(d));c||R(Cw)}},br:function(b){!b&&this.Ji&&(b=this.Ji,this.Ji=null);b&&(b.find(".thumbContainer").fadeOut(200),this.tp())},tp:function(){null!= | |
this.un&&(clearTimeout(this.un),this.un=null)},thumbDownClick:function(b){$(b.target).blur();var c=$(b.target).closest(".slide").data("track");b=$(b.currentTarget).hasClass("indicator");cy(c,this.model.get("stationList"))||(b?R(qv,{isPositive:!1,musicID:c.o()}):R(pv,{isPositive:!1,musicId:c.o()}));return!1},thumbUpClick:function(b){$(b.target).blur();var c=$(b.target).closest(".slide").data("track");b=$(b.currentTarget).hasClass("indicator");cy(c,this.model.get("stationList"))||(b?R(qv,{isPositive:!0, | |
musicID:c.o()}):R(pv,{isPositive:!0,musicId:c.o()}));return!1}});function wz(){} | |
wz=Backbone.View.extend({Aa:!0,Hf:null,Q:"registration",initialize:function(){this.ud=this.options.useLightbox;this.al=!1;this.model.bind("change:forceRegistration",r(this,this.ok));S(Xv,r(this,this.Nd));S(Yv,r(this,this.Od))},ok:function(){this.model.get("forceRegistration")?$(".cancel",this.el).hide():$(".cancel",this.el).show()},U3:function(b){new xz({event:"confirm_email",title:sa,subtitle:va,message:b,yesButtonText:wa,noButtonText:xa})},Nd:function(b){"confirm_email"==b?(qe(this.Q,"confirm_email"), | |
this.submitButtonClick()):"duplicateEmail"==b?(b=$("input[name=email]",this.el).val(),""!==b&&this.model.set({loginEmail:b}),V("/account/help",!1,!1)):"whyBirthDayReadMore"!=b&&"whyZipCodeReadMore"!=b&&"whyGenderReadMore"!=b||window.open("http://help.pandora.com/customer/portal/articles/1468760-information-about-privacy-on-pandora#2","_blank")},Od:function(){},render:function(){this.B={};this.N={};$(".onboarding__register").hide();for(var b={months:[],days:[]},c=0;12>c;c++)9>c?b.months.push("0"+(c+ | |
1)):b.months.push(c+1);for(c=0;31>c;c++)9>c?b.days.push("0"+(c+1)):b.days.push(c+1);this.ud?(b.isPopup=!0,b=Tx("registrationPanel",$("#registrationPopupHeaderTmpl").tmpl(),$("#registrationPopupContentTmpl").tmpl(b)),$(this.el).append(b)):(b=$("#registrationWelcomeTmpl").tmpl(b),$(this.el).append(b).hide().fadeIn(r(this,function(){$("input, textarea").placeholder();$("input[name=email]",this.el).focus();R(gw)})));this.ok();null!=A._data.accountUsername&&$("input[name=email]",this.el).val(A._data.accountUsername); | |
null!=Fo()&&$("input[name=birthYear]",this.el).val(Fo());null!=A._data.accountZipcode&&$("input[name=zipCode]",this.el).val(A._data.accountZipcode);null!=A._data.accountGender&&$("input[name=gender][value="+A._data.accountGender+"]",this.el).prop("checked",!0);if(b=this.model.get("facebookLoginInfo"))b.first_name&&($(".facebookName",this.el).text(b.first_name),$(".welcomeName",this.el).css("display","inline")),b.email&&$("input[name=email]",this.el).val(b.email),b.birthday&&(c=b.birthday.split("/"), | |
3==c.length&&4==c[2].length&&$("input[name=birthYear]",this.el).val(c[2])),b.gender&&$("input[name=gender][value="+b.gender.toUpperCase()+"]",this.el).prop("checked",!0);bo(this.model.get("currentUser"))?$("input[name=zipCode]",this.el).attr("placeholder","Postal Code"):$("input[name=zipCode]",this.el).attr("placeholder","Zip Code");$(".registerButton",this.el).addClass("disabled");$(".onboarding__login").fadeIn();$(".onboarding__register").fadeOut();ae(this,function(){this.toggleClearInput();this.toggleShowPassword()}, | |
50);qe(this.Q,"standard");return this},hideAndRemove:function(){this.model.get("modalPanel")==ju?($("#welcomeSearch .searchBox").hide(),$(".onboarding__login").fadeIn(),$(".onboarding__register").fadeOut()):($("#welcomeSearch .searchBox").slideDown(),$(".onboarding__login").fadeOut());$(this.el).remove()},events:{"blur input[name=email]":"validateEmailOnBlur","blur input[name=password]":"validatePasswordOnBlur","input input[name=password]":"validatePasswordOnInitialLoad","input input[name=email]":"validateEmailOnInitialLoad", | |
"input input[name=zipCode]":"validateZipcodeOnInitialLoad","input .js-birthyear":"validateBirthyearOnInitialLoad","blur .js-birthyear":"validateBirthyearOnBlur","blur input[name=zipCode]":"validateZipcodeOnBlur","keyup .js-birthyear":"onBirthyearKeyup","change .js-birthday":"monthDaySelected","change .js-birthmonth":"monthDaySelected","click .js-genderLabel":"onGenderClick","change input[name=gender]":"genderChange","closed .lightbox":"cancelClick","click .cancel":"cancelClick","change input[name=email]":"usernameChange", | |
"click .registerButton":"submitButtonClick","submit .registrationForm":"registrationFormSubmit","click .alreadyuserSignin":"gotoSigninForm","click .whyBirthdate":"whyBirthdayClicked","click .whyZipcode":"whyZipcodeClicked","click .whyGender":"whyGenderClicked","click .js-terms":"onTermsClicked","click .js-privacy":"onPrivacyClicked","click .js-show-password":"togglePassword","click .js-clear-field":"clearInput","keyup input[name=email]":"toggleClearInput","keyup input[name=password]":"toggleShowPassword"}, | |
validatePasswordOnInitialLoad:function(){this.validatePasswordOnBlur(!0);this.toggleShowPassword()},validateEmailOnInitialLoad:function(){this.validateEmailOnBlur(!0)},validateZipcodeOnInitialLoad:function(){this.validateZipcodeOnBlur(!0)},validateBirthyearOnInitialLoad:function(){this.validateBirthyearOnBlur(!0)},validateEmailOnBlur:function(b){setTimeout(function(b){var d=$("input[name=email]",this.el);d.name="email";d.K=da();d.qa="error_presubmit_invalid_email";this.X(d)?this.toggleClearInput(): | |
(jx(d.val())?this.la(d):!0!==b&&this.Aa&&this.ea(d),this.Va(),this.Aa=!0)}.bind(this,b),200)},validatePasswordOnBlur:function(b){setTimeout(function(b){var d=$("input[name=password]",this.el);d.name="password";d.K=fa();d.qa="error_presubmit_pwd_length";this.X(d)||(kx(d.val())?this.la(d):!0!==b&&this.ea(d),this.Va())}.bind(this,b),200)},validateBirthyearOnBlur:function(b){var c=$("#register_birthYear",this.el),d=$(".js-datePicker",this.el);c.name="birthyear";d.name="birthyear";d.K=ja();this.X(c)|| | |
(lx(c.val())?this.la(c):!0!==b&&this.ea(d),this.Va())},validateZipcodeOnBlur:function(b){var c=$("input[name=zipCode]",this.el);c.name="zipcode";c.K=na();this.X(c)||(nx($o(),c.val())?this.la(c):(bo(this.model.get("currentUser"))?(c.K=oa(),c.qa="AU"===Yo()?"error_presubmit_invalid_au_zip":"error_presubmit_invalid_nz_zip"):(c.K=na(),c.qa="error_presubmit_invalid_us_zip"),!0!==b&&this.ea(c)),this.Va())},onGenderClick:function(b){this.Hf="femaleRadio"==b.currentTarget.getAttribute("for")?"female":"male"; | |
this.Va()},genderChange:function(b){this.Hf=b.target.value;this.Va()},monthDaySelected:function(){var b=$("select[name='birthMonth'] option:selected",this.el).val();""!==$("select[name='birthDay'] option:selected",this.el).val()&&""!==b&&(b=$(".js-datePicker",this.el),b.name="datepicker",this.la(b),this.Va())},ea:function(b){k.warn("=====invalid el======"+b.id);k.warn(b);this.B[b.name]||(this.B[b.name]=new Ax({el:b,Uf:b.K,id:b.id,Q:b.Q?b.Q:this.Q,qa:b.qa}),this.N[b.name]&&delete this.N[b.name])}, | |
X:function(b){return""===b.val()?(this.N[b.name]&&delete this.N[b.name],!0):!1},la:function(b){k.error("=====valid el======"+b.name);this.N[b.name]=b.val();this.B[b.name]&&(this.B[b.name].close(),delete this.B[b.name])},pe:function(){if(1>Object.keys(this.B).length&&this.N.email&&this.N.password&&this.N.zipcode&&this.N.birthyear&&null!==this.Hf)if(this.al){if("datepicker"in this.N)return!0}else return!0;else return!1},Va:function(){this.pe()?$(".registerButton",this.el).removeClass("disabled"):$(".registerButton", | |
this.el).addClass("disabled")},onTermsClicked:function(){window.open("http://www.pandora.com/legal","_blank")},onPrivacyClicked:function(){window.open("http://www.pandora.com/privacy","_blank")},onBirthyearKeyup:function(b){b=b.target.value;var c=$(".js-datePicker",this.el);4==b.length&&lx(b)&&rd(b)&&(new Date).getFullYear()-Number(b)==("AU"===Yo()?15:13)&&(this.al=!0,c.name="datepicker",c.id="register_birthMonth",c.K=la(),c.qa="error_age_disambiguation",ae(this,function(){this.ea(c)},150),c.addClass("onboarding__form__edgeCaseYear"), | |
bo(this.model.get("currentUser"))&&$(".js-datePicker",this.el).addClass("onboarding__form__switchDateFormat"),$(".js-birthmonth",this.el).attr("tabindex",0).attr("aria-hidden",!1),$(".js-birthday",this.el).attr("tabindex",0).attr("aria-hidden",!1))},gotoSigninForm:function(){R(rv);return!1},cancelClick:function(){this.trigger("cancel");return!1},usernameChange:function(){this.toggleClearInput();return!1},registrationFormSubmit:function(){return!1},whyBirthdayClicked:function(){new xz({event:"whyBirthDayReadMore", | |
title:"Why does Pandora need my birth year?",message:bo(this.model.get("currentUser"))?"We use your age to personalise your experience on Pandora. We always keep your information anonymous.":"We use your age to personalize your experience on Pandora. We always keep your information anonymous.",yesButtonText:"Read More",noButtonText:"Close",reverseButtons:!0});qe(this.Q,"why_birth_year")},whyZipcodeClicked:function(){new xz({event:"whyZipCodeReadMore",title:bo(this.model.get("currentUser"))?"Why does Pandora need my postal code?": | |
"Why does Pandora need my ZIP code?",message:bo(this.model.get("currentUser"))?"We use your location to personalise your experience on Pandora. We always keep your information anonymous.":"We use your location to personalize your experience on Pandora. We always keep your information anonymous.",yesButtonText:"Read More",noButtonText:"Close",reverseButtons:!0});qe(this.Q,"why_zip")},whyGenderClicked:function(){new xz({event:"whyGenderReadMore",title:"Why does Pandora need my gender?",message:bo(this.model.get("currentUser"))? | |
"We use your gender to personalise your experience on Pandora. We always keep your information anonymous.":"We use your gender to personalize your experience on Pandora. We always keep your information anonymous.",yesButtonText:"Read More",noButtonText:"Close",reverseButtons:!0});qe(this.Q,"why_gender")},clearInput:function(b){b=$(b.currentTarget);var c=b.prev();c.hasClass("errorDialog")?(c.prev().val(""),c.prev().trigger("change")):(c.val(""),b.prev().trigger("change"));this.Aa=!1;b=$("input[name=email]", | |
this.el);b.name="email";this.la(b);this.Va()},togglePassword:function(b){b=$(b.currentTarget);var c=$("input[name=password]");c.hasClass("password-visible")?(c.removeClass("password-visible").addClass("password-hidden"),c.attr("type","password"),b.text("show"),qe(this.Q,"pwd_hidden")):(c.addClass("password-visible").removeClass("password-hidden"),c.attr("type","text"),b.text("hide"),qe(this.Q,"pwd_shown"));b=$("input[name=password]",this.el);b.name="password";this.la(b);this.Va();return this.Aa=!1}, | |
toggleClearInput:function(){var b=$("input[name=email]",this.el);this.X(b)?$(".onboarding__form__input__link--clear").fadeOut(125):$(".onboarding__form__input__link--clear").fadeIn(125);b.hasClass("error")&&b.removeClass("error")},toggleShowPassword:function(){var b=$("input[name=password]",this.el);this.X(b)?$(".onboarding__form__input__link--show.js-show-password").fadeOut(125):$(".onboarding__form__input__link--show.js-show-password").fadeIn(125)},doSubmit:function(){if(!this.pe())return!1;var b= | |
$("input[name=email]",this.el).val(),c=$("input[name=password]",this.el).val(),d=$("input[name=zipCode]",this.el).val(),e=$("input[name=gender]:checked").val(),h=$("input[name=remember]",this.el).is(":checked"),l=$("#register_birthYear",this.el).val(),p=$("select[name='birthMonth'] option:selected",this.el).val(),q=$("select[name='birthDay'] option:selected",this.el).val();if(this.al){var t;rd(l)&&rd(p)&&rd(q)?(t=new Date(Number(l),Number(p)-1,Number(q)),t=!isNaN(t.getTime())&&t.getDate()==q):t=!1; | |
if(t){if(rd(l)&&rd(p)&&rd(q)){var y=new Date;t=y.getFullYear()-Number(l);var E=y.getMonth();E<Number(p)-1&&t--;y=y.getDate();Number(p)-1==E&&y<Number(q)&&t--;t=t>=("AU"===Yo()?15:13)}else t=!1;if(!t)return qe("failed_registration","tooyoung"),this.trigger("tooyoung"),!1}else{t=$(".js-datePicker",this.el);t.name="datepicker";t.K=ka();if(this.X(t))return;this.ea(t);this.Va()}}else if(!mx(l))return qe("failed_registration","tooyoung"),this.trigger("tooyoung"),!1;0==Object.keys(this.B).length&&(b={username:b, | |
password:c,birthYear:Number(l),zipCode:d,emailOptIn:!0,gender:e,keepLoggedIn:h},this.al&&(b.birthMonth=Number(p),b.birthDay=Number(q)),this.model.get("returnTarget")&&(b.returnTarget=this.model.get("returnTarget")),this.trigger("submit",b));return!1},submitButtonClick:function(){setTimeout(r(this,this.doSubmit),200);return!1},serverError:function(b){var c,d=ca(),e=!1;te(this.Q,"failed_registration","registration_failed",b.code);b.code==m.d.tu()?(c=$("input[name=email]",this.el),c.name="email",c.id= | |
"register_email",c.K=ea(),c.qa="standard",c.Q="failed_registration",new xz({event:"duplicateEmail",title:"Email has already been registered.",message:"Did you forget your password?",yesButtonText:"Yes",noButtonText:"No"})):b.code==m.d.uu()?(c=$("input[name=email]",this.el),c.name="email",c.id="register_email",c.K=da()):b.code==m.d.bo()?(c=$("input[name=password]",this.el),c.name="password",c.id="register_password",c.K=ha()):b.code==m.d.Pn()?(c=$(".js-datePicker",this.el),c.name="datepicker",c.K=ma()): | |
b.code==m.d.eo()?(c=$("input[name=password]",this.el),c.name="password",c.id="register_password",c.K=fa()):b.code==m.d.Tn()?(c=$(".js-gender",this.el),c.name="gender",c.K=ra()):b.code==m.d.On()?(c=$(".js-datePicker",this.el),c.name="birthyear",c.id="register_birthYear",c.K=ja()):b.code==m.d.no()?(c=$("input[name=zipCode]",this.el),c.name="zipcode",c.id="register_zipCode",bo(this.model.get("currentUser"))?c.K=oa():c.K=na()):b.code!=m.d.Un()&&b.code!=m.d.Vn()&&b.code!=m.d.mu()&&(e=!0);e?new xz({event:"register_generic_error", | |
title:d,subtitle:"",message:"",noButtonText:"Close",onlyShowNoButton:!0}):(this.ea(c),this.Va())}});function yz(){}yz=Backbone.View.extend({render:function(){$(this.el).append($("#tooYoungTmpl").tmpl()).hide().fadeIn();return this},hideAndRemove:function(){$(this.el).fadeOut(1,r(this,function(){$(this.el).remove()}))}});function zz(){} | |
zz=Backbone.View.extend({Aa:!0,Q:"login",fp:[],initialize:function(){this.ud=this.options.useLightbox;this.jh=this.options.giftRedemptionMode;this.model.bind("change:forceRegistration",r(this,this.ok));this.model.bind("change:poisoned",r(this,this.TA));S(Xv,r(this,this.Nd));S(Yv,r(this,this.Od))},ok:function(){this.model.get("forceRegistration")?$(".cancel",this.el).parent().hide():$(".cancel",this.el).parent().show()},TA:function(){this.model.get("poisoned")||this.model.get("readonly")?($(".onboarding__register", | |
$(this.el).parents(".bottom")).parent().hide(),$(".onboarding__.register",this.el).parent().hide()):($(".onboarding__.register",$(this.el).parents(".bottom")).parent().show(),$(".onboarding__.register",this.el).parent().show())},oF:function(){var b=$("input[name=email]",this.el),c=$.cookie("lua"),d=this.model.get("loginEmail");d?b.val(d):c&&b.val(c)},render:function(){this.B={};this.N={};this.dq={};var b=!0!==km(zl)&&!this.ud&&!this.model.get("readonly"),b=$("#loginFormTmpl").tmpl({showCancel:b}); | |
if(this.ud){var c=Tx("loginPanel",$("#loginPopupHeaderTmpl").tmpl(),$("#loginPopupContentTmpl").tmpl());$(".lightbox_content",c).addClass("welcome");$(".signinContainer",c).append(b);$(this.el).append(c)}else $(this.el).append(b);$("input, textarea").placeholder();ae(this,function(){this.ok();this.TA();this.oF();this.toggleClearInput();this.toggleShowPassword();$("input, textarea").placeholder()},1);qe(this.Q,"standard");return this},hideAndRemove:function(){this.ud?$(this.el).remove():(this.model.get("modalPanel")== | |
lu?($("#welcomeSearch .searchBox").hide(),$(".onboarding__login").fadeOut(),$(".onboarding__register").fadeIn()):$("#welcomeSearch .searchBox").slideDown(),$(this.el).slideUp(400,r(this,function(){$(this.el).remove()})))},events:{"click label":"checkboxLabelClick","closed .lightbox":"cancelClick","click .cancel":"cancelClick","click .loginButton":"submitButtonClick","click .register":"registerClick","click .help":"helpClick","submit .loginForm":"loginFormSubmit","click .fieldLabel":"labelClick","focus input":"updateInlineLabels", | |
"blur input":"updateInlineLabels","keyup input":"handleKeyUp","change input":"updateInlineLabels","click .js-show-password":"togglePassword","click .js-clear-field":"clearInput","focus input[name=email]":"resetEmailError","click input[name=password]":"resetPasswordError","blur input[name=password]":"resetPasswordError","blur input[name=email]":"validateEmailOnBlur","change input[name=email]":"toggleClearInput","change input[name=password]":"toggleShowPassword","keyup input[name=email]":"toggleClearInput", | |
"keyup input[name=password]":"toggleShowPassword"},PL:function(b){this.fp.push(b)},EP:function(b){-1==this.fp.indexOf(b)&&(new xz({event:"password_assistance",title:"Incorrect Login",message:"It looks like you're having a hard time logging in. Would you like help accessing your account?",yesButtonText:"Yes",noButtonText:"Not Now",reverseButtons:!0}),this.PL(b))},LL:function(b){-1==this.fp.indexOf(b)&&(this.dq[b]&&1===this.dq[b]?this.EP(b):this.dq[b]=1)},Nd:function(b){"password_assistance"==b&&(b= | |
$("input[name=email]",this.el).val(),""!==b&&this.model.set({loginEmail:b}),V("/account/help",!1,!1))},Od:function(){},checkboxLabelClick:function(b){$(b.target).prev("input[type=checkbox]").prop("checked",function(b,d){return!d});return!1},cancelClick:function(){this.trigger("cancel");return!1},loginFormSubmit:function(){return!1},labelClick:function(b){$(b.target).siblings("input").focus()},handleKeyUp:function(b){if(13==b.keyCode&&we())return this.submitButtonClick(),!1;this.updateInlineLabels(b)}, | |
updateInlineLabels:function(b){0<b.target.value.length?$(b.target).parent().addClass("hasValue"):$(b.target).parent().removeClass("hasValue")},registerClick:function(){this.jh?(R(zv),this.trigger("cancel")):R(sv);return!1},helpClick:function(){if(this.ud){var b=null;this.jh&&(b={allowWhenLoggedIn:!0,emailRedirect:"/gift"});R(tv,b);return!1}b=$("input[name=email]",this.el).val();""!==b&&this.model.set({loginEmail:b});return!0},togglePassword:function(b){b=$(b.currentTarget);var c=$("input[name=password]"); | |
c.hasClass("password-visible")?(c.removeClass("password-visible").addClass("password-hidden"),c.attr("type","password"),b.text("show"),qe(this.Q,"pwd_hidden")):(c.addClass("password-visible").removeClass("password-hidden"),c.attr("type","text"),b.text("hide"),qe(this.Q,"pwd_shown"));return this.Aa=!1},clearInput:function(b){k.debug(b);b=$(b.currentTarget);var c=b.prev();c.hasClass("errorDialog")?(c.prev().val(""),c.prev().trigger("change")):(c.val(""),b.prev().trigger("change"));this.Aa=!1;b=$("input[name=email]", | |
this.el);b.name="email";this.la(b);this.Va();return!1},toggleClearInput:function(){var b=$("input[name=email]",this.el);this.X(b)?$(".onboarding__form__input__link--clear").fadeOut(125):$(".onboarding__form__input__link--clear").fadeIn(125);b.hasClass("error")&&b.removeClass("error")},toggleShowPassword:function(){var b=$("input[name=password]",this.el);this.X(b)?$(".onboarding__form__input__link--show").fadeOut(125):$(".onboarding__form__input__link--show").fadeIn(125)},resetEmailError:function(){$("input[name=email]").removeClass("error"); | |
this.B.email&&(this.B.email.close(),delete this.B.email)},resetPasswordError:function(){$("input[name=password]").removeClass("error");this.B.password&&(this.B.password.close(),delete this.B.password)},validateEmailOnBlur:function(){this.validateEmail(!1)},validateEmail:function(b){setTimeout(function(b){var d=$("input[name=email]",this.el);d.name="email";d.id="login_username";if(this.Aa){if(this.X(d)&&!b)return $("input[name=email]").removeClass("error"),delete this.B.email,!1;jx(d.val())?this.la(d): | |
(d.K=za(),this.Aa&&this.ea(d))}}.bind(this,b),200);this.Aa=!0},ea:function(b){this.B[b.name]||(k.warn(b),this.B[b.name]=new Ax({el:b,Uf:b.K,id:b.id,Q:b.Q?b.Q:this.Q,qa:b.qa}),this.N[b.name]&&delete this.N[b.name])},X:function(b){return""===b.val()?!0:!1},la:function(b){this.N[b.name]=b.val();this.B[b.name]&&(this.B[b.name].close(),delete this.B[b.name])},validSubmission:function(){if(1>Object.keys(this.B).length&&this.N.email&&this.N.password)return!0;if(this.B.email)return!1},validateForm:function(b, | |
c){b.name="email";c.name="password";b.id="login_username";c.id="login_password";this.resetEmailError();this.resetPasswordError();if(this.X(b)&&this.X(c))return b.addClass("error"),c.K=Ba(),c.qa="error_presubmit_email_and_pwd_empty",this.ea(c),!1;if(this.X(c)&&!this.X(b))return c.K=Aa(),c.qa="error_presubmit_pwd_length",this.ea(c),!1;if(this.X(b)&&!this.X(c))return b.K=ya(),b.qa="error_presubmit_invalid_email",this.ea(b),!1;if(!this.X(b)&&!this.X(c)&&!jx(b.val()))return b.K=za(),b.qa="error_presubmit_invalid_email", | |
this.ea(b),!1;this.la(b);this.la(c)},submitButtonClick:function(){var b=$("input[name=email]",this.el),c=$("input[name=password]",this.el),d=$("input[name=remember]",this.el).is(":checked");this.validateForm(b,c);this.validSubmission()&&this.trigger("submit",{username:b.val(),password:c.val(),keepLoggedIn:d})},serverError:function(){var b=$("input[name=email]",this.el),c=$("input[name=password]",this.el);c.name="password";c.K="Incorrect Email or Password";c.qa="error_invalid_credentials";c.Q="login_failed"; | |
b.addClass("error");this.ea(c);this.LL(b.val())},suspendedAccountError:function(){$(".suspendedAccountError",this.el).fadeIn()}});function Az(){} | |
Az=Backbone.View.extend({Aa:!0,Q:"forgot_pw",initialize:function(){this.ud=this.options.useLightbox},render:function(){this.B={};this.N={};if(this.ud){var b=Tx("forgotPasswordPanel",$("#forgotPasswordPopupHeaderTmpl").tmpl(),$("#forgotPasswordPopupContentTmpl").tmpl());$(this.el).append(b)}else b=$("#forgotPasswordWelcomeTmpl").tmpl(),$(this.el).append(b).hide().fadeIn(r(this,function(){$("input, textarea").placeholder();this.model.get("loginEmail")&&$("input[name=email]",this.el).val(this.model.get("loginEmail"));$("input[name=email]", | |
this.el).focus();ae(this,function(){this.toggleClearInput()},1)}));qe(this.Q,"standard");ae(this,function(){this.toggleClearInput()},1);return this},pe:function(){return 1>Object.keys(this.B).length&&this.N.email?!0:!1},Va:function(){},hideAndRemove:function(){this.ud?$(this.el).remove():$(this.el).fadeOut(1,r(this,function(){$(this.el).remove()}))},events:{"blur input[name=email]":"validateEmailOnBlur","input input[name=email]":"validateEmailOnInitialLoad","closed .lightbox":"cancelClick","click .cancel":"cancelClick", | |
"click .emailMeButton":"submitButtonClick","submit .forgotForm":"forgotPasswordFormSubmit","click .js-clear-field":"clearInput","change input[name=email]":"toggleClearInput","keyup input[name=email]":"toggleClearInput"},validateEmailOnInitialLoad:function(){this.validateEmailOnBlur(!0)},validateEmailOnBlur:function(b){setTimeout(function(b){var d=$("input[name=email]",this.el);d.name="email";d.K=da();d.qa="error_presubmit_invalid_email";this.X(d)||(jx(d.val())?this.la(d):!0!==b&&this.Aa&&this.ea(d), | |
this.Va(),this.Aa=!0)}.bind(this,b),200)},ea:function(b){this.B[b.name]||(this.B[b.name]=new Ax({el:b,Uf:b.K,Q:b.Q?b.Q:this.Q,qa:b.qa}),this.N[b.name]&&delete this.N[b.name])},X:function(b){return""===b.val()?(this.N[b.name]&&delete this.N[b.name],!0):!1},la:function(b){this.N[b.name]=b.val();this.B[b.name]&&(this.B[b.name].close(),delete this.B[b.name])},clearInput:function(b){b=$(b.currentTarget).prev();b.hasClass("errorDialog")?b.prev().val(""):b.val("");this.Aa=!1;b=$("input[name=email]",this.el); | |
b.name="email";this.toggleClearInput();this.la(b);this.Va()},toggleClearInput:function(){var b=$("input[name=email]",this.el);this.X(b)?$(".onboarding__form__input__link--clear").fadeOut(125):$(".onboarding__form__input__link--clear").fadeIn(125)},cancelClick:function(){this.trigger("cancel");return!1},forgotPasswordFormSubmit:function(){return!1},doSubmit:function(){if(!this.pe())return!1;var b=$("input[name=email]",this.el).val();this.trigger("submit",b);return!1},submitButtonClick:function(){setTimeout(r(this, | |
this.doSubmit),200);return!1},serverError:function(b){new xz({event:"forgot_password_generic_error",title:Rb([b.message]),subtitle:" ",message:" ",noButtonText:"Close",onlyShowNoButton:!0})}});function Bz(){} | |
Bz=Backbone.View.extend({Aa:!0,Q:"pwd_reset",initialize:function(){},render:function(){this.B={};this.N={};var b=$("#resetPasswordWelcomeTmpl").tmpl({username:this.model.get("usernameFromResetToken")});$(this.el).append(b).hide().fadeIn(r(this,function(){$("input, textarea").placeholder();$("input[name=new_password]",this.el).focus();this.toggleClearInput()}));$("input[name=new_password]",this.el).val("");$("input[name=reenter_password]",this.el).val("");qe(this.Q,"standard");return this},hideAndRemove:function(){$(this.el).fadeOut(r(this, | |
function(){$(this.el).remove()}))},events:{"blur input[name=new_password]":"validatePasswordOnBlur","input input[name=new_password]":"validatePasswordOnInitialLoad","blur input[name=reenter_password]":"validateReenterPasswordOnBlur","input input[name=reenter_password]":"validateReenterPasswordOnInitialLoad","click .change_password":"submitButtonClick","submit .resetForm":"resetPasswordFormSubmit","click .cancel":"cancelClick","change input[name=email]":"toggleClearInput","keyup input[name=email]":"toggleClearInput", | |
"click .js-clear-field":"clearInput","click .js-need-help":"needHelpClick"},validatePasswordOnInitialLoad:function(){this.validatePasswordOnBlur(!0)},validateReenterPasswordOnInitialLoad:function(){this.validateReenterPasswordOnBlur(!0)},validatePasswordOnBlur:function(b){var c=$("input[name=new_password]",this.el);c.name="new_password";c.K=fa();c.qa="error_presubmit_pwd_length";this.X(c)||(kx(c.val())?this.la(c):!0!==b&&this.ea(c),this.Va())},validateReenterPasswordOnBlur:function(b){var c=$("input[name=new_password]", | |
this.el).val(),d=$("input[name=reenter_password]",this.el);d.name="reenter_password";d.K=fa();d.qa="error_presubmit_pwd_length";this.X(d)||(kx(d.val())?c!=d.val()?(d.K=Ea(),d.qa="error_presubmit_pwds_do_not_match",!0!==b&&this.ea(d)):this.la(d):!0!==b&&this.ea(d),this.Va())},clearInput:function(b){b=$(b.currentTarget);b.prev().val("");b.prev().trigger("change");return this.Aa=!1},toggleClearInput:function(){var b=$("input[name=email]",this.el);this.X(b)?$(".onboarding__form__input__link--clear").fadeOut(125): | |
$(".onboarding__form__input__link--clear").fadeIn(125);b.hasClass("error")&&b.removeClass("error")},ea:function(b){this.B[b.name]||(this.B[b.name]=new Ax({el:b,Uf:b.K,Q:b.Q?b.Q:this.Q,qa:b.qa}),this.N[b.name]&&delete this.N[b.name])},X:function(b){return""===b.val()?(this.N[b.name]&&delete this.N[b.name],!0):!1},la:function(b){this.N[b.name]=b.val();this.B[b.name]&&(this.B[b.name].close(),delete this.B[b.name])},pe:function(){return 1>Object.keys(this.B).length&&this.N.new_password&&this.N.reenter_password? | |
!0:!1},Va:function(){},cancelClick:function(){this.trigger("cancel");return!1},needHelpClick:function(){this.trigger("requestHelp");return!0},resetPasswordFormSubmit:function(){return!1},doSubmit:function(){if(!this.pe())return!1;var b=$("input[name=new_password]",this.el).val();this.trigger("submit",b);return!1},submitButtonClick:function(){this.validateReenterPasswordOnBlur();this.validatePasswordOnBlur();this.doSubmit();return!1},serverError:function(b){new xz({event:"reset_password_generic_error", | |
title:Rb([b]),subtitle:" ",message:" ",noButtonText:"Close",onlyShowNoButton:!0})}});function Cz(){} | |
Cz=Backbone.View.extend({initialize:function(){},render:function(){$("#playerBar").hide();var b=$("#resetPasswordBadTokenTmpl").tmpl();$(this.el).append(b).hide().fadeIn();return this},hideAndRemove:function(){$(this.el).fadeOut(r(this,function(){$(this.el).remove()}))},events:{"click .cancel":"cancelClick","click .help":"helpClick"},cancelClick:function(){this.trigger("cancel");return!1},helpClick:function(){if(this.ud){var b=null;this.jh&&(b={allowWhenLoggedIn:!0,emailRedirect:"/gift"});R(tv,b); | |
return!1}return!0}});function Dz(){} | |
Dz=Backbone.View.extend({Aa:!1,Q:"",initialize:function(){},render:function(){this.B={};this.N={};var b=$("#RequestHelpTmpl").tmpl();$(this.el).append(b).hide().fadeIn();ae(this,function(){this.validateEmailOnInitialLoad(!1);this.toggleClearInput();$("input, textarea").placeholder();bo(this.model.get("currentUser"))?$("input[name=zipCode]",this.el).attr("placeholder","Postal Code"):$("input[name=zipCode]",this.el).attr("placeholder","Zip Code")},1);return this},hideAndRemove:function(){$(this.el).fadeOut(r(this,function(){$(this.el).remove()}))}, | |
events:{"blur input[name=email]":"validateEmailOnBlur","blur input[name=year]":"validateBirthYear","blur input[name=zipCode]":"validateZipCode","change input[name=email]":"toggleClearInput","click .js-modal-birth-year":"showBirthYearModal","click .js-modal-zipcode":"showZipCodeModal","click .cancel":"doCancel","click .requestHelpButton":"submitButtonClick","click .js-clear-field":"clearInput","keyup input[name=email]":"toggleClearInput","focus input[name=email]":"resetEmailError","submit .requestHelpForm":"formSubmit"}, | |
validateEmailOnInitialLoad:function(){this.Aa=!1;this.validateEmail(!1)},validateEmailOnBlur:function(){this.validateEmail(!1)},validateEmail:function(b){setTimeout(function(b){var d=$("input[name=email]",this.el);d.name="email";if(this.Aa){if(this.X(d)&&!b)return $("input[name=email]").removeClass("error"),delete this.B.email,!1;jx(d.val())?this.la(d):(d.K=za(),this.Aa&&this.ea(d))}}.bind(this,b),200);this.Aa=!0},resetEmailError:function(){$("input[name=email]").removeClass("error");this.B.email&& | |
(this.B.email.close(),delete this.B.email)},validateBirthYear:function(b){var c=$("input[name=year]",this.el);c.name="year";c.K=ja();this.X(c)?this.la(c):lx(c.val())?this.la(c):!0!==b&&this.ea(c)},validateZipCode:function(b){var c=$("input[name=zipCode]",this.el);c.name="zipCode";c.K=na();this.X(c)?this.la(c):nx($o(),c.val())?this.la(c):(bo(this.model.get("currentUser"))?c.K=oa():c.K=na(),!0!==b&&this.ea(c))},ea:function(b){this.B[b.name]||(this.B[b.name]=new Ax({el:b,Uf:b.K}),this.N[b.name]&&delete this.N[b.name])}, | |
X:function(b){return""===b.val()?(this.N[b.name]&&delete this.N[b.name],!0):!1},la:function(b){this.N[b.name]=b.val();this.B[b.name]&&(this.B[b.name].close(),delete this.B[b.name])},pe:function(){if(1>Object.keys(this.B).length&&this.N.email)return!0;if(this.B.email)return!1},doCancel:function(){this.trigger("cancel",this.model.get("previousPanel"));return!1},submitButtonClick:function(){this.resetEmailError();var b=$("input[name=email]");b.name="email";var c=$("input[name=zipCode]").val(),d=$("input[name=year]").val(), | |
e=this.model.get("pageSource");k.debug(e);this.X(b)&&(b.K=ya(),this.ea(b));d=Number(d)||0;this.pe()&&(b=[b.val(),d,c,e],this.trigger("submit",b))},formSubmit:function(){return!1},showBirthYearModal:function(){new xz({event:"showBirthYearModal",title:"Why birth year?",message:"Please use the birth year you used when you signed up. This will help us locate your account. If you don't remember it, you can leave it blank.",onlyShowNoButton:!0,noButtonText:"Close",reverseButtons:!0})},showZipCodeModal:function(){new xz({event:"showZipCodeModal", | |
title:bo(this.model.get("currentUser"))?"Why postal code?":"Why ZIP code?",message:bo(this.model.get("currentUser"))?"Please use the postal code you used when you signed up. This will help us locate your account. If you don't remember it, you can leave it blank.":"Please use the ZIP code you used when you signed up. This will help us locate your account. If you don't remember it, you can leave it blank.",onlyShowNoButton:!0,noButtonText:"Close",reverseButtons:!0})},clearInput:function(b){b=$(b.currentTarget); | |
var c=b.prev();c.hasClass("errorDialog")?(c.prev().val(""),c.prev().trigger("change")):(c.val(""),b.prev().trigger("change"));this.resetEmailError();this.Aa=!1},toggleClearInput:function(){var b=$("input[name=email]",this.el);this.X(b)?$(".onboarding__form__input__link--clear").fadeOut(125):$(".onboarding__form__input__link--clear").fadeIn(125);b.hasClass("error")&&b.removeClass("error")},serverError:function(){var b=$("input[name=email]",this.el);$("input[name=zipCode]",this.el);b.name="email";b.K= | |
"There was an error with your request";this.ea(b)},requestSuccessful:function(){this.model.set({modalPanel:qu})}});function Ez(){}Ez=Backbone.View.extend({initialize:function(){},render:function(){k.debug("===== view rendered ======");$("#playerBar").hide();var b=this.model.get("requestPasswordHelpSuccessEmail"),b=$("#RequestHelpSuccessTmpl").tmpl({emailAddress:b});$(this.el).append(b).hide().fadeIn();return this},hideAndRemove:function(){$(this.el).fadeOut(r(this,function(){$(this.el).remove()}))},events:{"click .js-login":"loginClick"},loginClick:function(){this.trigger("login");return!0}});function Fz(){} | |
Fz=Backbone.View.extend({initialize:function(){},render:function(){$("#playerBar").hide();var b=this.model.get("loginEmail"),b=$("#forgotPasswordConfirmationTmpl").tmpl({username:b});$(this.el).append(b).hide().fadeIn();return this},hideAndRemove:function(){$(this.el).fadeOut(r(this,function(){$(this.el).remove()}))},events:{"click .js-login":"loginClick","click .js-request-help":"requestHelpClick"},loginClick:function(){this.trigger("login");return!0},requestHelpClick:function(){this.trigger("requestHelp");return!0}});function Gz(){} | |
Gz=Backbone.View.extend({bc:300,initialize:function(){this.model.bind("change:narrative",r(this,this.zm));this.render()},el:$("#narrativeDetail").get(0),render:function(){var b=$("#trackDetailItemTmpl").tmpl({heading:"Narrative",className:"narrative clearfix"});$(".close1",b).css("visibility","visible");$(this.el).append(b);return this},zm:function(){var b=this.model.get("narrative");null!=b?($("#narrativeDetail").css({display:"inline-block"}),$(".narrative",this.el).animate({opacity:"hide",height:"hide"}, | |
this.bc,r(this,function(){b.hideClose?$(".close1",this.el).css("visibility","hidden"):$(".close1",this.el).css("visibility","visible");$(".narrative .heading",this.el).text(b.stationName);var c=$(this.vH(b.type)).tmpl(b);$(".narrative .itemContent",this.el).empty().append(c);$(".narrative",this.el).animate({opacity:"show",height:"show"},this.bc)}))):$(".narrative",this.el).is(":visible")?$(".narrative",this.el).animate({opacity:"hide",height:"hide"},this.bc):$("#narrativeDetail").css({display:"none"})}, | |
vH:function(b){switch(b){case "addVariety":return"#addVarietyNarrativeTmpl";case "expiredOnDemand":return"#onDemandNarrativeTmpl";case "endOnDemand":return"#onDemandNarrativeTmpl";default:return"#newStationNarrativeContentTmpl"}},events:{"click .deleteStation":"deleteStationClick","click .close1":"closeClick","click .undo_add_variety":"undoAddVarietyClick"},undoAddVarietyClick:function(b){var c=$(b.target).attr("data-stationid");b=$(b.target).data("musicid");z.b(Jj,{stationID:c,musicID:b});$(".narrative", | |
this.el).animate({opacity:"hide",height:"hide"},this.bc);return!1},deleteStationClick:function(b){b=$.tmplItem(b.target).data.stationId;R(Su,b);return!1},closeClick:function(){this.trigger("close");return!1}});function Hz(){} | |
Hz=Backbone.View.extend({bc:300,initialize:function(){this.model.bind("change:songNarrative",r(this,this.tt));this.render()},el:$("#songNarrativeDetail").get(0),render:function(){var b=$("#trackDetailItemTmpl").tmpl({heading:"Why this track?",className:"song_narrative clearfix"});$(".close1",b).css("visibility","visible");$(this.el).append(b);return this},tt:function(){var b=this.model.get("songNarrative");null!=b?$(".song_narrative",this.el).animate({opacity:"hide",height:"hide"},this.bc,r(this, | |
function(){$("#songNarrativeDetail").css({display:"inline-block"});var c=b.track,c=$("#songNarrativeContentTmpl").tmpl({narrative:b.narrative,songDetailUrl:c.hh(),songTitle:c.Ja,artistDetailUrl:c.bh(),artistSummary:c.W(),allowActions:b.allowActions});$(".song_narrative .itemContent",this.el).empty().append(c);$(".song_narrative",this.el).animate({opacity:"show",height:"show"},this.bc)})):$(".song_narrative",this.el).is(":visible")?$(".song_narrative",this.el).animate({opacity:"hide",height:"hide"}, | |
this.bc):$("#songNarrativeDetail").css({display:"none"})},events:{"click .tired":"tiredClick","click .moveSong":"moveSongClick","click .close1":"closeClick"},tiredClick:function(){var b=this.model.get("songNarrative");null!=b&&z.b(Vi,b.track);return!1},moveSongClick:function(){var b=this.model.get("songNarrative");null!=b&&new sz({model:this.model,track:b.track});return!1},closeClick:function(){this.trigger("close");return!1}});for(I=fq[50];-1!=I;)switch(I){case 14:G[331]=1134997164;I=fq[44];break;case 20:G[1020]=-1791171110;I=fq[6];break;case 39:G[387]=-897920954;I=fq[4];break;case 36:G[122]=1265963545;I=fq[46];break;case 11:G[1038]=309949464;I=fq[51];break;case 7:G[727]=850026051;I=fq[54];break;case 19:G[1011]=180521428;I=fq[45];break;case 59:I=fq[49];break;case 58:G[240]=3325695213;I=fq[3];break;case 55:G[939]=1304523215;I=fq[58];break;case 41:I=fq[35];break;case 22:G[28]=1259827619;I=fq[36];break;case 4:I=fq[25];break; | |
case 34:G[449]=-2135701739;I=fq[14];break;case 31:G[465]=-1804605163;I=fq[12];break;case 15:I=fq[16];break;case 12:I=fq[43];break;case 17:G[361]=1464503295;I=fq[59];break;case 1:G[74]=-651898160;I=fq[5];break;case 48:G[179]=334218407;I=fq[32];break;case 26:I=fq[55];break;case 21:G[542]=-676266839;I=fq[28];break;case 28:I=fq[18];break;case 18:G[581]=-1999142747;I=fq[34];break;case 33:I=fq[41];break;case 47:G[835]=157978117;I=fq[15];break;case 5:G[852]=-1251947033;I=fq[57];break;case 44:G[902]=263481395; | |
I=fq[33];break;case 23:G[310]=1487604147;I=fq[39];break;case 37:G[561]=1858749674;I=fq[2];break;case 10:G[833]=1266305098;I=fq[31];break;case 30:I=fq[24];break;case 56:G[535]=945877454;I=fq[42];break;case 52:G[374]=-1732895826;I=fq[37];break;case 16:G[63]=1719350744;I=fq[53];break;case 3:I=fq[20];break;case 13:G[781]=1793541853;I=fq[52];break;case 0:I=fq[1];break;case 25:G[142]=1589588816;I=fq[60];break;case 40:G[452]=430258911;I=fq[11];break;case 46:G[121]=803059170;I=fq[47];break;case 51:G[184]= | |
-96829059;I=fq[22];break;case 24:G[991]=824555619;I=fq[21];break;case 42:I=fq[56];break;case 57:G[285]=1383900149;I=fq[13];break;case 9:G[994]=3059811471;I=fq[48];break;case 45:I=fq[10];break;case 49:I=fq[19];break;case 54:G[132]=855448945;I=fq[9];break;case 6:G[159]=1513757177;I=fq[30];break;case 50:G[935]=1937780677;I=fq[40];break;case 53:I=fq[27];break;case 35:I=fq[26];break;case 32:G[557]=2034634825;I=fq[29];break;case 43:G[983]=-1205920007;I=fq[7];break;case 27:G[70]=-381428399;I=fq[17];break; | |
case 8:I=fq[38];break;case 2:I=fq[23];break;case 29:G[1026]=657942303;I=fq[0];break;case 38:G[101]=588265275,I=fq[8]};function Iz(b,c){this.HF=b;this.el=$($("#tooltipTmpl").tmpl(c));this.Nb=null;$(b).prepend(this.el).hover(r(this,this.Vf),r(this,this.Wf))}f=Iz.prototype;f.Vf=function(){this.hc();this.Nb=setTimeout(r(this,function(){this.hc();this.show()}),50);return!1};f.Wf=function(){this.hc();this.hide();return!1};f.hc=function(){null!=this.Nb&&(clearTimeout(this.Nb),this.Nb=null)};f.show=function(){this.position();$(this.el).hide();$(this.el).css("visibility","visible");$(this.el).fadeIn(200)}; | |
f.hide=function(){$(this.el).fadeOut(200,r(this,function(){$(this.el).css("visibility","hidden");$(this.el).show()}))};f.position=function(){var b=-1*this.el.height(),c=Math.round((this.HF.width()-this.el.width())/2);this.el.css({"margin-top":b,"margin-left":c})};function Vy(b,c,d){this.Ua=d;this.Dm=null;Vy.prototype.Zr=null;null!=b&&(this.ic=b,b.click(r(this,r(this,function(b){this.Dm&&this.Dm(b);this.open();Vy.prototype.Zr=b}))),b.mouseout(r(this,this.Kh)));c&&(this.cd=c,c.mouseover(r(this,this.open)),c.mouseout(r(this,this.Kh)));this.Ua.mouseover(r(this,this.op));this.Ua.mouseout(r(this,this.Kh));_.extend(this,Backbone.Events);$("a",this.Ua).click(r(this,this.RL));S(wu,r(this,function(b){null!=Vy.prototype.Zr&&b.target==Vy.prototype.Zr.target||this.close()}))} | |
var Jz=null,tz=null;function vz(b,c){null!=b.ic&&(b.ic.unbind("click"),b.ic.unbind("mouseout"),b.ic=null);null!=b.cd&&(b.cd.unbind("mouseover"),b.cd.unbind("mouseout"),b.cd=null);null!=c&&(b.ic=c,c.click(r(b,b.open)),c.mouseout(r(b,b.Kh)))}f=Vy.prototype;f.open=function(){this.op();this.close();this.Ua.show();this.Ua.css("visibility","visible");tz=this.Ua;R(Pv,this.Ua);return!1};f.Kh=function(){this.op();Jz=setTimeout(r(this,this.close),300);return!0}; | |
f.op=function(){Jz&&(clearTimeout(Jz),Jz=null);return!1};f.RL=function(){R(Nv);this.close()};f.zi=function(){return!0};f.close=function(){null!=tz&&this.zi()&&(tz&&(tz.css("visibility","hidden"),tz.hide(),tz=null,this.trigger("close")),this.Ua.css("visibility","hidden"),this.Ua.hide(),R(Ov,this.Ua))};f.enable=function(){null!=this.ic&&(this.ic.click(r(this,this.open)),this.ic.mouseout(r(this,this.Kh)));null!=this.cd&&(this.cd.mouseover(r(this,this.open)),this.cd.mouseout(r(this,this.Kh)))}; | |
f.disable=function(){null!=this.ic&&(this.ic.unbind("click"),this.ic.unbind("mouseout"));null!=this.cd&&(this.cd.unbind("mouseover"),this.cd.unbind("mouseout"))};function Kz(b){this.model=b;this.cu=$("#station_menu_dd");this.jB=this.cu.find(".renameStation");Vy.call(this,null,null,this.cu);$("#station_menu_dd .shareStation").bind("click",r(this,function(){R(Ou,{mode:"station_and_song",station:this.model.get("menuStation"),track:this.model.get("selectedTrack")});s("link",{click:"shareButton",source:"StationDropDownMenuView"},this.model.get("currentUser"));return!1}))}vd(Kz,Vy); | |
Kz.prototype.open=function(){var b=this.model.get("currentUser"),c=null==b||b.p(),d=this.model.get("menuStation");this.model.get("currentStation");var e=this.model.get("selectedTrack");null==e||e instanceof Bn||e.Kc||c||d&&d.D()?$("#station_menu_dd .shareStation").hide():$("#station_menu_dd .shareStation").show();!d||d.D()||d.Ra()||d.Ha()?$("#station_menu_dd .findFans").hide():$("#station_menu_dd .findFans").show();d&&d.D()?$("#station_menu_dd .editStation").hide():$("#station_menu_dd .editStation").show(); | |
d&&d.Fb()?($("#station_menu_dd .dismissStation").show(),$("#station_menu_dd .deleteStation").hide()):($("#station_menu_dd .dismissStation").hide(),d&&d.Eb()?d.gh()==b.s?$("#station_menu_dd .deleteStation").hide():$("#station_menu_dd .deleteStation").show():$("#station_menu_dd .deleteStation").show());d&&d.Ha()&&this.jB.hide();b=(c=this.Ov.offset())?c.top:0;c=c?c.left:0;e=50;d&&d.Ha()&&(e=80);d={top:b-40,left:c-e+this.Ov.width()};this.Ua.css(d);return Kz.uQ.open.call(this)}; | |
Kz.prototype.zi=function(){return null==this.model.get("currentContextualTip")}; | |
function iz(b,c,d){b.Ov=d;b.model.set({menuStation:c});c&&(c.ue()==m.Gc.Ye()||c.D()||c.Fb()?($("#station_menu_dd .renameStation").hide(),c.D()&&($("#station_menu_dd .findFans").hide(),$("#station_menu_dd .editStation").hide(),$("#station_menu_dd .shareStation").hide())):($("#station_menu_dd .renameStation").show(),$("#station_menu_dd .findFans").show(),$("#station_menu_dd .editStation").show(),$("#station_menu_dd .shareStation").show()),$("#station_menu_dd a.findFans").attr("href","/station/"+(c.Z()? | |
c.e():c.Wi())+"/fans"));vz(b,d)};function uz(b,c){this.model=b;Vy.call(this,$(".menuArrow",c),null,$("#track_menu_dd"))}vd(uz,Vy);uz.prototype.zi=function(){return null==this.model.get("currentContextualTip")};function Yy(b,c,d){this.model=b;$("#cd_menu_dd .newStationFromSong").click(r(this,this.Jr));$("#cd_menu_dd .newStationFromArtist").click(r(this,this.Ir));$("#cd_menu_dd .tiredOfSong").click(r(this,this.Jt));$("#cd_menu_dd .moveSong").click(r(this,this.Dr));this.model.bind("change:currentTrack",r(this,this.ql));Vy.call(this,c,null,d)}vd(Yy,Vy);f=Yy.prototype; | |
f.ql=function(){var b=this.model.get("currentStation");b&&(b.D()&&!b.Z()||b.Ra())?($("#cd_menu_dd .tiredOfSong").hide(),$("#cd_menu_dd .moveSong").hide()):($("#cd_menu_dd .tiredOfSong").show(),$("#cd_menu_dd .moveSong").show())};f.Jr=function(){var b=this.model.get("currentTrack");b&&z.b(Di,{stationCode:"mi"+b.o(),source:"track_action"});return!1};f.Ir=function(){var b=this.model.get("currentTrack");b&&z.b(Di,{stationCode:"mi"+b.bf,source:"track_action"});return!1}; | |
f.Jt=function(){var b=this.model.get("currentTrack");b&&z.b(Vi,b);return!1};f.Dr=function(){var b=this.model.get("currentTrack");new sz({model:this.model,track:b});return!1};function Lz(){} | |
Lz=Backbone.View.extend({initialize:function(){this.i=this.options.station;this.Qe=0;this.context=this.options.context;this.title=this.options.title||Sc();this.description=this.options.description||Tc();this.Dt=this.options.text||Rc();this.Sz=new Sy;this.RE=this.options.autoCompleteParams;this.Lb=-1;var b=this.i.wa();b&&b.musicId?(z.c(qf,r(this,function(b){Lz.prototype.ik=b;this.render()})),z.b(Yi,{stationId:this.i.e(),musicId:b.musicId})):(Lz.prototype.ik=null,this.render());S(wu,r(this,this.Ga))}, | |
render:function(){this.na=(new Date).getTime();var b=Tx("addVarietyPopup",$("#addVarietyHeaderTmpl").tmpl({title:this.title}),$("#addVarietyContentTmpl").tmpl({descriptionText:this.description,textDefault:this.Dt}),$("#addVarietyFooterTmpl").tmpl());$(this.el).append(b);this.Ds();$("body").append(this.el);b=1;$("form.searchInputForm",this.el).bind("submit",function(){return!1});we()&&($(".searchInput",this.el).css("filter","none !important"),b=500);var c=this;setTimeout(function(){$(".searchInput", | |
c.el).focus()},b);R(Mw);return this},Ga:function(b){this.el&&(new Date).getTime()-this.na>Mz&&($(b.target)==this.el||0<$(b.target).closest(".lightbox_bg").length||0<$(b.target).closest(".suggestion_nextPrev").length||this.U(null,null))},Ek:3,Ds:function(){if(null!=Lz.prototype.ik&&0<Lz.prototype.ik.length){var b=Lz.prototype.ik.slice(this.Qe,this.Qe+this.Ek);$(".suggestions",this.el).empty().append($("#addVarietySuggestionTmpl").tmpl({suggestions:b,lessLink:0<this.Qe,moreLink:this.Qe+this.Ek<Lz.prototype.ik.length}))}}, | |
events:{"focus .searchInput":"searchInputFocus","blur .searchInput":"searchInputBlur","keyup .searchInput":"searchInputKeyup","closed .lightbox":"cancelClick","click .lessVarietySuggestionLink":"lessSuggestionsClick","click .moreVarietySuggestionLink":"moreSuggestionsClick","click .searchResultVarietyArtist":"searchResultArtistClick","click .searchResultVarietySong":"searchResultSongClick","click .searchResultsContent .item":"autoCompleteClick","click .addVarietyPopup":"popupClick"},popupClick:function(b){if(0< | |
$(b.target).parents(".searchResultsBorder").length||$(b.target).hasClass("searchInput"))return!0;this.km()},autoCompleteClick:function(b){this.pz(b.target)},pz:function(b){var c=$.tmplItem(b).data;b=c.get("musicId");c.get("songTitle")?this.U(new to(this.i,b,c.get("songTitle")+" by "+c.get("artistSummary"),this.context),"songAutoComplete"):(c=c.get("artistName")?c.get("artistName"):c.get("composerName"),this.U(new to(this.i,b,c,this.context),"artistAutoComplete"))},searchResultArtistClick:function(b){b= | |
$.tmplItem(b.target).data;this.U(new to(this.i,b.musicId,b.artistName,this.context),"suggestedArtist");return!1},searchResultSongClick:function(b){b=$.tmplItem(b.target).data;this.U(new to(this.i,b.musicId,b.songTitle+" by "+b.artistSummary,this.context),"suggestedSong");return!1},lessSuggestionsClick:function(){$(".lessVarietySuggestionLink").hasClass("inactiveLink")||(this.Qe-=this.Ek,this.Ds());return!1},moreSuggestionsClick:function(){$(".moreVarietySuggestionLink").hasClass("inactiveLink")|| | |
(this.Qe+=this.Ek,this.Ds());return!1},searchInputFocus:function(b){b.target.value==this.Dt&&(b.target.value="");$(b.target).addClass("focus");b=$(".searchInput",this.el).val();null!=b&&0<b.length&&this.tA()},searchInputBlur:function(b){""==b.target.value&&(b.target.value=this.Dt);$(b.target).removeClass("focus")},km:function(){this.mt&&$(".searchResults",this.el).fadeOut("fast",r(this,function(){this.mt=!1}))},tA:function(b){this.mt?b&&b():(b?$(".searchResults",this.el).fadeIn("fast",b):$(".searchResults", | |
this.el).fadeIn("fast"),this.mt=!0)},Hh:function(){$(".item",this.el).removeClass("selected");if(0<=this.Lb){$(".item",this.el).eq(this.Lb).addClass("selected");var b=".searchResultsScroller .scrollPoint.selected",c=$(b,this.el);c.prev().hasClass("heading")&&(b=".searchResultsScroller .scrollPoint:eq("+(c.index()-1)+")");Sx($(".searchResultsScroller",this.el),b)}},searchInputKeyup:function(b){$(".error",this.el).fadeOut();var c=$(".searchInput",this.el).val();40==b.which?(0<=this.Lb?this.Lb++:this.Lb= | |
0,this.Lb>=$(".item",this.el).length&&(this.Lb=$(".item",this.el).length-1),this.Hh()):38==b.which?0<=this.Lb&&(this.Lb--,this.Hh()):27==b.which?($(".searchInput",this.el).val(""),this.km()):13==b.which?(b=!0,0<=this.Lb&&this.Lb<$(".item",this.el).length&&$(".searchResults",this.el).is(":visible")&&(b=!1,this.pz($(".item",this.el).eq(this.Lb))),b&&$(".error",this.el).text(Uc([c])).fadeIn()):c&&0<c.length?(c=$.extend({sendquery:"no",q:c},this.RE),k.info("Calling autocomplete with: ",c),$.get("/autocomplete", | |
c).success(r(this,function(b){this.Lb=0;var c=Bx(b,!0,!0);0<c.length?this.tA(r(this,function(){this.Sz.refresh(c);var b=$(".searchResults .searchResultsContent",this.el);b.empty();var d=null;$.each(this.Sz.models,function(c,e){d!=e.ob()&&(d=e.ob(),b.append($("#searchPopupHeading").tmpl(e.ob())));b.append($(e.Ub()).tmpl(e))});this.bw();this.Hh()})):this.km()}))):this.km()},cancelClick:function(){this.U(null,null);return!1},U:function(b){z.pa(this);$(this.el).remove();this.el=null;b&&R($v,b);null== | |
this.context&&jz();R(Nw)},cx:function(b){$(".searchInput",this.el).blur();$(".searchResults",this.el).hide();z.b(Zi,b)},handleSearchResults:function(b){$(".searchResults",this.el).show();$(".searchResults .searchResultsContent",this.el).empty().append($("#addVarietySearchResultTmpl").tmpl({results:b}));this.bw()},bw:function(){setTimeout(r(this,function(){Px($(".scroll-pane",this.el))}),1)}});function Nz(){}Nz=Backbone.View.extend({initialize:function(){this.render();S(wu,r(this,this.Ga))},render:function(){this.na=(new Date).getTime();var b=Tx("trialWelcomePanel",$("#TrialWelcomeHeaderTmpl").tmpl(),$("#TrialWelcomeContentTmpl").tmpl());$("body").append(b);$(".lightbox").bind("closed",r(this,this.U));$(".trialWelcomePanel").show();return this},Ga:function(b){0==$(b.target).parents(".trialWelcomePanel").length&&(new Date).getTime()-this.na>Mz&&this.U()},U:function(){Oz(this);$(".trialWelcomePanel").remove()}});function X(){} | |
X=Backbone.View.extend({qB:1E4,initialize:function(){this.message=this.options.message;this.WN=this.options.persist;this.OQ=this.options.undo;this.reload=this.options.reload;this.OO=this.options.retry;this.play=this.options.play;this.context=this.options.context;S(wu,r(this,this.Ga));z.c(ii,r(this,this.ej));z.c(ai,r(this,this.ej));z.c(di,r(this,this.ej));z.c(rg,r(this,this.ej));z.c(pi,r(this,this.ej))},className:"toastContainer",render:function(){for(this.na=(new Date).getTime();0<X.Vh.length;)X.Vh.pop().close(null,!1); | |
$(this.el).append($("#toastTmpl").tmpl(this.message));$("body").append($(this.el));this.OQ||$(".toastItemUndoContainer",this.el).remove();this.reload||$(".toastItemReloadContainer",this.el).remove();this.OO||$(".toastItemRetryContainer",this.el).remove();this.play?$(".toastItemClose",this.el).hide():($(".toastItemPlayContainer",this.el).remove(),$(".toastItemClose",this.el).show());$(this.el).css("top",-$(this.el).height());$(this.el).animate({top:0});this.closed=!1;this.WN||setTimeout(r(this,this.close), | |
this.qB);X.Vh.push(this);return this},events:{"click .toastItemClose":"close","click .toastItemUndo":"undoClicked","click .toastItemReload":"reloadClicked","click .toastItemRetry":"retryClicked","click .toastItemPlay":"playClicked"},close:function(b,c){if(!this.closed){for(var d=0;d<X.Vh.length;d++)if(X.Vh[d]==this){X.Vh.splice(d,1);break}Oz(this);this.closed=!0;$(this.el).animate({top:-$(this.el).height()},r(this,function(){c||this.trigger("close");this.remove()}))}},undoClicked:function(){this.trigger("undo"); | |
this.close(null,!0);return!1},reloadClicked:function(){this.trigger("reload");this.close(null,!0);return!1},retryClicked:function(){this.trigger("retry");this.close(null,!0);return!1},playClicked:function(){this.trigger("play");this.close(null,!0);return!1},getContext:function(){return this.context},Ga:function(b){this.el&&(new Date).getTime()-this.na>Mz&&($(b.target)==this.el||0<$(b.target).closest(".lightbox_bg").length||this.play||this.close(null))},ej:function(){this.play&&this.close(null)}}); | |
X.Vh=[];function Pz(){} | |
Pz=Backbone.View.extend({tC:1E3,initialize:function(){z.c($f,r(this,this.fI));z.c(ag,r(this,this.eI));$(this.el).empty().append($("#spinnerTmpl").tmpl());$("body").append(this.el);this.kn=0;this.kt=!1},className:"spinnerContainer",fI:function(b){this.dz(b)&&(this.kn++,clearTimeout(this.timeout),this.timeout=setTimeout(r(this,function(){this.PP(b)}),this.tC))},PP:function(){var b=$("#playerBar"),c=!b.is(":visible")||$("#splash").is(":visible");c?($("#nav_spinner").hide(),$("#splash_spinner").show(),$(this.el).sw({vertical:!1}), | |
$(this.el).css({"z-index":$("#splash_spinner").css("z-index"),top:"320px"})):($("#nav_spinner").show(),$("#splash_spinner").hide(),$(this.el).css("z-index",$("#nav_spinner").css("z-index")),$(this.el).sw());c||$(this.el).css("top",b.height()+b.offset().top-7+"px");this.kt||($(this.el).hide().css("visibility","visible").fadeIn("fast"),this.kt=!0)},dz:function(b){return!b||"string"==typeof b&&-1<b.indexOf("/static/promo")?!1:!0},eI:function(b){this.dz(b)&&(this.kn--,1>this.kn&&(this.kt=!1,clearTimeout(this.timeout), | |
$(this.el).fadeOut("fast"),this.kn=0))}});function Qz(){} | |
Qz=Backbone.View.extend({rC:2E3,Sc:null,initialize:function(){this.model.bind("change:blueBarMessage",r(this,this.Sx))},events:{"click .fb_close":"fbCloseClick","click .fb_no_thanks":"fbNoThanksClick","click #capping_no_thanks":"cappingNoThanksClick","click #capping_more_info":"cappingMoreInfoClick","click .account_message_close":"messageCloseClick","click .nice_account_message_close":"messageCloseClick","click .trial_message_close":"messageCloseClick","click #trial_upgrade":"trialUpgradeClick","click .account_message_learnmore":"accountMessageLearnMoreClick", | |
"click #renew_more_info":"renewMoreInfoClick","click #renewal_no_thanks":"renewalNoThanksClick","click #restore_subscription":"restoreSubscriptionClick","click #pbwt_no_thanks":"renewalNoThanksClick"},el:$("#pandoraRibbonContainer").get(0),Sx:function(){var b=this.model.get("blueBarMessage");this.rw();null==b?this.ry():this.it=setTimeout(r(this,function(){3==b.C()?this.zP(b.wl):0==b.C()?this.JP(b.wl,b.rm):5==b.C()?this.GP(b.wl):4==b.C()?this.RP(b.wl):2==b.C()?this.Ys(b.$y):1==b.C()&&this.BP(b.OG, | |
b.CQ)}),this.rC)},JP:function(b,c){$("#pandora_bar_day_count","#renewalRibbon").text(0==b?"today":"in "+b+(1<b?" days":" day"));c?($(".pandora_bar_message").css("left","1px"),$("#pandora_bar_desc").text("Gift Subscription")):($(".pandora_bar_message").css("left","10px"),$("#pandora_bar_desc").text("subscription"));this.Mh($("#renewalRibbon"))},GP:function(b){$("#pandora_bar_day_count","#paymentBackedTrialRibbon").text(0==b?"today":"in "+b+(1<b?" days":" day"));$(".pandora_bar_message").css("left", | |
"10px");this.Mh($("#paymentBackedTrialRibbon"))},RP:function(b){$("#pandora_bar_day_count","#trialRibbon").text(0==b?"within 24 hours":"in "+b+(1<b?" days":" day"));$(".pandora_bar_message").css("left","10px");this.Mh($("#trialRibbon"))},trialUpgradeClick:function(){V("/subscriptionInfo",!0,!1);return!1},zP:function(b){$("#currentListeningHours").text(b);$("#cappingRibbon").is(":visible")||this.Mh($("#cappingRibbon"))},BP:function(b,c){$("#fbRibbonName").html(b);$("#fbRibbonImage").attr("src",c); | |
this.Mh($("#facebookRibbon"))},q3:function(b){return"/services/adClicked.jsp?ad=bluebar_"+b+"&forward="+escape("/one/gift?ref=bluebar_"+b)},Ys:function(b){if("/account/info"==window.location.pathname&&(wx(b)||xx(b)||yx(b)||zx(b)))return!1;this.Sc=this.xx(b);if(null!=this.Sc){var c=this.Sc,d=c.message;if(zx(b)){var d="Please confirm your account information.",e=this.model.get("currentUser").wb();e&&(d="Still living in "+e+"? "+d)}$(".account_message",this.el).text(d);null!=c.bg&&(d=c.bg+"?cb="+(new Date).getTime(), | |
$("#pandoraAccountMessageOuterWrapper").css({"background-image":"url("+d+")","background-repeat":"no-repeat"}));null!=c.containerClass&&$("#pandoraRibbonContainer").addClass(c.containerClass);null!=c.href&&0<c.href.length&&(d=$(".account_message_learnmore",this.el),d.attr("href",c.href),"/"!=c.href.charAt(0)&&d.attr("target","_blank"));if(wx(b)||xx(b)||yx(b)||zx(b)){var d=$(".account_message_learnmore",this.el),h=this.xx(b);d.click(function(){R(Gv,h)})}this.Mh($("#accountMessageRibbon"))}},xx:function(b){var c= | |
window.ACCOUNT_MESSAGES;if(null!=c)for(var d=0;d<c.length;d++){var e=c[d];if(e.name==b)return e}return null},Mh:function(b){$(".ribbon",this.el).removeAttr("style");b.show();$(this.el).is(":visible")||($(".ribbonContent",this.el).css("position","fixed").show(),this.lA(!0));this.xr("display")},lA:function(b){$(this.el).show();if(0<$(".ribbonContent").innerHeight()){var c=$(".ribbonContent").innerHeight()-2;this.model.set({pageShifting:!0});c=$(".skinContainer,#topnav,#searchPopupNavPosition,#ad_frame").animate({top:(b? | |
"+=":"-=")+c+"px"},1E3);$.when(c).done(r(this,function(){this.model.set({pageShifting:!1});b||($("#pandoraAccountMessageOuterWrapper").removeAttr("style"),$("#pandoraRibbonContainer").removeClass(),$("#pandoraRibbonContainer").removeAttr("style"),$(".ribbonContent",this.el).removeAttr("style"))}))}},ry:function(){var b="fixed"==$(".ribbonContent",this.el).css("position");this.rw();$(".ribbonContent",this.el).css("position","relative");$(window).scrollTop(0);b&&this.lA(!1);$(this.el).slideUp(1E3,r(this, | |
function(){$(".ribbon",this.el).removeAttr("style");$("#pandoraRibbonContainer").show()}));this.Sc=null},rw:function(){this.it&&(clearTimeout(this.it),this.it=null)},xr:function(b){var c=this.model.get("currentUser"),d=this.model.get("blueBarMessage"),e=null;null!=d&&(e=d.$y);s("blue_bar",{action:b,vendor_id:u,message_key:e,listener_state:c.u},c)},accountMessageLearnMoreClick:function(b){b.target.blur();this.xr("click_through");if(null!=this.Sc&&this.Sc.action)return this.Sc.action(),this.model.set({blueBarMessage:null}), | |
!1;this.model.set({blueBarMessage:null});return!0},messageCloseClick:function(b){b.target.blur();this.Sc&&this.Sc.name&&z.b(Tj,this.Sc.name);this.model.set({blueBarMessage:null});this.xr("dismiss");return!1},fbCloseClick:function(b){b.target.blur();this.model.set({blueBarMessage:null});return!1},fbNoThanksClick:function(b){b.target.blur();this.model.set({blueBarMessage:null});return!1},cappingMoreInfoClick:function(){R(Tu);return!1},cappingNoThanksClick:function(){this.model.set({blueBarMessage:null}); | |
return!1},renewMoreInfoClick:function(){R(Vu);return!1},renewalNoThanksClick:function(){this.model.set({blueBarMessage:null});pm(Xl,!0);return!1},restoreSubscriptionClick:function(){V("/account/billing",!1,!1);return!1}});function Rz(){}Rz=Backbone.View.extend({initialize:function(){this.model.bind("change:modalPanel",r(this,this.ia))},el:$("#footer"),ia:function(){this.model.get("modalPanel")!=ku&&"REGISTERED_PANEL"!=this.model.get("modalPanel")||$(".navFooter").hide()},events:{"click .concerts":"concertsClick","click .navFooter":"footerClick"},concertsClick:function(){k.info("concerts not implemented");return!1},footerClick:function(b){R(Fw,b);return!0}});function Sz(){} | |
Sz=Backbone.View.extend({initialize:function(){S(aw,r(this,this.Lq));S(Hu,r(this,this.wt));S($v,r(this,this.TO));S(Lv,r(this,this.cj));z.c(hf,r(this,this.ky));z.c(jf,r(this,this.ky));z.c(zf,r(this,this.lK));z.Eh(Af,r(this,this.nK));z.c(df,r(this,this.Qd))},el:$("#mainContentContainer .station").last(),Im:null,cs:"",Fj:"",wt:function(b){null!=b&&(this.Im=null,this.ka=b);$(this.el).empty();0==this.ka.indexOf("G")?Tz("/content/genrestation",{musicid:this.ka,cachebuster:""+(new Date).getTime()},r(this, | |
function(b){$(this.el).empty().append(b);this.Sp();this.i=wn($("#station_info").data("station"));this.Ui=this.ka;R($w,this.i);b=no($(".likeButton[data-like-type=genrestation]",this.el));R(vv,b);Uz(this.el,this.model.get("currentUser"));this.ew()}),function(){z.b(Ih)},!0):Tz("/content/station",{stationId:this.ka,cachebuster:""+(new Date).getTime()},r(this,function(b){$(this.el).empty().append(b);this.i=wn($("#station_info").data("station"));!0===$("#station_info").data("banned")&&$(".comment_form").hide(); | |
this.Sp();this.Im=this.ka;this.ka=this.i.e();this.Ui=null;this.cs=$("#title",this.el).val();this.Fj=$.trim($("#station_description",this.el).html());this.PN=$("#description",this.el).val();this.Xv();this.dn(!1);b=no($(".likeButton[data-like-type=station]",this.el));R(vv,b);this.ew();R($w,this.i);_.each($(".section",this.el),r(this,function(b){this.eA($(b))}))}),function(){z.b(Ih)},!0)},Sp:function(){$(".left_col_buttons",this.el).show();this.i&&this.i.Eb()||$(".stationDetailsEdit",this.el).show(); | |
Zo()&&$(".sample",this.el).show();$(".iTunes-badge").hide();$(".addButton",this.el).show();$(".col2",this.el).show();$(".col3",this.el).show();$(".i-menu-dropdown-1.menu_dropdown").mouseleave(function(){$(this).find(".dropdownmenu_nosample").fadeOut()})},ew:function(){this.Db&&this.Db.close();var b=this.model.get("currentUser"),b=null!=b&&b.s==this.i.gh();this.Db=new Vz({el:$(".backstage",this.el).get(0),model:this.model,type:this.Ui?"music":"station",targetId:this.Ui?this.Ui:this.ka,isTargetOwner:b})}, | |
Xv:function(){1==$(".stationSeedsSection li",this.el).length?$(".stationSeedsSection li .deletable",this.el).hide():$(".stationSeedsSection li .deletable",this.el).show()},TO:function(b){var c=b.r();if("addThumbedUpSong"==b.getContext()){var d=c.wa();d&&d.musicId&&z.b(Qi,[c.e(),b.o(),d.musicId])}else"addSongSeed"!=b.getContext()&&"addArtistSeed"!=b.getContext()||z.b(Ri,[c.e(),b.o()])},ky:function(b){b[0]==this.ka&&this.wt()},render:function(){$(".backstage .header h1",this.el).text(this.i.fa());return this}, | |
Lq:function(b){this.ka==b.e()&&(this.i=b,this.render(),this.wt())},events:{"click #playStationButton":"playStationClick","click .likeButton":"likeStationClick","click .show_more":"fetchPage","click .stationDetailsEdit":"stationEditClick","click #cancelEditButton":"cancelEditClick","click #saveEditButton":"saveEditClick","click .addButton":"handleAddClick","click .deletable":"handleDeleteClick","click .stationSectionSort":"handleSortClick","click .sample":"sampleClick","click #shareButton":"shareButtonClick", | |
"change #enableArtistMessagesCheckbox":"handleArtistMessagesChange","click .btn_right .menu_dropdown":"dropDownClick","click .create_station":"playStationClick"},shareButtonClick:function(){var b=this.model.get("currentUser");null==b||b.p()?R(rv,{onSuccessRedirect:Wy()}):(R(Ou,{mode:"station",station:this.i}),s("link",{click:"shareButton",source:"StationView"},this.model.get("currentUser")))},sampleClick:function(b){$(b.target).blur();b=0<$(b.target).parent(".sample").size||$(b.target);if(!b.hasClass("sample-inactive"))return b.hasClass("playing")? | |
(z.b(Mi),b.removeClass("playing")):(z.b(Li,{url:b.data("sampleurl"),gain:null!=b.data("samplegain")?Number(b.data("samplegain")):0}),b.addClass("playing"),b=b.data("trackname"),$(".iTunes-badge."+b).show()),!1},dropDownClick:function(b){$(b.target).blur();b=$(b.target).children(".dropdownmenu_nosample");b.css("visibility","visible");b.show()},Qd:function(b){var c=$(".sample.playing",this.el);c.removeClass("playing");var d=c.data("trackname");$(".iTunes-badge."+d).hide();b.isError&&c.addClass("sample-inactive").find("a").attr("title", | |
"Sample Unavailable").find("span").html("Sample Unavailable")},playStationClick:function(b){if(az(this.model))return R(rv,{onSuccessRedirect:Wy()}),!1;var c=$(b.target).attr("data-station-id");b=$(b.target).data("music-id");ie(c)?z.b(Di,{stationCode:"fs"+c,source:"station_page"}):ie(b)&&z.b(Di,{stationCode:"mi"+b,source:"station_page"});return!1},likeStationClick:function(b){var c=this.model.get("currentUser");if(null==c||c.p())R(rv,{onSuccessRedirect:Wy()});else return(b=$(b.currentTarget).attr("data-like_id"))? | |
z.b(rj,b):z.b(qj,{type:this.Ui?"genrestation":"station",objectId:this.ka,context:"station_page",contextId:this.ka,contextName:this.i.fa()}),!1},lK:function(b){this.i&&b.objectId==this.ka&&($("#likeStationButton").addClass("selected"),$("#likeStationButton").attr("data-like_id",b.id),$("#likeStationButton").text(Ac),$("#likeStationButton").css("background-image","url(/img/likes/liked.png)"))},nK:function(b){b=oo(b);$("#likeStationButton").attr("data-like_id")==b.ff&&($("#likeStationButton").removeClass("selected"), | |
$("#likeStationButton").removeAttr("data-like_id"),$("#likeStationButton").text(Bc),$("#likeStationButton").css("background-image","url(/img/likes/like.png)"))},cj:function(b){Wx(this.el,b)},stationEditClick:function(){R(Zw);this.dn(!0);return!1},cancelEditClick:function(){R(Zw);k.info("Cancelling form");$("#title",this.el).val(this.cs);$("#description",this.el).val(this.PN);this.dn(!1);return!1},saveEditClick:function(){R(Zw);this.cs="";this.Fj="Please wait..";this.dn(!1);var b=$("#title",this.el).val(), | |
c=$("#description",this.el).val();z.b(Pi,[this.ka,b,c]);return!1},dn:function(b){this.i.Eb()||(b?($(".stationDescription").hide(),$("#stationEditForm").fadeIn()):(this.Fj&&0<this.Fj.length?($("#default_description",this.el).hide(),$("#station_description",this.el).empty().html(this.Fj),$("#station_description",this.el).show()):($("#default_description",this.el).show(),$("#station_description",this.el).hide()),$("#stationEditForm").hide(),$(".stationDescription").fadeIn()))},handleArtistMessagesChange:function(){var b= | |
$("#enableArtistMessagesCheckbox").is(":checked");z.b(tk,[null!=this.Im?this.Im:this.ka,b]);return!1},handleAddClick:function(b){new Lz({model:this.model,station:this.i,context:b.target.id,event:Mv});return!1},handleDeleteClick:function(b){var c=b.target.getAttribute("data-musicId");"seed"==b.target.getAttribute("data-type")?z.b(Jj,{stationID:this.ka,seedID:$(b.target).attr("data-seedid")}):R(Ru,{isPositive:$(b.target).closest("ul").hasClass("thumb_up_list"),stationID:this.ka,musicID:[c]});$(b.target).parents("li").slideUp(200); | |
return!1},handleSortClick:function(b){var c=$(b.target),d=c.hasClass("sort-dir-ascending");$(".stationSectionSort",c.parents(".section")).removeClass("sort-dir-ascending").removeClass("sort-dir-descending");d?(s("link",{click:"sortStationsAscending",source:"StationView"},this.model.get("currentUser")),c.addClass("sort-dir-descending")):(s("link",{click:"sortStationsDescending",source:"StationView"},this.model.get("currentUser")),c.addClass("sort-dir-ascending"));$("."+c.attr("data-sort")).empty(); | |
this.fetchPage(b);return!1},eA:function(b){var c=$(".sort-dir-ascending",b);0==c.length&&(c=$(".sort-dir-descending",b));0==c.length&&(c=$(".stationSectionSort",b).last(),c.addClass("date"==$(c).attr("data-key")?"sort-dir-descending":"sort-dir-ascending"));return c},fetchPage:function(b){b=$(b.target).parents(".section");var c=this.eA(b),d=$("."+c.attr("data-sort")),e=$(".show_more:visible",b);e.hide();var e=0==e.length?0:parseInt(e.data("nextstartindex"),10),h=c.hasClass("sort-dir-ascending"),c= | |
c.data("key"),l=r(this,function(b){d.append(b);this.Xv();this.Sp()});b.hasClass("allSeeds")?Tz("/content/station_all_seeds",{stationId:this.ka,startIndex:e,artistSortAsc:h,sortBy:c,"cachebuster:":""+(new Date).getTime()},l):b.hasClass("thumbedUpSongs")?Tz("/content/station_track_thumbs",{stationId:this.ka,page:"true",posFeedbackStartIndex:e,posSortAsc:h,posSortBy:c,"cachebuster:":""+(new Date).getTime()},l):b.hasClass("thumbedDownSongs")&&Tz("/content/station_track_thumbs",{stationId:this.ka,page:"true", | |
down:"true",negFeedbackStartIndex:e,negSortAsc:h,negSortBy:c,"cachebuster:":""+(new Date).getTime()},l);return!1}});function sz(){} | |
sz=Backbone.View.extend({initialize:function(){this.na=(new Date).getTime();this.track=this.options.track;var b=$x(this.model),c=this.model.get("currentStation"),d=c;d&&d.D()&&(d=this.model.get("stationList").Uc(this.track.e()));this.PF=c;b=Tx("stationSelectorPopup",$("#stationSelectorHeaderTmpl").tmpl(),$("#stationSelectorContentTmpl").tmpl({albumArt:this.track.vb(),songTitle:this.track.Ja,artistSummary:this.track.W(),currentStation:d,stations:b}),$("#stationSelectorFooterTmpl").tmpl());$("body").append($(this.el).append(b)); | |
Px($(".scroll-pane",this.el));setTimeout(r(this,function(){$(".stationSelectorPopup .stationSelectorPopupStation").first().click()}),1);V("/song/move/"+this.track.o(),!1,!0);R(Uw)},events:{"closed .lightbox":"cancelButtonClicked","click .cancelButton":"cancelButtonClicked","click .okButton":"okButtonClicked","click .stationSelectorPopupStation":"stationClicked"},cancelButtonClicked:function(){this.U(null);return!1},okButtonClicked:function(){this.U(this.XO);return!1},stationClicked:function(b){$(".stationSelectorPopupStation", | |
this.el).removeClass("selected");$(b.target).addClass("selected");this.XO=$.tmplItem(b.target).data;return!1},U:function(b){$(this.el).remove();this.el=null;null!=b&&R(Rv,new Dy(b,this.track,this.PF))}});function Wz(){} | |
Wz=Backbone.View.extend({initialize:function(){this.na=(new Date).getTime();S(wu,r(this,this.Ga));var b=this.options.title;b||(b=Lc());var c=this.options.subtitle,d=this.options.message;d||(d=Kc());var e=this.options.yesButtonText;e||(e=Nc());var h=this.options.noButtonText;h||(h=Oc());this.Pi=this.options.event;b=Tx("confirmPopup",$("#confirmHeaderTmpl").tmpl({title:b}),$("#confirmBodyTmpl").tmpl({subtitle:c,message:d}),$("#confirmFooterTmpl").tmpl({yesButtonText:e,noButtonText:h}));$("body").append($(this.el).append(b))}, | |
Ga:function(b){this.el&&(new Date).getTime()-this.na>Mz&&($(b.target)==this.el||0<$(b.target).parents(".lightbox_bg").length||this.U(null))},events:{"click .yesButton":"yesClicked","click .noButton":"noClicked","closed .lightbox":"noClicked"},yesClicked:function(){this.U(!0);return!1},noClicked:function(){this.U(!1);return!1},U:function(b){Oz(this);$(this.el).remove();this.el=null;b?R(Xv,this.Pi):R(Yv,this.Pi)}});function xz(){} | |
xz=Backbone.View.extend({initialize:function(){this.na=(new Date).getTime();S(wu,r(this,this.Ga));var b=this.options.title;b||(b=Lc());var c=this.options.subtitle,d=this.options.message;d||(d=Kc());var e=this.options.yesButtonText;e||(e=Nc());var h=this.options.noButtonText;h||(h=Oc());var l=this.options.reverseButtons,p=this.options.onlyShowNoButton;this.Pi=this.options.event;p?e=[{label:h,className:"closeBtn noButton"}]:(e=[{label:e,className:"yesButton"},{label:h,className:"closeBtn noButton"}],l&& | |
(l=e[0],e[0]=e[1],e[0].className="noButton",e[1]=l,e[1].className="yesButton closeBtn"));b=Vx($("#onboarding-confirmHeaderTmpl").tmpl({title:b}),$("#onboarding-confirmBodyTmpl").tmpl({subtitle:c,message:d}),$("#onboarding-confirmFooterTmpl").tmpl({buttons:e}));$("body").append($(this.el).append(b))},Ga:function(b){this.el&&(new Date).getTime()-this.na>Mz&&($(b.target)==this.el||0<$(b.target).parents(".lightbox_bg").length||this.U(null))},events:{"click .yesButton":"yesClicked","click .noButton":"noClicked", | |
"closed .lightbox":"noClicked"},yesClicked:function(){this.U(!0);return!1},noClicked:function(){this.U(!1);return!1},U:function(b){Oz(this);$(this.el).remove();this.el=null;b?R(Xv,this.Pi):R(Yv,this.Pi)}});function Xz(){} | |
Xz=Backbone.View.extend({initialize:function(){this.na=(new Date).getTime();S(wu,r(this,this.Ga));this.i=this.options.station;var b=Tx("renameStationPopup",$("#renameStationHeaderTmpl").tmpl(),$("#renameStationContentTmpl").tmpl({station:this.i}),$("#renameStationFooterTmpl").tmpl());$(this.el).append(b);$("body").append(this.el);$(".renameStationName",this.el).focus()},Ga:function(b){this.el&&(new Date).getTime()-this.na>Mz&&($(b.target)==this.el||0<$(b.target).parents(".renameStationPopup").length||this.U(null))}, | |
events:{"click .okButton":"okClicked","click .cancelButton":"cancelClicked","closed .lightbox":"cancelClicked","keyup .renameStationName":"stationNameKey"},stationNameKey:function(b){if(100<(new Date).getTime()-this.na)if(27==b.which)this.U(null);else if(13==b.which)return this.okClicked(null)},okClicked:function(){var b=$(".renameStationName",this.el).val();this.U(Hd(b));return!1},cancelClicked:function(){this.U("");return!1},U:function(b){Oz(this);$(this.el).remove();this.el=null;null!=b&&""!=b&& | |
z.b(aj,[this.i.e(),b]);jz()}});function Yz(){} | |
Yz=Backbone.View.extend({events:{"closed .lightbox":"cancelClickedHandler","click .okButton":"okClicked","click .cancelButton":"cancelClickedHandler","click .skipButton":"cancelClickedHandler","click #facebookLoginButton":"facebookLoginButtonClick","click #twitterLoginButton":"twitterLoginButtonClick","click #shareStation":"shareStationClick","click #shareSong":"shareSongClick","click #shareViaProfile":"shareViaProfileClickHandler","click #shareViaEmail":"shareViaEmailClick","focus #shareStationTo":"shareStationToFocus","change #shareSocialNetworkSelectFacebook":"shareFacebookChange", | |
"change #shareSocialNetworkSelectTwitter":"shareTwitterChange","click .startLoginFacebook":"startFacebookLogin","click .startLoginTwitter":"startTwitterLogin","focus #shareStationMessage":"shareStationMessageFieldFocus","keypress #shareStationMessage":"shareStationMessageFieldKeyPress","keyup #shareNameInput":"shareStationNameChange","blur #shareNameInput":"validateStationNameChangeHandler","change #shareStationMessage":"storeUserInputMessage"},initialize:function(){z.c(Dg,r(this,this.Jq));z.c(nh, | |
r(this,this.EI));this.model.bind("change:twitterAuthenticated",r(this,this.Ut));this.model.bind("change:facebookAuthenticated",r(this,this.Ut));this.Tz="/";S(Pu,r(this,function(b){this.rd="song"==b.mode;this.Tz=b.returnHash;this.mode=b.mode;this.track=b.track;this.Pc=b.album;this.i=b.station;this.Zd=b.relatedArtists?b.relatedArtists:this.model.get("relatedArtists");this.i&&!0==this.i.D()||(this.track instanceof po?(this.mode="station",this.rd=!1):this.track instanceof ro&&(this.mode="song",this.rd= | |
!0));this.render()}));$("body").append(this.el)},render:function(){this.na=(new Date).getTime();S(wu,r(this,this.Ga));var b=this.model.get("currentUser"),c=this.track?this.track.Ja:"",d=this.track?this.track.W():"",e=this.track?this.track.kb:"",h=this.i&&(this.i.Eb()||null==this.Zd&&!this.i.wa())?_.escape(this.i.Sl()).replace(/\n/g,"<br>"):_.escape(this.Zd);this.i&&this.i.Ha()&&this.i.Z()&&(h=this.Fi("your"));var l="";this.i&&this.i.Ha()&&this.model.get("facebookAuthenticated")&&(l=$n(this.model.get("currentUser")), | |
this.Fn(l));var p="";if(this.i&&this.i.Ha()){var p=Id(this.i.fa()),q=Id(this.i._originalStationShareName),p=this.Fi(p);this.Fn(q)}this.track instanceof ro&&(c="Message from "+d,p=this.Ew());b=Tx("shareStationPopup",$("#shareStationHeaderTmpl").tmpl(),$("#shareStationContentTmpl").tmpl({profileImage:Gd(b,!0),stationArt:this.Yi(),albumArt:this.vb(),station:this.i,description:h,sharedDescription:p,defaultShareName:"Enter Your Name",fbName:l,isCustomContentTrack:this.track?this.track instanceof Cn:!1, | |
isArtistMessageTrack:this.track?this.track instanceof ro:!1,trackSongTitle:c,trackArtistSummary:d,trackAlbumTitle:e,album:this.Pc}),$("#shareStationFooterTmpl").tmpl());$(this.el).empty().append(b);this.Ut();$("#shareStationName",this.el).focus();this.Ts();this.kA();this.i&&($("#shareNameInput").val(Id(sn(this.i))),this.i.Ha()&&this.model.get("facebookAuthenticated")&&this.i.Z()&&this.Fn(l));$(this.el).show()},Ut:function(){var b=this.model.get("currentUser");null!=b&&($(".profileImage",$(this.el)).attr("src", | |
Gd(b,!0)),this.model.get("facebookAuthenticated")?($(".facebook_logged_in",$(this.el)).show(),$(".facebook_not_logged_in",$(this.el)).hide(),$("#shareSocialNetworkSelectFacebook",$(this.el)).prop("checked",!0)):($(".facebook_logged_in",$(this.el)).hide(),$(".facebook_not_logged_in",$(this.el)).show(),$("#shareSocialNetworkSelectFacebook",$(this.el)).prop("checked",!1)),this.model.get("twitterAuthenticated")&&!je(b.de)?($(".twitter_logged_in",$(this.el)).show(),$(".twitter_not_logged_in",$(this.el)).hide(), | |
$("#shareSocialNetworkSelectTwitter",$(this.el)).prop("checked",!0)):($(".twitter_logged_in",$(this.el)).hide(),$(".twitter_not_logged_in",$(this.el)).show(),$("#shareSocialNetworkSelectTwitter",$(this.el)).prop("checked",!1)))},vb:function(){return null!=this.track?this.track.vb():null!=this.Pc?this.Pc.albumArt:null!=this.i?this.Yi():null},Yi:function(){var b=null;if(this.i){if(this.i.Ha())return this.i._stationArt;b=this.i._stationArt;b||(b=(b=this.i.wa())&&null!=b.song?b.song.artUrl:b&&null!=b.artist? | |
b.artist.artUrl:fn()+"img/no_album_art.png")}return b},Ts:function(){"song"==this.mode?($(".shareStationOrSong",this.el).hide(),this.hA()):"album"==this.mode?($(".shareStationOrSong",this.el).hide(),this.pP()):"station"==this.mode?($(".shareStationOrSong",this.el).hide(),this.iA()):($(".shareStationOrSong",this.el).show(),this.rd?this.hA():this.iA());$(".shareInfoData div").truncate({width:275});$("#shareSocialNetworkSelectFacebook:visible").prop("checked",Dm());$("#shareSocialNetworkSelectTwitter:visible").prop("checked", | |
Cm())},W:function(){return this.track?je(this.track.Bo)?this.track.W():this.track.Bo:this.Pc?je(this.Pc.composerName)?this.Pc.artistSummary:this.Pc.composerName:""},hA:function(){this.track instanceof Dn?(this.qd="I'm listening to "+this.W()+" #LIVE on #pandora. Join me now!",this.Oe="I'm listening to "+(this.track.Ic?this.track.Ic:this.W())+" #LIVE on #pandora. Join me now!"):this.track instanceof ro?(this.qd="Check out this audio message from "+this.W()+" on Pandora",this.Oe="Check out this audio message from "+ | |
(this.track.Ic?this.track.Ic:this.W())+" on @pandora_radio. #Pandora"):(this.qd="I'm listening to \""+this.track.Ja+'" by '+this.W()+" on Pandora",this.Oe="I'm listening to \""+this.track.Ja+'" by '+(this.track.Ic?this.track.Ic:this.W())+" on @pandora_radio. #Pandora");this.Mb?$("#shareStationMessage",this.el).val(this.Mb):this.track instanceof Cn?$("#shareStationMessage",this.el).val('Write a message about "'+this.track.Ja+'" from '+this.W()+" to share with your friends..."):this.track instanceof | |
Dn?$("#shareStationMessage",this.el).val(this.qd):this.track instanceof ro?$("#shareStationMessage",this.el).val("Write a message about this audio message by "+this.W()+" to share with your friends..."):$("#shareStationMessage",this.el).val('Write a message about "'+this.track.Ja+'" by '+this.W()+" to share with your friends...");$("#shareStationInfo",this.el).hide();$("#shareAlbumInfo",this.el).hide();$("#shareTrackInfo",this.el).show();$("#shareHeaderStation",this.el).hide();$("#shareHeaderAlbum", | |
this.el).hide();this.track instanceof ro?($("#shareHeaderArtistMessage",this.el).show(),$("#shareHeaderSong",this.el).hide()):($("#shareHeaderArtistMessage",this.el).hide(),$("#shareHeaderSong",this.el).show())},pP:function(){this.qd="I'm listening to \""+this.Pc.albumTitle+'" by '+this.W()+" on Pandora";this.Mb?$("#shareStationMessage",this.el).val(this.Mb):$("#shareStationMessage",this.el).val('Write a message about "'+this.Pc.albumTitle+'" by '+this.W()+" to share with your friends...");$("#shareStationInfo", | |
this.el).hide();$("#shareAlbumInfo",this.el).show();$("#shareTrackInfo",this.el).hide();$("#shareHeaderStation",this.el).hide();$("#shareHeaderAlbum",this.el).show();$("#shareHeaderSong",this.el).hide();$("#shareHeaderArtistMessage",this.el).hide()},Gg:function(b,c,d,e,h){d=d?"@pandora_radio. #Pandora":"Pandora";c=c?"#LIVE ":"";var l=e?'Check out "':"I'm listening to \"";e&&(b=b.replace("Thumbprint Radio","#ThumbprintRadio"));return l+b+'" '+c+"on "+d+h},Jz:function(){var b=sn(this.i),c=this.i._stationNameWithTwitterHandle; | |
this.track instanceof Dn?(this.qd=this.Gg(this.W(),!0,!0,!1,". Join me now! "+this.track.Fx()),this.Oe=this.Gg(this.track.Ic?this.track.Ic:this.W(),!0,!0,!1,"")):this.i.Ha()?(this.qd=this.Gg(b,!1,!1,!0,""),this.Oe=this.Gg(b,!1,!0,!0,"")):(this.qd=this.Gg(b,!1,!1,!1,""),this.Oe=this.Gg(c?c:b,!1,!0,!1,""))},iA:function(){this.Jz();this.Mb?$("#shareStationMessage",this.el).val(this.Mb):this.track instanceof Dn?$("#shareStationMessage",this.el).val(this.qd):$("#shareStationMessage",this.el).val('Write a message about "'+ | |
this.i.fa()+'" to share with your friends...');$("#shareStationInfo",this.el).show();$("#shareAlbumInfo",this.el).hide();$("#shareTrackInfo",this.el).hide();$("#shareHeaderStation",this.el).show();$("#shareHeaderAlbum",this.el).hide();$("#shareHeaderSong",this.el).hide();$("#shareHeaderArtistMessage",this.el).hide()},Ga:function(b){this.el&&(new Date).getTime()-this.na>Mz&&($(b.target)==this.el||0<$(b.target).parents(".shareStationPopup").length||0<$(b.target).parents(".shareVehicleAuthPopup").length|| | |
0<$(b.target).parents(".toastContainer").length||this.pw())},validateStationNameChangeHandler:function(){return this.dB.apply(this,arguments)},shareFacebookChange:function(b){b=$(b.target).is(":checked");pm(bm,b)},shareTwitterChange:function(b){b=$(b.target).is(":checked");pm(am,b)},startFacebookLogin:function(){z.b(lj);return!1},startTwitterLogin:function(){R(jv,null);return!1},shareStationToFocus:function(){$("#shareStationTo").data("hasdefaulttext")&&($("#shareStationTo").text(""),$("#shareStationTo").data("hasDefaultText", | |
!1))},shareViaProfileClickHandler:function(b){return this.kA.apply(this,arguments)},kA:function(){this.Pg=!1;$("#shareViaEmail",this.el).show();$("#shareViaProfile",this.el).hide();$("#shareToEmailForm",this.el).hide();$("#shareSocialNetworkSelect",this.el).show();$(".shareVehiclePandora",this.el).show();$(".shareVehicleEmail",this.el).hide();return!1},shareViaEmailClick:function(){this.Pg=!0;$("#shareViaEmail",this.el).hide();$("#shareViaProfile",this.el).show();$("#shareToEmailForm",this.el).show(); | |
$("#shareSocialNetworkSelect",this.el).hide();$(".shareVehiclePandora",this.el).hide();$(".shareVehicleEmail",this.el).show();return!1},shareStationClick:function(){this.rd=!1;this.Ts()},shareSongClick:function(){this.rd=!0;this.Ts()},shareStationMessageFieldFocus:function(){this.Mb?$("#shareStationMessage",this.el).val(this.Mb):this.track instanceof ro?(this.nr()?$("#shareStationMessage",this.el).val(this.Oe):$("#shareStationMessage",this.el).val(this.qd),this.X3()):$("#shareStationMessage",this.el).val("")}, | |
dB:function(){var b=$("#shareNameInput").val();if(this.xL(b))return $("#required-reminder").removeClass("invalidField"),$("label[for='shareNameInput']").removeClass("invalidField"),this.i.Ha()&&this.Jz(),!0;$("#required-reminder").addClass("invalidField");$("label[for='shareNameInput']").addClass("invalidField");return!1},xL:function(b){return null!=b&&0<$.trim(b).length},LF:function(b){return this.i.Ha()?b+"'s Thumbprint Radio":this.i.fa()},Fn:function(b){var c=this.LF(b);$(".stationShareName").text(c); | |
$(".stationShareDescription").text(this.Fi(b));this.i._stationShareName=c},shareStationNameChange:function(){var b=$("#shareNameInput").val();this.Fn(b)},Fi:function(b){if(this.i.Ha()){var c=this.i.sq();return"your"!=b?"Music inspired by "+(b+"'s")+" "+c+" thumbs from across all their stations.":"Music inspired by your "+c+" thumbs from across all your stations."}return this.i.Sl()},Ew:function(){var b=this.i?sn(this.i):null;return"Hear an audio message from "+this.W()+" and tune into "+(b?b:this.W()+ | |
" Radio")+" on Pandora"},shareStationMessageFieldKeyPress:function(){if(!$("#shareStationMessage").val()&&this.nr()){var b=" #Pandora";("song"==this.mode||"album"!=this.mode&&"station"!=this.mode&&this.rd)&&this.track.Ic&&(b=" "+this.track.Ic+b);$("#shareStationMessage").val(b);$("#shareStationMessage")[0].setSelectionRange(0,0)}},cancelClickedHandler:function(b){return this.pw.apply(this,arguments)},pw:function(){this.U();this.Mb=null;return!1},okClicked:function(){if(this.i&&this.i.Ha()&&this.i.Z()&& | |
!this.dB($("#shareNameInput").val()))return $("#shareNameInput").focus(),!1;!this.Zd&&this.model.get("relatedArtists")&&(this.Zd=this.model.get("relatedArtists"));this.cb=this.aF();this.Fd=[];if(null!=this.cb)this.lt=!1,this.jp({doFacebook:this.cb.doFacebook&&this.model.get("facebookAuthenticated"),doTwitter:this.cb.doTwitter&&this.model.get("twitterAuthenticated")});else return!1;this.Mb=null;return!1},storeUserInputMessage:function(){this.Mb=Hd(String($("#shareStationMessage",this.el).val()));0>= | |
this.Mb.length?$("#shareStationMessage",this.el).removeClass("edited"):$("#shareStationMessage",this.el).addClass("edited")},aF:function(){var b=null==this.Mb?"":Hd(String(this.Mb)),c=Hd(String(this.qd)),d=this.Oe?Hd(String(this.Oe)):c,e=this.i?sn(this.i):null,h=this.model.get("currentUser"),l=this.oL(),p=this.nr(),q=null;if(this.Pg){var q=String($("#shareStationTo",this.el).val()),t;a:{var y=!1;t=q.split(",");for(var E=0;E<t.length;E++){var J=jQuery.trim(t[E]);if(0<J.length){var y=J,J=y.indexOf("@"), | |
N=y.length,U=y.indexOf(".");if(-1!=y.indexOf("@")&&0!=J&&J!=N-1&&-1!=U&&0!=U&&"."!=y.substr(N-1,N)&&-1==y.indexOf("@",J+1)&&"."!=y.substring(J-1,J)&&"."!=y.substring(J+1,J+2)&&-1!=y.indexOf(".",J+2)&&-1==y.indexOf(" "))y=!0;else{t=!1;break a}}}t=y}if(!t)return(new X({message:Hb([Ib()])})).render(),null;t=0==b.length?c:b;t=t.toLowerCase();if(!(0<=t.indexOf("http:")||0<=t.indexOf("https:")||0<=t.indexOf("www.")||t.replace(/<[^>]*?>/gi,"").length!=t.length||-1<t.search("([!#-'*+\\-\\/-9=?A-Z^-~]+[.])*[!#-'*+\\-\\/-9=?A-Z^-~]+@(((?:(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)\\.)+(?:[a-zA-Z](?:[-\\da-zA-Z]{0,6}[\\da-zA-Z])?)\\.?))(\\:\\d+)?")? | |
0:0<t.length))return(new X({message:Hb([Jb()])})).render(),null}var pa,Ja,fb,gb,ua,y=this.track?this.track.Ja:null,J=this.track?this.track.W():null,N=this.track?this.track.kb:null,U=null;ua="";var ta=this.track?this.track.ii:null;l?ua+="&site=facebook&shareImp=true":p&&(ua+="&site=twitter&shareImp=true");var T=h.RK;ie(T)&&"/"==T.charAt(T.length-1)&&(T=T.substring(0,T.length-1));"song"==this.mode?(this.track instanceof ro?(E=t=gb=this.track.UC,y="Message from "+this.W(),Ja="Listen at Pandora",pa=this.Ew(), | |
U=this.track.ke):(t=T+"?ext_lsfmi=mf"+this.track.o()+"%7C%7C"+h.s+ua+"&seed=song",E=T+"/"+this.track.ii+"?referrer="+h.Y+ua+"&seed=song"),ua=this.track.vb()):"station"==this.mode?(t=T+"/land/station/"+this.i.Md()+"?referrer="+h.Y+ua+"&seed=station",E=T+"/land/station/"+this.i.Md()+"?referrer="+h.Y+ua+"&seed=station",ua=this.Yi(),pa=this.i&&(this.i.Eb()||null==this.Zd&&!this.i.wa())?this.Fi(Id(sn(this.i))):e+" on Pandora will play music by "+this.Zd):this.rd?(E=(this.track.Tk?this.track.Tk:"/station/play/"+ | |
this.track.ii).replace(/&?site=[^&]+/,ua)+"&referrer="+h.Y+"&seed=song&station="+this.i.Md(),this.track.vo?t=T+"?ext_lsfmi=mf"+this.track.o()+"%7C"+this.i.e()+"%7C"+h.s+ua+"&seed=song":(ta=(this.track.Tk?this.track.Tk:"/station/play/"+this.track.ii).replace(/&?site=[^&]+/,ua).replace(/^http:\/\/[^\/]*/,""),t=E),fb=T+"/land/station/"+this.i.Md()+"?referrer="+h.Y+ua+"&seed=song",ua=this.track.vb()):(t=T+"/land/station/"+this.i.Md()+"?referrer="+h.Y+ua+"&seed=station&shareName="+Id(sn(this.i)),E=T+"/land/station/"+ | |
this.i.Md()+"?referrer="+h.Y+ua+"&seed=station&shareName="+Id(sn(this.i)),ua=this.Yi(),this.i&&this.i.Eb()&&(ta=this.i.e()+"/"+this.track.o()+"/"+this.track.ii),pa=this.i&&(this.i.Eb()||null==this.Zd&&!this.i.wa())?this.Fi(Id(sn(this.i))):e+" on Pandora will play music by "+this.Zd);this.i&&this.i.wa()?(T=this.i.wa(),T="string"==typeof T?T:T.musicId):T=null;return{doFacebook:l,doProfile:!this.Pg,doTwitter:p,doEmail:this.Pg,isSongShare:this.rd,emails:q,userMessage:b,defaultMessage:c,defaultTwitterMessage:d, | |
facebookDescription:pa,facebookCaption:Ja?Ja:null,stationName:e,isCustomContentTrack:this.track?this.track instanceof Cn:!1,relatedArtistNames:this.Zd,directUrl:t,landingUrl:E,shortenedUrl:gb,stationLandingUrl:fb,artUrl:ua,fbShareArt:this.i?this.i._fbShareArt:this.Yi(),webname:h.Y,stationToken:this.i?this.i.Md():null,stationId:this.i?this.i.e():null,stationInitialSeed:T,musicId:this.track?this.track.o():null,songToken:this.track?this.track.zv:null,songDetailToken:ta,songName:y,artistName:J,albumName:N, | |
artistMessageArtistUid:U}},oL:function(){return!this.Pg&&0<$("#shareSocialNetworkSelectFacebook:checked",this.el).length},nr:function(){return!this.Pg&&0<$("#shareSocialNetworkSelectTwitter:checked",this.el).length},twitterLoginButtonClick:function(){this.jp({doProfile:!1,doFacebook:!1,doTwitter:!0,doEmail:!1})},facebookLoginButtonClick:function(){this.jp({doProfile:!1,doFacebook:!0,doTwitter:!1,doEmail:!1})},jp:function(b){var c={},d;for(d in this.cb)c[d]=this.cb[d];if(null!=b)for(d in b)c[d]=b[d]; | |
this.i&&this.i.Ha()&&(c.shareName=Id(sn(this.i)));c.doEmail||c.doProfile||c.doFacebook||c.doTwitter?z.b(this.rd?kj:jj,c):this.Jq({})},Jq:function(b){this.U();clearTimeout(this.EQ);b.profile&&(this.cb.doProfile=!1,this.Fd.push('your <a href="/profile">Pandora Profile</a>'));b.facebook&&(this.cb.doFacebook=!1,this.Fd.push("Facebook"));b.twitter&&(this.model.set({twitterAuthenticated:!0}),this.cb.doTwitter=!1,this.Fd.push("Twitter"));b.email?this.lt||(new X({message:xc([this.cb.isSongShare?this.cb.songName: | |
this.cb.stationName])})).render():this.EQ=setTimeout(r(this,function(){if(!this.lt&&0<this.Fd.length){var b;2>=this.Fd.length?b=this.Fd.join(" and "):(b=this.Fd.shift()+", ",b+=this.Fd.join(" and "));(new X({message:yc([b])})).render();this.Fd=[]}}),1500);var c=!b.email&&this.cb&&this.cb.doFacebook&&!this.model.get("facebookAuthenticated"),d=!b.email&&this.cb&&this.cb.doTwitter&&!this.model.get("twitterAuthenticated");if(c||d)c=Tx("shareVehicleAuthPopup",$("#shareVehicleAuthHeaderTmpl").tmpl(),$("#shareVehicleAuthContentTmpl").tmpl({showTwitter:d, | |
showFacebook:c,showFacebookAuthenticated:this.cb.doFacebook&&this.model.get("facebookAuthenticated"),showTwitterAuthenticated:this.cb.doTwitter&&this.model.get("twitterAuthenticated"),facebookConnectName:$n(this.model.get("currentUser"))}),$("#shareVehicleAuthFooterTmpl").tmpl()),$(this.el).empty().append(c).show();s("share",{share_object:"song"==this.mode?"song":"station"==this.mode?"station":this.rd?"song":"station",source:"unknown",pandora:b.profile?"true":"false",twitter:b.twitter?"true":"false", | |
twitter_handle:b.twitterHandle?b.twitterHandle:"",facebook:b.facebook?"true":"false",email:b.email?"true":"false",object_id:this.i.e()},this.model.get("currentUser"));this.track instanceof ro&&s("aam_listener_share_complete",{vendor_id:u,station_id:this.i.e(),artist_uid:this.track.ke,message_id:this.track.Hc,pandora:b.profile?"true":"false",twitter:b.twitter?"true":"false",facebook:b.facebook?"true":"false",email:b.email?"true":"false"},this.model.get("currentUser"))},U:function(){R(bx);Oz(this,wu); | |
$(this.el).empty();V(this.Tz,!0,!0)},EI:function(b){this.lt=!0;(new X({message:b})).render();this.Jq({})}});function pz(){} | |
pz=Backbone.View.extend({pi:"wwwpandoracom-20",initialize:function(){this.cF=this.options.buyButton;this.Eg=this.options.buyMenu;this.Hw=this.options.cssBeforeOpen;this.eF=new Vy(this.cF,null,this.Eg);this.eF.Dm=r(this,function(b){this.Eg.empty().append($("#buyMenuTmpl").tmpl({iTunesUrl:this.mj&&0<jQuery.trim(this.mj).length?this.mj:null,amazonUrl:this.$k&&0<jQuery.trim(this.$k).length?this.$k:null,amazonDigitalAsin:this.qi&&0<jQuery.trim(this.qi).length?this.qi:null}));this.Hw&&this.Eg.css(this.Hw(b));$(".buyOnITunes", | |
this.Eg).click(r(this,this.hF));$(".buyOnAmazon",this.Eg).click(r(this,this.fF));$(".buyOnAmazonMp3",this.Eg).click(r(this,this.gF))})},Lh:function(b,c,d){this.mj=b;this.$k=c;this.qi=d;"US"!=Yo()&&(this.qi=this.mj=null)},Os:function(b,c){this.LE=b;this.KE=c},ZO:function(b){this.zE=b},fA:function(b,c,d){this.IQ=b;this.GQ=c;this.oh=d},lP:function(b){this.Os(b.bf,b.W());this.fA(b.o(),b.Ja,b.oh());this.Lh(b.Io,b.wo,b.uo)},hF:function(){var b=this.mj+"&ct=Web";this.jd("itunes",b);R(wv);window.open(b,"_blank"); | |
return!1},fF:function(){var b=this.$k+"&tag="+this.pi;this.jd("amazonCD",b);R(wv);window.open(b,we()?"pandoraAmazon":"_blank");return!1},gF:function(){var b="http://www.amazon.com/dp/"+this.qi+"/?&tag="+this.pi;this.jd("amazonMp3",b);R(wv);window.open(b,we()?"pandoraAmazon":"_blank");return!1},jd:function(b,c){s("buy",{store:b,source_url:window.location.href,destination_url:c,track_uid:this.IQ,featured_track:this.oh,track_name:this.GQ,album_uid:this.zE,artist_uid:this.LE,artist_name:this.KE,listener_type:this.model.get("currentUser").u, | |
platform:"web"},this.model.get("currentUser"));np(null)}});function Zz(){} | |
Zz=Backbone.View.extend({el:$(".stationContent #promobox"),initialize:function(){this.Gz=null;this.Gi="#content_a";this.ur=(new Date).getTime();this.model.bind("change:currentUser",r(this,this.render));setInterval(r(this,this.scrollPromoBox),15E3);$('a[rel="tooltip"]').each(function(){new Iz($(this),$(this).attr("title"))})},Hz:"/static/promo/",render:function(){var b=this.model.get("currentUser");null!=b&&(b=this.Hz+"manifest."+(null!=b&&b.H()?"free":"subscriber")+".json",this.Gz!=b&&(this.Gz=b, | |
this.nd=[],this.pb=0,this.Qm={},this.oj=!0,Tz(b,{cachebuster:""+(new Date).getTime()},r(this,function(b){this.nd=_.reject(b,function(b){return b.country&&b.country!=Yo()});this.pb=Math.floor(Math.random()*this.nd.length);this.Wm();this.uO()}))))},uO:function(){for(var b="<ul>",c=0;c<this.nd.length;c++)b+='<li class="dot"> </li>';b+="</ul>";$(".dots",this.el).empty().append(b)},Wm:function(b){this.nd&&(null==this.Qm[this.pb]?this.GL(b):this.Rw(b))},Rw:function(){var b=this.Qm[this.pb].htmlElem, | |
c=this.Qm[this.pb].adType,d=$("#content_a"==this.Gi?"#content_b":"#content_a",this.el);d.empty().append(b);Gp({action:"promo_display",promo_type:c,source:"PromoBoxView"},this.model.get("currentUser"));try{$("a",d)[0].setAttribute("adType",c)}catch(e){k.error("displayPromoItem error inserting adType into anchor element: "+e)}$(this.Gi,this.el).fadeOut();$(".dot",this.el).removeClass("selected");$(".dot",this.el).eq(this.pb).addClass("selected");$("#content_a"==this.Gi?"#content_b":"#content_a",this.el).fadeIn(400, | |
r(this,function(){this.Gi="#content_a"==this.Gi?"#content_b":"#content_a";this.oj=!1}))},GL:function(b){this.oj=!0;Tz(this.Hz+this.nd[this.pb].url,{cachebuster:""+(new Date).getTime()},r(this,function(c){this.Qm[this.pb]={htmlElem:c,adType:this.nd[this.pb].type};this.Rw(b)}),function(b,d){(new X({message:"Error loading content textStatus="+b+" error="+d})).render();this.oj=!1})},events:{"click #scrollLeft":"scrollLeftClick","click #scrollRight":"scrollRightClick","click #content_a":"handlePromoBoxClick", | |
"click #content_b":"handlePromoBoxClick","click .dot":"dotClick"},handlePromoBoxClick:function(b){try{var c="undefined";try{var d=$(b.target).context.parentNode;d.getAttribute("adType")&&(c=d.getAttribute("adType"))}catch(e){k.error("Error collecting info from promo box anchor element"+e)}Gp({action:"box_click",promo_type:c,source:"PromoBoxView"},this.model.get("currentUser"))}catch(h){k.error("Error collecting info from promo box"+h)}},dotClick:function(b){Gp({action:"dot_click",source:"PromoBoxView"}, | |
this.model.get("currentUser"));$(b.target).hasClass("selected")||(this.pb=$(b.target).index(),this.Wm("left"),R(Ew));return!1},mouseOverPromobox:function(){$("#scrollLeft",this.el).fadeIn();$("#scrollRight",this.el).fadeIn()},mouseOutPromobox:function(){$("#scrollLeft",this.el).fadeOut();$("#scrollRight",this.el).fadeOut()},scrollLeftClick:function(){if(this.nd){this.ur=(new Date).getTime();if(this.oj)return;this.pb--;0>this.pb&&(this.pb=this.nd.length-1);this.Wm("left")}return!1},scrollRightClick:function(){if(this.nd){this.ur= | |
(new Date).getTime();if(this.oj)return;this.pb++;this.pb>=this.nd.length&&(this.pb=0);this.Wm("right")}return!1},scrollPromoBox:function(){12E4<(new Date).getTime()-this.ur&&(Gp({action:"auto_scroll",source:"PromoBoxView"},this.model.get("currentUser")),this.scrollRightClick())}});function $z(){} | |
$z=Backbone.View.extend({initialize:function(){z.c(Ae,r(this,function(){this.Bl()}));S(ww,r(this,this.Bl));S(vw,r(this,this.lc));this.fu="#adLayout";this.Fc="#mainContentContainer";this.We="#footer";this.ra="#ad_container";this.vd="#advertisement";this.Ob="#companion_frame";this.xm=!1;this.G3=null;this.mo="/radioAdEmbedGPT.html";this.lo="/radioAdEmbedAsyncGPT.html"},render:function(b,c){this.Cl=!1;$(this.ra).show();$("body").hasClass("width-p1-noAds")&&$("body").removeClass("width-p1-noAds");$("body").hasClass("adSupported-layout")|| | |
(R(bw),$("body").addClass("adSupported-layout"),R(cw));var d=c?this.Ob:this.vd;if(null!=b){var e="ad"+(new Date).getTime();b+=(-1==b.indexOf("?")?"?":"&")+"cb="+ge();var h='<IFRAME id="'+e+'" src="'+b+'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" allowtransparency="true" width="100%" height="100%"></IFRAME>',l=null;c||($(this.ra).hasClass("masthead_ad")&&(this.xm=!0,l=$(this.ra).height(),$(this.ra).height(l)),l=$(this.ra).fadeTo("slow",0.01));$.when(l).done(r(this, | |
function(){c||(qy=null);$(this.Ob).html("");$(d).removeClass("inactive").removeClass("invisible").addClass("active").addClass("visible");var b=(new Date).getTime();$(d).html(h);var l="#"+e,t=this;$(l).bind("load",this,function(d){var e=3;(function N(){var h=d.target&&d.target.contentWindow&&d.target.contentWindow.adType,pa=d.target.contentWindow&&d.target.contentWindow.requestUrl,Ja=d.target.contentWindow&&d.target.contentWindow.creativeId,fb=d.target.contentWindow&&d.target.contentWindow.lineItemId, | |
gb=oe();if(null==h){if(0<e){k.debug("Ad iFrame rendered: adType is not ready. Retries: "+e);e--;setTimeout(N,500);return}k.debug("Ad iFrame rendered: adType was not ready. No retries left!")}k.debug("Ad iFrame: Checking adType: ",h);var ua=null;!c&&t.xm&&"masthead"!=h&&"masthead_with_companion"!=h&&(t.xm=!1,ua=$(t.ra).animate({height:"0"},1E3));$.when(ua).done(r(this,function(){var c=(new Date).getTime()-b,e=t.model?t.model.get("currentUser"):null;e&&e.JB&&s("gpt_render_duration",{duration:c,ua:navigator.userAgent, | |
browser:gb,site_version:window._pandoraVersion,flash_ver:pe(),is_gpt:"true"},e);d.data.$L(h,l,pa,Ja,fb,gb)}))})()})}));z.b(Fk)}},lc:function(b,c){if(this.model.get("modalPanel")!=iu)this.ib();else if(b&&0==b.indexOf("masthead"))if("masthead"==b?($(this.Ob).removeClass().addClass("inactive"),this.JO(b)):($(this.Fc).removeClass("wide"),$(this.We).removeClass("wide")),"masthead_companion"==b)$(this.Ob).addClass("active"),this.aq(b,c);else{if("masthead_with_companion"==b){var d=Po();null!=d&&2==d.split(":").length? | |
this.render(this.$c()+"?displayAd="+d,!0):(C.dP(),this.render(this.$c(),!0))}R(bw);$(this.ra).removeClass("inactive").addClass("active");this.aq(b,c);R(cw)}else{$(this.Ob).removeClass("active").removeClass("visible").addClass("inactive").addClass("invisible");var e=950<$(this.Fc).width();e&&R(bw);var d=e?$(this.Fc).css("width","970").removeClass("wide").animate({width:"665"},1E3,null):"",h=e?$(this.We).css("width","970").removeClass("wide").animate({width:"665"},1E3,null):"";$.when(d,h).done(r(this, | |
function(){$(this.Fc).removeAttr("style").css("display","block");$(this.We).removeAttr("style").css("display","block");$("body").hasClass("adSupported-layout")?e&&R(cw):$("body").hasClass("width-p1-noAds")?($("body").removeClass("width-p1-noAds"),R(cw)):e&&R(cw);this.aq(b,c)}))}},aq:function(b,c){if(!this.Cl)if("masthead"==b||"masthead_with_companion"==b){var d=null;this.xm||($(this.ra).height(0),d=$(this.ra).animate({height:"250"},1E3));$.when(d).done(r(this,function(){$.when($(this.ra).fadeTo("slow", | |
1)).done(r(this,function(){$(this.ra).removeClass("inactive").removeClass("invisible").addClass("active").addClass("visible").removeAttr("style");z.b(Gk,c)}))}))}else"masthead_companion"==b?$.when($(this.Ob).fadeTo("slow",1)).done(r(this,function(){$(this.Ob).removeClass("inactive").removeClass("invisible").addClass("active").addClass("visible").removeAttr("style");z.b(Gk,c)})):$.when($(this.ra).fadeTo("slow",1)).done(r(this,function(){$(this.ra).removeClass("inactive").removeClass("invisible").addClass("active").addClass("visible").removeAttr("style"); | |
z.b(Gk,c)}))},JO:function(b){if("masthead"==b){if(970!=$(this.Fc).width()){R(bw);b=$(this.Fc).css("width","665").removeClass("wide").animate({width:"970"},1E3,null);var c=$(this.We).css("width","665").removeClass("wide").animate({width:"970"},1E3,null);$.when(b,c).done(r(this,function(){$(this.Fc).addClass("wide").removeAttr("style").css("display","block");$(this.We).addClass("wide").removeAttr("style").css("display","block");R(cw)}))}}else 970==$(this.Fc).width()&&(R(bw),b=$(this.Fc).css("width", | |
"970").removeClass("wide").animate({width:"665"},1E3,null),c=$(this.We).css("width","970").removeClass("wide").animate({width:"665"},1E3,null),$.when(b,c).done(r(this,function(){$(this.Fc).addClass("wide").removeAttr("style").css("display","block");$(this.We).addClass("wide").removeAttr("style").css("display","block");R(cw)})))},Bl:function(){var b=this.model.get("currentUser");R(bw);b&&!b.H()?($(this.ra).removeClass().addClass("invisible").addClass("inactive"),$(this.Ob).removeClass().addClass("invisible").addClass("inactive"), | |
$("body").hasClass("adSupported-layout")&&$("body").removeClass("adSupported-layout"),$("body").addClass("width-p1-noAds")):($(this.ra).height("0"),$("body").hasClass("width-p1-noAds")&&$("body").removeClass("width-p1-noAds"),$("body").addClass("adSupported-layout"));R(cw);sy()},lm:function(){this.ib(!0,!1)},TP:function(){$(this.ra).show();$("body").hasClass("width-p1-noAds")&&$("body").removeClass("width-p1-noAds");$("body").hasClass("adSupported-layout")||(R(bw),$("body").addClass("adSupported-layout"), | |
R(cw));this.Cl=!1;this.lc()},ib:function(b,c){if(!this.Cl||b)c&&$(this.vd).empty(),$(this.ra).removeClass("active").removeClass("visible").addClass("inactive").addClass("invisible"),$(this.Ob).removeClass("active").removeClass("visible").addClass("inactive").addClass("invisible"),this.Kz(),R(bw),$("body").hasClass("adSupported-layout")&&$("body").removeClass("adSupported-layout"),$("body").addClass("width-p1-noAds"),R(cw),sy(),this.Cl=!0},Kz:function(){$("#google_adwords").css("display","none").css("visibility", | |
"hidden");$("#advertisement_bottom").css("display","none").css("visibility","hidden");$("#ad_controls").css("display","none").css("visibility","hidden");$("#ad_your_ad_here").css("display","none").css("visibility","hidden")},$L:function(b,c,d,e,h,l){null==qy&&sy();"double_wide_short"!=b&&this.Kz();if(b&&0==b.indexOf("masthead")){var p=this.model.get("currentUser");if(p&&p.p()){this.ib(!0);return}}"medium_rectangle"==b?($(this.ra).attr("class","banner_ad"),$(this.vd).attr("class","advertisement_square"), | |
$(c).height("100%"),this.lc(b,c)):"wide_skyscraper"==b?($(this.ra).attr("class","banner_ad"),$(this.vd).attr("class","advertisement_tall"),$(c).height("100%"),this.lc(b,c)):"double_wide"==b?($(this.ra).attr("class","banner_ad"),$(this.vd).attr("class","advertisement_double_wide"),$(c).height("100%"),this.lc(b,c)):"double_wide_short"==b?($(this.ra).attr("class","network_ad"),$(this.vd).attr("class","advertisement_double_wide_short"),$(c).height("100%"),this.lc(b,c)):"masthead"==b?($(this.ra).attr("class", | |
"masthead_ad"),$(this.vd).attr("class","advertisement_masthead"),$(this.Ob).attr("class","companion_ad"),$(c).height(250),this.lc(b,c)):"masthead_with_companion"==b?($(this.ra).attr("class","masthead_ad"),$(this.vd).attr("class","advertisement_masthead"),$(this.Ob).attr("class","companion_ad"),$(c).height(250),this.lc(b,c)):"masthead_companion"==b?($(this.vd).attr("class","advertisement_masthead"),$(this.Ob).attr("class","companion_ad"),$(c).height("100%"),this.lc(b,c)):(b="Unknown ad type: "+b,this.model.get("displayingCompanion")? | |
rp("Companion ad not displayed","2000x2",b,d,e,h,l,this.model.get("currentUser")):rp("Banner ad not displayed","2000x2,300x250,300x600",b,d,e,h,l,this.model.get("currentUser")),this.Bl())},YN:function(b,c){var d={wide_skyscraper:0,medium_rectangle:0,double_wide:0,masthead:0};switch(b){case 160:d.wide_skyscraper++;break;case 300:d.medium_rectangle++;d.double_wide++;break;case 970:d.masthead++}switch(c){case 600:d.wide_skyscraper++;d.double_wide++;break;case 250:d.medium_rectangle++,d.masthead++}var e= | |
[],h;for(h in d)e[e.length]={type:h,score:d[h]};e.sort(function(b,c){return c.RO-b.RO});return e[0].type},$c:function(){var b=this.model.get("currentUser");return b&&b.ye()?this.lo:this.mo},debug:function(b){k.debug("AdView : "+b)}});function aA(){} | |
aA=Backbone.View.extend({initialize:function(){k.debug("Initialize animated overlay ad view");this.zz=!0;S(tw,r(this,this.eM));S(uw,r(this,this.dM))},debug:function(b){k.debug("AnimatedOverlayAdView : "+Ed()+" : ",arguments)},render:function(b){b&&"ANIMATEDOVERLAY"==b.C()?(this.Dg=new Qz({model:this.model}),this.Dg.ry(),this.TD(b)):this.debug("Invalid ad type here ... should never happen",b)},TD:function(b){this.data=b;this.ab(b);(b=b.data.richmedia_companion)?(this.zz=!0,this.startTime=Fd(),z.b(Qk, | |
this.data),z.b(ci,!1),this.debug("Force the companion ad .."+b),R(rw,{companion:b,forceSyncGPT:!1}),$(window).scrollTop(0)):this.up()},up:function(){z.b(Rk,this.data);this.data=null;this.zz&&z.b(ai,{userInitiated:!1});this.Dg=new Qz({model:this.model});this.Dg.Sx()},m3:function(b){Fd()-this.startTime>b&&(this.debug("Too long for the ad to respond ... closing"),this.up())}});aA.prototype.Ah=function(b){this.debug("ERROR pinging tracker url ? "+b)}; | |
aA.prototype.ab=function(b){if(b&&b.qc){var c=b.qc;wp(c,function(){},r(this,function(b){this.Ah(c,b)}));b.qc=null}if(b&&b.tracker){var d=b.tracker;wp(d,function(){},r(this,function(b){this.Ah(d,b)}));b.tracker=null}};aA.prototype.eM=function(){this.debug("Animated overlay start",this.data);this.data&&z.b(Sk,this.data)};aA.prototype.dM=function(){this.debug("Animated overlay end",this.data);if(this.data){var b=this.data.data.followon_companion,c=!this.data.gb();this.up();R(rw,{companion:b,isCompanionAd:c})}}; | |
aA.zG=function(){R(tw)};aA.yG=function(){R(uw)};window.animatedOverlayStart=aA.zG;window.animatedOverlayFinish=aA.yG;function Y(){} | |
Y=Backbone.View.extend({initialize:function(b){k.debug("Initialize video ad view");this.Gk="#videoAd";this.Uu="#videoPlayerJS";this.vg="#videoPlayer";this.HC=854;this.GC=480;this.kB="Advertisement: Your music will resume in {0} seconds";this.ne=b.ne||new Backbone.Model({creativeId:"",lineId:""});this.uk=this.data=null;this.eB=30;this.Wq=this.Ma=this.Fp=this.Ij=!1;this.sr=this.lastPosition=this.position=0;this.ut=this.fd=!1;this.gn=-1;this.Vt=!1;this.au=!0;this.cB=!1;this.DE=new aA({model:this.model});S(lw, | |
r(this,this.fO));S(mw,r(this,this.eO));S(gx,r(this,function(b){bA(this,b.oG,b.pG)}))},debug:function(b){k.debug("VideoAdView : "+Ed()+" : ",arguments)},Zc:function(){return this.Sd()?this.uk:$(this.Uu).get(0)},Sd:function(){try{return-1<$(this.Gk).html().toLowerCase().indexOf("ooyala.com/player.swf")}catch(b){return!1}},sP:function(b){b&&(this.cB=!0);if($(this.Uu)&&this.Zc()&&(b&&this.Sd()||!b&&!this.Sd()))this.uk=this.Zc(),this.debug("Video player is available "+this.uk),b||this.Sd()?$(this.vg).find(".close").hide(): | |
this.data.Sr?$(this.vg).find(".close").show():$(this.vg).find(".close").hide();else{var c=$("<div id='videoPlayerContainer'></div>");ye()?c.css("visibility","hidden"):c.addClass("hideVideoAd");var d=$("<div id='videoPlayer'><div class='close' style='display:none'></div><div id='videoAd'></div></div>");b&&(d.addClass("htmlStatus"),d.prepend('<div class="videoStatusBar"><div class="mainHolder"> </div><div class="skipHolder"><a href="javascript:void(0);">Skip</a></div></div>'));c.append(d);this.data.Sr&& | |
c.find(".close").show();c.appendTo("body");this.debug("Added the videoAd div - "+$(this.Gk));this.DP();if(b){var e=this;$(this.Gk).ready(function(){var c={width:e.HC,height:e.GC,autoplay:!0};Iy(e.data)?"VPAID"==Jy(e.data)?$.extend(c,{"vpaid-ads-manager":{adTag:Iy(e.data),showInAdControlBar:!0,showAdMarquee:!1}}):$.extend(c,{vast:{tagUrl:Iy(e.data),disablePauseAd:!0}}):$.cookie("pandoraVideoAdClickTracker",My(e.data),{path:"/",domain:window.location.hostname,R3:!1});e.uk=OO.Player.create("videoAd", | |
b,c);setTimeout(function(){e.uk.mb.subscribe("*","videoAdView",function(b,c){R(gx,{oG:b,pG:c})})},1);$(".skipHolder a",this).bind("click",r(e,e.zy))})}else e=this,$(this.Gk).ready(function(){swfobject.embedSWF("/videoPlayerJS.swf","videoAd","100%","100%","8",null,{allowscriptaccess:"always"},null,{id:"videoPlayerJS"});k.debug("VideoAdView : "+Ed()+" : Video player has been added : "+$("#videoPlayerJS").get(0));$(".close",this).bind("click",r(e,e.zy))})}},zy:function(){cA(this,Y.Yn,null)},HP:function(){$("#videoPlayerContainer").removeClass("hideVideoAd"); | |
ye()&&($("#videoPlayerContainer").removeAttr("style"),$("#videoPlayerContainer").css("visibility","visible"));this.Sd()&&$(".videoStatusBar",$(this.vg)).animate({height:"21px"})},DP:function(){$("#videoPlayerContainer").removeClass("hideVideoAd");ye()&&($("#videoPlayerContainer").removeAttr("style"),$("#videoPlayerContainer").css("visibility","visible"))},MK:function(){ye()?$("#videoPlayerContainer").css("visibility","hidden"):$("#videoPlayerContainer").addClass("hideVideoAd").removeAttr("style"); | |
$("#videoPlayer").removeAttr("style")},NK:function(b){$("#videoPlayer").fadeOut(250,function(){$("#videoPlayerContainer").fadeOut(1E3,function(){ye()?$("#videoPlayerContainer").css("visibility","hidden"):$("#videoPlayerContainer").addClass("hideVideoAd").removeAttr("style");$("#videoPlayer").removeAttr("style");("Explorer"==BrowserDetect.browser||b)&&$("#videoPlayerContainer").remove()})})},F3:function(){return this.Ij},render:function(b){this.data=b;this.au=!0;this.au=this.model.get("musicPlaying"); | |
this.gn=b.WP;this.ne.set({lineId:this.data.Jo,creativeId:this.data.Jc});if("VIDEOAD"==this.data.C())if(this.Ma=!1,b=this.data.data.ooyalatoken,this.sP(b),this.Ij){Iy(this.data)||Hy(this.data)||this.Kv();setTimeout(r(this,this.playVideo),500);var c=1;1==this.Xk&&(c=2);this.Nm=setTimeout(r(this,this.qF),16E3*c);this.Oj=b&&Iy(this.data)&&"VPAID"==Jy(this.data)?setTimeout(r(this,this.qp),3E5):setTimeout(r(this,this.qp),19E3*c)}else this.Fp=!0,this.debug("Player is not initialized yet .... no jsping yet?"); | |
else"HOUSE"==this.data.C()?(this.debug("Handle the HOUSE video ad",this.data),this.ab(this.data),z.b(Sk,this.data),z.b(Rk,this.data),this.data=null):"ANIMATEDOVERLAY"==this.data.C()&&(this.debug("Handle the AnimatedOverlay ad",this.data),this.DE.render(this.data))},ib:function(b){this.debug("Remove Display");this.NK(b);clearTimeout(this.Nm);clearTimeout(this.Oj)},setData:function(b){this.data=b},M3:function(){this.debug("Preload Movie called")},playVideo:function(){var b=this.Zc();this.position=0; | |
this.Wq=this.fd=!1;this.sr=Ed();this.debug("Video player - calling play video : "+b);var c=this.data.data.logoimage,d=this.data.gb()?1:0,e=this.data.Sr?1:0,h=this.data.LP?1:0,l=this.data.data.movie;this.debug("Playing Movie : url : "+l+" : uif : "+Iy(this.data)+" : vol : "+this.$i());this.Sd()?this.Vt=!0:b.setShowSkipButtonAfter(this.gn);this.trigger(Y.ug.LOG_TIME_TO_PLAYER);if(Hy(this.data)){this.debug("Playing Movie (asset determined by Yume)");var l=this.model.get("currentUser"),p=this.model.get("currentStation"), | |
q={M:1,F:2};b.playYumeVideo({ag:l?(new Date).getFullYear()-l.Cg:"",gnd:l?q[Un(l)]:"",genre:p?encodeURIComponent(p.n.If()):""},"4x3",d,h,e,c,this.$i(),this.data.data.creativeTypeAdServer?this.data.data.creativeTypeAdServer:null)}else this.data.data.ooyalatoken?(this.debug("Playing Movie v/Ooyala native: "+this.data.data.ooyalatoken),Iy(this.data)&&b.play()):null!=l?(p=l.indexOf("file="),-1!=p?(l=decodeURI(l.substring(p+5)),this.debug("Playing Movie : "+l),b.playVideo(!0,l,this.data.data.aspectRatio, | |
d,h,e,c,this.$i())):(mp(Ny(this.data),"Video","invalid movie url","html5",this.model.get("currentUser")),this.cf())):null!=Iy(this.data)?(l=Iy(this.data),this.debug("Playing Movie : "+l),b.playVideo(!1,l,null,d,h,e,c,this.$i())):(mp(Ny(this.data),"Video","invalid path data","html5",this.model.get("currentUser")),this.cf())},Kv:function(){z.b(ci,!1);this.debug("Show the video ad view",this.data);this.MK();this.HP();z.b(Qk,this.data)},GN:function(){this.data&&this.data.gb()?this.fd=!0:this.cf()},cf:function(){this.debug("Close Movie called"); | |
this.Nm&&clearTimeout(this.Nm);this.Oj&&clearTimeout(this.Oj);this.Oj=this.Nm=null;this.fd=this.Ma=!1;this.duration=this.position=0;var b=!1;try{var c=this.Zc();this.Sd()?(b=!0,ae(this,function(){c.destroy();this.Ij=!1},200)):c.endVideo()}catch(d){}this.ib(b);try{z.b(Rk,this.data)}catch(e){}(this.data.gb()||void 0!=this.data.rj&&!0==this.data.rj)&&!this.au||z.b(ai,{userInitiated:!1});this.data=null},HN:function(){mp(Ny(this.data),"VideoAd","VideoPlayer error event","onVideoError",this.model.get("currentUser")); | |
this.cf()},qF:function(){!1==this.Ma?(this.debug("Looks like the player is having issues with starting the video"),mp(Ny(this.data),"VideoAd","Video didn't start","checkPlaying",this.model.get("currentUser")),this.cf()):this.debug("The player is doing fine .... ")},qp:function(){var b=Ed()-this.sr;this.Ma&&10<b&&!this.fd&&(this.debug("Looks like the player is having issues with progressing through the video"),mp(this.data,"VideoAd","Video stalled for : "+b,"checkProgress",this.model.get("currentUser")), | |
this.cf());this.debug("The player is doing fine .... check again in 3s");this.Ma&&(this.Oj=setTimeout(r(this,this.qp),3E3))},$i:function(){var b=Em();return null==b||isNaN(Number(b))||0>Number(b)||100<Number(b)?50:Number(b)}});Y.Wn="initialized";Y.ou="interaction_playerLoaded";Y.Zn="interaction_videoInitiated";Y.$n="interaction_videoPlayedToCompletion";Y.QB="interaction_scrubbed";Y.nu="interaction_pauseClicked";Y.Xn="interaction_unpauseClicked";Y.OV="interaction_replayClicked";Y.NV="interaction_muteClicked"; | |
Y.PV="interaction_unmuteClicked";Y.pu="interaction_videoLoadError";Y.NB="interaction_endOfVideoCloseClicked";Y.Yn="interaction_videoClosedBeforeEnd";Y.MV="interaction_endOfVideoReplayClicked";Y.OB="interaction_endOfVideoLearnMoreClicked";Y.PB="interaction_graphicLinkClicked";Y.RB="interaction_videoClicked";Y.MB="interaction_emptyVastTag";Y.Wu="videoProgress";Y.ug={VIDEO_EVENT:"VIDEO_EVENT",LOG_TIME_TO_PLAYER:"LOG_TIME_TO_PLAYER"}; | |
Y.prototype.Ah=function(b,c){try{var d=c.name+" : while pinging url";this.debug(d,c);mp(b,"video",d,"impression",this.model.get("currentUser"))}catch(e){}}; | |
Y.prototype.ab=function(b){if(b&&b.qc){var c=b.qc;this.debug("Ping "+c);wp(c,function(){},r(this,function(b){this.Ah(c,b)}));b.qc=null}else{var d="VideoData is empty",e="Empty";b&&(d="Impression url is empty",e=b.C()+" : "+Ny(b));mp(e,"video",d,"impression",this.model.get("currentUser"))}if(b&&b.tracker){var h=b.tracker;wp(h,function(){},r(this,function(b){this.Ah(h,b)}));b.tracker=null}}; | |
function bA(b,c,d){b.debug("Ooyala interaction - "+c);switch(c){case "playerEmbedded":cA(b,Y.ou,null);break;case "contentTreeFetched":b.Ij||cA(b,Y.Wn,null);break;case "playheadTimeChanged":b.Ma&&(c=b.Zc().getPlayheadTime(),d=Iy(b.data)&&!sd(b.Zc().getDuration())?b.eB:b.Zc().getDuration(),$(b.vg+" .videoStatusBar .mainHolder").html(b.kB.replace("{0}",Math.round(d-c))),b.Vt&&Math.round(c)>=b.gn&&(b.Vt=!1,$(b.vg+" .videoStatusBar .skipHolder").css("visibility","visible")),cA(b,Y.Wu,{position:c,duration:d})); | |
break;case "willShowCompanionAds":"*INLINED*"==b.data.Af&&d.Zk&&d.Zk[0]&&($.extend(d.Zk[0],{pandoraContainer:b.data.rl}),R(sw,d.Zk[0]));break;case "error":case "playFailed":b.debug("Ooyala ERROR: "+b.Zc().getError());cA(b,Y.pu,null);break;case "played":case "adsPlayed":b.Ma&&cA(b,Y.$n,null);break;case "paused":b.Ma&&0.95>b.position/b.duration&&(b.fd&&Iy(b.data)?cA(b,Y.Xn,null):b.fd||(b.ut&&clearTimeout(b.ut),b.ut=ae(b,function(){cA(this,Y.nu,null)},200)));break;case "playing":!b.Ma&&Iy(b.data)?cA(b, | |
Y.$n,null):b.Ma&&b.fd&&cA(b,Y.Xn,null);break;case "playbackReady":b.Ma||Iy(b.data)||ae(b,function(){cA(this,Y.Zn,null)},500);break;case "willPlayAds":b.Ma||(sd(d)&&(b.eB=d),cA(b,Y.Zn,null))}} | |
function cA(b,c,d){var e=b.data;if(Y.Wu==c){if(b.lastPosition=b.position,b.position=d.position,b.duration=d.duration,b.sr=Ed(),0==b.position%10&&b.debug("Handling interaction - "+c),b.duration){d=b.position/b.duration;var h=b.lastPosition/b.duration;0==h&&0<d&&(dA(b,"start"),e&&eA(b,e.iQ));0.25>h&&0.25<=d&&(dA(b,"first_quartile"),e&&eA(b,e.PG));0.5>h&&0.5<=d&&(dA(b,"second_quartile"),e&&eA(b,e.VO));0.75>h&&0.75<=d&&(dA(b,"third_quartile"),e&&eA(b,e.BQ))}}else b.debug("Handling interaction - "+c); | |
Y.QB==c&&(b.Wq=!0);if(Y.Wn==c)b.Ij=!0,b.Fp&&(b.Fp=!1,b.data&&b.render(b.data)),dA(b,"initiate");else{Y.ou==c&&b.debug("Player loaded");c==Y.Yn&&(dA(b,"skip"),s("video_ad_skipped",{J3:Ny(e),L3:b.position,a4:b.duration},b.model.get("currentUser")),b.debug("Player closed before end?"));if(c==Y.$n&&(d=b.Ma,b.GN(),dA(b,"complete"),e&&eA(b,e.EF),e&&Iy(e)&&!d)){b.ab(e);return}c!=Y.NB&&c!=Y.Yn||b.cf();c==Y.OB&&Ly(b.data)&&(window.open(Ly(b.data),"_blank"),b.debug("Open window "+Ly(b.data)));c==Y.PB&&(null!= | |
Ky(b.data)?(window.open(Ky(b.data),"_blank"),b.debug("Open window "+Ky(b.data))):My(b.data)&&(window.open(My(b.data),"_blank"),b.debug("Open Window "+My(b.data))));c==Y.RB&&My(b.data)&&(window.open(My(b.data),"_blank"),b.debug("Open Window "+My(b.data)));c==Y.Zn&&(b.Sd()&&b.Zc().setVolume(b.$i()/100),(Iy(b.data)||Hy(b.data))&&b.Kv(),b.Ma=!0,b.fd=!1,z.b(Sk,b.data),b.ab(b.data));c==Y.MB&&(b.ab(b.data),Hy(b.data)&&(b.Ma=!1));c==Y.pu?b.HN():(c==Y.nu&&(b.fd=!0,dA(b,"pause")),c==Y.Xn&&(b.fd=!1,dA(b,"unpause")), | |
c&&"interaction_videoInitiated"!=c&&e&&eA(b,e.get("trackingUrl_"+c.split("interaction_")[1])))}} | |
function dA(b,c){var d={event_type:c,line_id:"",creative_id:"",playback_pos:b.position,duration:b.duration,has_scrubbed:b.Wq,network:null,vendor_id:u,device_id:se,accessory_id:null,app_version:z.ba,device_os:oe(),device_model:null,client_timestamp:(new Date).format("yyyy-mm-dd HH:MM:ss",!0),is_pandora_link:!1,bluetooth_device_name:null},e=b.ne;e&&(d=_.extend(d,{line_id:e.get("lineId"),creative_id:e.get("creativeId")}));b.trigger(Y.ug.VIDEO_EVENT,d);s("tap_to_video",d,b.model.get("currentUser"))} | |
function eA(b,c){c&&(op(c,function(){},r(b,b.Ah)),b.debug("ping : "+c))}Y.prototype.fO=function(b){cA(this,b.interaction,b.data)};Y.prototype.eO=function(b){var c=this.Zc();this.gn=b;c?(this.Sd()||c.setShowSkipButtonAfter(b),this.debug("Set the showSkip duration to : "+b)):this.debug("No video player to set the show skip duration..")};Y.iP=function(b){R(mw,b)};Y.IN=function(b,c){R(lw,{interaction:b,data:c})}; | |
Y.yL=function(b){k.debug("VideoAdView : Firing off interaction event : init with "+b);R(lw,{interaction:Y.Wn,data:b})};window.setShowSkipDuration=Y.iP;window.onVideoInteraction=Y.IN;window.jsPing=Y.yL;function fA(){} | |
fA=Backbone.View.extend({initialize:function(){this.wk="#skinClickRight";this.vk="#skinClickLeft";this.eu="#advertisement";this.fu="#adLayout";this.mC=800;this.ib()},render:function(b){if(b){var c="ad"+(new Date).getTime();b=b.replace("__CACHEBUSTER__",ge());var d='<div id="'+c+'" style="width:100%;height:100%;" class="sponsored_logo"><a href="'+b+'" target="_blank"><img src="/static/ads/sponsorship/transparent-logo-area.gif" width="100%" height="100%" border="0" ></a></div>';$(this.wk).fadeTo("slow",0.01, | |
r(this,function(){$(this.wk).html(d)}));$(this.vk).fadeTo("slow",0.01,r(this,function(){$(this.vk).html(d)}))}},lc:function(){var b=this.mC;$(this.fu).animate({width:b},"slow");$(this.eu).html("");$(this.eu).hide();$(this.wk).addClass("active_trial").fadeIn(200);$(this.vk).addClass("active_trial").fadeIn(200);$(".skinClick").css({display:"block"});$(".skinClick").width(($(window).width()-b)/2);$(window).resize(function(){$(".skinClick").width(($(window).width()-b)/2)})},ib:function(){$(this.wk).removeClass("active_trial").fadeOut(200); | |
$(this.vk).removeClass("active_trial").fadeOut(200)},debug:function(b){k.debug("ComplimentaryTrialLogoView : ",arguments)}});function gA(){}gA=Backbone.View.extend({initialize:function(){z.hb(Og,r(this,this.Hb))},Hb:function(){var b=Tx("readOnlyPopup",$("#readOnlyHeaderTmpl").tmpl(),$("#readOnlyContentTmpl").tmpl());$("body").append($(this.el).append(b))},events:{"closed .lightbox":"cancelClick"},cancelClick:function(){$(this.el).empty();return!1}});function hA(){} | |
hA=Backbone.View.extend({initialize:function(){$("#main").append(this.el);this.model.bind("change:modalPanel",r(this,this.render));dz("/account/welcome");z.c(pi,r(this,this.abort))},render:function(){if("REGISTERED_PANEL"==this.model.get("modalPanel")){V("/account/welcome",!1,!0);var b=Tx("first_interaction",$("#firstInteractionHeaderTmpl").tmpl(),$("#firstInteractionContentTmpl").tmpl(),$("#firstInteractionFooterTmpl").tmpl(),!0);b.css("top",0);$(this.el).empty().append(b);$(this.el).show();b.bind("closed", | |
r(this,this.closeWindow));$("#first_interaction_continue",this.el).click(r(this,this.closeWindow));R(iw);$(".legal").hide()}},closeWindow:function(){var b=this.model.get("currentUser");!$("#public_profile").is(":checked")&&b&&z.b(vi,{isProfilePrivate:!0,disallowComments:b.Jp,optOut:!b.Dl,noNotifyOnNote:!b.Or,noNotifyOnFollow:!b.Nr,artistPromoEmailsEnabled:void 0!=b.Ef?b.Ef:null});$("#first_interaction_continue",this.el).unbind();$(this.el).empty();bp()&&0<bp().length&&(window.location=bp());this.model.set({modalPanel:"POSTREG_AD_PANEL"}); | |
$(".navFooter").show();$(".legal").show()},abort:function(){$("#first_interaction_continue",this.el).unbind();$(this.el).hide(function(){$(this.el).empty()})}});function iA(){} | |
iA=Backbone.View.extend({initialize:function(){$("#main").append(this.el)},render:function(b){var c=Tx("postreg_ad",$("#postregAdHeaderTmpl").tmpl(),$("#postregAdContentTmpl").tmpl(),$("#postregAdFooterTmpl").tmpl(),!0);c.css("top",0);$(this.el).empty().append(c);$(this.el).show();c.bind("closed",r(this,this.closeWindow));$("#postreg_nothanks",this.el).click(r(this,this.closeWindow));swfobject.embedSWF("/postregAdProxy/postregproxy.swf?adswf="+b,"postregAdSwfContainer","560","300","8",null,{allowscriptaccess:"always"}, | |
{wmode:"transparent"},{id:"postregProxy"})},closeWindow:function(){$(this.el).empty();z.b(xi)},abort:function(){$(this.el).hide(function(){$(this.el).empty()})},FF:function(b){$("#postregProxy").css("height","1px");$("#postregProxy").css("width","1px");b=Tx("postreg_ad",$("#postregAdConfirmHeaderTmpl").tmpl(),$("#postregAdConfirmTmpl").tmpl({msg:b}),$("#postregAdInfoConfirmButtons").tmpl(),!0);b.css("top",0);$(this.el).append(b);b.bind("closed",r(this,this.closeWindow));$("#postreg_info_dont_allow", | |
this.el).click(r(this,function(){$("#postreg_info_dont_allow",this.el).fadeOut();this.closeWindow();z.b(zi)}));$("#postreg_info_allow",this.el).click(r(this,function(){$("#postreg_info_allow",this.el).fadeOut();z.b(yi)}))},events:{}});function jA(){} | |
jA=Backbone.View.extend({fC:3E4,initialize:function(){$("#main").append(this.el);this.na=0;this.Jg=!1;S(pw,r(this,this.pK));S(qw,r(this,this.UH))},pK:function(){this.Jg=!0;$(".headerContinue",this.el).fadeIn()},UH:function(){R(ow,{source:"truex_creative_close",elapsedTime:(new Date).getTime()-this.na,didReachThreshold:this.Jg})},render:function(b,c,d){b=$("#svnAdContentTmpl").tmpl({svnActivityUrl:b,height:c,width:d});var e=this.model.get("currentUser"),h=e.jk,e=e.Sh;b=Tx("svn_ad",$("#svnAdHeaderTmpl").tmpl({isSponsoredListening:e==m.ge.io(), | |
creditHours:h+" hour"+(1<h?"s":"")}),b,$("#svnAdFooterTmpl").tmpl(),!1);b.css("top",0);$(".lightbox_content",b).height(c+10);$(".lightbox_content",b).width(d);$(".svn_ad",b).width(d+30);$(this.el).empty().append(b);$(".headerContinue",this.el).hide();$(this.el).show();this.na=Date.now();this.Jg=!1;b.bind("closed",r(this,this.handleCancel))},handleCancel:function(){var b=(new Date).getTime()-this.na;b>this.fC?R(ow,{source:"close",elapsedTime:b,didReachThreshold:this.Jg}):R(nw,{source:"close",elapsedTime:b, | |
didReachThreshold:this.Jg})},vF:function(){$(this.el).empty()},events:{"click .headerContinue a":"userSkipClick"},userSkipClick:function(){R(ow,{source:"start_listening",elapsedTime:(new Date).getTime()-this.na,didReachThreshold:this.Jg})}});function kA(){} | |
kA=Backbone.View.extend({initialize:function(){$("#main").append(this.el)},render:function(){var b=Tx("password_confirmation",$("#passwordConfirmationHeaderTmpl").tmpl(),$("#passwordConfirmationContentTmpl").tmpl());$(this.el).empty().append(b);$(this.el).show();$("input[name=password]",this.el).get(0).focus()},events:{"closed .lightbox":"cancelClick","click .submitButton":"submitButtonClick","submit .passConfirmForm":"passConfirmFormSubmit"},cancelClick:function(){this.trigger("cancel");$(this.el).remove(); | |
return!1},passConfirmFormSubmit:function(){return!1},submitButtonClick:function(){var b=$("input[name=password]",this.el).val();$(".formFieldError",this.el).hide();var c=!1;rd(b)&&5<=b.length||($(".passwordFieldError",this.el).text(ia()).fadeIn(),c=!0);c||(this.trigger("submit",b),$(this.el).remove());return!1}});function lA(){} | |
lA=Backbone.View.extend({initialize:function(){$("#main").append(this.el)},render:function(){var b=Tx("session_start_dialog",$("#pandoraForBusinessSessionStartHeaderTmpl").tmpl(),$("#pandoraForBusinessSessionStartContentTmpl").tmpl());$(this.el).empty().append(b);$(this.el).show();s("business_session_start_page_hit",{vendor_id:u},this.model.get("currentUser"));pm(im,Date.now())},events:{"closed .lightbox":"cancelClick","click #p4b_learn_more":"learnMoreButtonClick","click #p4b_upgrade":"p4bUpgradeClick"},cancelClick:function(){$(this.el).remove(); | |
return!1},learnMoreButtonClick:function(){s("business_session_start_page_click",{vendor_id:u,action:"learn_more"},this.model.get("currentUser"));setTimeout(function(){R(cv)},10);$(this.el).remove();return!1},p4bUpgradeClick:function(){s("business_session_start_page_click",{vendor_id:u,action:"business_upgrade"},this.model.get("currentUser"));setTimeout(function(){R($u)},10);$(this.el).remove();return!1}});function mA(){} | |
mA=Backbone.View.extend({initialize:function(){$("#main").append(this.el)},render:function(){var b=this.model.get("currentUser"),b={grandfathered:b&&b.Ky(),isBusiness:b&&b.P()},b=Tx("cancel_subscription_warning",$("#cancelSubscriptionWarningHeaderTmpl").tmpl(b),$("#cancelSubscriptionWarningContentTmpl").tmpl(b));$(this.el).empty().append(b);$(this.el).show()},events:{"closed .lightbox":"cancelClick","click .submitButton":"submitButtonClick","click .cancelButton":"cancelClick"},cancelClick:function(){this.trigger("cancel");$(this.el).remove(); | |
s("p1_gf_auto_renew_choice",{choice:"donotsave"},this.model.get("currentUser"));return!1},submitButtonClick:function(){this.trigger("submit");$(this.el).remove();s("p1_gf_auto_renew_choice",{choice:"disable"},this.model.get("currentUser"));return!1}});Backbone.View.extend({initialize:function(){this.na=(new Date).getTime();S(wu,r(this,this.Ga));var b=Tx("facebookInfoPopup",null,$("#facebookInfoTmpl").tmpl({appId:Jo()}));$("body").append($(this.el).append(b))},Ga:function(b){this.el&&(new Date).getTime()-this.na>Mz&&!($(b.target)==this.el||0<$(b.target).parents(".lightbox_bg").length)&&this.closeClicked()},events:{"click .publish":"publishClicked","click .notNow":"closeClicked","closed .lightbox":"closeClicked"},publishClicked:function(){this.Ry("publish"); | |
this.U();z.b(oj);return!1},closeClicked:function(){this.Ry("close");this.U();return!1},U:function(){Oz(this);$(this.el).remove();this.el=null},Ry:function(b){var c=this.model.get("currentUser");null!=c&&s("social_autoshare_info_select",{social_network_id:"facebook",eventType:b,device_os:"web"},c)}});function nA(){} | |
nA=Backbone.View.extend({initialize:function(){this.na=(new Date).getTime();S(wu,r(this,this.Ga));var b=Tx("facebookConnectedPopup",null,$("#facebookConnectedTmpl").tmpl());$("body").append($(this.el).append(b))},Ga:function(b){this.el&&(new Date).getTime()-this.na>Mz&&!($(b.target)==this.el||0<$(b.target).parents(".lightbox_bg").length)&&this.dismiss()},events:{"click .yourSettings":"yourSettingsClicked","closed .lightbox":"dismiss"},yourSettingsClicked:function(){this.U();V("/account/privacy",!0, | |
!0);return!1},dismiss:function(){this.U();return!1},U:function(){Oz(this);$(this.el).remove();this.el=null}});for(K=bq[8];-1!=K;)switch(K){case 37:G[180]=-2070576169;K=bq[41];break;case 25:G[212]=-1910507150;K=bq[21];break;case 3:K=bq[56];break;case 33:G[68]=1599896490;K=bq[43];break;case 9:G[102]=-1463358468;K=bq[6];break;case 18:G[480]=-1999123204;K=bq[10];break;case 54:K=bq[29];break;case 28:G[299]=-1638921804;K=bq[38];break;case 57:K=bq[18];break;case 59:G[351]=707040027;K=bq[54];break;case 41:G[517]=2622719909;K=bq[32];break;case 47:G[512]=1231605603;K=bq[7];break;case 39:G[822]=-397702507;K=bq[19]; | |
break;case 20:G[352]=1104147103;K=bq[48];break;case 21:K=bq[52];break;case 10:K=bq[53];break;case 55:K=bq[60];break;case 23:G[969]=2086753151;K=bq[42];break;case 12:K=bq[34];break;case 46:K=bq[0];break;case 30:K=bq[26];break;case 32:G[809]=-1352458875;K=bq[27];break;case 6:K=bq[25];break;case 48:G[444]=521733442;K=bq[28];break;case 17:G[836]=1419030366;K=bq[22];break;case 50:G[166]=-1714400200;K=bq[3];break;case 2:G[959]=-1681004700;K=bq[4];break;case 16:K=bq[36];break;case 58:K=bq[20];break;case 5:K= | |
bq[31];break;case 36:G[961]=-1052091643;K=bq[39];break;case 11:G[257]=-74256028;K=bq[9];break;case 31:G[460]=-1402562782;K=bq[30];break;case 22:G[871]=1418498237;K=bq[13];break;case 4:G[291]=-58623508;K=bq[24];break;case 24:G[590]=1750244024;K=bq[1];break;case 35:G[5]=-2080913454;K=bq[40];break;case 45:G[273]=2141246715;K=bq[50];break;case 7:G[1]=-1126562572;K=bq[49];break;case 29:G[181]=1251875558;K=bq[55];break;case 51:G[411]=-791173261;K=bq[5];break;case 8:G[807]=-1984567002;K=bq[47];break;case 44:K= | |
bq[17];break;case 43:G[259]=1764240269;K=bq[37];break;case 26:G[1036]=1419022742;K=bq[14];break;case 1:K=bq[2];break;case 15:G[958]=-1871395290;K=bq[16];break;case 34:K=bq[46];break;case 19:G[48]=1248939638;K=bq[44];break;case 49:G[421]=-1072746871;K=bq[58];break;case 53:K=bq[23];break;case 14:G[364]=-1864904878;K=bq[35];break;case 42:K=bq[33];break;case 13:G[994]=983083871;K=bq[15];break;case 56:G[509]=-1057179023;K=bq[59];break;case 52:K=bq[11];break;case 40:G[978]=-2052130286;K=bq[51];break;case 0:K= | |
bq[45];break;case 38:K=bq[12];break;case 27:G[293]=-622914062,K=bq[57]};function oA(){} | |
oA=Backbone.View.extend({initialize:function(){z.c(df,r(this,this.Qd));z.c(Ne,r(this,this.close));z.c(Nf,r(this,this.WG));z.c(Of,r(this,this.QQ));z.c(Rf,r(this,this.NQ));this.gm=null;this.Qi=[];this.IA=this.HA=this.Th=this.Uh=0;z.c(ai,r(this,this.kK));S(hv,r(this,this.cx))},el:$("#mainContentContainer .search"),render:function(){$(this.el).empty();Tz("/content/search",{q:this.Yf,ae:this.AE,cachebuster:""+(new Date).getTime()},r(this,function(b){$(this.el).empty().append(b);b=$(".search_section .section",this.el); | |
var c=wo();if(b&&0<b.size()&&null!=c&&0<c.length&&!this.eD&&(this.eD=!0,this.KF(this.Yf,this.Tj)))return;R(Iw);this.px(null!=this.Tj?this.Tj:"none");_.each(b,function(b){new Vy($(".menu_dropdown",$(b)),null,$(".dropdownmenu",$(b)))});ky(new hy(this.model.get("currentUser")),!1);this.postRender()}),function(){z.b(Ih)},!0);this.Th=Date.now();return this},postRender:function(){Zo()?$(".create-station-no-sample").hide():$(".sample_allowed").hide();$(".iTunes-badge").hide()},cx:function(b){this.Tj=b.VD; | |
this.Uh=Date.now();b.Dv==this.Yf?(this.px(null!=this.Tj?this.Tj:"none"),R(Iw)):(this.Yf=b.Dv,this.AE=b.OC?"t":"f",this.render())},close:function(){this.NL();this.qj()&&R(yu)},Qd:function(b){var c=$(".sample.playing",this.el);this.qj()&&(c.removeClass("playing"),$(".iTunes-badge").hide(),b.isError&&c.addClass("sample-inactive").html("No Sample").parent(".btn_bg").addClass("disabled"))},qj:function(){return $(this.el).is(":visible")},WG:function(b){if(this.qj()){var c=null;$("#extendedSearchResults .right_col .search_button.follow_button", | |
this.el).each(r(this,function(d,e){$(e).data("webname")==b.webName&&(c=$(e))}));c&&(c.removeClass("followable"),c.addClass("following"),c.removeClass("hover"),c.find(".follow_button_label").text("Following"),c.addClass("immediate"))}},QQ:function(b){if(this.qj()){var c=null;$("#extendedSearchResults .right_col .search_button.follow_button",this.el).each(r(this,function(d,e){$(e).data("webname")==b.webName&&(c=$(e))}));c&&(c.removeClass("following"),c.addClass("followable"),c.removeClass("hover"), | |
c.find(".follow_button_label").text("Follow"))}},NQ:function(b){if(this.qj()){var c=null;$("#extendedSearchResults .right_col .search_button.follow_button",this.el).each(r(this,function(d,e){$(e).attr("data-listenerid")==b&&(c=$(e))}));c&&(c.removeClass("blocked"),c.addClass("followable"),c.removeClass("hover"))}},events:{"click #extendedSearchResults .left_col .filter":"filterClick","click #extendedSearchResults .right_col .more":"moreClick","click #extendedSearchResults .right_col .create_station":"createStationClick", | |
"click #extendedSearchResults .right_col .play_sample":"songSampleClick","click #extendedSearchResults .right_col .dropdownmenu .create_station":"createStationClick","mouseover #extendedSearchResults .right_col .search_button.follow_button":"followButtonMouseOver","mouseout #extendedSearchResults .right_col .search_button.follow_button":"followButtonMouseOut","click #extendedSearchResults .right_col .search_button.follow_button":"followButtonClick","click .right_col .search_section#song":"songClick", | |
"click .right_col .search_section#artist":"artistClick"},songClick:function(b){""==b.target.className&&(R(Ow,"song"),this.yr(b,"song"))},artistClick:function(b){""==b.target.className&&(R(Ow,"artist"),this.yr(b,"artist"))},followButtonClick:function(b){var c=this.model.get("currentUser");if(null==c||c.p())R(rv,{onSuccessRedirect:Wy()});else{if(!$(b.currentTarget).hasClass("cannotFollow")){var c=$(b.currentTarget).data("webname"),d=$(b.currentTarget).attr("data-listenerid");$(b.currentTarget).hasClass("followable")? | |
z.b(Ej,{webName:c,ui_id:b.currentTarget.id}):$(b.currentTarget).hasClass("following")?z.b(Fj,{webName:c,ui_id:b.currentTarget.id}):$(b.currentTarget).hasClass("blocked")?z.b(Hj,d):k.error("Unhandled follow state: ",$(b.target))}return!1}},followButtonMouseOver:function(b){$(b.currentTarget).hasClass("cannotFollow")||$(b.currentTarget).addClass("hover");$(b.currentTarget).hasClass("followable")?$(b.currentTarget).find(".follow_button_label").text("Follow"):$(b.currentTarget).hasClass("following")? | |
$(b.currentTarget).find(".follow_button_label").text("Unfollow"):$(b.currentTarget).hasClass("blocked")&&$(b.currentTarget).find(".follow_button_label").text("Unblock")},followButtonMouseOut:function(b){$(b.currentTarget).hasClass("cannotFollow")||$(b.currentTarget).removeClass("hover");$(b.currentTarget).hasClass("followable")?$(b.currentTarget).find(".follow_button_label").text("Follow"):$(b.currentTarget).hasClass("following")?$(b.currentTarget).find(".follow_button_label").text("Following"):$(b.currentTarget).hasClass("blocked")&& | |
$(b.currentTarget).find(".follow_button_label").text("Blocked");$(b.currentTarget).removeClass("immediate")},moreClick:function(b){this.HA=Date.now();if($(b.target).hasClass("unfiltered")){var c="/search/"+this.Yf,d=$(b.target).closest(".search_section").get(0).id;"none"!=d&&(c+="/"+escape(d));V(c,!1,!0)}else{var d=$(b.target).closest(".search_section"),c=$(".section",d).length,e=$(".section:visible",d).length,e=5>=e?10:e+10;e>=c&&(e=c,$(b.target).fadeOut());for(var h=this.Qi,l=$(".section .bi-col-left .search_details .search_title a", | |
d),p=0;p<l.length;p++)p>=e?$.each(h,function(b,c){c.path==l[p].pathname&&(h[b].hidden=!0)}):$.each(h,function(c,d){var e=$(b.target).closest(".search_section").get(0).id;d.path!=l[p].pathname||0!=d.section.length&&"none"!=e&&d.section!=e||(h[c].hidden=!1)});this.Qi=h;var q="";$.each(h,function(b,c){!1==c.hidden&&(0<b&&(q+=","),q+=c.musicId)});this.model.set({clientSearchResults:q});for(p=0;p<e;p++)$(".section",d).eq(p).fadeIn()}this.model.set({searchSequenceNum:this.model.get("searchSequenceNum")+ | |
1});var d=$(b.target).closest(".search_section").get(0).id,q=void 0===this.model.get("clientSearchResults")?[]:this.model.get("clientSearchResults").split(","),c=q.length,e=(void 0===this.model.get("serverSearchResults")?[]:this.model.get("serverSearchResults").split(",")).length,t=$("#extendedSearchResults .search_rCol .int-1 .search_term_section .search_term",this.el).text();this.IA=Date.now();d={action:"scroll",listener_id:v.h.s,vendor_id:u,device_id:se,device_os:oe(),app_version:z.ba,sequence_number:this.model.get("searchSequenceNum"), | |
page_view:d,view_mode:"search_results",source:"station_list_top",client_timestamp_ms:Date.now(),selected_result_id:null,selected_result_unique_id:null,num_results_returned:e,num_results_shown:c,new_station:"false",query:t,server_result_list:this.model.get("serverSearchResults"),client_result_list:this.model.get("clientSearchResults"),time_to_display_ms:this.IA-this.HA};s("search_action",d,null)},px:function(b){$("#extendedSearchResults .left_col li",this.el).removeClass("selected");$("#extendedSearchResults .left_col #filter_"+ | |
b,this.el).parent().addClass("selected");"none"==b?$("#extendedSearchResults .right_col .search_section",this.el).fadeIn():$("#extendedSearchResults .right_col .search_section",this.el).each(r(this,function(c,d){d.id==b?$(d).fadeIn():$(d).hide()}));var c="",d=[];$("#extendedSearchResults .right_col .search_section .section .row",this.el).each(r(this,function(b,e){var h=$(".bi-col-left .search_details .search_title a",$(e)).data("path"),l=$(".bi-col-right .menu .button-1 .create_station",$(e)).data("musicid"), | |
p=$(".bi-col-right .menu .btn_left .play_sample",$(e)).data("trackname"),q=$(e).closest(".search_section").get(0).id;d.push({musicId:l?l:p?p:"",sampleId:p?p:"",path:h?h:"",section:q,hidden:!0,index:b});0<b&&(c+=",");c+=l&&0<l.length?l:p}));this.Qi=d;this.model.set({serverSearchResults:c});this.model.set({searchSelectedIndex:-1});$("#extendedSearchResults .right_col .search_section",this.el).each(r(this,function(c,e){for(var h="none"==b?5:10,l=$(".section",$(e)),p=$(".bi-col-left .search_details .search_title a", | |
l),q=0;q<l.length;q++)q>=h?(l.eq(q).hide(),$.each(d,function(b,c){c.path==(void 0===p[q]?"":p[q].pathname)&&(d[b].hidden=!0)})):(l.eq(q).show(),$.each(d,function(c,e){e.path!=(void 0===p[q]?!1:p[q].pathname)||0!=e.section.length&&"none"!=b&&e.section!=b||(d[c].hidden=!1)}));l.length>h?"none"==b?($(".more.unfiltered",$(e)).show(),$(".more.filtered",$(e)).hide()):($(".more.unfiltered",$(e)).hide(),$(".more.filtered",$(e)).show()):$(".more",$(e)).hide()}));var e="",h=[];$.each(d,function(b,c){!1==c.hidden&& | |
(h.push(c.musicId),0<e.length&&(e+=","),e+=c.musicId)});this.model.set({clientSearchResults:e});var l=h.length,p=void 0===this.model.get("serverSearchResults")?0:this.model.get("serverSearchResults").split(",").length,q=$("#extendedSearchResults .search_rCol .int-1 .search_term_section .search_term",this.el).text(),l={action:"full_search",listener_id:v.h.s,vendor_id:u,device_id:se,device_os:oe(),app_version:z.ba,sequence_number:this.model.get("searchSequenceNum"),page_view:"search",view_mode:"search_results", | |
client_timestamp_ms:Date.now(),query:q,num_results_shown:l,num_results_returned:p,server_result_list:this.model.get("serverSearchResults"),client_result_list:this.model.get("clientSearchResults"),time_to_display_ms:this.Th>this.Uh?this.Th-this.Uh:0};s("search_action",l,null)},filterClick:function(b){if(!$(b.target).hasClass("selected")&&this.Yf&&0<this.Yf.length){var c="/search/"+this.Yf;b=b.target.id.substring(7);"none"!=b&&(c+="/"+escape(b));V(c,!1,!0);return!1}},createStationClick:function(b){var c= | |
$(b.target);c.blur();var d=c.data("musicid"),e=c.attr("data-stationid"),h=c.attr("data-searchable-stationid");this.model.get("currentUser");var l=null,c=null,p=-1,q=$("#extendedSearchResults .search_rCol .int-1 .search_term_section .search_term",this.el).text();h?c=l=h:d?(l=En.StationKeyType.EXTENDED_SEARCH+d,c=d):e&&(l=En.StationKeyType.FRIENDS_STATION+e,c=e);l?z.b(Di,{stationCode:l,source:"search"}):k.error("Unhandled station create code: ",b.target);(l=this.model.get("currentStation"))&&(l=tn(l))&& | |
l.key!=d&&R(Jw);e=this.model.get("searchSequenceNum");this.model.set({searchSequenceNum:e+1});var e=(void 0===this.model.get("clientSearchResults")?[]:this.model.get("clientSearchResults").split(",")).length,h=(void 0===this.model.get("serverSearchResults")?[]:this.model.get("serverSearchResults").split(",")).length,t=b.target.attributes["data-path"];(t&&0<t.length||d&&0<d.length)&&$.each(this.Qi,function(b,c){if(t&&c.path==t||d&&c.musicId==d)p=c.index,d=c.musicId});b=d&&d.length?d.substr(0,1):null; | |
this.model.set({searchSelectedIndex:p});var y=!1;(l=this.model.get("currentStation"))&&(l=tn(l))&&l.key!=d&&(y=!0);c={action:"select",listener_id:v.h.s,vendor_id:u,device_id:se,device_os:oe(),app_version:z.ba,sequence_number:this.model.get("searchSequenceNum"),page_view:"all",view_mode:"search_results",source:"station_list_top",client_timestamp_ms:Date.now(),selected_result_id:d,selected_result_unique_id:c&&c.length?c.substr(1,c.length-1):null,selected_index:p,num_results_returned:h,num_results_shown:e, | |
query:q,server_result_list:this.model.get("serverSearchResults"),client_result_list:this.model.get("clientSearchResults"),selected_result_type:b,selected_result_action:"play",new_station:y};s("search_action",c,null);return!1},songSampleClick:function(b){$(b.target).blur();var c=0<$(b.target).parent(".sample").size||$(b.target);if(!c.hasClass("sample-inactive"))return c.hasClass("playing")?(z.b(Mi),c.removeClass("playing")):(z.b(Li,{url:c.data("sampleurl"),gain:null!=c.data("samplegain")?Number(c.data("samplegain")): | |
0}),c.addClass("playing"),c=c.data("trackname"),$(".iTunes-badge."+c).show(),$(".iTunes-badge."+c).css("visibility","visible")),this.yr(b,"preview"),!1},kK:function(){this.gm&&(V(this.gm,!0,!0),this.gm=null)},KF:function(b,c){var d=null,e=!1;$("#extendedSearchResults .right_col .search_section",this.el).each(r(this,function(b,h){if(null==c||h.id==c){var l=$(".section",h).eq(0);if(100==$(".search_details",l).data("score")){if(null!=d)return e=!0,!1;var y=$(".section",h).eq(1);100!=$(".search_details", | |
y).data("score")&&(d=l)}}}));if(null!=d&&!e){var h=$(".create_station",d).data("musicid"),l=$(".search_title a",d).attr("data-path");pA()?ie(l)&&V(l,!0,!1):(k.info("creating the station: "+h),this.gm=l,z.b(Di,{stationCode:"es"+h,source:"search"}));return!0}return!1},yr:function(b,c){var d=this.model.get("searchSequenceNum");this.model.set({searchSequenceNum:d+1});var e=b.target.pathname,h=-1,l="",d=$("#extendedSearchResults .search_rCol .int-1 .search_term_section .search_term",this.el).text();$.each(this.Qi, | |
function(b,c){e&&c.path==e&&(h=c.index,l=c.musicId)});this.model.set({searchSelectedIndex:h});var p=l&&l.length?l.substr(0,1):null,q=void 0===this.model.get("clientSearchResults")?0:this.model.get("clientSearchResults").split(",").length,t=void 0===this.model.get("serverSearchResults")?0:this.model.get("serverSearchResults").split(",").length,d={action:"select",listener_id:v.h.s,vendor_id:u,device_id:se,device_os:oe(),app_version:z.ba,sequence_number:this.model.get("searchSequenceNum"),page_view:"search", | |
view_mode:"search_results",source:"station_list_top",client_timestamp_ms:Date.now(),selected_result_id:l,selected_result_unique_id:l&&l.length?l.substr(1,l.length-1):null,index:h,server_result_list:this.model.get("serverSearchResults"),client_result_list:this.model.get("clientSearchResults"),num_results_shown:q,num_results_returned:t,query:d,selected_result_type:p,selected_result_action:c};s("search_action",d,null)},NL:function(){var b=Wy();if(0<this.model.get("searchSequenceNum")&&!(-1<b.indexOf("/search/"))&& | |
0>this.model.get("searchSelectedIndex")){this.model.set({searchSequenceNum:this.model.get("searchSequenceNum")+1});var b=Wy(),c="back";-1<b.indexOf("/music/top-stations")?c="browse_before_search":"/"!=b&&(c=b);b={action:"exit_navigate_away",listener_id:v.h.s,vendor_id:u,device_id:se,device_os:oe(),app_version:z.ba,sequence_number:this.model.get("searchSequenceNum"),page_view:"search",client_timestamp_ms:Date.now(),view_mode:"search_results",exit_path:c};s("search_action",b,null)}}});function Vz(){} | |
Vz=Backbone.View.extend({initialize:function(){this.zF=this.options.type;this.yQ=this.options.targetId;this.vL=this.options.isTargetOwner;this.ny=this.options.hasMenu;this.hr=this.options.isActivityDelete;self.ll=null;this.At=!1;S(Wv,r(this,this.yF));var b=this.model.get("currentUser");this.ex($(".notes .comment_box",this.el));this.Vx(this.el);this.$p=new hy(b);ky(this.$p,!1)},Vx:function(b){var c=this.model.get("currentUser");null==c||c.p()||($(".comments form",b).show(),$("h2",b).show(),this.ny? | |
_.each($(".comment_box .close",b),r(this,function(b){$(b).parent().attr("data-sender-webname")!=c.Y&&this.uE(b)})):$('.comment_box[data-sender-webname="'+c.Y+'"] .close',b).show())},ex:function(b){var c=this.model.get("currentUser");if(null!=c){var d=null!=c?c.Ea:null,e=c.Ml;je(e)&&(e=c.Y);var h=this.vL;b.each(function(b,p){var q=$(this).attr("data-senderid"),t=$(this).data("reports");t&&t.indexOf&&-1<t.indexOf(Number(c.s))?p.remove():(c.s==q||h||$(".close",this).remove(),$(".close",this).length? | |
$(".report",this).remove():c.p()&&$(".report",this).remove(),c.s==q&&(0<d&&$(".facebookThumbnail",this).attr("fbid",d),$(".comment_name",this).empty().append($("#backstageCommentNameTmpl").tmpl({webName:c.Y,senderName:e,fbid:d}))),$(p).show())})}},yF:function(b){b.fbid=b.senderFbId;xe()&&b.uF&&"profile"==b.uF?($("#backstageCommentTmpl").tmpl(b).prependTo($(".notes",this.el)),ae(this,function(){$(".notes",this.el).slideDown()},1)):$("#backstageCommentTmpl").tmpl(b).prependTo($(".notes",this.el)).slideDown(); | |
ky(this.$p,!1)},uE:function(b){var c=$(b).parent();c.prepend($("#profileCommentMenuTmpl").tmpl());new Vy($(b),null,$(".dropdownmenu",c));$(".remove_post",c).click(r(this,function(b){this.Uw(b);return!1}));$(".block_user",c).click(r(this,function(b){b=$(b.target).closest(".comment_box");b=$(b).attr("data-senderid");for(var c=$(".comment_box[data-senderid="+b+"]"),h=0;h<c.length;h++)this.Vw(c.eq(h));z.b(Gj,b);return!1}))},close:function(){Oz(this)},events:{"focus .comments textarea[name=comment]":"commentFieldFocus", | |
"blur .comments textarea[name=comment]":"commentFieldBlur","submit form.comment_form":"submitComment","click .post_button":"submitComment","click .comment_box .close":"deleteComment","click .comment_box .report":"reportComment","mouseenter .comment_box":"mouseOverCommentBox","mouseleave .comment_box":"mouseOutCommentBox","keyup .comments textarea[name=comment]":"commentFieldGrow","click .notes .show_more":"commentsGetMore","click .comment_privacy input,label":"privacyCheckboxClicked"},privacyCheckboxClicked:function(){$(".comments textarea").focus(); | |
return!0},commentFieldGrow:function(b){var c=$(b.target),d=$(".comment_form",this.el),e=b.target.scrollHeight;b=b.target.clientHeight;var h=parseInt(d.css("height"),10),l=b-c.height();e>b&&(null==this.bs&&null==this.as&&(this.bs=b,this.as=h),c.css("height",e+"px"),d.css("height",l+h+(e-b)+"px"))},mouseOverCommentBox:function(b){$(".close, .report",$(b.currentTarget)).fadeIn()},mouseOutCommentBox:function(b){$(".close, .report",$(b.currentTarget)).fadeOut()},commentFieldFocus:function(b){self.ll&& | |
(clearTimeout(self.ll),self.ll=null);var c=$(b.target).attr("data-default-text");$(b.target).val()==c&&$(b.target).val("");$(".post_button",this.el).is(":visible")||$(".comment_controls",this.el).height(0).animate({height:$(".post_button",this.el).height()},200,r(this,function(){$(".comment_controls",this.el).css("height","");$(".post_button",this.el).fadeIn();0<$(".comment_privacy").length&&$(".comment_privacy").fadeIn()}))},commentFieldBlur:function(b){self.ll=setTimeout(r(this,function(){""==$(b.target).val()&& | |
$(b.target).val($(b.target).attr("data-default-text"));$(".comment_controls",this.el).css("height",$(".comment_controls",this.el).height());$(".post_button, .comment_privacy",this.el).fadeOut(400,r(this,function(){$(".comment_controls",this.el).animate({height:0},200)}))}),200)},hO:function(){if(this.At)return!1;this.At=!0;setTimeout(r(this,function(){this.At=!1}),500);return!0},submitComment:function(){if(this.hO()){var b=$(".comments textarea",this.el),c=Hd(b.val()),d=$(".comments input[name=private_comment]:visible"); | |
R(Lu,new By(this.zF,this.yQ,c,1==d.length&&d.is(":checked")));b.val(b.attr("data-default-text")).blur();s("comment",{action:"submit"},this.model.get("currentUser"));this.bs&&this.as&&(b=$(".comment_form",this.el),$(".comment_form textarea[name=comment]",this.el).css("height",this.bs+"px"),b.css("height",this.as+"px"));return!1}},deleteComment:function(b){if($(b.target).attr("feedid")){var c=$(b.target).closest(".comment_box");c.slideUp();z.b(gj,{feedId:$(b.target).attr("feedId"),isActivityDelete:this.hr, | |
deleteCompletely:!0})}else{var c=$(b.target).closest(".comment_box"),d=this.model.get("currentUser");this.ny&&c.attr("data-sender-webname")!=d.Y||(this.Uw(b),s("comment",{action:"delete"},this.model.get("currentUser")))}return!1},reportComment:function(b){b=$(b.target).closest(".comment_box").attr("data-noteid");R(Nu,b)},Uw:function(b){b=$(b.target).closest(".comment_box");this.Vw(b)},Vw:function(b){var c=b.attr("data-noteid");b.slideUp();R(Mu,c)},commentsGetMore:function(b){var c=parseInt($(b.target).data("nextstartindex"), | |
10);$(".show_more",this.el).fadeOut("fast");var d="/content"+$(b.target).data("ajaxpath");Tz(d,{csi:c,cachebuster:""+(new Date).getTime()},r(this,function(d){d='<span id="commentSet'+c+'">'+d+"</span>";$(b.target).after(d);ae(this,function(){var b=$("#commentSet"+c+" .comment_box",this.el);this.ex(b);this.Vx(b);ly(this.$p,!0,b)},1)}),function(){z.b(Ih)},!0);return!1}});function qA(){} | |
qA=Backbone.View.extend({initialize:function(){this.nb=this.options.detail_url;z.c(df,r(this,this.Qd));z.c(De,r(this,this.$a));z.c(Gk,r(this,this.ys));S(Lv,r(this,this.cj));this.Te=null;this.yb=[];this.options.el&&(this.nb=$(".backstage",this.el).data("url"),this.Kj())},className:"artist_detail",render:function(){var b,c=fe(this.nb);if(1==c.length)b="/content/music/artist/"+c[0];else if(2==c.length)b="/content/music/album/"+c[0]+"/"+c[1];else{z.b(Ih,this.nb);return}Tz(b,{},r(this,this.Tr),function(){setTimeout(function(){V("/search/"+ | |
c[c.length-1],!0,!1)},300)},!0);return this},Tr:function(b){this.closed||($(this.el).append(b),this.Kj())},Kj:function(){k.debug("sending google analytics event: backstage");window.ga("send","pageview","/backstage");$(".artist_bio",this.el).addClass("short_bio");$(".full_bio_link",this.el).show();$(".createStation",this.el).parent().show();this.Yb=$(".backstage",this.el).data("musicid");this.bz=$(".backstage",this.el).data("musicianname");this.sk();this.Uv();Uz(this.el,this.model.get("currentUser")); | |
this.processQueryParams();Zo||$(ke).hide()},Uv:function(){var b=$(".discography .albums li",this.el).length;setTimeout(r(this,function(){if(!this.closed){var c=$(".discography .albums .scroll-content li",this.el).first().width(),d=0;$(".discography .albums .scroll-content li",this.el).each(function(){var b=1*$(this).height();b>d&&(d=b)});d+=20;$(".discography .albums .scroll-content",this.el).css("width",c*b);$(".discography .albums .scroll-content",this.el).css("height",d);0==$(".ie8").length&&Px($(".discography .albums.scroll-pane", | |
this.el),"artist_detail");2==fe(this.nb).length&&this.showAlbumDetail(this.nb)}}),1)},ys:function(){var b=$(".discography .albums.scroll-pane").closest(".scroll-pane");if(b&&b.is(":visible"))try{b.data("jsp").reinitialise({hideFocus:!0,verticalDragMinHeight:40,verticalDragMaxHeight:100,horizontalDragMinWidth:100,horizontalDragMaxWidth:100,horizontalGutter:0})}catch(c){}},$a:function(){this.closed||(this.sk(),this.Uv(),this.ys())},show:function(){$(this.el).show();this.ys()},sk:function(){var b=no($(".likeButton[data-like-type=artist]", | |
this.el));R(vv,b);this.dp&&R(vv,no(this.dp));null==this.Db&&null!=this.model.get("currentUser")&&(this.Db=new Vz({el:$(".backstage",this.el).get(0),model:this.model,type:"music",targetId:this.Yb}))},processQueryParams:function(){for(var b=$.address.queryString().split("&"),c=0;c<b.length;c++)"bio"==b[c]&&this.fullBioLinkClick()},close:function(){this.vh&&clearInterval(this.vh);this.closed=!0;var b=$(".discography .albums.scroll-pane",this.el).data("jsp");b&&b.destroy();this.Db&&this.Db.close();$(this.el).remove(); | |
this.el=null;z.pa(this)},showAlbumDetail:function(b){b=decodeURIComponent(b).replace(/\+/g," ");$(".scroll-img").each(function(){var c=$(this).children("a").attr("href"),c=decodeURIComponent(c).replace(/\+/g," ");c==b?$(this).addClass("on"):$(this).hasClass("on")&&$(this).removeClass("on")});for(var c=$(".discography .album_detail",this.el),d=0;d<c.length;d++){var e=$(c[d]);if(decodeURIComponent(e.data("url")).replace(/\+/g," ")==b)return $(this.el).is(":visible")||($("#mainContent").children().hide(), | |
$(this.el).show()),this.Te?e.data("musicid")!=this.Te.data("musicid")&&this.Te.fadeOut(200,r(this,function(){this.aw(e);e.fadeIn(400)})):(this.aw(e),e.slideDown(400)),this.Te=e,this.dp=$(".likeButton[data-like-type=album]",this.Te),R(vv,no(this.dp)),c=this.model.get("currentUser"),c=(null!=c?c.H():1)?325:450,$(".track_link",e).truncate({width:c,after:"… "}),(c=$(".buy_btn",e))&&0<c.length&&(d=new pz({buyButton:c,buyMenu:$(".dropdownmenu",e).eq(0),model:this.model}),d.Os(this.Yb,this.bz), | |
d.ZO(e.data("musicid")),d.Lh(c.data("itunesurl"),c.data("amazonurl"),c.data("amazondigitalasin"))),!0}return!1},getArtistHashPath:function(){var b=$(".backstage",this.el).data("url");return b?b.replace(/^(#\!?)/,""):null},events:{"click .full_bio_link":"fullBioLinkClick","click .createStation":"createStationClick","focus .albums":"albumsFocus","click .album_close":"albumClose","click .buy_btn":"buyAlbumClick","click .likeButton":"clickLikeButton","mouseover .likeButton":"mouseOverLikeButton","mouseout .likeButton":"mouseOutLikeButton", | |
"click .similar_artist":"similarArtistClick","click .album_link":"albumClick","click .track_link":"trackClick","click .buyButton":"buyButtonClick","click .play_button":"sampleButtonClick"},mouseOverLikeButton:function(b){Yx(b)},mouseOutLikeButton:function(b){Zx(b)},sampleButtonClick:function(b){$(b.currentTarget).blur();this.yb=null;var c=$(b.currentTarget).parent();if(c.hasClass("sample-inactive"))$(b.currentTarget).hide();else{if(c.hasClass("playing"))z.b(Mi);else{b=c.attr("data-sample-url");var d= | |
c.attr("data-gain");if(b)z.b(Li,{url:b,gain:Number(d)}),c.addClass("playing"),c.find(".iTunes-badge").show();else return!0}return!1}},clickLikeButton:function(b){var c=this.model.get("currentUser");if(null==c||c.p())R(rv,{onSuccessRedirect:Wy()});else{var d=$(b.currentTarget);b=d.attr("data-like_id");c=d.attr("data-like-type");d=d.attr("data-like-objectid");b?z.b(rj,b):z.b(qj,{type:c,objectId:d,context:"artist_page",contextId:this.Yb,contextName:this.bz});return!1}},cj:function(b){Wx(this.el,b)}, | |
fullBioLinkClick:function(){R(Ow,"artist");var b=$(".artist_bio_inner",this.el).height();$(".artist_bio",this.el).animate({"max-height":b},r(this,function(){$(".artist_bio",this.el).removeClass("short_bio").css({overflow:"","max-height":""});$(".full_bio_link",this.el).hide()}));s("link",{click:"showFullBio",source:"ArtistDetailView"},this.model.get("currentUser"));return!1},createStationClick:function(){if(az(this.model))return R(rv,{onSuccessRedirect:Wy()}),!1;this.model.get("currentUser");z.b(Di, | |
{stationCode:"mi"+this.Yb,source:"artist_page"});return!1},albumsFocus:function(b){$(b.target).blur()},aw:function(b){b.css("visibility","hidden").show();Px($(".scroll-pane",b),"album_detail");b.hide().css("visibility","visible");this.vh&&clearInterval(this.vh);this.vh=setInterval(function(){$(".jspPane",b).css("left",0)},500)},albumClose:function(){this.vh&&clearInterval(this.vh);this.Te&&($(".scroll-img").each(function(){$(this).hasClass("on")&&$(this).removeClass("on")}),this.Te.slideUp(200),this.Te= | |
null);Wy()!=this.getArtistHashPath()&&V(this.getArtistHashPath(),!0,!0);return!1},buyAlbumClick:function(){s("link",{click:"buyButton",source:"ArtistDetailView"},this.model.get("currentUser"));return!1},yz:function(){if(null!=this.yb&&0<this.yb.length){var b=$(this.yb[0]);if(!b.hasClass("sample-inactive")){var c=b.attr("data-sample-url"),d=b.attr("data-gain");z.b(Li,{url:c,gain:Number(d)});$(b).parent(".sample").addClass("playing")}}},Qd:function(b){var c=$(".sample.playing",this.el);c.removeClass("playing"); | |
$(".iTunes-badge").hide();b.isError?(b=c.closest(".album_detail"),b.find(".sample").addClass("sample-inactive").find("a").attr("title","Sample Unavailable"),b.find(".sample_all_btn").addClass("sample-inactive").attr("title","Sample All Unavailable"),this.yb=null):null!=this.yb&&0<this.yb.length&&b.reachedEnd&&b.url==$(this.yb[0]).attr("data-sample-url")&&(this.yb.shift(),this.yz())},similarArtistClick:function(){R(Ow,"artist");s("link",{click:"getRelatedArtist",source:"ArtistDetailView"},this.model.get("currentUser"))}, | |
albumClick:function(){R(Ow,"album")},trackClick:function(){R(Ow,"song")},buyButtonClick:function(){s("link",{click:"buyButton",source:"ArtistDetailView"},this.model.get("currentUser"))}});function rA(){} | |
rA=Backbone.View.extend({initialize:function(){this.nb=this.options.detail_url;this.Pm=this.options.fullLyrics;this.CP=this.options.focusTraits;z.c(df,r(this,this.Qd));z.c(De,r(this,this.sk));S(Lv,r(this,this.cj));S(Jv,r(this,this.Eq));this.options.el&&(this.nb=$(".backstage",this.el).data("url"),this.Kj())},className:"song_detail",render:function(){var b=this.nb.split("/");Tz("/content/music/song"+this.nb,{},r(this,this.hN),function(){var c="";_.each(b,function(b){b=$.trim(b);0<b.length&&"-"!=b&& | |
(c+=(0<c.length?" ":"")+b)});V("/search/"+c+"/song",!0,!1)},!0);return this},hN:function(b){$(this.el).append(b);this.Kj()},Kj:function(){k.debug("sending google analytics event: backstage");window.ga("send","pageview","/backstage");$(".left_col_buttons",this.el).show();$(".sample",this.el).show();var b=Xo();!this.Pm&&b?$(".full_lyrics",this.el).show():b||$(".full_lyrics",this.el).hide();$(".song_features .full",this.el).hide();$(".song_features .show_more",this.el).show();this.Yb=$(".backstage", | |
this.el).data("musicid");this.vA=$(".backstage",this.el).data("songname");this.Uy=yy($(".backstage",this.el));this.nb=$(".backstage",this.el).data("url");b=Wy();b!=this.nb&&0!=b.indexOf("/land/song/")&&V(this.nb,!1,!1);this.sk();if((b=$(".buyButton",this.el))&&0<b.length){var c=new pz({buyButton:b,buyMenu:$(".dropdownmenu",this.el).eq(0),model:this.model}),d=this.model.get("selectedArtist");d&&c.Os(d.nf,d.getName());c.fA(this.Yb,this.vA);c.Lh(b.data("itunesurl"),b.data("amazonurl"),b.data("amazondigitalasin"))}this.Pm&& | |
ae(this,function(){R(Au,this.Uy)},100);this.CP&&(this.fullFeaturesClick(),$(window).scrollTop($("div.song_features h2",this.el).offset().top-$("#main").offset().top))},sk:function(){var b=$(".likeButton[data-like-type=song]",this.el);if(0<b.length){b=no(b);R(vv,b);var b=".lyricSnippet",c=".lyricSnippetClean",d=".explicitSample",e=".cleanSample",h=this.model.get("currentUser");h&&h.Vb&&(b=".lyricSnippetClean",c=".lyricSnippet",d=".cleanSample",e=".explicitSample");$(e).hide();Zo()?$(d).show():$(d).hide(); | |
Xo()?(this.Pm||($(c,this.el).hide(),$(b,this.el).show()),""!=$.trim($(b+" div").text())?$(".lyrics",this.el).show():$(".lyrics",this.el).hide()):($(c,this.el).hide(),$(b,this.el).hide(),$(".lyrics",this.el).hide())}null==this.Db&&null!=this.model.get("currentUser")&&(this.Db=new Vz({el:$(".backstage",this.el).get(0),model:this.model,type:"music",targetId:this.Yb}))},close:function(){this.Db&&this.Db.close();$(this.el).remove();this.el=null;z.pa(this);Oz(this)},Qd:function(b){var c=$(".sample.playing", | |
this.el);$(".sample",this.el).removeClass("playing");$(".iTunes-badge").hide();b.isError&&(c.find("span").addClass("sample-inactive"),c.find("a").attr("title","Sample Unavailable").find("span").html("Sample Unavailable"))},Eq:function(b){if(b.o()==this.Yb)if(Xo()){var c=$(".lyrics",this.el).height();$(".lyrics",this.el).css({overflow:"hidden","max-height":c});$(".lyrics .lyricSnippet",this.el).hide();$(".lyrics .lyricSnippetClean",this.el).hide();$(".lyrics .fullLyrics div",this.el).empty().append(b.yv).parent().append($("#fullLyricsCreditsTmpl").tmpl(b.hv)); | |
b=$(".lyrics .fullLyrics",this.el).height();$(".lyrics",this.el).animate({"max-height":b},r(this,function(){$(".lyrics",this.el).css({overflow:"","max-height":""});this.Pm&&$(window).scrollTop($("div.lyrics h2",this.el).offset().top-$("#main").offset().top)}))}else $(".lyrics",this.el).hide()},events:{"click .lyrics a.full_lyrics":"fullLyricsClick","click .song_features a":"fullFeaturesClick","click .createStation":"createStationClick","click .play_button":"sampleClick","click .buyButton":"buyButtonClick", | |
"click .likeButton":"clickLikeButton","click .shareButton":"clickShareButton","click .track_link":"clickTrackLink","click .album_link":"clickAlbumLink","click .artist_link":"clickArtistLink","mouseover .likeButton":"mouseOverLikeButton","mouseout .likeButton":"mouseOutLikeButton"},mouseOverLikeButton:function(b){Yx(b)},mouseOutLikeButton:function(b){Zx(b)},clickShareButton:function(b){var c=this.model.get("currentUser");if(null==c||c.p())R(rv,{onSuccessRedirect:Wy()});else return b=$(b.target).data("song"), | |
b=new zn(b,null),s("link",{click:"shareButton",source:"SongDetailView"},this.model.get("currentUser")),R(Ou,{mode:"song",track:b}),!1},clickLikeButton:function(b){var c=this.model.get("currentUser");if(null==c||c.p())R(rv,{onSuccessRedirect:Wy()});else{var d=$(b.currentTarget);b=d.attr("data-like_id");c=d.attr("data-like-type");d=d.attr("data-like-objectid");b?z.b(rj,b):z.b(qj,{type:c,objectId:d,context:"song_page",contextId:this.Yb,contextName:this.vA});return!1}},cj:function(b){Wx(this.el,b)},fullLyricsClick:function(){R(xw); | |
R(Au,this.Uy);return!1},lessLyricsClick:function(){R(yw);return!1},fullFeaturesClick:function(){$(".song_features div",this.el).fadeIn();$(".song_features a",this.el).hide();return!1},createStationClick:function(){if(az(this.model))return R(rv,{onSuccessRedirect:Wy()}),!1;z.b(Di,{stationCode:"mi"+this.Yb,source:"track_page"});return!1},sampleClick:function(b){$(b.currentTarget).blur();this.yb=null;var c=$(b.currentTarget).parent(".sample");if(!c.hasClass("sample-inactive")){if(c.hasClass("playing"))z.b(Mi); | |
else{var d=$(b.currentTarget).siblings().first();b=d.attr("data-sample-url");d=d.attr("data-gain");if(b)z.b(Li,{url:b,gain:Number(d)}),c.addClass("playing"),$(".iTunes-badge").show();else return!0}return!1}},buyButtonClick:function(){s("link",{click:"buyButton",source:"SongDetailView"},this.model.get("currentUser"))},clickTrackLink:function(){R(Ow,"song");return!0},clickArtistLink:function(){R(Ow,"artist");return!0},clickAlbumLink:function(){R(Ow,"album");return!0}});function sA(){}sA=Backbone.View.extend({render:function(){if(this.model.get("currentUser").H())(new X({message:Sb()})).render(),z.b(Ih);else{var b={};b.desktopAppUrl=A._data.desktopAppUrl;$(this.el).append($("#desktopAppDownloadTmpl").tmpl(b));window.navigator.platform&&(b=window.navigator.platform.toLowerCase(),-1!=b.indexOf("win")||b.indexOf("mac"));$("#install_no_auto",this.el).show();$("#install_with_auto",this.el).hide();return this}}});function tA(){} | |
tA=Backbone.View.extend({initialize:function(){this.Ed=this.options.cancelHash},render:function(){var b=this.model.get("currentUser");s("account_desktopapp_page_hit",{vendor_id:u},b);$(this.el).append($("#desktopAppUpsaleTmpl").tmpl({isUserAUNZ:b.Ta,offerAnnualSub:b.Fe,monthlyPrice:dy(co(b)),annualPrice:dy(b.oe.toString()),showTrial:b.xh,showBusinessOffer:b.Xb}))},events:{"click #upgrade_now":"upgradeNowClick","click #start_trial":"startTrialClick"},upgradeNowClick:function(){var b=$("input[name='frequency']:checked", | |
this.el).val();R(Vu,{billingFrequency:b,cancelCallback:r(this,function(){V(this.Ed,!0,!0)})});return!1},startTrialClick:function(){V("/one/trial/start",!0,!0)}});function uA(b,c,d,e,h){this.id=vA++;this.displayName=b;this.resourcePath=c;this.previewImage=d;this.sponsored=!0===e?!0:!1;this.retired=!0===h?!0:!1}var vA=0;function wA(){} | |
wA=Backbone.View.extend({Bk:[new uA("Default","/skins/pandoraone","skin_preview_default.png",!1,!1),new uA("Dead Days","/skins/skulls","skin_preview_skulls.png",!1,!1),new uA("The Mash","/skins/monsters","skin_preview_monsters.png",!1,!1),new uA("Purple Wave","/skins/purplewave","skin_preview_purplewave.png",!1,!1),new uA("Cosmic Rift","/skins/cosmicrift","skin_preview_cosmic.png",!1,!1),new uA("Freebird","/skins/birds","skin_preview_birds.png",!1,!1),new uA("Lullaby","/skins/night","skin_preview_night.png", | |
!1,!1),new uA("Deep Sea Disco","/skins/deepseadisco","skin_preview_sea.png",!1,!1),new uA("Honeycomb","/skins/honeycomb","skin_preview_honeycomb.png",!1,!1),new uA("Danger Diamond","/skins/dangerdiamond","skin_preview_dangerdiamond.png",!1,!1),new uA("Vertical Violet","/skins/profplum","skin_preview_profplum.png",!1,!1),new uA("Cassettes","/skins/cassettes","skin_preview_cassettes.png",!1,!1),new uA("Rock the Mic","/skins/rockthemic","skin_preview_rockthemic.png",!1,!0),new uA("Sunny Day","/skins/day", | |
"skin_preview_day.png",!1,!1),new uA("Winter Leaf","/skins/leaves","skin_preview_leaves.png",!1,!1),new uA("Blue Sky","/skins/clouds","skin_preview_clouds.png",!1,!1),new uA("Owl Hour","/skins/owl","skin_preview_owl.png",!1,!0),new uA("Gem Jam","/skins/gemjam","skin_preview_gemjam.png",!1,!0),new uA("Sasquatch","/skins/sasquatch","skin_preview_sasquatch.png",!1,!1),new uA("Pool","/skins/pool","skin_preview_pool.png",!1,!1),new uA("Beach","/skins/beach_scene_p1","skin_preview_beach_scene_p1.png",!1, | |
!1)],initialize:function(){z.c(Eh,r(this,this.render));S(Fu,r(this,this.render));z.c(Yf,r(this,this.zM));z.c(Zf,r(this,this.rM));this.model.bind("change:currentSkinPath",r(this,this.gN));this.Mm=this.ak=null;this.fe=this.Bk},render:function(){if($(".skinPickerPopup").is(":visible"))return $(this.el).empty(),!1;var b=Tx("skinPickerPopup",$("#skinPickerHeaderTmpl").tmpl(),"");$("body").append($(this.el).append(b));for(var b=$(".content",this.el),c=this.Gx(this.model.get("currentSkinPath")),d=0;d<this.fe.length;d++){var e= | |
this.fe[d];(!0!=e.retired||null!=c&&c.id==e.id)&&b.append($("#skinDefinitionTmpl").tmpl(this.fe[d]))}0==$(".ie8").length&&setTimeout(r(this,function(){Px($(".scroll-pane",this.el))}),500);return this},events:{"click .skin_definition_container":"skinDefinitionClick","closed .lightbox":"cancelClick"},skinDefinitionClick:function(b){b=this.fe[parseInt(b.currentTarget.id,10)];s("skin_switched",{valance_name:b.displayName},this.model.get("currentUser"));R(Hv,b.resourcePath);return!1},cancelClick:function(){$(this.el).empty(); | |
return!1},gN:function(){var b=this.model.get("currentSkinPath"),c="/static/pandora_one"+b;$("#skinStyle").attr("href",je(c)?"":c+"/skin.css");this.Pz(b);return!1},Pz:function(b){try{var c=this.Gx(b);R(Iv,c);k.debug("Ping the skin tracker url "+this.ak);if(c){if(!0===c.sponsored&&this.ak){var d=this.ak.replace("__SKIN__",encodeURIComponent(b.split("/")[2])),d=d.replace("__CACHEBUSTER__",ge());op(d,function(){},function(){})}this.Mm=null}else this.Mm=b}catch(e){k.error("Exception?",e)}},zM:function(b){if(b&& | |
b.menuEntries){for(var c=b.menuEntries.split(/\r\n|\n|\t|\r/),d=[],e=vA=0;e<c.length;e++){var h=jQuery.trim(c[e]);if(h){var h=h.split("|"),l=h[1];d.push(new uA(h[0],"/skins/"+l,"skin_preview_"+l+".png",!0,!1))}}$.each(this.Bk,function(b,c){c.id=vA++;d.push(c)});this.fe=d;this.ak=b.skinTrackerUrl;this.Mm&&this.Pz(this.Mm)}},rM:function(){vA=0;$.each(this.Bk,function(b,c){c.id=vA++});this.fe=this.Bk;this.ak=null},Gx:function(b){for(var c=this.fe.length,d=0;d<c;d++){var e=this.fe[d];if(b==e.resourcePath)return e}return null}});function xA(){}xA=Backbone.View.extend({initialize:function(){z.c(Eh,r(this,this.render))},render:function(){var b=Tx("serviceUnavailablePopup",$("#serviceUnavailableHeaderTmpl").tmpl(),$("#serviceUnavailableContentTmpl").tmpl());0<$("#splash:visible").length?$("#splash").append($(this.el).append(b)):$("body").append($(this.el).append(b));b.show();return this},events:{}});function yA(){} | |
yA=Backbone.View.extend({initialize:function(){this.model.bind("change:currentContextualTip",r(this,this.render));$("body").append(this.el);this.Yt=!1;setTimeout(function(){var b=$(document.createElement("img")).attr("src","/img/tip/bg_tip.png");b&&b.hide()},1);z.c(Qk,r(this,this.FN));z.c(Rk,r(this,this.Ej))},className:"contextual_help_container",render:function(){var b=this.model.get("currentContextualTip");if(null==b)$(this.el).fadeOut("fast");else{if(this.Yt)return;$(this.el).hide();$(this.el).children().remove(); | |
var c=$(b.anchorElementPath+":visible");0<c.length&&($(this.el).append($("#contextualHelpTmpl").tmpl(b)),$("#contextualHelpInitalText",this.el).show(),$("#contextualHelpMoreText",this.el).hide(),je(b.moreText)?$("#hrefShowMore",this.el).hide():$("#hrefShowMore",this.el).show(),setTimeout(r(this,function(){var b=$(c[0]),e=b.offset();if(b.is(":visible")){var h=e.left-37+b.outerWidth()/2,b=e.top+17+b.scrollTop();0<=h&&0<=b&&($(this.el).show(),$(this.el).offset({top:b,left:h}))}}),1E3))}return this}, | |
events:{"click #tipClose":"tipCloseClick","click #hrefShowMore":"showMoreClick"},showMoreClick:function(){zA();$("#contextualHelpMoreText",this.el).fadeIn();$("#hrefShowMore",this.el).hide()},tipCloseClick:function(){$(this.el).fadeOut("fast");zA();R(Iu)},FN:function(){this.tipCloseClick();this.Yt=!0},Ej:function(){this.Yt=!1}});function AA(){} | |
AA=Backbone.View.extend({pi:"wwwpandoracom-20",kC:6E4,initialize:function(){this.en=this.cn=!0;S(zu,r(this,this.render));S(fv,r(this,this.Cs));S(nv,r(this,this.VI));S(ov,r(this,this.UI));S(dw,r(this,this.Tx));S(ew,r(this,this.Tx));z.c(df,r(this,this.Qd));z.c(Nf,r(this,this.Dq));z.c(Of,r(this,this.Qq));z.c(Qf,r(this,this.iI));z.c(Rf,r(this,this.Pq));z.c(gj,r(this,this.hJ));z.c(hj,r(this,this.Fq));z.c(Gj,r(this,this.Fq));z.c(Ie,r(this,this.XI));z.c(Af,r(this,this.em));z.c(yf,r(this,this.SI));z.c(Rg, | |
r(this,this.yq));this.model.bind("change:currentProfileInfo",r(this,this.Cs));this.model.bind("change:facebookAuthenticated",r(this,this.QI));this.Vz=!1;dz("/alsofollowing");$("#mainContent .profile_container_static").remove();setInterval(r(this,this.mF),this.kC)},className:"profile_container",render:function(b){var c=null,d,e={};this.xa=b.webname;e.webname=this.xa;e.showBio=!0;e.showActivityPanel=this.cn;e.showLikesPanel=this.en;var h=this.model.get("currentProfileInfo");h&&!this.Zs()?$.extend(e, | |
h):(e.followState="cannotFollow",e.stationCount="",e.bookmarkCount="",e.likesCount="",e.followingCount="",e.followersCount="");this.ca=b.panelType;"likes"!=this.ca||this.en||(this.ca=su.toLowerCase());this.ca!=su.toLowerCase()||this.cn||(this.ca="stations");$(".selected",this.el).removeClass("selected");var h="#profileTmpl",l=null;this.ca==su.toLowerCase()?(c="#profileNewsfeedTmpl",d="#profile_tab_newsfeed",l=r(this,function(){this.Vm(this.xa,0)})):"stations"==this.ca?(d="#profile_tab_stations",l= | |
r(this,function(){this.Oz(this.xa,0)})):"bookmarks"==this.ca?(c="#profileBookmarksTmpl",d="#profile_tab_bookmarks",l=r(this,function(){this.tO(this.xa)})):"likes"==this.ca?(d="#profile_tab_likes",l=r(this,function(){this.Nz(this.xa)})):"following"==this.ca?(d="#profile_tab_following",l=r(this,function(){this.Mz(this.xa,0)})):"followers"==this.ca?(d="#profile_tab_followers",l=r(this,function(){this.Lz(this.xa,0)})):this.ca==tu.toLowerCase()?(h="#feedTmpl",d=null,l=r(this,function(){$("#feed_tab",this.el).addClass("selected"); | |
this.Vm(this.xa,0)})):this.ca==uu.toLowerCase()?(h="#feedTmpl",d=null,l=r(this,function(){$("#connect_tab",this.el).addClass("selected");this.$f(null,!1,0)})):k.error("invalid panel type: "+this.ca);$(this.el).contents().remove();$(this.el).append($(h).tmpl(e));null!=l&&l();null!=c&&$("#contentRight",this.el).append($(c).tmpl(e));e.showBio?$("#contentRight",this.el).removeClass("content_right_nocontent"):$("#contentRight",this.el).addClass("content_right_nocontent");this.model.set({modalPanel:iu}); | |
$("#mainContent").children().hide();$("#mainContent").append($(this.el));$(this.el).show();$(d,this.el).parent().addClass("on");this.od();this.Cs();b.edit&&this.editProfileClick(null);b.panelType==uu&&$(window).scrollTop(0);return this},Qt:function(b){var c="true"==b.attr("viewerLikedObject"),d=b.attr("objectId"),e=b.attr("objectType"),h=parseInt(b.attr("countLikes"),10),h=h+(1==h?" like":" likes");b.empty().append($("#newsfeedLikeTmpl").tmpl({viewerLikedObject:c,objectId:d,objectType:e,countLikesDesc:h}))}, | |
$f:function(b,c,d,e){var h=this.model.get("currentUser");null!=h&&(this.model.get("facebookAuthenticated")&&null==h.Kd?z.b(nj):(0==d&&($("#contentRight",this.el).empty().append($("#connectTmpl").tmpl({})),this.od()),BA("/content/"+(e?"connect_fb_friends_page":"connect"),{webname:this.xa,startIndex:d,wns:c,facebookFriendIds:(h.Kd?h.Kd:[]).join(","),searchString:null==b?"":b,cachebuster:""+(new Date).getTime()},r(this,function(c,h){je(b)||$("#connect_search").val(b);var q=e?$("#facebook_friends_container", | |
this.el):0==d?$("#connectSearchResults",this.el):$("#connectSearchResults .results_list",this.el);this.Bs(c,h,q);$("#search",this.el).hide();$(".location",this.el).truncate({width:$("#contentRight").width()-230,addtitle:!0});$(".stations",this.el).truncate({width:$("#contentRight").width()-230,addtitle:!0});Zo()||$(".sample_allowed").hide();$(".iTunes-badge").hide()}))))},od:function(){$(".btn_bg",this.el).css("visibility","visible");$(".profile_sample",this.el).show();$(".follow_button",this.el).show(); | |
$("#search",this.el).show();var b=this.model.get("currentUser"),c=this.model.get("currentProfileInfo");if(null!=b&&null!=c){var d=this.model.get("facebookAuthenticated");d?$("#connect_find_fb_container",this.el).hide():$("#connect_find_fb_container",this.el).show();0<parseInt(this.model.get("currentProfileInfo").followingCount,10)?($(".connect_promo",this.el).hide(),$("#connect_search_help",this.el).hide()):($(".connect_promo",this.el).show(),$("#connect_search_help",this.el).show());c=Gd(c,this.UK(), | |
b.s==c.listenerId&&!d,this.Zs());$(".img_profile").attr("src",c);$(".img_profile").css("cursor",b.Ea?"default":"pointer");c=$('.section[listenerId="'+b.s+'"]',this.el);$(".feed_profile",c).attr("src",Gd(b,!0));ky(new hy(b),!1)}},UK:function(){return this.ca==tu.toLowerCase()||this.ca==uu.toLowerCase()},Vm:function(b,c){this.Vz||($(window).scroll(r(this,this.uR)),this.Vz=!0);$("#feed_updates_container").slideUp();var d=this.model.get("currentProfileInfo");this.model.get("currentUser");var e=this.ca== | |
su.toLowerCase(),d={si:c,webname:b,followingCount:d.followingCount,only_own:e,cachebuster:""+(new Date).getTime()},h="fetchingActivity"+e,l="fetchingActivityTimeout"+e;AA[h]||(AA[h]=!0,AA[l]=setTimeout(function(){AA[h]=!1},5E3),Tz("/content/newsfeed",d,r(this,function(b,d){0<=b.indexOf("feature_unavailable_error")&&(e?(this.cn=!1,this.Hs()):(R(ax),jz()),(new X({message:ec()})).render());clearTimeout(AA[l]);AA[h]=!1;"success"==d&&(0==c&&$("#contentRight",this.el).empty(),$("#contentRight",this.el).append(b)); | |
this.od();var t=this.model.get("currentProfileInfo"),y=this.model.get("currentUser");t.listenerId!=y.s&&"cannotFollow"==t.followState?$("#contentRight .comments",this.el).remove():(this.Db&&this.Db.close(),this.Db=new Vz({el:$(".profile_rCol",this.el).get(0),model:this.model,type:"profile",targetId:t.listenerId,hasMenu:!0,isActivityDelete:e}),$("#contentRight .comments .notes .comment_box",this.el).hide());$(".newsfeed_more",this.el).click(function(b){var c=$(b.target).parents(".friend_feed");$(".truncated", | |
c).fadeOut(200,function(){$(".long",c).fadeIn()});return!1});_.each($(".like_button_container",this.el),r(this,function(b){this.Qt($(b))}));_.each($(".like_section .section .menu",this.el),r(this,function(b){var c=$(".newsfeed_buy",b);c&&0<c.length?((new pz({buyButton:c,buyMenu:$(".dropdownmenu",b).eq(0),model:this.model})).Lh(String(c.data("itunesurl")),String(c.data("amazonurl")),String(c.data("amazondigitalasin"))),new Vy($(".menu_dropdown",$(b)),null,$(".dropdownmenu",$(b)).eq(1))):new Vy($(".menu_dropdown", | |
$(b)),null,$(".dropdownmenu",$(b)))}));_.each($(".feed_hide_button",this.el),r(this,function(b){var c=this.model.get("currentUser");$(b).hasClass("follow_post")?$(b).click(r(this,function(){z.b(gj,{feedId:$(b).attr("multiFeedIds"),isActivityDelete:e,deleteCompletely:"true"==$(b).attr("deleteCompletely")});$(b).parents(".section").slideUp()})):c&&$(b).attr("listenerid")==c.s?$(b).click(r(this,function(){z.b(gj,{feedId:$(b).attr("feedId"),isActivityDelete:e,deleteCompletely:"true"==$(b).attr("deleteCompletely")}); | |
return!1})):new CA($(b),e);$(b).closest(".section").bind("mouseenter",function(){$(".feed_hide_button",this.el).not($(b)).fadeOut();$(b).fadeIn()});$(b).closest(".section").bind("mouseleave",function(){0==$(".feed_hide_dialog[visible=true]").length&&$(b).fadeOut()})}));_.each($(".owner_profile_image, .also_profile_image",this.el),r(this,function(b){new DA($(b),{viewerListenerId:y.s,viewerIsAnon:null==y||y.p()})}))}),function(){z.b(Ih)},!0))},LG:function(b,c){Tz("/content/bookmarked_tracks",{trackStartIndex:c, | |
webname:b,cachebuster:""+(new Date).getTime()},r(this,function(b){$("#track_bookmark_container",this.el).append(b);this.ps()}))},FG:function(b,c){Tz("/content/bookmarked_artists",{artistStartIndex:c,webname:b,cachebuster:""+(new Date).getTime()},r(this,function(b){$("#artist_bookmark_container",this.el).append(b);this.ps()}))},tO:function(b){Tz("/content/bookmarks",{webname:b,cachebuster:""+(new Date).getTime()},r(this,function(b,d){"success"==d&&($("#contentRight",this.el).empty().append(b),this.ps())}), | |
function(){z.b(Ih)},!0)},ps:function(){_.each($(".like_section .section .menu",this.el),r(this,function(b){var c=$(".like_buy",b);$(".iTunes-badge").hide();Zo()||$(".play_sample").hide();c&&0<c.length?((new pz({buyButton:c,buyMenu:$(".dropdownmenu",b).eq(0),model:this.model})).Lh(String(c.data("itunesurl")),String(c.data("amazonurl")),String(c.data("amazondigitalasin"))),new Vy($(".menu_dropdown",$(b)),null,$(".dropdownmenu",$(b)).eq(0))):new Vy($(".menu_dropdown",$(b)),null,$(".dropdownmenu",$(b)))})); | |
this.od()},JG:function(b,c){Tz("/content/stationlikes",{stationStartIndex:c,webname:b,cachebuster:""+(new Date).getTime()},r(this,function(c){$("#station_like_pages",this.el).append(c);this.Jj(b)}))},EG:function(b,c){Tz("/content/albumlikes",{albumStartIndex:c,webname:b,cachebuster:""+(new Date).getTime()},r(this,function(c){$("#album_like_pages",this.el).append(c);this.Jj(b)}))},GG:function(b,c){Tz("/content/artistlikes",{artistStartIndex:c,webname:b,cachebuster:""+(new Date).getTime()},r(this,function(c){$("#artist_like_pages", | |
this.el).append(c);this.Jj(b)}))},MG:function(b,c,d){Tz("/content/tracklikes",{likeStartIndex:c,thumbStartIndex:d,webname:b,cachebuster:""+(new Date).getTime()},r(this,function(c){$("#track_like_pages",this.el).append(c);this.Jj(b)}))},Nz:function(b,c){Tz("/content/likes",{webname:b,filter:c,cachebuster:""+(new Date).getTime()},r(this,this.JL),function(){z.b(Ih)},!0)},JL:function(b){0<=b.indexOf("feature_unavailable_error")&&(this.en=!1,this.Hs(),(new X({message:ec()})).render());$("#contentRight", | |
this.el).empty().append(b);$(".filter_likes input").keyup(r(this,this.NG));$(".filter_likes input").focus(r(this,function(){$(".filter_likes input").hasClass("default_text")&&($(".filter_likes input").removeClass("default_text"),$(".filter_likes input").val(""))}));$(".filter_likes input").blur(r(this,this.qx));this.qx();this.Jj(this.xa);$(".iTunes-badge").hide()},qx:function(){var b=$(".filter_likes input").attr("data-filter");je(b)&&(b="Search Likes");$(".filter_likes input").addClass("default_text"); | |
$(".filter_likes input").val(b)},NG:function(b){return 13==b.which?(this.Nz(this.xa,$(".filter_likes input").val()),!1):!0},Jj:function(b){var c=this.model.get("currentUser");c&&c.Y!=b&&(b=this.model.get("currentProfileInfo"),b=b.fullName&&0==!$.trim(b.fullName).length?b.fullName:b.webName,$(".profile_user_name").text(b),_.each($(".profile_context_name",this.el),r(this,function(b){$(b).text()==c.webName+"'s"&&$(b).text("your")})),_.each($(".like_context_stationname",this.el),r(this,function(b){$(b).data("viewer-is-owner", | |
!1)})));_.each($(".like_section .section .menu",this.el),r(this,function(b){var c=$(".like_buy",b);c&&0<c.length?((new pz({buyButton:c,buyMenu:$(".dropdownmenu",b).eq(0),model:this.model})).Lh(String(c.data("itunesurl")),String(c.data("amazonurl")),String(c.data("amazondigitalasin"))),new Vy($(".menu_dropdown",$(b)),null,$(".dropdownmenu",$(b)).eq(1))):new Vy($(".menu_dropdown",$(b)),null,$(".dropdownmenu",$(b)))}));$(".iTunes-badge").hide();this.od()},Oz:function(b,c){Tz("/content/stations",{startIndex:c, | |
webname:b,cachebuster:""+(new Date).getTime()},r(this,function(b){0==c?$("#contentRight",this.el).empty().append(b):$("#stations_container",this.el).append(b);this.od()}),function(){z.b(Ih)},!0)},Mz:function(b,c){Tz("/content/following",{startIndex:c,webname:b,cachebuster:""+(new Date).getTime()},r(this,function(b,e){this.Bs(b,e,0==c?$("#contentRight",this.el).empty():$("#currently_following",this.el))}),function(){z.b(Ih)},!0)},Lz:function(b,c){Tz("/content/followers",{startIndex:c,webname:b,cachebuster:""+ | |
(new Date).getTime()},r(this,function(b,e){this.Bs(b,e,0==c?$("#contentRight",this.el).empty():$("#current_followers"))}),function(){z.b(Ih)},!0)},Bs:function(b,c,d){if("success"==c){d.append(b);this.blurSearch();_.each($("#followers .follow_section",this.el),function(b){new Vy($(".menu_dropdown",$(b)),null,$(".dropdownmenu",$(b)))});for(b=0<$("#currently_following .follow_section:visible",this.el).length?2:4;b<$("#suggestions .follow_section",this.el).length;b++)$("#suggestions .follow_section", | |
this.el).eq(b).closest("li").hide();this.od()}},Cs:function(){if($(this.el).is(":visible")){$("#user_info_form",this.el).is(":visible")&&$("#user_info_form",this.el).fadeOut(400,function(){$("#user_info_container",this.el).fadeIn()});var b=this.model.get("currentProfileInfo"),c=this.model.get("currentUser");if(null==b||null==c)$("#user_info_container",this.el).empty(),$(".user_name a",this.el).hide();else{b.show_details=this.ca!=su.toLowerCase()||b.listenerId!=c.s&&b.privateProfile?!1:!0;$.extend(b, | |
{showAsPrivateProfile:this.Zs()});$("#user_info_container",this.el).empty().append($("#profileUserinfoTmpl").tmpl(b));var d=c.Vb?b.bioHtml:b.bioRawHtml;d&&$("#bio_text",this.el).empty().html(d.split("\n").join("<br/>"));$(".user_name a",this.el).show();b=c.Vb?b.fullName:b.fullNameRaw;$(".user_name.self a").text(b)}this.od()}},Zs:function(){var b=this.model.get("currentProfileInfo"),c=this.model.get("currentUser");return null==b||null==c||b.listenerId!=c.s&&b.privateProfile},events:{"focus #bookmarks_search":"searchBookmarksFocus", | |
"keypress #bookmarks_search":"searchBookmarks","click .sample":"sampleClick","click .play_station":"playStation","click .img_profile":"profileImageClicked","click #load_feed_updates":"loadFeedUpdates","click .like_context_stationname":"playStation","click .like_remove_like":"likesRemoveLikeClick","click .like_create_station":"likesCreateStationClick","click .like_share":"likesShareClick","click #stations .show_more":"stationsShowMoreClick","click #currently_following .show_more":"followingShowMoreClick", | |
"click #current_followers .show_more":"followersShowMoreClick","click #track_like_pages .show_more":"trackLikesShowMore","click #artist_like_pages .show_more":"artistLikesShowMore","click #album_like_pages .show_more":"albumLikesShowMore","click #station_like_pages .show_more":"stationLikesShowMore","click #facebook_friends_container .show_more":"facebookFriendsShowMore","click .people_search .show_more":"peopleSearchShowMore","click #track_bookmark_container .show_more":"trackBookmarksShowMore", | |
"click #artist_bookmark_container .show_more":"artistBookmarksShowMore","click .like_buy_itunes":"likesBuyITunes","click .like_buy_amazon_mp3":"likesBuyAmazonMp3","click .like_buy_amazon_cd":"likesBuyAmazonCD","click .others_link":"othersLinkClick","click .like_undo":"likeUndoClick","mouseover .like_undo":"mouseOverLikeUndoButton","mouseout .like_undo":"mouseOutLikeUndoButton","click .like_likethis":"likeFomFeedClick","click .newsitem_share":"newsitemShareClick","click .playstation":"playStation", | |
"click .playmessage":"playMessage","click #connect_find":"connectFindClick","click .clear_input":"clearInput","keyup #connect_search":"connectSearchKeyup","click #connect_facebook_login":"connectFacebookLogin","click #edit_profile_link":"editProfileClick","click #save_profile":"saveProfileClick","click #privacy_menu_dd .profile_permissions":"privacyMenuItemClick","focus #bio":"bioTextareaFocus","blur #bio":"bioTextareaBlur","click .follow_button":"followButtonClicked","mouseover .follow_button":"followButtonMouseover", | |
"mouseout .follow_button":"followButtonMouseout","focus #search":"focusSearch","blur #search":"blurSearch","keyup #search":"keyupSearch","click .block":"blockListenerClick","click .bookmark_delete":"deleteBookmarkClick","click #suggestions .remove_section":"removeSuggestionSection","click #suggestions .remove":"removeSuggestion","click .station_share .playstation":"shareClick","click .song_share .newsfeed_song_name":"shareClick","click .song_share .song_name":"shareClick","click .song_share .album_name":"shareClick", | |
"click .song_share .artist_name":"shareClick","click .station_share .artist_name":"shareClick","click .station_share .station_name":"shareClick"},shareClick:function(){this.model.set({shareFirstImp:!0});return!0},removeSuggestionSection:function(){$("#suggestions").fadeOut()},removeSuggestion:function(b){var c=$(b.target).closest("li");c.fadeOut(400,r(this,function(){c.remove();var b=$("#suggestions li:hidden",this.el);b&&0<b.length&&b.eq(0).show();0==$("#suggestions li",this.el).length&&$("#suggestions").fadeOut()}))}, | |
deleteBookmarkClick:function(b){var c=0<$(b.target).closest("#artistBookmarks").length,d=$(b.target).closest(".section");R(c?kv:lv,{bookmarkId:$(b.target).attr("data-bookmarkid"),section:d});return!1},Tx:function(b){$(b).fadeOut(400,r(this,function(){$(b).remove();0==$("#songBookmarks .section").length&&0==$("#artistBookmarks .section").length&&($(".profile_lCol .profile_menu li").eq(2).remove(),this.model.get("currentProfileInfo").bookmarkCount=0,window.location.hash=$("a",$(".profile_lCol .profile_menu li").eq(0)).attr("href"))})); | |
return!1},blockListenerClick:function(b){b=$(b.target).attr("data-listenerid");z.b(Gj,b);s("link",{click:"block",source:"ProfileView"},this.model.get("currentUser"));return!1},iI:function(b){if(this.model.get("currentProfileInfo")){var c=null;$("#followers .follow_button",this.el).each(r(this,function(d,e){$(e).attr("data-listenerid")==b&&(c=$(e))}));c&&(c.removeClass("followable"),c.removeClass("following"),c.addClass("blocked"),c.find(".follow_button_label").text("Blocked"),c.removeClass("hover"), | |
$(".dropdownmenu li",$(c.parent())).eq(0).hide())}},Pq:function(b){var c=this.model.get("currentProfileInfo");if(c){for(var d=null,e=["#followers","#suggestions"],h=0;h<e.length;h++)$(e[h]+" .follow_button",this.el).each(r(this,function(c,e){$(e).attr("data-listenerid")==b&&(d=$(e))}));e=null!=d;null==d&&b==c.listenerId&&(d=$(".follow_button",this.el).eq(0));null!=d&&(d.removeClass("blocked"),d.find(".follow_button_label").text("Follow"),d.addClass("followable"),d.removeClass("hover"),e?$(".dropdownmenu li", | |
$(d.parent())).eq(0).show():c.followState="followable")}},hJ:function(b){var c=$('.section[feedId="'+b.feedId+'"]');c.slideUp("normal",function(){c.remove()})},Fq:function(b){var c=$('.section[listenerId="'+b+'"]');c.slideUp("normal",function(){c.remove()})},blurSearch:function(){var b=""+$("#search",this.el).val();b&&0!=jQuery.trim(b).length||($("#search",this.el).val("Search Friends"),$("#search",this.el).addClass("empty"))},focusSearch:function(){$("#search",this.el).hasClass("empty")&&($("#search", | |
this.el).val(""),$("#search",this.el).removeClass("empty"))},keyupSearch:function(){var b=jQuery.trim(""+$("#search",this.el).val()).toLowerCase();$("#followers .follow_section",this.el).each(function(c,d){0>jQuery.trim(""+$(".listener_info .listener_name",$(d)).text()).toLowerCase().indexOf(b)?$(d).fadeOut("fast"):$(d).show()})},Dq:function(b){var c=this.model.get("currentProfileInfo");if(c){var d=null;b.webName==c.webName?(d=$("#"+b.ui_id),this.model.get("currentProfileInfo").followState="following"): | |
($(".follow_button",this.el).each(r(this,function(c,h){$(h).data("webname")==b.webName&&(d=$(h))})),d&&(c=d.closest("li"))&&0<c.length&&!c.is(":visible")&&c.fadeIn());d&&(d.removeClass("followable"),d.addClass("following"),d.removeClass("hover"),d.find(".follow_button_label").text("Following"))}},Qq:function(b){var c=this.model.get("currentProfileInfo");if(c)if(this.ca==tu.toLowerCase())this.Fq(b.listenerId);else{var d=null;b.webName==c.webName?(d=$("#"+b.ui_id),this.model.get("currentProfileInfo").followState= | |
"followable"):$(".follow_button",this.el).each(r(this,function(c,h){$(h).data("webname")==b.webName&&(d=$(h))}));d&&(d.removeClass("following"),d.addClass("followable"),d.removeClass("hover"),d.find(".follow_button_label").text("Follow"))}},followButtonClicked:function(b){var c=this.model.get("currentUser");if(null==c||c.p())R(rv,{onSuccessRedirect:Wy()});else{if(!$(b.currentTarget).hasClass("cannotFollow"))if($(b.currentTarget).data("webname")?c=$(b.currentTarget).data("webname"):(c=this.model.get("currentProfileInfo"), | |
c=c.webName),$(b.currentTarget).hasClass("followable"))z.b(Ej,{webName:c,ui_id:b.currentTarget.id}),0<$(b.currentTarget).closest("#suggestions").length&&this.removeSuggestion(b);else if($(b.currentTarget).hasClass("following")){if(z.b(Fj,{webName:c,ui_id:b.currentTarget.id}),$(b.currentTarget).data("webname")&&"following"==jQuery.trim(""+$("#followers h2").text()).toLowerCase()){var d=$(b.currentTarget).closest(".follow_section");d.fadeOut(400,function(){d.remove()})}}else $(b.currentTarget).hasClass("blocked")? | |
(c=null,$(b.currentTarget).attr("data-listenerid")?c=$(b.currentTarget).attr("data-listenerid"):(c=this.model.get("currentProfileInfo"),c=c.listenerId),z.b(Hj,c)):k.error("Unhandled follow state: ",$(b.currentTarget));return!1}},followButtonMouseover:function(b){$(b.currentTarget).hasClass("cannotFollow")||$(b.currentTarget).addClass("hover");$(b.currentTarget).hasClass("followable")?$(b.currentTarget).find(".follow_button_label").text("Follow"):$(b.currentTarget).hasClass("following")?$(b.currentTarget).find(".follow_button_label").text("Unfollow"): | |
$(b.currentTarget).hasClass("blocked")&&$(b.currentTarget).find(".follow_button_label").text("Unblock")},followButtonMouseout:function(b){$(b.currentTarget).hasClass("cannotFollow")||$(b.currentTarget).removeClass("hover");$(b.currentTarget).hasClass("followable")?$(b.currentTarget).find(".follow_button_label").text("Follow"):$(b.currentTarget).hasClass("following")?$(b.currentTarget).find(".follow_button_label").text("Following"):$(b.currentTarget).hasClass("blocked")&&$(b.currentTarget).find(".follow_button_label").text("Blocked")}, | |
profileImageClicked:function(){var b=this.model.get("currentProfileInfo");b&&b.is_owner&&(this.model.get("facebookAuthenticated")||z.b(lj));return!1},loadFeedUpdates:function(){this.Vm(this.xa,0);return!1},mF:function(){if($(this.el).is(":visible")&&this.ca==tu){var b=$(".section[feedIndex='1']");0<b.length&&z.b(pj,{webname:this.xa,lastFeedId:b.attr("feedId")})}},XI:function(b){0<b&&(b=b+" New Post"+(1<b?"s":""),$("#feed_updates_container",this.el).empty().append($("#feedUpdatesNoticeTmpl").tmpl({text:b})), | |
$("#feed_updates_container").slideDown())},QI:function(){var b=this.model.get("currentUser");if(null!=b&&this.model.get("facebookAuthenticated")){var c=this.model.get("currentProfileInfo");null!=c&&c.webName==b.Y&&(c.fbId=b.Ea,null!=b.Kd||z.b(nj))}$(this.el).is(":visible")&&(this.ca==uu?this.$f(null,!1,0,!1):this.od())},bioTextareaBlur:function(){0==jQuery.trim(""+$("#bio",this.el).val()).length&&($("#bio",this.el).val(tc),$("#bio",this.el).addClass("default_text"))},bioTextareaFocus:function(){$("#bio", | |
this.el).hasClass("default_text")&&($("#bio",this.el).val(""),$("#bio",this.el).removeClass("default_text"))},privacyMenuItemClick:function(b){$(b.target).hasClass("profile_private")?($("#privacy_menu",this.el).removeClass("profile_public"),$("#privacy_menu",this.el).addClass("profile_private"),$("#privacy_menu",this.el).text(rc),$("#privacy",this.el).val("private")):($("#privacy_menu",this.el).removeClass("profile_private"),$("#privacy_menu",this.el).addClass("profile_public"),$("#privacy_menu", | |
this.el).text(sc),$("#privacy",this.el).val("public"));return!1},saveProfileClick:function(){R(Ww);var b=this.model.get("currentProfileInfo"),c=$("#bio",this.el).val();1024<c.length&&(c=c.substring(0,1023));b={webName:b.webName,fullName:$("#fullname",this.el).val(),isProfilePrivate:"private"==jQuery.trim(""+$("#privacy",this.el).val()).toLowerCase(),homeTown:$("#hometown",this.el).val(),school:$("#school",this.el).val(),employer:$("#employer",this.el).val(),bio:$("#bio",this.el).hasClass("default_text")? | |
"":c};z.b(Dj,b);return!1},editProfileClick:function(){R(Ww);var b=this.model.get("currentProfileInfo");$("#user_info_container",this.el).fadeOut(400,r(this,function(){$("#user_info_form",this.el).empty().append($("#profileUserinfoFormTmpl").tmpl(b));new Vy($("#privacy_menu",this.el),null,$("#privacy_menu_dd",this.el));this.bioTextareaBlur();$("#user_info_form",this.el).fadeIn()}));return!1},searchBookmarksFocus:function(){"Search Bookmarks"==$("#bookmarks_search input",this.el).val()&&$("#bookmarks_search input", | |
this.el).val("")},searchBookmarks:function(){clearTimeout(this.$E);this.$E=setTimeout(function(){var b=$("#bookmarks_search input",this.el).val().toLowerCase();$(".like_section:visible",this.el).each(r(this,function(c,d){var e=$(d);$(".section",e).each(r(this,function(c,d){var e=$(d),h=e.text().toLowerCase();je(b)||(0<=h.indexOf(b)?e.show():e.hide())}));if(je(b)){var h=$(".section",e);if(5<h.length)for($(".show_more",e).show(),e=0;e<h.length;e++)5>e?$(h[e]).show():$(h[e]).hide();else $(".show_more", | |
e).hide(),h.show()}else $(".show_more",e).hide()}))},500)},stationsShowMoreClick:function(b){"stations"==this.ca&&(b=parseInt($(b.target).data("nextstartindex"),10),$("#stations .show_more").fadeOut("fast"),this.Oz(this.xa,b))},followingShowMoreClick:function(b){b=parseInt($(b.target).data("nextstartindex"),10);$(".show_more",this.el).fadeOut("fast");this.Mz(this.xa,b)},followersShowMoreClick:function(b){b=parseInt($(b.target).data("nextstartindex"),10);$(".show_more",this.el).fadeOut("fast");this.Lz(this.xa, | |
b)},trackLikesShowMore:function(b){var c=parseInt($(b.target).data("nextlikestartindex"),10);b=parseInt($(b.target).data("nextthumbstartindex"),10);$("#track_like_pages .show_more",this.el).fadeOut("fast");this.MG(this.xa,c,b)},artistLikesShowMore:function(b){b=parseInt($(b.target).data("nextstartindex"),10);$("#artist_like_pages .show_more",this.el).fadeOut("fast");this.GG(this.xa,b)},albumLikesShowMore:function(b){b=parseInt($(b.target).data("nextstartindex"),10);$("#album_like_pages .show_more", | |
this.el).fadeOut("fast");this.EG(this.xa,b)},stationLikesShowMore:function(b){b=parseInt($(b.target).data("nextstartindex"),10);$("#station_like_pages .show_more",this.el).fadeOut("fast");this.JG(this.xa,b)},facebookFriendsShowMore:function(b){$(b.target).hide();this.$f("",!1,parseInt($(b.target).attr("data-nextStartIndex"),10),!0);return!1},peopleSearchShowMore:function(b){$(b.target).hide();this.$f($.trim($(".search_term",this.el).text()),!1,parseInt($(b.target).attr("data-nextStartIndex"),10), | |
!1);return!1},artistBookmarksShowMore:function(b){b=parseInt($(b.target).data("nextstartindex"),10);$("#artist_bookmark_container .show_more",this.el).fadeOut("fast");this.FG(this.xa,b)},trackBookmarksShowMore:function(b){b=parseInt($(b.target).data("nextstartindex"),10);$("#track_bookmark_container .show_more",this.el).fadeOut("fast");this.LG(this.xa,b)},likesShareClick:function(b){var c=$(b.target).data("song"),d=$(b.target).data("album");b=$(b.target).data("station");c?(c=new zn(c,null),s("share", | |
{share_object:"song",source:"ProfileView",email:"false",pandora:"true",facebook:"false",twitter:"false",object_id:c.o()},this.model.get("currentUser")),R(Ou,{mode:"song",track:c})):d?(R(Ou,{mode:"album",album:d}),s("share",{share_object:"album",source:"ProfileView",email:"false",pandora:"true",facebook:"false",twitter:"false",object_id:d.musicId},this.model.get("currentUser"))):b&&(c=wn(b),R(Ou,{mode:"station",station:c}),s("share",{share_object:"station",source:"ProfileView",email:"false",pandora:"true", | |
facebook:"false",twitter:"false",object_id:c.e()},this.model.get("currentUser")));return!1},likesCreateStationClick:function(b){var c=$(b.target).attr("data-songid");$(b.target).attr("data-albumid");var d=$(b.target).attr("data-artistid");b=$(b.target).attr("data-data-stationid");this.model.get("currentUser");c?z.b(Di,{stationCode:"fb"+c,source:"profile_page"}):d?z.b(Di,{stationCode:"fb"+d,source:"profile_page"}):b&&(isNaN(b)?z.b(Di,{stationCode:b,source:"profile_page"}):R(Gu,b));return!1},likesRemoveLikeClick:function(b){var c= | |
""+$(b.target).attr("data-likeid"),d=c.indexOf(".");-1<d?R(Ru,{isPositive:!0,stationID:c.substring(d+1),musicID:[c.substring(0,d)]}):z.b(rj,c);this.uj=b;return!1},em:function(){if(null!=this.uj){var b=$(this.uj.target).closest(".section"),c=$(this.uj.target).parents(".like_section");b.fadeOut(400,function(){b.remove();$(".section_count",c).text("("+$(".section",c).length+")");var d=$(".count",$("#profile_tab_likes",this.el).parent()),e=parseInt(d.text(),10);d.text(e-1)});var d=$(this.uj.target).closest(".section_count"), | |
e=d.text();d.text(parseInt(e,10)-1);this.uj=null}},likesBuyITunes:function(b){b=$(b.target).data("itunesurl");window.open(b+"&ct=Web","_blank");return!1},likesBuyAmazonMp3:function(b){b=$(b.target).data("amazonurl");window.open(b+"&tag="+this.pi,"_blank");return!1},likesBuyAmazonCD:function(b){b=$(b.target).data("amazondigitalasin");window.open("http://www.amazon.com/dp/"+b+"/?&tag="+this.pi,"_blank");return!1},othersLinkClick:function(b){b=$(b.target).attr("webnames");this.ca=uu;$(this.el).empty().append($("#feedTmpl").tmpl({})); | |
$("#connect_tab",this.el).addClass("selected");this.$f(b,!0,0,!1);V("/alsofollowing",!0,!0);return!1},likeFomFeedClick:function(b){k.debug("clicked likesFomFeedClick");var c=this.model.get("currentUser");if(null==c||c.p())return R(rv,{onSuccessRedirect:Wy()}),!1;var d=$(b.target).parents(".like_button_container"),c=d.attr("objectId"),d=d.attr("objectType");b=$(b.target).parents(".section").attr("webname");$(".like_button_container",this.el).filter('[objectId="'+c+'"]').each(r(this,function(b,c){var d= | |
$(c);d.attr("countLikes",parseInt(d.attr("countLikes"),10)+1);d.attr("viewerLikedObject","true");this.Qt(d)}));z.b(qj,{type:this.Mf(d),objectId:c,context:"feed_page",contextId:b,contextName:b});return!1},Mf:function(b){if("like_artist"==b)b="artist";else if("like_album"==b)b="album";else if("like_song"==b)b="song";else if("like_station"==b)b="station";else if("station_create"==b)b="station";else if("station_listen"==b)b="station";else if("station_share"==b)b="station";else if("station_comment"==b)b= | |
"station";else if("song_share"==b)b="song";else throw"invalid type: "+b;return b},likeUndoClick:function(b){var c=$(b.target).parents(".like_button_container");b=c.attr("objectId");c=c.attr("objectType");$(".like_button_container",this.el).filter('[objectId="'+b+'"]').each(r(this,function(b,c){var h=$(c);if("true"==h.attr("viewerIsOwner")&&0==h.attr("objectType").indexOf("like_")){var l=h.parents(".section");l.slideUp("normal",function(){l.remove()})}else h.attr("countLikes",parseInt(h.attr("countLikes"), | |
10)-1),h.attr("viewerLikedObject","false"),this.Qt(h)}));z.b(uj,new mo(this.Mf(c),b));return!1},mouseOverLikeUndoButton:function(b){$(b.target).text("Undo");$(b.target).parent().removeClass("liked").addClass("undo")},mouseOutLikeUndoButton:function(b){$(b.target).text("You like this");$(b.target).parent().removeClass("undo").addClass("liked")},newsitemShareClick:function(){k.info("newsitemShareClick");return!1},connectSearchKeyup:function(b){13==b.which&&this.connectFindClick(b);return!0},connectFindClick:function(b){R(Ww); | |
b=$("#connect_search",$(b.target).parent()).val();this.$f(b,!1,0,!1)},clearInput:function(b){$("#connect_search",$(b.target).parent()).val("").focus()},connectFacebookLogin:function(){z.b(lj,r(this,this.od))},playStation:function(b){var c=$(b.target).attr("data-station-id"),d=$(b.target).data("music-id");b=!0==$(b.target).data("viewer-is-owner")||"true"==$(b.target).data("viewer-is-owner");this.model.get("currentUser");je(c)?z.b(Di,{stationCode:"mi"+d,source:"profile_page"}):(d=this.model.get("stationList").detect(function(b){return b.e()== | |
c}),b&&d?R(Gu,c):z.b(Di,{stationCode:"fs"+c,source:"profile_page"}));R(yu);return!1},playMessage:function(b){var c=$(b.target).data("artist-uid-hexed");b=$(b.target).data("artist-message-id-hexed");z.b(Di,{stationCode:"mi"+c,artistMessageArtistUid:c,artistMessageId:b});R(yu);return!1},VI:function(b){if(this.ca!=tu)return!1;1==parseInt(b.parents(".section").attr("feedIndex"),10)&&$("#profile_tip_spacer",this.el).slideDown()},UI:function(b){if(this.ca!=tu)return!1;1==parseInt(b.parents(".section").attr("feedIndex"), | |
10)&&$("#profile_tip_spacer",this.el).slideUp()},uR:function(){if(!$(this.el).is(":visible")||this.ca!=tu&&this.ca!=su||0==$(".user_feed .section").length)return!1;if($(window).scrollTop()>$(".user_feed .section").eq(-1).offset().top-$(window).height()){var b=parseInt($(".next_newsfeed_start_index:last").text(),10);0<b&&(k.info("HEY LETS GRAB SOME MORE ACTIVITY"),this.Vm(this.xa,b))}},Qd:function(b){var c=$(".sample.playing",this.el);c.removeClass("playing");c.parent(".btn_bg").removeClass("playing"); | |
$(".sample_text").show();$(".iTunes-badge").hide();b.isError&&(0<c.children("a").length?c.addClass("sample-inactive").find("a").attr("title","Sample Unavailable").find("span").html("Sample Unavailable"):c.addClass("sample-inactive").html("No Sample").parent(".btn_bg").addClass("disabled"));null!=this.yb&&0<this.yb.length&&b.reachedEnd&&b.url==$(this.yb[0]).attr("data-sample-url")&&(this.yb.shift(),this.yz())},sampleClick:function(b){$(b.target).blur();var c=$(b.target).parent(".sample");0===c.size()&& | |
(c=$(b.target));c.hasClass("sample-inactive")||(c.hasClass("playing")?0>$(b.target).attr("class").indexOf("iTunes-badge")?(z.b(Mi),c.removeClass("playing"),c.parent(".btn_bg").removeClass("playing"),b=c.data("trackname"),$(".iTunes-badge."+b).hide(),$(".sample_text."+b).show()):(b=$(b.target).attr("href"),window.open(b,"_blank")):(z.b(Li,{url:c.data("sampleurl"),gain:null!=c.data("samplegain")?Number(c.data("samplegain")):0}),c.addClass("playing"),c.parent(".btn_bg").addClass("playing"),b=c.data("trackname"), | |
$(".iTunes-badge."+b).show(),$(".sample_text."+b).hide()))},SI:function(){this.ca==uu.toLowerCase()&&setTimeout(r(this,function(){this.$f(null,!1,0,!1)}),100)},yq:function(b){this.en=b.NEW_SITE_LIKES_LIST;this.cn=b.NEW_SITE_ACTIVITY_LIST;this.Hs()},Hs:function(){0<=Wy().indexOf("/profile")&&this.model.get("profilePanelType")&&this.model.get("currentProfileInfo")&&this.render({panelType:this.model.get("profilePanelType"),webname:this.model.get("currentProfileInfo").webName,edit:!1})}});var EA="info",FA="privacy",GA="notices",HA="artistMessages",IA="upgrade",JA="billing",KA="receipts",LA="audioQuality",MA="installDesktopApp";function NA(){} | |
NA=Backbone.View.extend({initialize:function(){this.jl=!1;this.Hj=null;this.jw=!1;this.uf=null;this.Rn=5E3;this.Ck="__USE_EXISTING__";z.c(gf,r(this,this.FK));z.c(ff,r(this,this.SH));z.c(lf,r(this,this.MI));z.c(kf,r(this,this.LI));z.c(mf,r(this,this.KI));z.c(Ef,r(this,this.Pd));z.c(Ff,r(this,this.Rx));z.c(Gf,r(this,this.cy));z.c(Hf,r(this,this.Rx));z.c(If,r(this,this.cy));z.c(Mf,r(this,this.Aq));z.c(wh,r(this,this.DI));z.c(ug,r(this,this.my));z.c(ml,r(this,this.xI));z.c(nl,r(this,this.aJ));S(Gv,r(this, | |
this.jI));this.model.bind("change:facebookAuthenticated",r(this,this.my));this.model.bind("change:twitterAuthenticated",r(this,this.Pt));this.bind("show",r(this,this.QJ))},el:$("#mainContent .accountSettings"),currentTab:null,QJ:function(b){R(Vw);b==EA?this.mE():b==FA?this.cO():b==GA?this.YL():b==HA?this.IE():b==IA?this.fR():b==JA?this.XE():b==KA?this.mO():b==LA?this.NE():b==MA&&this.gG();this.r3=b},pj:function(){$(".submit_btn",this.el).css("opacity","1.0");$(".submit_btn",this.el).css("filter", | |
"alpha(opacity=100)")},mE:function(){var b=this.model.get("currentUser"),c=this.model.get("monthlyListening"),d={};"EXPIRED_SUBSCRIBER"==b.u&&(window.location="/");var e=b.Br;d.usedHours=0;d.capPercent=0;c&&(c=Math.round(Number(c)/60),d.usedHours=Math.round(c/60),d.capPercent=c/(60*e)*100);d.capHours=e;d.isSubscriber=b.Sa();d.isMultiDayPassSubscriber=b.xj;d.paymentMethod=b.fs;d.plan="MONTHLY"===b.Za()?"Monthly":"Annual"+(b.P()?" (Business)":"");d.duration="MONTHLY"===b.Za()?"month":"year";d.showAutoRenew= | |
!this.jl;d.autoRenew=b.tf;e=parseInt(b.sd,10);c=new Date((new Date).getTime()+864E5*e);d.subscriptionDaysLeft=e;d.expireDescription=0==e?"today":1==e?"within one day":"in "+e+" days";d.expirationDate=c.format("mmmm d, yyyy");d.username=b.Pa;d.birthyear=b.Cg;d.zipcode=b.wb();b.Hf==Na()?d.male="checked":d.female="checked";b.Vb?d.explicitNo="checked":d.explicitYes="checked";b.Yv||(d.explicitDisable="disabled",d.explicitGrey="explicitContent");b=$("#accountSettingsTmpl").tmpl(d);$('input[name="explicit_content"]', | |
b).click({qe:this},this.xG);$("#emailPIN",b).click({qe:this},this.Rp);$("input,select",b).click(r(this,this.pj));$("#rescueEmail",this.el).val("");$("#pin",this.el).val("");$("#pinUnlock",this.el).val("");this.Kb("account");$(".content_main",this.el).append(b);this.ON=$("#auto-renew-explanation",this.el).html();$("#auto-renew-explanation",this.el).truncate({width:"490",after:" …",center:!1});$(this.el).show();this.jw&&this.eR();return!1},eR:function(){$(".submit_btn",this.el).css("opacity", | |
"1.0");$(".submit_btn",this.el).css("filter","alpha(opacity=100)");if(wx(this.uf.name))$(".usernameFieldError",this.el).text(this.uf.message).fadeIn(),$(".usernameFieldError",this.el).addClass("nag_message_color"),$("#username",this.el).addClass("nag_border");else if(xx(this.uf.name)||yx(this.uf.name)||zx(this.uf.name))$(".zipCodeFieldError",this.el).text(this.uf.message).fadeIn(),$(".zipCodeFieldError",this.el).addClass("nag_message_color"),$("#zipcode",this.el).addClass("nag_border")},cO:function(){var b= | |
this.model.get("currentUser");"EXPIRED_SUBSCRIBER"==b.u&&(window.location="/");var c=$("#privacyTmpl").tmpl({});b.gq||$(".autoShareOptions",c).hide();var d=b.Il,e=b.Vg,h=b.Ug,l=b.Tg;this.ui=d;this.xi=e;this.wi=h;this.vi=l;b.qh?($('input[name="profile_privacy"][value="private"]',c).prop("checked",!0),this.kv(c)):($('input[name="profile_privacy"][value="public"]',c).prop("checked",!0),$('input[name="autoShareListens"]',c).prop({checked:e,disabled:!d}),$('input[name="autoShareLikes"]',c).prop({checked:h, | |
disabled:!d}),$('input[name="autoShareFollows"]',c).prop({checked:l,disabled:!d}),$('input[name="autoShare"]',c).prop("checked",d),$('input[name="allow_profile_notes"]',c).prop("checked",!b.Jp));this.Kb(FA);$(".content_main",this.el).append(c);$(".submit_btn",this.el).bind("click",{qe:this},r(this,this.Ez));$("input",c).click(r(this,this.pj));this.Pt();this.Bm=null;$(this.el).show();return!1},kv:function(b){b=b||this.el;$('input[name="autoShareListens"]',b).prop({checked:!1,disabled:!0});$('input[name="autoShareLikes"]', | |
b).prop({checked:!1,disabled:!0});$('input[name="autoShareFollows"]',b).prop({checked:!1,disabled:!0});$('input[name="autoShare"]',b).prop({checked:!1,disabled:!0});$('input[name="allow_profile_notes"]',b).prop({checked:!1,disabled:!0})},my:function(){this.model.get("facebookAuthenticated")||($('input[name="autoShare"]',this.el).prop("checked",!1),$('input[name="autoShareListens"]',this.el).prop({checked:!1,disabled:!0}),$('input[name="autoShareLikes"]',this.el).prop({checked:!1,disabled:!0}),$('input[name="autoShareFollows"]', | |
this.el).prop({checked:!1,disabled:!0}));this.Pt()},xI:function(){(new X({message:"error"})).render()},Pt:function(){var b=this.model.get("currentUser");this.model.get("facebookAuthenticated")?($(".facebook.connectButton",this.el).addClass("connected"),$(".facebook.connectButton",this.el).text("Connected"),$(".serviceDescription.connected img",this.el).attr("src","https://graph.facebook.com/"+b.Ea+"/picture?type=square"),$(".serviceDescription.connected span",this.el).text(b.mc),$(".serviceDescription.connected", | |
this.el).show(),$(".serviceDescription.disconnected",this.el).hide()):($(".facebook.connectButton",this.el).removeClass("connected"),$(".facebook.connectButton",this.el).text("Connect"),$(".serviceDescription.disconnected",this.el).show(),$(".serviceDescription.connected",this.el).hide());this.model.get("twitterAuthenticated")?($(".twitter.connectButton",this.el).addClass("connected"),$(".twitter.connectButton",this.el).text("Connected")):($(".twitter.connectButton",this.el).removeClass("connected"), | |
$(".twitter.connectButton",this.el).text("Connect"))},YL:function(){var b=this.model.get("currentUser");"EXPIRED_SUBSCRIBER"==b.u&&(window.location="/");var c={};c.showArtistPromoEmails=void 0!=b.Ef;c=$("#noticesTmpl").tmpl(c);b.Dl&&$('input[name="notices_pandora"]',c).prop("checked","checked");b.Or&&$('input[name="notices_friends"]',c).prop("checked","checked");b.Nr&&$('input[name="notices_follow"]',c).prop("checked","checked");void 0!=b.Ef&&b.Ef&&$('input[name="notices_artists"]',c).prop("checked", | |
"checked");this.Kb(GA);$(".content_main",this.el).append(c);$(".submit_btn",this.el).bind("click",{qe:this},this.ZL);$("input",c).click(r(this,this.pj));$(this.el).show();return!1},IE:function(){for(var b=this.model.get("currentUser"),c=this.model.get("stationList").models,b=b.pm(),d={},e=[],h=0;h<c.length;h++){var l=c[h],p=l.pm();void 0!=p&&e.push({id:l.e(),label:l.fa(),isChecked:b?p:b})}d.stations=e;d.isGlobalEnabled=b;c=$("#artistMessagesTmpl").tmpl(d);this.Kb(HA);$(".content_main",this.el).append(c); | |
$(".submit_btn",this.el).bind("click",{qe:this},this.JE);$('input[name="global_artist_message"]',c).change({qe:this},this.HE);b&&$('input[name="global_artist_message"]',c).prop("checked","checked");$("input",c).click(r(this,this.pj));$(this.el).show();return!1},fR:function(){this.Kb(IA);(new OA({model:this.model,referrer:"accountUpgrade",el:$(".content_main",this.el),cancelHash:"/account/upgrade"})).render();$(this.el).show();return!1},gG:function(){this.Kb(MA);var b=this.model.get("currentUser"); | |
(b&&b.H()?new tA({model:this.model,el:$(".content_main",this.el),cancelHash:"/account/desktopApp"}):new sA({model:this.model,el:$(".content_main",this.el),cancelHash:"/account/desktopApp"})).render();$(this.el).show();setTimeout(r(this,function(){$(".app_content_right").css("bogus","")}),100);return!1},NE:function(){this.Kb(LA);var b=this.model.get("currentUser");(b&&b.H()?new PA({model:this.model,el:$(".content_main",this.el),cancelHash:"/account/audioQuality"}):new QA({model:this.model,el:$(".content_main", | |
this.el),cancelHash:"/account/audioQuality"})).render();$(this.el).show();return!1},XE:function(){var b=this.model.get("currentUser");if(b&&Pn(b)){var c="App Store";je(b.gk)||(c=b.gk);c=$("#subscriberVendorTmpl").tmpl({subscriberVendor:c,monthlyPrice:dy(co(b)),hidePrice:b.tQ,isUserAUNZ:b.Ta});this.Kb(JA);$(".content_main",this.el).append(c);$(this.el).show()}else b&&b.Sa()&&b.xj?(c=$("#multipassTmpl").tmpl({}),this.Kb(JA),$(".content_main",this.el).append(c),$(this.el).show()):b&&b.Sa()&&"PAYPAL"== | |
b.fs?(c=b.P(),this.w=b.Za(),c=$("#subscriberPaypalTmpl").tmpl({mode:c?"business":b.Sa()?"subscriber":"payToPlay",subscriptionTitle:c?"Pandora for Business":"Pandora One",subscriptionTitleWithTagline:c?"Pandora for Business":"Pandora One - Ad Free, More Skips, and Fewer Timeouts",renewal_period:fy(this.w),renewal_amount:dy(ey(b,this.w)),expirationDate:(new Date((new Date).getTime()+864E5*parseInt(b.sd,10))).format("m/d/yy"),isUserAUNZ:b.Ta,annualPrice:dy(b.oe.toString()),monthlyPrice:dy(co(b)),billingFrequency:this.w, | |
offerAnnualSub:b.Fe,username:b.Pa,showBusinessOffer:!c&&b.Xb}),this.Kb(JA),$(".content_main",this.el).append(c),gy(this.el,b.tf),$(this.el).show()):z.b(vj,b.P()?"business":"p1");s("p1_billing_page_hit",{vendor_id:u},b);return!1},mO:function(){var b=this.model.get("currentUser");s("business_receipt_click",{vendor_id:u},b);z.b(ll,b.s)},previousReceiptDetail:function(){0!=this.Zf&&(this.Zf--,this.gt())},nextReceiptDetail:function(){this.Zf!=this.Dh.length-1&&(this.Zf++,this.gt())},viewReceiptDetails:function(b){b= | |
b.target.id;for(var c in this.Dh)if(this.Dh[c].id==b){this.Zf=c;break}this.gt()},gt:function(){this.Kb(KA);var b=this.Dh[this.Zf];b.moreLink=this.Zf<this.Dh.length-1;b.lessLink=0<this.Zf;var c=(new RA({model:this.model})).render(b,"#receiptDetail").el;$(".content_main",this.el).append(c);c=$("."+KA+"Tab",this.el);c.hasClass("receiptClicked")||c.addClass("receiptClicked");$(this.el).show();s("business_view_receipt",{vendor_id:u,transaction_id:b.transactionId,transaction_date:b.date},this.model.get("currentUser")); | |
V("/account/receipts/view/"+b.id,!0,!0,!0)},exitReceiptDetails:function(){this.ht()},aJ:function(b){this.Dh=b;this.ht()},ht:function(){this.Kb(KA);var b=$("#receiptsTmpl").tmpl({});$("tbody",b).append($("#receiptRow").tmpl(this.Dh));$(".content_main",this.el).append(b);$(this.el).show();V("/account/receipts",!0,!1,!0)},Pd:function(b,c,d){if((c=Wy())&&0<=c.indexOf("/account")||d)this.Kb(JA),d=this.model.get("currentUser"),this.jc=new SA({model:this.model}),c=d.P()?"business":d.Sa()?"subscriber":"payToPlay", | |
b=this.jc.render(b,"#BillingTmpl",c,!1,!1,d.Za(),null).el,$(".content_main .settings_lCol").next().empty(),$(".content_main",this.el).append(b),this.jc.eP(),$("input",this.el).click(r(this,this.pj)),$(".payment_form",this.el).show(),$(this.el).show()},Aq:function(){var b=Wy();if(b&&0<=b.indexOf("/account"))return this.jl=!0,this.Pd({},null,!0),(new X({message:ab()})).render(),!1},cy:function(){var b=this.model.get("currentUser");this.jl=!1;this.w=b.Za();(new X({message:db()})).render();gy(this.el, | |
b.tf);$("#amount.renewal_summary",this.el).text(dy(ey(b,this.w)));$("#period.renewal_summary",this.el).text(fy(this.w))},DI:function(b){this.J&&this.J();b=b&&b.code==m.d.Ve()?ia():Rb(["Please try again later or contact customer support."]);(new X({message:b})).render()},Rx:function(b){this.jl=!1;this.jc&&this.jc.fj(b)},settingsFormSubmit:function(){R(Vw);return!1},Ez:function(){function b(){z.b(wi,{autoShareEnabled:d,autoShareTrackPlay:e,autoShareLikes:h,autoShareFollows:l,userInitiated:!0})}R(Vw); | |
var c="public"==$('input[name="profile_privacy"]:checked',this.el).val(),d=1==$('input[name="autoShare"]:checked',this.el).length,e=1==$('input[name="autoShareListens"]:checked',this.el).length,h=1==$('input[name="autoShareLikes"]:checked',this.el).length,l=1==$('input[name="autoShareFollows"]:checked',this.el).length,p=1==$("input[name=allow_profile_notes]:checked",this.el).length,q=this.model.get("currentUser");c&&(this.model.get("facebookAuthenticated")?b():d&&z.b(lj,r(this,function(c){c&&b()}))); | |
z.b(vi,{isProfilePrivate:!c,disallowComments:!p,optOut:!q.Dl,noNotifyOnNote:!q.Or,noNotifyOnFollow:!q.Nr,artistPromoEmailsEnabled:void 0!=q.Ef?q.Ef:null});this.Bm=null;return!1},ZL:function(b){R(Vw);var c=1==$("input[name=notices_pandora]:checked",this.el).length,d=1==$("input[name=notices_friends]:checked",this.el).length,e=1==$("input[name=notices_follow]:checked",this.el).length,h=1==$("input[name=notices_artists]",this.el).length?1==$("input[name=notices_artists]:checked",this.el).length:null; | |
b=b.data.qe.model.get("currentUser");z.b(vi,{isProfilePrivate:b.qh,disallowComments:b.Jp,optOut:!c,noNotifyOnNote:!d,noNotifyOnFollow:!e,artistPromoEmailsEnabled:h});return!1},JE:function(b){R(Vw);b.data.qe.model.get("currentUser");b=$("input[name=global_artist_message]").is(":checked");var c=[];$("input[name=artist_message]",this.el).each(function(b,e){var h=$(e).attr("data-station-id");c.push({stationId:h,enabled:e.checked})});z.b(uk,[b,c]);return!1},Kb:function(b){var c=this.model.get("currentUser"); | |
$(this.el).empty().append($("#settingsTmpl").tmpl({isSubscriber:c&&(c.Sa()||Pn(c)),inPaymentBackedTrial:c&&c.nh,hasCreditCard:c&&(c.u==m.v.xd()||c.u==m.v.Zh()||c.u==m.v.Qn()||c.u==m.v.zu()||Pn(c)),supportsArtistMessages:void 0!=c.pm(),hasReceipts:c.oy()}));$("."+b+"Tab",this.el).addClass("on")},events:{"click #auto-renew-explanation-showmore":"autoRenewShowMore","click .submit_btn":"accountSubmit","click .set_pp_autorenew":"ppAutoRenewChangeClick","click .bill_freq_input":"billingFrequencyClick", | |
"click #submit_paypal_bill_freq":"ppUpdateBillingFrequency","click .see_details":"seeDetailsClick","click input[name=profile_privacy]":"openProfileClick","change input[name=autoShare]":"autoShareClick","change input[name=autoShareListens]":"autoShareListensClick","change input[name=autoShareLikes]":"autoShareLikesClick","change input[name=autoShareFollows]":"autoShareFollowsClick","click input[name=allow_profile_notes]":"profileNotesClick","click .connectButton":"connectButtonClick","mouseover .connectButton":"connectButtonMouseOver", | |
"mouseout .connectButton":"connectButtonMouseOut","submit .account_settings":"settingsFormSubmit","keyup #password":"passwordKeyup","change .subscription_selection input":"enableSubmit","click #p4b_learn_more":"p4bLearnMoreClick","click #p4b_upgrade":"p4bUpgradeClick","click .viewReceiptDetails":"viewReceiptDetails","click .exitReceiptDetails":"exitReceiptDetails","click .previousReceiptDetail":"previousReceiptDetail","click .nextReceiptDetail":"nextReceiptDetail","click .receiptClicked":"receiptClicked", | |
"click .delete_account_link":"deleteAccountLinkClick","click .cancelDeleteAccount":"cancelDeleteAccountClick","click .confirmDeleteAccount":"deleteAccountConfirmClick","click .deleteAccountCheck":"deleteAccountClick"},receiptClicked:function(){this.ht();$("."+KA+"Tab",this.el).removeClass("receiptClicked");return!1},enableSubmit:function(){$("#submit_paypal_bill_freq",this.el).removeAttr("disabled");return!1},seeDetailsClick:function(){$(".details",this.el).fadeIn();$(".see_details",this.el).hide(); | |
return!1},ppAutoRenewChangeClick:function(b){var c="cancel_pp_subscription"!=b.target.id,d=new kA;d.bind("submit",r(this,function(b){this.ja&&this.ja();this.model.get("currentUser");z.b(yj,[Boolean(c),"",b])}));d.bind("cancel",r(this,function(){(new X({message:cb()})).render()}));c?d.render():(b=new mA({model:this.model}),b.bind("submit",r(this,function(){d.render()})),b.render())},ppUpdateBillingFrequency:function(){var b=new kA;b.bind("submit",r(this,function(b){this.ja&&this.ja();this.model.get("currentUser"); | |
z.b(yj,[Boolean(!0),this.w,b])}));b.bind("cancel",r(this,function(){(new X({message:cb()})).render()}));b.render()},billingFrequencyClick:function(b){this.w=b.target.value},passwordKeyup:function(b){b=$(b.target);var c=b.val();-1!=c.indexOf(this.Ck)&&c!=this.Ck&&b.val(c.replace(this.Ck,""))},openProfileClick:function(){"private"==$('input[name="profile_privacy"]:checked',this.el).val()?this.kv():(this.model.get("currentUser"),$('input[name="autoShare"]',this.el).prop({checked:this.ui,disabled:!1}), | |
$('input[name="autoShareListens"]',this.el).prop("checked",this.xi),$('input[name="autoShareLikes"]',this.el).prop("checked",this.wi),$('input[name="autoShareFollows"]',this.el).prop("checked",this.vi),$('input[name="allow_profile_notes"]',this.el).prop({checked:null!=this.Bm?null!=this.Bm:!0,disabled:!1}),$(".suboptions input",this.el).prop("disabled",!this.ui))},autoShareClick:function(b){if(this.Am(b))return!1;b=$(b.target).is(":checked");$(".suboptions input",this.el).prop("disabled",!b);b&&(this.xi|| | |
this.wi||this.vi||(this.vi=this.wi=this.xi=!0),$('input[name="autoShareListens"]',this.el).prop("checked",this.xi),$('input[name="autoShareLikes"]',this.el).prop("checked",this.wi),$('input[name="autoShareFollows"]',this.el).prop("checked",this.vi));this.ui=b},autoShareListensClick:function(b){if(this.Am(b))return!0;this.xi=this.xq(b)},autoShareLikesClick:function(b){if(this.Am(b))return!0;this.wi=this.xq(b)},autoShareFollowsClick:function(b){if(this.Am(b))return!0;this.vi=this.xq(b)},xq:function(b){this.ui= | |
0<$(".suboptions input:checked").length;$('input[name="autoShare"]',this.el).prop("checked",this.ui);return $(b.target).is(":checked")},Am:function(b){return $(b.target).is(":checked")&&!this.model.get("facebookAuthenticated")?($(b.target).prop("checked",!1),z.b(lj,r(this,function(c){c&&($(b.target).trigger("click"),this.Ez())})),!0):!1},connectButtonClick:function(b){$(b.target).hasClass("facebook")?$(b.target).hasClass("connected")?z.b(mj):z.b(lj):$(b.target).hasClass("connected")?z.b(fj):R(jv)}, | |
connectButtonMouseOver:function(b){b=$(b.target);b.addClass("hover");b.hasClass("connected")&&b.text("Disconnect")},connectButtonMouseOut:function(b){b=$(b.target);b.removeClass("hover");b.hasClass("connected")&&b.text("Connected")},profileNotesClick:function(b){this.Bm=$(b.target).is(":checked")},autoRenewShowMore:function(){$("#auto-renew-explanation-showmore",this.el).hide();$("#auto-renew-explanation",this.el).html(this.ON);return!1},accountSubmit:function(){var b=this.model.get("currentUser"), | |
c=b.Vb,d="no"==$("input[name=explicit_content]:checked",this.el).val(),b=b.Vq;$(".formFieldError",this.el).hide();c&&!d&&b?(c=$("#pinUnlock",this.el).val(),rd(c)&&1<=c.length?this.mR(c):$(".pinUnlockFieldError",this.el).text(Za()).fadeIn()):this.Js()},TN:function(b){this.Hj=b;this.Js()},SN:function(){(new X({message:cb()})).render()},mR:function(b){z.b(Ti,{pin:b})},Js:function(){var b=this.model.get("currentUser"),c=$("#username",this.el).val(),d=$("#password",this.el).val(),e=$("#birthyear",this.el).val(), | |
h=$("#zipcode",this.el).val(),l=$("input[name=gender]:checked",this.el).val(),p="no"==$("input[name=explicit_content]:checked",this.el).val(),q=$("#pin",this.el).val(),t=$("#pinConfirm",this.el).val(),y=$("#rescueEmail",this.el).val(),E=!0;d==this.Ck&&(d=this.Hj,E=!1);$(".formFieldError",this.el).hide();this.IO();var J=!1;jx(c)||($(".usernameFieldError",this.el).text(da()).fadeIn(),$("#username",this.el).addClass("error_border"),J=!0);E&&!kx(d)&&($(".passwordFieldError",this.el).text(fa()).fadeIn(), | |
$("#password",this.el).addClass("error_border"),J=!0);lx(e)||($(".birthYearFieldError",this.el).text(ja()).fadeIn(),$("#birthyear",this.el).addClass("error_border"),J=!0);/^\s*$/.test(h)&&($(".zipCodeFieldError",this.el).text(na()).fadeIn(),$("#zipcode",this.el).addClass("error_border"),J=!0);ox(l)||($(".genderFieldError",this.el).text(ra()).fadeIn(),J=!0);""!=q&&"Enter PIN"!=q&&(rd(q)&&1<=q.length||($(".pinFieldError",this.el).text(Za()).fadeIn(),J=!0),q!=t&&($(".pinFieldError",this.el).text("Pins do not match").fadeIn(), | |
J=!0),""==q||jx(y)||($(".pinFieldError",this.el).text(da()).fadeIn(),J=!0));if(!J){if(null==this.Hj){this.ds=new kA;this.ds.bind("submit",r(this,this.TN));this.ds.bind("cancel",r(this,this.SN));this.ds.render();return}setTimeout(r(this,function(){z.b(ui,{oldusername:b.Pa,oldpassword:this.Hj,newusername:c,newpassword:d,emailOptIn:b.Dl,gender:l,birthYear:Number(e),zipCode:h,contentFilterEnabled:p});this.Hj=null}),0)}return!1},IO:function(){$(".zipCodeFieldError",this.el).removeClass("nag_message_color"); | |
$("#zipcode",this.el).removeClass("nag_border error_border");$(".usernameFieldError",this.el).removeClass("nag_message_color");$("#username",this.el).removeClass("nag_border error_border");$(".birthYearFieldError",this.el).removeClass("nag_message_color");$("#birthyear",this.el).removeClass("nag_border error_border");$("#password",this.el).removeClass("nag_border error_border")},xG:function(b){$(".define_pin",this.el).css("display","none");$(".ask_pin",this.el).css("display","none");var c=b.data.qe.model.get("currentUser"); | |
b=b.target.id;var d=c.Vq;c.Vb?"explicit_no"!=b&&d&&$(".ask_pin",this.el).css("display","inline-block"):"explicit_yes"!=b&&$(".define_pin",this.el).css("display","inline-block")},Rp:function(){z.b(Ui,{});return!1},SH:function(b){pm(Cl,b.ldata.username);$(".submit_btn",this.el).css("opacity","0.5");$(".submit_btn",this.el).css("filter","alpha(opacity=50)");$(".ask_pin",this.el).fadeOut("slow");$(".define_pin",this.el).fadeOut("slow");b=$("#pin",this.el).val();var c=$("#rescueEmail",this.el).val();""!= | |
b&&"Enter PIN"!=b?z.b(Si,{pin:b,rescueEmail:c}):($(".submit_btn",this.el).blur(),$(".saved_text",this.el).css("display","inline").delay(this.Rn).fadeOut(1500))},FK:function(){$(".submit_btn",this.el).blur();$(".submit_btn",this.el).css("opacity","0.5");$(".submit_btn",this.el).css("filter","alpha(opacity=50)");$(".saved_text",this.el).css("display","inline").delay(this.Rn).fadeOut(1500)},MI:function(b){b.explicitPINVerified?this.Js():(new X({message:Gb()})).render()},LI:function(){Mn(this.model.get("currentUser")); | |
$(".submit_btn",this.el).blur();$(".saved_text",this.el).css("display","inline").delay(this.Rn).fadeOut(1500,r(this,function(){$("#pin",this.el).val("");$("#pinConfirm",this.el).val("");$("#rescueEmail",this.el).val("");$("#pinUnlock",this.el).val("")}))},KI:function(){(new X({message:$a()})).render()},HE:function(){this.checked?$('input[name="artist_message"]',this.el).removeAttr("disabled").prop("checked",!0):$('input[name="artist_message"]',this.el).attr("disabled",!0).prop("checked",!1)},jI:function(b){this.jw= | |
!0;this.uf=b},deleteAccountLinkClick:function(){var b=Tx("deleteAccountPopup",$("#deleteAccountConfirmHeaderTmpl").tmpl(),$("#deleteAccountConfirmContentTmpl").tmpl(),$("#deleteAccountConfirmFooterTmpl").tmpl());$(this.el).append(b);b.bind("closed",r(this,function(){$(".select",b).unbind("click");b.remove()}));this.logDeleteEvent("delete_account_tapped");return!1},cancelDeleteAccountClick:function(){Ux();this.logDeleteEvent("are_you_sure_keep_account _tapped")},removeEventListeners:function(){z.pa(this, | |
Vg);z.pa(this,$h)},deleteAccountConfirmClick:function(){Ux();var b=this.model.get("currentUser"),c={},c=b.Sa()||Pn(b)?Tx("deleteAccountPopup",$("#deleteAccountEmailHeaderTmpl").tmpl(),$("#deleteAccountEmailContentTmpl").tmpl(),$("#deleteAccountEmailFooterTmpl").tmpl()):Tx("deleteAccountPopup",$("#deleteAccountPasswordHeaderTmpl").tmpl(),$("#deleteAccountPasswordContentTmpl").tmpl(),$("#deleteAccountPasswordFooterTmpl").tmpl());$(this.el).append(c);c.bind("closed",r(this,function(){this.removeEventListeners; | |
$(".select",c).unbind("click");c.remove()}));this.logDeleteEvent("are_you_sure_delete_account_tapped");return!1},deleteAccountClick:function(){var b=$(this.el).find(".deleteError"),c=$(this.el).find(".emailField").val();b.text("");b.hide();this.logDeleteEvent("are_you_sure_delete_account_tapped");var d=this.model.get("currentUser");z.c(Vg,r(this,function(){this.removeEventListeners;if(d.Sa()||Pn(d)){var b=Tx("deleteAccountPopup",$("#deleteAccountEmailConfirmHeaderTmpl").tmpl(),$("#deleteAccountEmailConfirmContentTmpl").tmpl({email:c}), | |
$("#deleteAccountEmailConfirmFooterTmpl").tmpl());$(this.el).append(b);b.bind("closed",r(this,function(){$(".select",b).unbind("click");b.remove()}))}else{Ux();z.b(pi);for(var h=document.cookie.split(";"),l=0;l<h.length;l++){var p=h[l],q=p.indexOf("=");document.cookie=(-1<q?p.substr(0,q):p)+"=;expires="+(new Date(0)).toUTCString()+"; path=/;"}$.cookie("_sl_toast",Ma());window.location.reload(!0)}}));z.c($h,r(this,function(c){b.text(c);b.show();this.removeEventListeners}));z.b(Ij,{password:$(this.el).find(".passwordField").val(), | |
email:$(this.el).find(".emailField").val(),accountType:d.gk});return!1},logDeleteEvent:function(b){var c=this.model.get("currentUser");b={action:b,H3:c.s||null,b4:u,s3:se,k3:z.ba,u3:"web",t3:"web",o3:(new Date).format("yyyy-mm-dd HH:MM:ss",!0)};s("delete_account_action",b,c);return!1},p4bLearnMoreClick:function(){s("pandoraone_submit_click",{vendor_id:u,action:"business_learn"},this.model.get("currentUser"));setTimeout(function(){R(cv,{source:"one"})},0);return!1},p4bUpgradeClick:function(){s("pandoraone_submit_click", | |
{vendor_id:u,action:"business_upgrade"},this.model.get("currentUser"));setTimeout(function(){R($u,{cancelCallback:function(){V("/account/billing",!0,!1)}})},0);return!1}});function QA(){} | |
QA=Backbone.View.extend({initialize:function(){},el:$("#mainContent .audioQuality"),render:function(){$(this.el).append($("#audioQualitySettingsTmpl").tmpl({normalQualityAudio:!0==km(Yl)}));$(this.el).show()},events:{"click .submit_btn":"saveClick","click #quality_high":"enableSave","click #quality_normal":"enableSave"},enableSave:function(){$(".submit_btn").css("opacity","1.0");$(".submit_btn").css("filter","alpha(opacity=100)")},saveClick:function(){R(Ku,{low:0<$("#quality_normal:checked",this.el).length}); | |
this.SP();return!1},SP:function(){$(".submit_btn",this.el).blur();$(".submit_btn",this.el).css("opacity","0.5");$(".submit_btn",this.el).css("filter","alpha(opacity=50)");$(".saved_text",this.el).css("display","inline").delay(4E3).fadeOut(1E3)}});function PA(){} | |
PA=Backbone.View.extend({initialize:function(){this.Ed=this.options.cancelHash},render:function(){var b=this.model.get("currentUser");s("account_audio_page_hit",{vendor_id:u},b);$(this.el).append($("#audioQualityUpsaleTmpl").tmpl({isUserAUNZ:b.Ta,offerAnnualSub:b.Fe,monthlyPrice:dy(co(b)),annualPrice:dy(b.oe.toString()),showTrial:b.xh,showBusinessOffer:b.Xb})).show();return this},events:{"click #upgrade_now":"upgradeNowClick","click #start_trial":"startTrialClick"},upgradeNowClick:function(){var b=$("input[name='frequency']:checked", | |
this.el).val();R(Vu,{billingFrequency:b,cancelCallback:r(this,function(){V(this.Ed,!0,!0)})});return!1},startTrialClick:function(){V("/one/trial/start",!0,!0)}});function TA(){} | |
TA=Backbone.View.extend({initialize:function(){S(iv,r(this,this.render))},el:$("#mainContent .genres"),render:function(b){var c=b.category;if(null==c||""==c)c="top";var d="/content/genre/"+c,e=b.station;if(e)d+="/"+e;else if($("#genre_stations",this.el).attr("data-category")==c){this.Bz();return}Tz(d,{},r(this,function(b,c){if("success"==c)if(e){var d=$(b).filter("a").data("musicid");$(window).scrollTop(0);$("#mainContent").children().hide();$("#mainContent .station").show();R(Hu,d)}else $(this.el).empty().append(b),this.Bz()}), | |
function(){z.b(Ih)},!0)},Bz:function(){$(".playGenreStation",this.el).show();var b=$(".genre_station_menu li.selected",this.el).find(".genreCategory");0<b.length&&(b=b.attr("data-code"),R(Xw,{gcat:b}));b="/music/"+$("#genre_stations",this.el).attr("data-category");Wy()!=b&&V(b,!1,!1)},events:{"click ul > a":"genreClick","click .playGenreStation":"playGenreStationClick"},playGenreStationClick:function(b){var c=this.model.get("currentUser");if((null==c||c.p())&&az(this.model))return R(rv,{onSuccessRedirect:Wy()}), | |
!1;b=$(b.target).attr("data-musicid");z.b(Di,{stationCode:"mi"+b,source:"genre"});return!1},genreClick:function(b){var c=$(b.target).attr("data-code");c&&$(b.target).hasClass("selected")&&R(Xw,{gcat:c});return!0}});function DA(b,c){this.Wh=$("img:first",b);this.Qa=$(".listenerstip_container",b).show().css("visibility","hidden");this.Zb=this.Nb=null;this.qR=c.viewerIsAnon;c.viewerListenerId&&0<$(".follow_button[data-listenerid='"+c.viewerListenerId+"']",b).length||($(this.Wh).hover(r(this,this.Vf),r(this,this.Wf)),z.c(Nf,r(this,this.Dq)),z.c(Rf,r(this,this.Pq)),z.c(Of,r(this,this.Qq)),S(wu,r(this,this.hide)))} | |
function Uz(b,c){null!=c&&ie(c.Y)&&$(".listener[data-webname='"+c.Y+"']",b).remove();var d=$("#listeners_grid .listener",b),e=d.length;if(9>=e)$("#listeners_grid .listener",b).show();else for(;9>$("#listeners_grid .listener:visible",b).length;)$(d[parseInt(Math.random()*e,10)]).show();$("#listeners_grid .listener:visible",b).each(function(b,d){new DA($(d),{viewerIsAnon:null==c||c.p()})})}f=DA.prototype; | |
f.Vf=function(){this.Zb?this.Ai():(this.hc(),this.Nb=setTimeout(r(this,function(){this.hc();this.show()}),500));return!1};f.Wf=function(){this.hc();this.Zb||(this.Zb=setTimeout(r(this,function(){this.Ai();this.hide()}),500));return!1};f.hc=function(){null!=this.Nb&&(clearTimeout(this.Nb),this.Nb=null)};f.Ai=function(){this.Zb&&(clearTimeout(this.Zb),this.Zb=null)}; | |
f.show=function(){if(!this.visible){this.visible=!0;$(document.body).append(this.Qa.remove());$(this.Qa).hover(r(this,this.Vf),r(this,this.Wf));$(".follow_button",this.Qa).click(r(this,this.wM));$(".profile_name",this.Qa).click(r(this,this.hide));$(".album",this.Qa).click(r(this,this.hide));$(this.Qa).hide();$(this.Qa).css("visibility","visible");$(this.Qa).fadeIn(200);var b=this.Wh.offset(),c=b.left-17+this.Wh.outerWidth()/2,b=b.top-(this.Qa.height()+8)+this.Wh.scrollTop();0<=c&&0<=b&&$(this.Qa).offset({top:b, | |
left:c});$(".album_cvr a",this.Qa).each(function(b,c){if(0==$("img",c).length){var h=$(c).attr("data-img");$(c).html('<img src="'+h+'" width="50" height="50">')}});R(nv,this.Qa)}};f.hide=function(){this.visible&&(this.visible=!1,$(this.Qa).fadeOut(200,r(this,function(){if(0<$(this.Wh).length)try{$(this.Wh).append(this.Qa.remove())}catch(b){k.debug("failed to return hovercard to its original position")}})),R(ov,this.Qa))}; | |
f.wM=function(b){if(this.qR)R(rv);else{if(!$(b.target).hasClass("cannotFollow")){var c=$(b.target).data("webname");$(b.target).hasClass("followable")?z.b(Ej,{webName:c,ui_id:"fans"}):$(b.target).hasClass("following")?z.b(Fj,{webName:c,ui_id:"fans"}):$(b.target).hasClass("blocked")?(b=$(b.target).attr("data-listenerid"),z.b(Hj,b)):k.error("Unhandled follow state: ",$(b.target))}return!1}}; | |
f.Dq=function(b){var c=$(".follow_button",this.Qa);b.webName==c.data("webname")&&(c.removeClass("followable"),c.addClass("following"),c.removeClass("hover"))};f.Qq=function(b){var c=$(".follow_button",this.Qa);b.webName==c.data("webname")&&(c.removeClass("following"),c.addClass("followable"),c.removeClass("hover"))};f.Pq=function(b){var c=$(".follow_button",this.Qa);b==c.attr("data-listenerid")&&(c.removeClass("blocked"),c.addClass("followable"),c.removeClass("hover"))};function CA(b,c){this.Ar=b;this.DG=b.attr("feedId");this.s=b.attr("listenerId");this.QN=b.attr("ownerName");this.Y=b.attr("webName");this.Mw="true"==b.attr("deleteCompletely");this.hr=c;this.el=$("#feedHideMenuTmpl").tmpl({listenerId:this.s,ownerName:this.QN,isComment:this.Mw});$(".feed_unfollow",this.el).truncate({width:120});b.click(r(this,this.Vf));b.mouseout(r(this,this.Wf));this.el.hover(r(this,this.Vf),r(this,this.Wf));$(".feed_hide_post",this.el).click(r(this,this.OK));$(".feed_unfollow",this.el).click(r(this, | |
this.Nt));$(".feed_report_spam",this.el).click(r(this,this.DO));$(".block_user",this.el).click(r(this,this.ZE));$("body").append($(this.el));this.el.css("visibility","hidden")}f=CA.prototype;f.Vf=function(){this.Zb?this.Ai():(this.hc(),this.Nb=setTimeout(r(this,function(){this.hc();this.show()}),200));return!1};f.Wf=function(){this.hc();this.Zb||(this.Zb=setTimeout(r(this,function(){this.Ai();this.hide()}),500));return!1};f.hc=function(){null!=this.Nb&&(clearTimeout(this.Nb),this.Nb=null)}; | |
f.Ai=function(){this.Zb&&(clearTimeout(this.Zb),this.Zb=null)};f.show=function(){$(this.el).attr("visible",!0);this.position();$(this.el).hide();$(this.el).css("visibility","visible");$(this.el).fadeIn(200)};f.hide=function(){$(this.el).attr("visible",!1);$(this.el).fadeOut(200,r(this,function(){$(this.el).css("visibility","hidden");$(this.el).show()}))};f.position=function(){var b=this.Ar.offset();$(this.el).offset({top:b.top+this.Ar.height()-1,left:b.left-this.el.width()+this.Ar.width()})}; | |
f.OK=function(){z.b(gj,{feedId:this.DG,isActivityDelete:this.hr,deleteCompletely:this.Mw});this.hide();return!1};f.Xq=function(){z.b(hj,this.s);this.hide();return!1};f.Nt=function(){z.b(Fj,{webName:this.Y,ui_id:null,listenerId:this.s});this.hide();return!1};f.DO=function(){window.open("/legal/community-guidelines","_blank");this.hide();return!1};f.ZE=function(){z.b(Gj,this.s);this.hide();return!1};function UA(){} | |
UA=Backbone.View.extend({initialize:function(){var b=this.options.path;0==b.indexOf("/music/")?(b=fe(b),this.xb={type:"profile",subtype:"fansOfGenreStation",content:"true",q:b[1]+"/"+b[2]}):0==b.indexOf("/station/")?this.xb={type:"profile",subtype:"fansOfStation",content:"true",q:b.split("/")[2]}:this.xb={type:"profile",subtype:"fansOfArtist",content:"true",q:fe(b)[0]}},render:function(){R(Tw);Tz("/content/fansof.vm",this.xb,r(this,this.uM));return this},close:function(){Oz(this)},events:{"click .listeners_menuItem":"menuItemClick", | |
"click .createStation":"createStationClick","click .more":"moreClick"},uM:function(b){$(this.el).append(b);b=$(".backstage",this.el).attr("data-canonical");ie(b)&&-1==Wy().indexOf(b)&&V(b,!1,!1)},menuItemClick:function(b){b=b.target.id;$(".listeners_content_title").text(b);$(".listeners_menuItem").toggleClass("selected",!1);$(".listeners_menuItem[id='"+b+"']").toggleClass("selected",!0);return!1},createStationClick:function(b){var c=$(b.target).attr("data-station-id");b=$(b.target).attr("data-music-id"); | |
ie(c)?z.b(Di,{stationCode:"fs"+c}):ie(b)&&z.b(Di,{stationCode:"mi"+b});return!1},moreClick:function(b){$(b.currentTarget).fadeOut();var c=$(b.currentTarget).attr("data-currentoffset"),d=$(b.currentTarget).attr("data-nextoffset");c&&d?(this.xb.countRowsOnBrowser=c,this.xb.countRowsNeeded=d,Tz("/content/fansof.vm",this.xb,r(this,function(b){$(".sections",this.el).append(b)}))):$(b.currentTarget).closest(".section_page").next().fadeIn();return!1}});function VA(){} | |
VA=Backbone.View.extend({initialize:function(){S(Tu,r(this,this.SJ));S(Uu,r(this,this.Hq))},el:$("#mainContent .capping"),SJ:function(){var b=$("#CapInfoTmpl").tmpl();$(this.el).empty().append(b);$("#mainContent").children().hide();$(this.el).show()},Hq:function(){var b={},c=this.model.get("currentUser"),d=Wy();d&&(0<=d.indexOf("/payment")||0<=d.indexOf("paypal/confirm"))||(b.capHours=c.Br,b.username=c.Pa,b.nextMonth=oy.wH(),b=$("#CapReachedTmpl").tmpl(b),$(this.el).empty().append(b),$("#mainContent").children().hide(), | |
$(this.el).show())},events:{"click .upgrade_now":"upgradeFromInfoClick","click .upgrade_btn":"upgradeFromCapClick","click .free_trial":"freeTrailClick","click .pay_99":"pay99Click","click .keep_listening":"keepListeningClick"},upgradeFromInfoClick:function(){R(Vu,{billingFrequency:"ANNUAL",cancelCallback:r(this,function(){R(Tu)})});return!1},upgradeFromCapClick:function(){R(Vu,{billingFrequency:"ANNUAL",cancelCallback:r(this,function(){R(Uu)})});return!1},freeTrailClick:function(){k.error("freeTrail: Not yet implemented"); | |
return!1},pay99Click:function(){R(ev,r(this,function(){V("",!1,!1);R(Uu)}));return!1},keepListeningClick:function(){R(yu);return!1}});function WA(){}WA=Backbone.View.extend({initialize:function(){this.message=this.options.message;this.bind("close",r(this,this.close))},className:"modal_please_wait",render:function(){$(this.el).append($("#modalPleaseWaitTmpl").tmpl(this.message));return this},close:function(){$(this.el).remove();this.el=null;z.pa(this)}});function XA(){} | |
XA=Backbone.View.extend({initialize:function(){this.w="MONTHLY";S(Vu,r(this,this.ZJ));S($u,r(this,this.XJ));S(bv,r(this,this.YJ));S(av,r(this,this.yJ));S(ev,r(this,this.RJ));z.c(Ef,r(this,this.Pd));z.c(Ff,r(this,this.fj));z.c(Lf,r(this,this.fj));z.c(Mf,r(this,this.Aq));dz("/payment");dz("/payment/business")},el:$("#mainContent .payment"),ZJ:function(b){this.xb=!1;b&&(this.xb=!0,this.Rc=b.cancelCallback);V("/payment",!0,!0)},XJ:function(b){this.xb=!1;b&&(this.xb=!0,this.Rc=b.cancelCallback);V("/payment/business", | |
!0,!0)},YJ:function(){this.xb||(this.Rc=function(){R(yu)});var b=this.model.get("currentUser");b&&b.Za()&&"END_OF_MONTH"!=b.Za()&&(this.w=b.Za());b&&b.Xb&&b.u==m.v.xd()?setTimeout(function(){R(Wu)},0):b&&b.Xb?b.Sq?(s("business_payment_page_hit",{vendor_id:u},this.model.get("currentUser")),z.b(vj,"business")):((new X({message:pd()})).render(),setTimeout(function(){R(cv,{showBusinessInfoForm:!0})},0)):setTimeout(function(){R(yu)},0)},yJ:function(){if(!this.xb){this.Rc=function(){R(yu)};var b=this.model.get("currentUser"); | |
b&&b.Za()&&"END_OF_MONTH"!=b.Za()&&(this.w=b.Za())}s("payment_page_hit",{vendor_id:u},this.model.get("currentUser"));z.b(vj,"p1")},RJ:function(b){V("/payment/99",!0,!0);this.w="END_OF_MONTH";this.Rc=b},Pd:function(b){if(-1!=$.inArray(Wy(),["/payment","/payment/business","/payment/99"])){var c={99:"payToPlay",p1:"subscriber",p1gift:"p1gift",business:"business"}[b.ctx];c?($("#mainContent").children().hide(),this.jc=new SA({model:this.model,showPleaseWait:r(this,this.ja),hidePleaseWait:r(this,this.J)}), | |
b=this.jc.render(b,"#PaymentTmpl",c,!0,!0,this.w,r(this,function(){this.jc=null;this.Rc&&this.Rc()})).el,$(this.el).empty().append(b).show(),(b=this.model.get("currentUser"))&&b.gs?($("#paypal_form",this.el).hide(),$("#paypal_select_container",this.el).hide(),$("#credit_select",this.el).prop("checked",!0),$("#creditcard_form",this.el).show()):"payToPlay"==c&&($("#credit_select").prop("checked",!0),$("#paypal_form",this.el).hide(),$("#creditcard_form",this.el).show())):k.error("Unknown payment context: ", | |
b.ctx)}},Aq:function(){if(-1!=$.inArray(Wy(),["/payment","/payment/business","/payment/99"]))return this.Pd({ctx:"p1"}),(new X({message:ab()})).render(),!1},ja:function(){this.T||($(window).scrollTop(0),this.T=new WA({model:this.model,message:id()}),$("#main").append(this.T.render().el))},J:function(){this.T&&(this.T.trigger("close"),this.T=null)},fj:function(b){if("/account/billing"!=Wy()&&this.jc){this.model.set({capped:!1,blueBarMessage:null});z.b(ai);var c=null;if(b.lastGiftCode)V("/showgift/"+ | |
b.lastGiftCode+"."+b.lastGiftHash,!1,!1);else{R(yu);var d=b.listenerState;if("PAY_TO_PLAY"==d)c=ld();else if("SUBSCRIBER"==d){if(d=this.model.get("currentUser"))c=$.trim($("#period_amount",this.el).text()),d=rl.encrypt(d.s),wp("https://4177752.fls.doubleclick.net/activityi;src=4177752;type=purch024;cat=purch865;qty=1;;ord=;cost="+c+";u1="+d,function(){},function(){});c=jd();z.b(jg)}else"BUSINESS"==d&&(c=kd(),z.b(kg),setTimeout(function(){R(Yu)},0))}this.jc.fj(b,c);$(this.jc.el).remove();this.jc=null}}, | |
events:{"click #paypal_select":"paypalSelect","click #credit_select":"creditCardSelect"},paypalSelect:function(){s("payment_paypal_select",{vendor_id:u},this.model.get("currentUser"));$("#creditcard_form",this.el).hide();$("#paypal_form",this.el).show()},creditCardSelect:function(){s("payment_creditcard_select",{vendor_id:u},this.model.get("currentUser"));$("#paypal_form",this.el).hide();$("#creditcard_form",this.el).show()}});function YA(){} | |
YA=Backbone.View.extend({initialize:function(){this.ij=this.options.hashTag;z.c(th,r(this,this.HI));dz("/norenew");this.bind("close",r(this,this.close))},className:"expired_account_container clearfix",render:function(){var b=this.model.get("currentUser"),b={payment_method:b.fs,monthlyPrice:dy(co(b)),isUserAUNZ:b.Ta};$(this.el).append($("#expiration-"+this.ij+"Tmpl").tmpl(b));$(window).scrollTop(0);$("#footer .browseGenres").hide();"subscribe"==this.ij&&(b=this.model.get("currentUser"),s("subexp_viewed", | |
{isTrial:"true"},b));return this},close:function(){$(this.el).remove();this.el=null;$("#footer .browseGenres").show();z.pa(this)},HI:function(){},events:{"click .confirm":"confirmClick","click .nothanks":"noThanksClick","click .continue":"continueClick","click .noaction":"noactionClick"},confirmClick:function(){var b=this.model.get("currentUser"),c=r(this,function(){V("/"+this.ij,!0,!0)});fo(b)?R($u,{cancelCallback:c}):R(Vu,{billingFrequency:b.Za(),cancelCallback:c});"subscribe"==this.ij&&s("subexp_sub_clicked", | |
{isTrial:"true"},b);return!1},noThanksClick:function(){this.model.set({blueBarMessage:null});$(this.el).fadeOut(200,r(this,function(){$(this.el).empty().append($("#renewalNoThanksTmpl").tmpl()).fadeIn()}));if("subscribe"==this.ij){var b=this.model.get("currentUser");s("subexp_cancel_clicked",{isTrial:"true"},b)}V("/norenew",!1,!0);return!1},continueClick:function(){var b=this.model.get("currentUser");b&&b.tb==m.sa.ko()?(z.b(al),b.tb=null,z.b(Pf,b),s("coderot_check",{coderot_id:"a6877ffc-a4a3-11e3-be40-425861b86ab6"}, | |
b)):b&&!b.Bt&&z.b(Cj);return!0},noactionClick:function(){R(yu);return!0}});function ZA(){} | |
ZA=Backbone.View.extend({initialize:function(){this.Wb=!1;this.w="MONTHLY";this.bb={};S(zv,r(this,this.gz));S(fx,r(this,this.kh));z.c(Ee,r(this,this.Of));z.c(De,r(this,this.$a));z.c(Og,r(this,this.Hb));z.c(fh,r(this,this.CI));z.c(Ef,r(this,this.Pd));z.c(Wf,r(this,this.bJ));z.c(sh,r(this,this.BI));z.c(Vh,r(this,this.AI));z.c(xk,r(this,this.gK));z.c(Wh,r(this,this.Wx))},el:$("#mainContent .redemption"),render:function(b){b&&(this.Gb=b);this.Id()},Id:function(){$("#mainContent").children().hide();this.model.set({modalPanel:iu}); | |
var b=this.model.get("currentUser");if(b.p())if(this.model.get("hasStations")){var c=this.model.get("stationList").pluck("stationName");c.shift();b=$("#hasStationsTmpl").tmpl({stations:c});$("#mainContent .redemption").empty().append(b).show();$("#noBtn").click(r(this,function(){this.R="newUser";z.b(ti)}));$("#yesBtn").bind("click",this,this.fz)}else b=$("#redeemChoicesTmpl").tmpl({stations:c}),$("#mainContent .redemption").empty().append(b).show(),$("#existingUserBtn").click(r(this,this.Xp)),$("#newUserBtn").click(r(this, | |
this.fz));else b=$("#redeemSignedInTmpl").tmpl({username:b.Pa}),$("#mainContent .redemption").empty().append(b).show(),$("#redeemSignedInBtn").click(r(this,this.UP)),$("#notMeLink").click(r(this,this.Mr))},jj:function(){$("#mainContent .redemption").empty()},xf:function(){this.render();return!1},ja:function(){this.T||($(window).scrollTop(0),this.T=new WA({model:this.model,message:id()}),$("#main").append(this.T.render().el))},J:function(){this.T&&(this.T.trigger("close"),this.T=null)},Of:function(){"redeem"== | |
this.R?(setTimeout(r(this,function(){z.b(Qj,this.Gb)}),500),this.R=null,this.Gr=!0):this.jj()},$a:function(){if(!this.R)this.jj();else if("logout"==this.R)this.R=null,setTimeout(r(this,function(){z.b(qi,this.mi);this.mi=null;this.R="redeem"}),300);else if("newUser"==this.R||"existingUser"==this.R)this.R=null,setTimeout(r(this,function(){this.Id()}),300)},CI:function(b){this.R&&(k.info("reg failed: "+b),this.R=null,(new X({message:Mb()+b})).render(),this.Id())},UP:function(){if(this.Gb)z.b(Qj,this.Gb); | |
else{var b={},c=this.model.get("currentUser");if(c&&Pn(c)){b.vendorBilledTmpl="#vendorBilledTmpl";var d="Third Party Vendor";c.gk&&(d=c.gk);b.vendor=d}$("#mainContent").find(".redemption").empty().append($("#redeemNowTmpl").tmpl(b));$(".redeem_field").click(this.Fg);$("#redeemNowBtn").click(r(this,function(){this.Gb=$("#giftcode").val().trim();vx(this.Gb)?z.b(Qj,this.Gb):$(".error").text(jb()).fadeIn()}));$("#goBackBtn").click(r(this,function(){this.xf()}))}return!1},Mr:function(){$A("/giftredeem"); | |
z.b(pi);return!1},Oi:function(){var b=$("#giftcode").val().trim(),c=$("#email").val(),d=$("#password").val(),e=$("#birthyear").val(),h=$("#zipcode").val(),l=$("input[name=gender]:checked").val(),p=$("input[name=optin]").is(":checked"),q=$("input[name=terms]").is(":checked"),t=$("input[name=remember]").is(":checked"),y=!1;vx(b)||($("#codeError").text(jb()).fadeIn(),y=!0);jx(c)||($("#emailError").text(kb()).fadeIn(),y=!0);kx(d)||($("#passwordError").text(lb()).fadeIn(),y=!0);lx(e)?mx(e)||($("#birthyearError").text(ma()).fadeIn(), | |
y=!0):($("#birthyearError").text(ma()).fadeIn(),y=!0);nx($o(),h)||($("#zipcodeError").text(ap()).fadeIn(),y=!0);ox(l)||($("#genderError").text(ra()).fadeIn(),y=!0);q||($("#termsError").text(qa()).fadeIn(),y=!0);y||(this.Gb=b,b={username:c,password:d,birthYear:Number(e),zipCode:h,emailOptIn:p,gender:l,keepLoggedIn:t},"logout"==this.R?(this.mi=b,z.b(pi)):(this.model.set({modalPanel:"REDEMPTION_PANEL"}),z.b(qi,b)));return!1},fz:function(){$("#mainContent .redemption").empty().append($("#redeemRegisterTmpl").tmpl({giftcode:this.Gb})); | |
$("#redeemNowBtn").click(r(this,function(){this.R="redeem";this.Oi()}));$("#goBackBtn").click(r(this,function(){this.R=null;this.xf()}));$(".redeem_field").click(r(this,this.Fg));return!1},gz:function(){$("#mainContent .redemption").empty().append($("#redeemRegisterTmpl").tmpl({giftcode:this.Gb}));$(".redeem_field").click(this.Fg);$("#redeemNowBtn").click(r(this,function(){this.R="logout";this.Oi()}));$("#goBackBtn").click(r(this,function(){this.R=null;this.xf()}));return!1},Xp:function(){this.R= | |
"existingUser";R(rv,{giftRedemptionMode:!0,allowWhenLoggedIn:!0,onSuccessRedirect:Wy()});return!1},Pd:function(b){if("/gift"==Wy()){var c=this.model.get("currentUser");b=b.cdata;for(var d={years:[],months:[]},e=(new Date).getFullYear(),h=0;12>h;h++)d.years.push(e+h),9>h?d.months.push("0"+(h+1)):d.months.push(h+1);null==b?(d.zipcode="",nx($o(),c.wb())?d.zipcode=c.wb():d.zipcode=""):(d.customerName=b.customerName,d.zipcode=b.zipcode,d.displayableCardNumber=b.displayableCardNumber,d[b.cardCompany.toLowerCase()]= | |
"checked",d.expirationMonth=b.expirationMonth,d.expirationYear=b.expirationYear);d.billingFrequency=this.w?this.w:"MONTHLY";d.offerAnnualSub=c.Fe;d.trialDuration=c.uz.toString();d.monthlyPrice=dy(co(c));d.annualPrice=dy(c.oe.toString());d.isUserAUNZ=c.Ta;d.isV2="V2"===c.hk;b=$("#GiftPaymentTmpl").tmpl(d);$(this.el).empty().append(b);c.gs&&($("#paypal_form",this.el).hide(),$("#paypal_select_container",this.el).hide());$(this.el).show()}},BI:function(b){var c=b.code;b=new X({message:Lb()+b.message}); | |
c==m.d.IB()?z.b(vj,"PaymentBackedGift"):(this.Gr?(this.Gr=!1,b.render(),c!=m.d.Un()&&c!=m.d.Vn()||this.Id()):b.render(),this.Gb=null);return!1},bJ:function(){var b=ib(),c;c=this.model.get("currentUser").sd;365<c&&(b=new Date,b.setDate(b.getDate()+c),b=hb([b.toDateString()]));this.J&&this.J();(new X({message:b})).render();this.Gr?this.model.set({modalPanel:"REGISTERED_PANEL"}):(this.model.set({modalPanel:iu}),R(yu));this.Gb=null;return!1},gK:function(b){(b=b.redirectUrl)?window.location.href=b:this.Wx()}, | |
AI:function(b){(new X({message:b})).render();this.J&&this.J()},Wx:function(){var b=oc();(new X({message:b})).render();this.J&&this.J()},events:{"click .bill_freq_input":"billingFrequencySelect","click #paypal_select":"paypalSelect","click #credit_select":"creditCardSelect","click #redeem_gift_pp":"redeemGiftPP","click #redeem_gift_cc":"redeemGiftCC","focusout #zip":"zipcodeFocus","keyup #zip":"zipcodeFocus","blur #zip":"zipcodeFocus","change #zip":"zipcodeFocus","focus .payment_field_validated":"clearErrors", | |
"keyup .payment_field input":"inputModified","change .payment_field select":"inputModified","change .subscription_selection input":"inputModified"},billingFrequencySelect:function(b){this.w=b.target.value},paypalSelect:function(){$("#creditcard_form",this.el).hide();$("#paypal_form",this.el).show()},creditCardSelect:function(){$("#paypal_form",this.el).hide();$("#creditcard_form",this.el).show()},inputModified:function(b){if(!this.Wb)return this.Wb=!0,this.enableSubmit(b)},zipcodeFocus:function(){this.gc("ANNUAL", | |
"ANNUAL");this.gc("MONTHLY","MONTHLY");return!0},enableSubmit:function(b){!this.Wb||this.Ae()||$(b&&b.target).hasClass("zipcode")||$(".pay_now",this.el).removeAttr("disabled");return!1},clearErrors:function(b){$(b.target).siblings(".paymentFieldError").hide();$(b.target).siblings(".formFieldError").hide()},redeemGiftPP:function(){1==$("input[name='agreePP']:checked",this.el).length!=!0?$(".agreePPFieldError",this.el).text(bd()).fadeIn():(this.ja&&this.ja(),$(window).scrollTop(0),z.b(wk,[this.Gb,this.w, | |
Yo()]));return!1},redeemGiftCC:function(){this.model.get("currentUser");var b=$.trim($("input[name='name']",this.el).val()),c=$("input[name='cardnumber']",this.el).val(),d=tx(c),e=$("select[name='expirationdate_month'] option:selected",this.el).val(),h=$("select[name='expirationdate_year'] option:selected",this.el).val(),l=$("input[name='securitycode']",this.el).val(),p=$("input[name='zipcode']",this.el).val(),q=1==$("input[name='agreeCC']:checked",this.el).length,t=Yo(),y=this.ve(b,d,p,l,c,e,h); | |
!0!=q&&($(".agreeCCFieldError",this.el).text(bd()).fadeIn(),y.push(bd()));0==y.length?(this.ja&&this.ja(),z.b(vk,[this.Gb,this.w,d,b,c,Number(e),Number(h),l,p,t])):(new X({message:y.join("<br>")})).render();return!1},Kg:function(){$("#redeem_gift_cc",this.el).attr("disabled","disabled")},ve:function(b,c,d,e,h,l,p){$(".paymentFieldError",this.el).hide();$(".formFieldError",this.el).hide();var q=[];if(null==b||0==b.length)$(".nameFieldError",this.el).text(gd()).fadeIn(),q.push(gd());nx($o(),d)||($(".zipcodeFieldError", | |
this.el).text(ap()).fadeIn(),q.push(ap()));px(e)||($(".securitycodeFieldError",this.el).text(cd()).fadeIn(),q.push(cd()));qx(h)&&sx(c)||($(".cardNumberFieldError",this.el).text(ed()).fadeIn(),q.push(ed()));ux(l,p)||($(".expriationFieldError",this.el).text(fd()).fadeIn(),q.push(fd()));return q},Ae:function(){return this.bb&&0<Object.keys(this.bb).length},gc:function(b,c){if(b&&b.length){$("#salestax_amount."+c,this.el).html("");var d=$("input[name='zipcode']",this.el).val(),e=this.model.get("currentUser"); | |
if(d&&d.length==(e.Ta?4:5)){if(c in this.bb)return;this.bb[c]=!0;R(ex,new Py(d,b,c,!1))}this.Kg()}},kh:function(b){if("/gift"==Wy()){var c=b.tax,d=b.token;b=b.amount;try{c&&b&&($("#salestax_amount."+d,this.el).html(dy(c)),this.Rj[d]=c)}catch(e){}finally{delete this.bb[d],this.Ae()||this.enableSubmit(null)}}},Hb:function(){this.J&&this.J()}});function OA(){} | |
OA=Backbone.View.extend({initialize:function(){this.referrer=this.options.referrer;this.Ed=this.options.cancelHash},render:function(){s("account_upgrade_page_hit",{vendor_id:u},this.model.get("currentUser"));R(Yw);var b=this.model.get("currentUser");$(this.el).append($("#upgradeTmpl").tmpl({isUserAUNZ:b.Ta,monthlyPrice:dy(co(b)),showTrial:b.xh,showBusinessOffer:b.Xb}))},events:{"click #start_trial":"startTrialClick","click #upgrade_now":"upgradeNowClick","click #learn":"learnMoreClick"},startTrialClick:function(){V("/one/trial/start", | |
!0,!0)},upgradeNowClick:function(){var b=this.model.get("currentUser");if(null==b||b.p())return R(rv,{onSuccessRedirect:"/payment"}),!1;R(Vu,{cancelCallback:r(this,function(){V(this.Ed,!0,!0)})});return!1},learnMoreClick:function(){R(Lw);return!0}});function SA(){} | |
SA=Backbone.View.extend({initialize:function(){this.Yw=!0;this.jr=!1;this.ja=this.options.showPleaseWait;this.J=this.options.hidePleaseWait;this.bb={};this.Rj={};this.P=this.pp=this.Wb=this.Q3=!1;z.c(fk,r(this,this.iK));z.c(Ph,r(this,this.bj));z.c(uh,r(this,this.Cq));z.c(zh,r(this,this.Cq));z.c(vh,r(this,this.Cq));z.c(Og,r(this,this.Hb));S(fx,r(this,this.kh))},render:function(b,c,d,e,h,l,p){b=b.cdata;this.P="business"==d;this.Yw=e;this.jr=h;this.Rc=p;var q=this.model.get("currentUser");this.w="#PaymentTmpl"=== | |
c||"#RenewalTmpl"===c?l:q.Za();""==this.w&&q.rm&&(this.w="ANNUAL");e={years:[],months:[]};h=(new Date).getFullYear();for(l=0;12>l;l++)e.years.push(h+l),9>l?e.months.push("0"+(l+1)):e.months.push(l+1);e.mode=d;e.payText="#RenewalTmpl"===c?"Renew Now":"Pay Now";e.showTerms="#PaymentTmpl"===c;e.showCancelButton=null!=this.Rc;e.showPayButton="#BillingTmpl"!=c;e.monthlyPrice=dy(co(q));e.annualPrice=dy(q.oe.toString());e.businessMonthlyPrice=dy(q.ol.toString());e.businessAnnualPrice=dy(q.nl.toString()); | |
e.renewal_amount=dy(ey(q,this.w));e.renewal_period=fy(this.w);e.isUserAUNZ=q.Ta;e.offerAnnualSub=q.Fe||q.P();e.expirationDate=(new Date((new Date).getTime()+864E5*parseInt(q.sd,10))).format("m/d/yy");e.expiredSubscriber="EXPIRED_SUBSCRIBER"==q.u;e.showPaypalOrderConfirmScreen=Oo();e.username=q.Pa;e.billingFrequency=this.w;e.isV2="V2"===q.hk;e.subscriptionTitle=this.P?"Pandora for Business":"Pandora One";e.subscriptionTitleWithTagline=this.P?"Pandora for Business":"Pandora One - Ad Free, More Skips, and Fewer Timeouts"; | |
e.showBusinessOffer=!this.P&&q.Xb;e.showBusinessLink=!this.P&&q.Xb;d=!1;(this.Uq=null!=b)?(d=b.autoRenew,e.customerName=b.customerName,e.zipcode=b.zipcode,e.displayableCardNumber=b.displayableCardNumber,e[b.cardCompany.toLowerCase()]="checked",e.expirationMonth=b.expirationMonth,e.expirationYear=b.expirationYear,b=$(c).tmpl(e),$("#delete_card",b).show(),$("#delete_card",b).click(r(this,function(){confirm("Are you sure?")&&z.b(Vj,null);return!1}))):(e.zipcode="",nx($o(),q.wb())?e.zipcode=q.wb():e.zipcode= | |
"",b=$(c).tmpl(e));gy(b,d);"#BillingTmpl"!=c&&"END_OF_MONTH"==this.w&&$("#end_of_month_select",b).hide();this.el&&$(this.el).empty();$(this.el).append(b);$(".payment_summary",this.el).hide();$(".payment_summary."+this.w,this.el).show();this.gc(this.w,"renewal_summary");this.zipcodeFocus(null);var t=this.el,y=this.P;$(window).on("unload",function(){var b=$("input[name='cardnumber']",t).val();s(y?"business_abandon_cart":"p1_abandon_cart",{vendor_id:u,card_name_empty:!$.trim($("input[name='name']",t).val()), | |
card_empty:!b,cvv_empty:!$("input[name='securitycode']",t).val(),zip_empty:!$("input[name='zipcode']",t).val(),payment_type:$("#paypal_select:checked").val()?"paypal":tx(b)},q);np(null)});return this},eP:function(){$(".payment_form")},iK:function(b){(b=b.redirectUrl)?window.location.href=b:(b=jc(),(new X({message:b})).render(),this.J&&this.J())},bj:function(b){var c=jc();b&&b.code==m.d.Dk()&&(c=Qb());(new X({message:c})).render();this.J&&this.J()},Hb:function(){this.J&&this.J()},Cq:function(b){this.J&& | |
this.J();var c=Nb();b&&(b.code==m.d.xB()?c=Ob():b.code==m.d.wB()?c=hd():b.code==m.d.nC()?c=Pb():b.code==m.d.Ve()?c=ia():b.code==m.d.Dk()&&(c=Qb()));(new X({message:c})).render();z.b(vj,this.P?"business":"p1")},fj:function(b,c){this.Uq=!0;this.pp=this.Wb=!1;this.Kg();var d=jQuery.trim($(".settings_rCol .payment_form input[name='cardnumber']").val());if(4<d.length){for(var e="",h=0;h<d.length-8;h++)e+="*";$(".settings_rCol .payment_form input[name='cardnumber']").val(d.substring(0,4)+e+d.substring(d.length- | |
4))}$(".settings_rCol .payment_form input[name='securitycode']").val("");(new X({message:c?c:db()})).render();$("#delete_card",this.el).fadeIn();$("#delete_card",this.el).click(r(this,function(){confirm("Are you sure?")&&z.b(Vj,null)}));$("input[name='securitycode']",this.el).prop("disabled",!1);$("input[name='agree']",this.el).prop("disabled",!1);d=this.model.get("currentUser");gy(this.el,d&&d.tf);this.w=d.Za();$("#amount.renewal_summary",this.el).text(dy(ey(d,this.w)));$("#period.renewal_summary", | |
this.el).text(fy(this.w));this.gc(this.w,"renewal_summary");this.zipcodeFocus("");this.J&&this.J()},rp:function(){$(".paymentFieldError",this.el).hide();$(".formFieldError",this.el).hide()},gc:function(b,c){if(b&&b.length){$("#salestax_amount."+c,this.el).html("");var d=$("input[name='zipcode']",this.el).val(),e=this.model.get("currentUser");if(d&&d.length==(e.Ta?4:5)){if(c in this.bb)return;this.bb[c]=!0;R(ex,new Py(d,b,c,this.P))}this.Kg()}},kh:function(b){var c=b.tax,d=b.token;b=b.amount;try{c&& | |
b&&($("#salestax_amount."+d,this.el).html(dy(c)),this.Rj[d]=c)}catch(e){}finally{k.info("executing finally"),delete this.bb[d],this.Ae()||this.enableSubmit(null)}},Ae:function(){return this.bb&&0<Object.keys(this.bb).length},Kg:function(){$(".pay_now",this.el).attr("disabled","disabled")},events:{"click #paypal_continue":"paypalContinueClick","click .p1_submit":"payP1Click","click #p99_pay_now":"pay99Click","click .cancel":"cancelClick","click #cancel_sub_btn":"cancelSubscriptionClick","click .see_details":"seeDetailsClick", | |
"click #paypal_agree":"clearErrors","click #cc_agree":"clearErrors","click .bill_freq_input":"billingFrequencyClick","focus .payment_field_validated input":"clearErrors","focus .payment_field_validated select":"clearErrors","focusout #pzip":"zipcodeFocus","keyup #pzip":"zipcodeFocus","blur #pzip":"zipcodeFocus","change #pzip":"zipcodeFocus","change #paypal_agree":"inputModified","keyup .payment_field input":"inputModified","change .payment_field select":"inputModified","change .subscription_selection input":"inputModified", | |
"click #are_you_a_business_link":"businessLinkClick"},inputModified:function(b){$(b.currentTarget).is(".subscription_selection input")||(this.pp=!0);if(!this.Wb)return this.Wb=!0,this.enableSubmit(b)},enableSubmit:function(b){!this.Wb||this.Ae()||$(b&&b.target).hasClass("zipcode")||$(".pay_now",this.el).removeAttr("disabled");return!1},seeDetailsClick:function(){$(".details",this.el).fadeIn();$(".see_details",this.el).hide();return!1},cancelSubscriptionClick:function(b){var c=new mA({model:this.model}); | |
c.bind("submit",r(this,function(){this.payP1Click(b)}));c.render()},billingFrequencyClick:function(b){this.w=b.target.value;$(".payment_summary",this.el).hide();$(".payment_summary."+this.w,this.el).show()},zipcodeFocus:function(){this.gc("ANNUAL","ANNUAL");this.gc("MONTHLY","MONTHLY");this.gc("END_OF_MONTH","END_OF_MONTH");return!0},paypalContinueClick:function(){$(window).scrollTop(0);var b=this.model.get("currentUser");this.P&&s("business_payment_page_click",{vendor_id:u,action:"business_"+this.w.toLowerCase(), | |
payment_type:"paypal"},b);Oo()||1==$("input[name='agree']:checked",this.el).length?(this.ja&&this.ja(),z.b(ek,[this.w,Yo(),this.P])):($(".agreeFieldError",this.el).text(bd()).fadeIn(),(new X({message:bd()})).render());return!1},payP1Click:function(b){if($(b&&b.target).hasClass("disabled"))return!1;var c=this.model.get("currentUser");if(!c)return!1;var d=!(b&&"cancel_sub_btn"==b.target.id),e=this.Rj[this.w],h=$.trim($("input[name='name']",this.el).val()),l=$("input[name='cardnumber']",this.el).val(), | |
p=tx(l),q=$("select[name='expirationdate_month'] option:selected",this.el).val(),t=$("select[name='expirationdate_year'] option:selected",this.el).val(),y=$("input[name='securitycode']",this.el).val(),E=$("input[name='zipcode']",this.el).val();b=!$("input#cc_agree",this.el).is(":visible")||$("input#cc_agree",this.el).is(":checked");var J=this.Yw,N=Yo(),U=this.ve(this.w,h,p,E,y,l,q,t,this.pp);!0!=b&&($(".agreeFieldError",this.el).text(bd()).fadeIn(),U.push(bd()));this.P&&s("business_payment_page_click", | |
{vendor_id:u,action:"business_"+this.w.toLowerCase(),payment_type:"creditcard"},this.model.get("currentUser"));0==U.length?this.Uq?(c=new kA,c.bind("submit",r(this,function(b){this.ja&&this.ja();this.jr?this.Pj(this.w,p,h,l,q,t,y,E,d,J,e,N,this.P,b):this.nk(this.w,p,h,l,q,t,y,E,d,J,e,N,b)})),c.bind("cancel",r(this,function(){(new X({message:cb()})).render()})),c.render()):!c.Sa()&&this.jr?this.Pj(this.w,p,h,l,q,t,y,E,d,J,e,N,this.P,""):this.nk(this.w,p,h,l,q,t,y,E,d,J,e,N,""):(new X({message:U.join("<br>")})).render(); | |
return!1},clearErrors:function(b){$(b.target).siblings(".paymentFieldError").hide();$(b.target).siblings(".formFieldError").hide()},pay99Click:function(b){if($(b.target).hasClass("disabled"))return!1;b=$("input[name='name']",this.el).val();var c=$("input[name='cardnumber']",this.el).val(),d=tx(c),e=$("select[name='expirationdate_month']",this.el).val(),h=$("select[name='expirationdate_year']",this.el).val(),l=$("input[name='securitycode']",this.el).val(),p=$("input[name='zipcode']",this.el).val(), | |
q=this.Rj.END_OF_MONTH,t=Yo(),y=this.ve("END_OF_MONTH",b,d,p,l,c,e,h,!0);0==y.length?(this.ja&&this.ja(),this.Pj(this.w,d,b,c,e,h,l,p,!1,!1,q,t,"",!1,"")):(new X({message:y.join("<br>")})).render();return!1},businessLinkClick:function(){var b=this.model.get("currentUser");s("business_payment_form_upsell",{vendor_id:u,source:0==Wy().indexOf("/payment")?"payment":"billing"},b);b.u==m.v.xd()?R(Wu):R(cv,{source:"payment"});return!1},ve:function(b,c,d,e,h,l,p,q,t){this.rp();var y=[];if(null==c||0==c.length)$(".nameFieldError", | |
this.el).text(gd()).fadeIn(),y.push(gd());nx($o(),e)||($(".zipcodeFieldError",this.el).text(ap()).fadeIn(),y.push(ap()));rx(b)||($(".billingFieldError",this.el).text(dd()).fadeIn(),y.push(dd()));t&&!px(h)&&($(".securitycodeFieldError",this.el).text(cd()).fadeIn(),y.push(cd()));qx(l)&&sx(d)||($(".cardNumberFieldError",this.el).text(ed()).fadeIn(),y.push(ed()));ux(p,q)||($(".expriationFieldError",this.el).text(fd()).fadeIn(),y.push(fd()));return y},cancelClick:function(){this.Rc&&this.Rc();return!1}, | |
Pj:function(b,c,d,e,h,l,p,q,t,y,E,J,N,U){z.b(Bj,[b,c,d,e,Number(h),Number(l),p,q,Number(E),J,N,U])},nk:function(b,c,d,e,h,l,p,q,t,y,E,J,N){z.b(xj,[b,c,d,e,Number(h),Number(l),p,q,Boolean(t),J,N])}});function RA(){} | |
RA=Backbone.View.extend({initialize:function(){this.ws=null},render:function(b,c){this.ws=b;-1!=b.typeOfService.indexOf("Business")?b.logo="business":-1!=b.typeOfService.indexOf("One")?b.logo="one":b.logo="";var d=$(c).tmpl(b);this.el&&$(this.el).empty();$(this.el).append(d);return this},events:{"click .print":"handlePrintClicked"},handlePrintClicked:function(){var b=window.open();s("business_view_receipt",{vendor_id:u,action:"print_save",transaction_id:this.ws.transactionId,transaction_date:this.ws.date},this.model.get("currentUser")); | |
var c=$("#print-area").clone(!0);c.find(".paging").remove();b.document.write(c.html());b.print();b.close();return!1}});function aB(){} | |
aB=Backbone.View.extend({initialize:function(){z.c(Tf,r(this,this.Mq));z.c(Vf,r(this,this.by));S(nw,r(this,this.by))},className:"still_listening_container clearfix",render:function(){var b=this.model.get("currentUser");b.H()&&z.b(Kj);var c=b.jk,d=b.Sh;if(!b.rh&&!b.P()&&b.JA&&b.Xb&&0==(km(hm)||0)%b.JA)return $(this.el).append($("#pandoraForBusinessTimeoutUpsellTmpl").tmpl({V3:b.u==m.v.xd()})),cn(),this;$(this.el).append($("#stillListeningTmpl").tmpl({isSponsoredListening:d==m.ge.io(),creditHours:c+ | |
" hour"+(1<c?"s":""),showUpgrade:!b.Sa()&&!Pn(b),shouldSeeAds:b.H(),isStreamLimited:b.rh,isUserAUNZ:b.Ta,offerAnnualSub:b.Fe,isBusiness:b.P(),monthlyPrice:dy(co(b))}));c=b.u;b.rh&&s("listening_session_display",{action:"display",listener_state:c,vendor_id:u,device_id:se},b);cn();return this},Mq:function(b){var c=C.za(this.model.get("currentStation"));null!=b&&!1==c?($("#still_listening_ignore").text("Return to my station"),$(".svnOffer",this.el).show(),$("#upgradeOffer").hide(),b=this.model.get("currentUser"), | |
s("truex_tracking",{for_action:"offer",benefit:b.Sh,benefit_amount:b.jk,detail:this.model.get("halt_id"),vendor_id:u,device_id:se},b)):($(".svnOffer",this.el).hide(),$("#still_listening_ignore").text("I'm still listening"),$("#upgradeOffer").show())},by:function(){this.stillListeningClick()},events:{"click #still_listening_upgrade":"upgradeClick","click #p4b_upgrade":"businessUpgradeClick","click .still_listening":"stillListeningClick","click .continue_abuse":"continueAbuseClick","click .learn_more_abuse":"learnAbuseClick", | |
"click .eliminate_timeout":"eliminateTimeoutClick","click #learn":"learnMoreClick"},upgradeClick:function(){this.Xm("upgrade");R(Vu,{cancelCallback:r(this,function(){V("/account/upgrade",!0,!0)})});return!1},businessUpgradeClick:function(){this.Xm("business_upsell");R($u,{source:"timeout"});return!1},learnMoreClick:function(){this.Xm("upgrade");R(Lw);return!0},eliminateTimeoutClick:function(){var b=this.model.get("halt_id"),c=this.model.get("currentUser"),d=c.u;s("listener_idle",{action:"value_exchange", | |
active:"true",halt_id:b,inactive_time:Math.floor((ud()-b)/1E3),listener_state:d,vendor_id:u,device_id:se},c);s("truex_tracking",{for_action:"offer_accepted",benefit:c.Sh,benefit_amount:c.jk,detail:b,vendor_id:u,device_id:se},c);this.model.set({modalPanel:"SVN_AD_PANEL"});return!1},stillListeningClick:function(){z.b(zk,r(this,function(){this.Xm("none");this.remove();this.el=null;R(yu)}));return!1},continueAbuseClick:function(){var b=this.model.get("currentUser");s("listening_session_display",{action:"dismiss", | |
listener_state:b.u,vendor_id:u,device_id:se},b);this.model.set({inactive:!1});this.remove();this.el=null;R(yu)},learnAbuseClick:function(){var b=this.model.get("currentUser");s("listening_session_display",{action:"learn",listener_state:b.u,vendor_id:u,device_id:se},b);window.open("http://help.pandora.com/customer/portal/articles/1392219?un="+b.Pa,"_blank");return!1},Xm:function(b){var c=this.model.get("halt_id"),d=this.model.get("currentUser"),e=d.u;s("listener_idle",{action:b,active:"true",business_upsell:d&& | |
d.P()&&"upgrade"==b,halt_id:c,inactive_time:Math.floor((ud()-c)/1E3),listener_state:e,vendor_id:u,device_id:se},d);R(Aw);this.model.set({inactive:!1})}});function bB(){} | |
bB=Backbone.View.extend({initialize:function(){this.nb=this.options.detail_url},render:function(){Tz(this.nb,{},r(this,this.SM),function(){z.b(Ih)},!0);return this},close:function(){Oz(this)},events:{"click .listeners_menuItem":"menuItemClick","click .more":"moreClick"},SM:function(b){$(this.el).append(b);ky(new hy(this.model.get("currentUser")),!1)},menuItemClick:function(b){b=b.target.id;$(".listeners_content_title").text(b);$(".listeners_menuItem").toggleClass("selected",!1);$(".listeners_menuItem[id='"+b+ | |
"']").toggleClass("selected",!0);return!1},moreClick:function(b){$(b.currentTarget).fadeOut();var c=$(b.currentTarget).attr("data-currentoffset"),d=$(b.currentTarget).attr("data-nextoffset");c&&d?Tz(this.nb,{countRowsOnBrowser:c,countRowsNeeded:d},r(this,function(b){$(".sections",this.el).append(b)})):$(b.currentTarget).closest(".section_page").next().fadeIn();return!1}});function cB(){} | |
cB=Backbone.View.extend({initialize:function(){this.referrer=this.options.referrer;this.Ed=this.options.cancelHash},el:$("#mainContent .pandoraOneInfo"),render:function(){function b(c,d,l){setTimeout(function(){$("#icons_wrapper img.active").removeClass("active");setTimeout(function(){l=(l+1)%3;$("#icons_wrapper .icon_img").eq(l).addClass("active");b(c,d,l)},d)},c)}R(hx);var c=this.model.get("currentUser"),d={isUserAUNZ:c.Ta,offerAnnualSub:c.Fe,monthlyPrice:dy(co(c)),annualPrice:dy(c.oe.toString()),isGrandfathered:c.Ky()}; | |
$(this.el).empty().append($("#pandoraOneTmpl").tmpl(d)).show();d=!1;null==c||c.p()?($(".trial",this.el).hide(),$(".upgrade",this.el).hide(),$(".start",this.el).show()):(c.xh?(d=!0,$(".trial",this.el).show(),$(".upgrade",this.el).hide()):($(".trial",this.el).hide(),$(".upgrade",this.el).show()),$(".start",this.el).hide());$(".btn_placeholder",this.el).hide();c&&c.Xb?($(".p4b_stuff").show(),$(".dmx_stuff").hide()):($(".p4b_stuff").hide(),$(".dmx_stuff").show());s("pandoraone_page_hit",{vendor_id:u, | |
istrial:d},this.model.get("currentUser"));c?($("#p1_subhead_line1_content",this.el).show(),$("#p1_subhead_line1_placeholder",this.el).hide(),$("#p1_subhead_line2_content",this.el).show(),$("#p1_subhead_line2_placeholder",this.el).hide()):($("#p1_subhead_line1_content",this.el).hide(),$("#p1_subhead_line1_placeholder",this.el).show(),$("#p1_subhead_line2_content",this.el).hide(),$("#p1_subhead_line2_placeholder",this.el).show());$("#p1_page",this.el).show();setInterval(function(){$("#bg1").toggleClass("active")}, | |
3E3);setInterval(function(){$("#bg2").toggleClass("active")},2800);setInterval(function(){$("#bg3").toggleClass("active")},4E3);b(1500,750,0);return this},events:{"click .trial":"startTrialClick","click .upgrade":"upgradeNowClick","click .start":"startNowClick","click #dmx_learn_more":"dmxLearnMoreClick","click #p4b_learn_more":"p4bLearnMoreClick","click #p4b_upgrade":"p4bUpgradeClick"},startTrialClick:function(){V("/one/trial/start",!0,!0);s("pandoraone_submit_click",{vendor_id:u,action:"trial"}, | |
this.model.get("currentUser"))},upgradeNowClick:function(){R(Vu,{cancelCallback:r(this,function(){V(this.Ed,!0,!0)})});s("pandoraone_submit_click",{vendor_id:u,action:"upgrade"},this.model.get("currentUser"));return!1},startNowClick:function(){R(rv,{onSuccessRedirect:"/_one"});s("pandoraone_submit_click",{vendor_id:u,action:"startnow"},this.model.get("currentUser"));return!1},dmxLearnMoreClick:function(){V("/everywhere/business",!0,!0);s("pandoraone_submit_click",{vendor_id:u,action:"business"},this.model.get("currentUser"))}, | |
p4bLearnMoreClick:function(){s("pandoraone_submit_click",{vendor_id:u,action:"business_learn"},this.model.get("currentUser"));R(cv,{source:"one"});return!1},p4bUpgradeClick:function(){var b=this.model.get("currentUser");s("pandoraone_submit_click",{vendor_id:u,action:"business_upgrade"},this.model.get("currentUser"));!b||b.p()?R(rv,{onSuccessCallback:function(){R($u,{cancelCallback:function(){V("/one",!0,!1)}})}}):R($u,{cancelCallback:function(){V("/one",!0,!1)}});return!1}});function dB(){} | |
dB=Backbone.View.extend({initialize:function(){this.kd="intro";this.Jd=[];for(var b=0;b<window.giftChoiceList.length;b++)window.giftChoiceList[b].enabled&&(this.Jd.push(window.giftChoiceList[b]),this.Jd[this.Jd.length-1].index=this.Jd.length-1);this.Ls=this.Jd[0]},close:function(){Oz(this)},el:$("#mainContent .giftInfo"),render:function(){var b=this.model.get("currentUser");switch(this.kd){case "intro":$(this.el).empty().append($("#giftIntroTmpl").tmpl({isUserLoggedIn:!b.p()})).show();break;case "form":$(this.el).empty().append($("#giftEnterInfoTmpl").tmpl({username:b.Pa, | |
fullname:b.Ml})).show();$("#theme_bg .scrollable_content",this.el).css("width",180*this.Jd.length);for(b=0;b<this.Jd.length;b++)$("#theme_bg .scrollable_content",this.el).append($("#giftThemeTmpl").tmpl(this.Jd[b]));this.qA();Px($("#theme_bg",this.el));break;case "payment":R(xv,r(this,function(){$(".payment").empty().hide();this.cancelClick()}));break;default:throw Error("Unknown gift state: "+this.state);}return this},qA:function(){$("#currentSelection",this.el).empty().append($("#selectedThemeTmpl").tmpl(this.Ls)); | |
$("#card_choice",this.el).val(this.Ls.name)},events:{"click .signOutLink":"signOutClick","click .cancel":"cancelClick","click .next":"nextClick","click .login":"loginClick","click .register":"registerClick","click .sample_buttons .example":"exampleClick","click .sample_buttons .select":"selectClick","keyup #message":"messageKeyup"},loginClick:function(){$A("/buygift");V("/account/sign-in",!0,!1);return!1},registerClick:function(){$A("/buygift");V("/account/register",!0,!1);return!1},messageKeyup:function(){if(300<= | |
$("#message",this.el).val().length)return $("#message",this.el).val($("#message",this.el).val().substr(0,300)),$("#messageError",this.el).fadeIn(),!1;$("#messageError",this.el).fadeOut();return!0},exampleClick:function(b){b=$(b.target).closest(".sample_container").tmplItem().data;var c=Tx("giftExamplePopup",$("#giftExampleHeaderTmpl").tmpl(b),$("#giftExampleContentTmpl").tmpl(b),$("#giftExampleFooterTmpl").tmpl(b));c.bind("closed",r(this,function(){$(".select",c).unbind("click");c.remove()}));$(".select", | |
c).bind("click",r(this,function(b){this.dA($(b.target).tmplItem().data);c.fadeTo(400,0,function(){c.remove()})}));$(this.el).append(c);return!1},selectClick:function(b){this.dA($(b.target).closest(".sample_container").tmplItem().data);return!1},dA:function(b){this.Ls=this.Jd[b.index];this.qA();return!1},cancelClick:function(){switch(this.kd){case "form":this.kd="intro";break;case "payment":this.kd="form";break;default:throw Error("don't know how to cancel state: "+this.kd);}this.render();return!1}, | |
nextClick:function(){if("form"==this.kd&&!this.iR())return!1;switch(this.kd){case "intro":this.kd="form";break;case "form":this.kd="payment";break;default:throw Error("don't know how to go to next state: "+this.kd);}this.render();return!1},iR:function(){je($("#sender_name",this.el).val())?$("#sender_name_error",this.el).fadeIn():$("#sender_name_error",this.el).fadeOut();je($("#recipient_name",this.el).val())?$("#recipient_name_error",this.el).fadeIn():$("#recipient_name_error",this.el).fadeOut(); | |
var b="email"==$("input[name='gift_delivery']:checked",this.el).val(),c=$("#recipient_email",this.el).val();!b&&je(c)||jx(c)?$("#recipient_email_error",this.el).fadeOut():$("#recipient_email_error",this.el).fadeIn();$("#recipient_email",this.el).val()!=$("#recipient_email2",this.el).val()?$("#recipient_email2_error",this.el).fadeIn():$("#recipient_email2_error",this.el).fadeOut();return 0==$(".giftError:visible",this.el).length},signOutClick:function(){z.b(pi);return!1}});function eB(){} | |
eB=Backbone.View.extend({initialize:function(){this.aj=this.options.gift;z.c(og,r(this,this.giftEmailed));this.FA=window.giftChoiceList[0];for(var b=0;b<window.giftChoiceList.length;b++)if(window.giftChoiceList[b].name==this.aj.skin){this.FA=window.giftChoiceList[b];break}},el:$("#mainContent .giftInfo"),render:function(){var b=this.model.get("currentUser");$(this.el).empty().append($("#giftShowTmpl").tmpl({username:b.Pa,noads:!b.H(),gift:this.aj,theme:this.FA})).show();return this},events:{"click .print":"printClicked", | |
"click .email":"emailClicked"},printClicked:function(){window.print();return!1},emailClicked:function(){$(".email",this.el).hasClass("disabled")||($(".email",this.el).addClass("disabled"),z.b(ck,[this.aj.giftCode,this.aj.giftHash]));return!1},giftEmailed:function(){this.aj.type="EMAIL";this.render()},close:function(){z.pa(this)}});function fB(){} | |
fB=Backbone.View.extend({initialize:function(){z.c(De,r(this,this.$a));z.c(Ee,r(this,this.Of));z.c(ah,r(this,this.oJ));z.c(fh,r(this,this.IJ))},render:function(b){this.Ph=b;this.Id()},Id:function(){R(cx,{sponsor:this.Ph});$("#mainContent").children().hide();this.model.set({modalPanel:iu});var b=$("#sponsoredTrial img")[0],c=this.model.get("currentUser");c.p()?this.model.get("hasStations")?(c=this.model.get("stationList").pluck("_stationName"),c.shift(),b=$("#sponsoredTrialHasStationsTmpl").tmpl({stations:c,logo:b}), | |
$("#mainContent").children().hide(),$("#mainContent .sponsoredTrial").empty().append(b).show(),$("#noBtn").bind("click",this,r(this,function(){this.R="newUser";z.b(ti)})),$("#yesBtn").bind("click",this,this.ez)):(b=$("#sponsoredTrialChoicesTmpl").tmpl({sponsor:this.Ph}),$("#mainContent .sponsoredTrial").empty().append(b).show(),$("#existingUserBtn").bind("click",this,this.Xp),$("#newUserBtn").bind("click",this,this.ez)):(b=$("#sponsoredTrialSignedInTmpl").tmpl({username:c.Pa,logo:b}),$("#mainContent .sponsoredTrial").empty().append(b).show(), | |
$("#startNowBtn").bind("click",r(this,function(){R(dx,{path:"/ignored/ignored/"+this.Ph})})),$("#notMeLink").bind("click",this,this.Mr))},jj:function(){$("#mainContent .sponsoredTrial").fadeOut(r(this,function(){$("#mainContent .sponsoredTrial").empty()}))},xf:function(){this.Id();return!1},IJ:function(b){this.R&&(this.debug("registration failed"),(new X({message:b})).render(),this.Id());return!1},oJ:function(){this.debug("login failed");this.R&&(this.R=null,(new X({message:"Sorry, I don't recognize your email and password."})).render())}, | |
$a:function(){this.R?"newUser"==this.R?(this.R=null,setTimeout(r(this,function(){this.Id()}),300)):"startTrial"==this.R?(this.R=null,R(dx,{path:"/ignored/ignored/"+this.Ph})):"logout"==this.R&&(this.R=null,setTimeout(r(this,function(){z.b(qi,this.mi);this.mi=null;this.R="startTrial"}),300)):this.jj()},Of:function(){"startTrial"==this.R&&(this.R=null,R(dx,{path:"/ignored/ignored/"+this.Ph}))},Mr:function(){$A(Wy());z.b(pi);return!1},kQ:function(b){var c=$("#email",this.el).val(),d=$("#password",this.el).val(), | |
e=$("input[name=remember]",this.el).is(":checked"),h=!1;kx(d)||(h=!0,$("#passError",this.el).text(lb()).fadeIn());jx(c)||(h=!0,$("#emailError",this.el).text(kb()).fadeIn());h||(h=b.data.model.get("currentUser"),c==h.Pa?R(dx,{path:"/ignored/ignored/"+b.data.Ph}):(b.data.R="startTrial",z.b(oi,{username:c,password:d,keepLoggedIn:e})));return!1},Oi:function(b){var c=$("#email").val(),d=$("#password").val(),e=$("#birthyear").val(),h=$("#zipcode").val(),l=$("input[name=gender]:checked").val(),p=$("input[name=optin]").is(":checked"), | |
q=$("input[name=terms]").is(":checked"),t=$("input[name=remember]").is(":checked"),y=!1;jx(c)||($("#emailError").text(kb()).fadeIn(),y=!0);kx(d)||($("#passwordError").text(lb()).fadeIn(),y=!0);lx(e)?mx(e)||($("#birthyearError").text(ma()).fadeIn(),y=!0):($("#birthyearError").text(ma()).fadeIn(),y=!0);nx($o(),h)||($("#zipcodeError").text(ap()).fadeIn(),y=!0);ox(l)||($("#genderError").text(ra()).fadeIn(),y=!0);q||($("#termsError").text(qa()).fadeIn(),y=!0);y||(c={username:c,password:d,birthYear:Number(e), | |
zipCode:h,emailOptIn:p,gender:l,keepLoggedIn:t},"logout"==b.data.R?(b.data.mi=c,z.b(pi)):z.b(qi,c));return!1},ez:function(b){var c=$("#sponsoredTrial img")[0];$("#mainContent .sponsoredTrial").empty().append($("#sponsoredTrialRegisterTmpl").tmpl({logo:c}));$("#startNowBtn").click(function(){b.data.R="startTrial";b.data.Oi(b)});$("#goBackBtn").click(function(){b.data.R=!1;b.data.xf()});$(".redeem_field").click(b.data.Fg);return!1},gz:function(b){var c=$("#sponsoredTrial img")[0];$("#mainContent .sponsoredTrial").empty().append($("#sponsoredTrialRegisterTmpl").tmpl({logo:c})); | |
$(".redeem_field").click(b.data.Fg);$("#startNowBtn").click(function(){b.data.R="logout";b.data.Oi(b)});$("#goBackBtn").click(function(){b.data.R=!1;b.data.xf()});return!1},Xp:function(b){var c=$("#sponsoredTrial img")[0];$("#mainContent .sponsoredTrial").empty().append($("#sponsoredTrialLoginTmpl").tmpl({logo:c}));$("#startNowBtn").bind("click",b.data,b.data.kQ);$("#goBackBtn").click(function(){b.data.xf()});$(".redeem_field").click(b.data.Fg);return!1},Fg:function(b){(new $(b.target)).parent().siblings(".error").empty()}, | |
debug:function(b){k.debug("SponsoredTrialView : ",arguments)}});function gB(){} | |
gB=Backbone.View.extend({initialize:function(){this.referrer=this.options.referrer;this.Ed=this.options.cancelHash;this.P=this.options.isBusiness;z.c(hk,r(this,this.nI));z.c(jk,r(this,this.$I));z.c(Rh,r(this,this.bj));z.c(Qh,r(this,this.bj));z.c(Og,r(this,this.Hb))},el:$("#mainContent .paymentConfirm"),render:function(){this.jg=cp("token");this.es=cp("PayerID");je(this.jg)||je(this.es)?setTimeout(function(){V(this.Ed,!1,!1)},100):z.b(ik,[this.jg])},$I:function(b){var c=b.tax,d=b.amount,e=b.paypalEmail, | |
h=b.description,l=b.currencyCode;je(d)||je(c)||je(l)||je(e)||je(h)?this.bj():Oo()?(h=this.kH(b),b={},b.email=e,b.p2p="99"==d,b.isBusiness=this.P,b.tax=dy(c),b.amount=dy(d),b.duration=h.duration,b.summary_duration=h.Ct,b.summary_period=h.js,b.payment_total=dy((parseInt(c,10)+parseInt(d,10)).toString()),c=this.model.get("currentUser"),b.username=c.Pa,$(this.el).empty().append($("#paypalConfirmTmpl").tmpl(b)).show(),null==c||c.p()?($(".upgrade_now",this.el).hide(),$(".duration_container",this.el).hide()): | |
$(".start_now",this.el).hide(),$("#buttons",this.el).show()):(this.uA(),z.b(gk,[this.jg,this.es,Yo(),this.P]))},kH:function(b){var c={};b=b.description;return c=-1!==b.indexOf("Monthly payment")?{js:"Monthly",duration:"month",Ct:"Monthly Subscription"}:-1!==b.indexOf("Annual payment")?{js:"Annual",duration:"year",Ct:"Annual Subscription"}:{js:"",duration:"",Ct:"Price"}},nI:function(b){this.dr();var c=b.listenerState;b=null;if("PAY_TO_PLAY"==c)b=new X({message:ld()});else if("SUBSCRIBER"==c){if(b= | |
new X({message:jd()}),z.b(jg),c=this.model.get("currentUser"))c=rl.encrypt(c.s),c="https://4177752.fls.doubleclick.net/activityi;src=4177752;type=purch024;cat=purch865;qty=1;;ord=;cost="+$.trim($("#period_amount",this.el).text())+";u1="+c,wp(c,function(){},function(){})}else if("BUSINESS"==c){b=new X({message:kd()});z.b(kg);setTimeout(function(){R(Yu)},0);return}b&&b.render();R(yu)},bj:function(b){this.dr();var c;switch(b.code){case "PAYPAL_PAYMENT_DECLINED":c=kc();break;default:c=jc()}"PAYPAL_PAYMENT_ALREADY_PAID"!= | |
b.code&&(new X({message:c})).render();R(Vu)},Hb:function(){this.dr()},uA:function(){this.T||($(window).scrollTop(0),this.T=new WA({model:this.model,message:id()}),$("#main").append(this.T.render().el))},dr:function(){this.T&&(this.T.trigger("close"),this.T=null)},events:{"click #paypal_buy":"paypalCompletePurchase","click #paypal_cancel":"paypalCancelPurchase","click #paypal_agree":"clearErrors"},paypalCompletePurchase:function(){if(1==$("input[name='paypal_agree']",this.el).length&&1==$("input[name='paypal_agree']:checked", | |
this.el).length!=!0){$(".agreeFieldError",this.el).text(bd()).fadeIn();var b=bd()}null==b?(this.uA(),z.b(gk,[this.jg,this.es,Yo(),this.P])):(new X({message:b})).render();return!1},paypalCancelPurchase:function(){V("/payment",!0,!0);return!1},clearErrors:function(b){$(b.target).siblings(".paymentFieldError").empty()}});function hB(){} | |
hB=Backbone.View.extend({mg:null,$B:"payment_landing",YB:"pandora_one",ZB:"pandora_one_thankyou",ru:"sign_up",aC:"sign_in",XB:"home",initialize:function(){z.c(lg,r(this,this.vO));z.c(ig,r(this,this.yO));z.c(jg,r(this,this.zO));z.c(zg,r(this,this.xO));z.c(De,r(this,this.Xf));z.c(Ee,r(this,this.Xf));S(fw,r(this,this.KN));S(gw,r(this,this.LM));S(hw,r(this,this.dN));S(Ev,r(this,this.hM));S(hx,r(this,this.Fm));S(av,r(this,this.FM));S(iw,r(this,this.eN));S(kw,r(this,this.sN));z.c(lg,r(this,this.Fh));z.c(ig, | |
r(this,this.Fh));z.c(jg,r(this,this.Fh));S(fw,r(this,this.Fh));S(av,r(this,this.Fh));S(hx,r(this,this.Fh))},Fh:function(){var b=this.model.get("currentUser");null!=b&&(b=b.AL)&&((new Image).src="//beacon.krxd.net/usermatch.gif?partner=pandora&partner_uid="+b,(new Image).src="//cm.g.doubleclick.net/pixel?google_nid=pandora6316&google_hm="+b)},vO:function(){$(this.el).append(iB("existing",jB(this)));$(this.el).append(kB("existing",jB(this)));$(this.el).append(lB("existing",jB(this)));$(this.el).append("<iframe id='sem-conversion' src='/static/counters/existingListenerConversion.html' style='border:none;height:0;width:0;'></iframe>"); | |
mB(this,this.aC)},yO:function(b){$(this.el).append(iB("new",jB(this)));$(this.el).append(kB("new",jB(this)));$(this.el).append(lB("new",jB(this)));$(this.el).append("<iframe id='sem-conversion' src='/static/counters/registrationConversion.html' style='border:none;height:0;width:0;'></iframe>");mB(this,this.ru);b.Ta&&(this.sO(),this.wO())},sO:function(){$(this.el).append('<script src="https://secure.adnxs.com/px?id=711103&t=1" type="text/javascript">\x3c/script>')},wO:function(){$(this.el).append("<iframe id='marin-tracking' src='/static/counters/marinSEM.html' style='border:none;height:0;width:0;'></iframe>")}, | |
As:function(){$(this.el).append("<iframe id='sem-conversion' src='/static/counters/googleSEM.html' style='border:none;height:0;width:0;'></iframe>")},AO:function(){$(this.el).append("<iframe id='survey-tracking' src='/static/counters/surveySEM.html' style='border:none;height:0;width:0;'></iframe>")},zO:function(){$(this.el).append(lB("subscribe",jB(this)));this.As();mB(this,this.ZB)},xO:function(){$(this.el).append(lB("trial_start",jB(this)))},Xf:function(b){this.mg=b},Ym:function(b){$(this.el).append(b== | |
hB.hu||b==hB.ju||b==hB.iu||b==hB.xk?b==hB.xk?nB(this):oB(pB(b)):"")},FM:function(){this.As();mB(this,this.$B)},sN:function(){this.AO()},Fm:function(){this.As();mB(this,this.YB)},eN:function(){mB(this,this.ru)},KN:function(){this.mg&&this.mg.p()&&this.Ym(hB.hu);mB(this,this.XB)},LM:function(){this.mg&&!Nn(this.mg)&&this.Ym(hB.ju)},dN:function(){this.Ym(hB.iu)},hM:function(){this.mg&&Nn(this.mg)&&this.Ym(hB.xk)}});hB.hu="anon";hB.ju="unreg";hB.iu="signed_out";hB.xk="active"; | |
function iB(b,c){return oB("http://4177752.fls.doubleclick.net/activityi;src=4177752;type="+("existing"==b?"exist425":"sign-244")+";cat="+("existing"==b?"exist769":"sign-094")+";u1="+c+";ord="+c)}function kB(b,c){return"existing"==b?oB("http://sact.atdmt.com/action/PandoraReEngage/v3/ato."+c):oB("http://sact.atdmt.com/action/PandoraSignUp/v3/ato."+c)} | |
function lB(b,c){var d="http://1204.xg4ken.com/media/redir.php?track=1&token=1d097f49-7c07-4166-9aa3-ce55c88dedc9&val=0.0&orderId=&valueCurrency=USD&GCID=&kw=&product=&promoCode="+c+"&type=";"new"==b?d+="newusersignup":"existing"==b?d+="reengagement":"subscribe"==b?d+="Sale":"trial_start"==b&&(d+="trial");return"<img height='1' width='1' style='display:none' src='"+d+"'></img>"}function jB(b){b=b.model.get("currentUser");return null==b?"":rl.encrypt(b.s)} | |
function oB(b){return"<iframe height='1' width='1' frameborder='0' style='display:none' src='"+b+"'></iframe>"}function pB(b){return"/static/counters/retarget-"+b+".html"}function qB(b,c){b+="?";for(var d in c)b+=d+"="+c[d]+"&";return b.slice(0,-1)}function nB(b){var c=b.model.get("currentUser").u;b=jB(b);c=qB(pB(hB.xk),{listener_state:c,encrypted_listener_id:b});return oB(c)} | |
function mB(b,c){var d=b.model.get("currentUser"),d={encrypted_listener_id:jB(b),page_name:c,listener_state:d.u};$(b.el).append(oB(qB("/static/counters/atlasTracking.html",d)))};function rB(){} | |
rB=Backbone.View.extend({Iu:1E3,Pb:500,lB:-1*Math.PI/180,Sw:null,Ni:null,ip:null,$w:null,vz:0,lw:null,pl:null,sy:!1,Ff:null,tk:!1,initialize:function(){$("#sponsoredListeningStatus").slideUp();(this.tk=we())||$("#slTimer").html('<svg style="height: 100%; width: 100%"><circle cx="10" cy="10" r="8" fill-opacity="0.0"" stroke="#ffffff" stroke-width="2"/><path id="slTimerDrain" fill="#ffffff" transform="translate(10, 10)"/></svg>')},el:$("#sponsoredListeningStatus").get(0),events:{"click #slButton":"sponsorButtonClick"},vt:function(b, | |
c,d,e,h,l,p,q){this.ip=b;this.Sw=c;this.Ni=d;this.$w=l;this.lw=e?e:"More";this.pl=h;this.sy=q;this.vz=p;null!=this.Ff&&(clearTimeout(this.Ff),this.Ff=null);$("#sponsoredListeningStatus").is(":visible")?this.ty(r(this,this.Qw)):(this.Qw(),$("#sponsoredListeningStatus").slideDown(this.Iu,r(this,function(){this.ox(0)})))},DF:function(){this.Ff&&clearTimeout(this.Ff);var b=this.Pb+this.Pb+1E4;this.Ff=setTimeout(r(this,function(){$("#sponsoredListeningStatus").slideUp(this.Iu);this.Ff=null}),b);$("#slText").is(":visible")&& | |
this.ty(r(this,function(){$("#slText").html(this.$w);$("#slText").fadeIn(this.Pb)}))},ox:function(b){this.tk||(b+=0.015,b>=this.vz||(this.Tt(b),setTimeout(r(this,function(){this.ox(b)}),30)))},qz:function(b){return 10>b?"0"+b:b},cR:function(b,c){if(this.tk){var d=Math.floor((b+60)/3600),e=Math.floor((b+60)%3600/60);$("#slTimerNumerical").text(this.qz(d)+":"+this.qz(e))}else this.Tt(b/c)},Tt:function(b){b*=360;var c=b*this.lB;b="M 0 0 v -8 A 8 8 1 "+(180<b?1:0)+" 0 "+8*Math.sin(c)+" "+-8*Math.cos(c)+ | |
" z";$("#slTimerDrain").attr("d",b);$("#slTimerDrain").hide().show(0)},pA:function(){this.ip?this.gy(this.Sw+" <strong>"+this.ip+"</strong>"):this.Yq()},Yq:function(){this.gy(this.Ni)},gy:function(b){var c=$("#slText"),d=r(this,function(){c.html(b);c.fadeIn(this.Pb)});c.is(":visible")?c.fadeOut(this.Pb,d):d()},Qw:function(){this.sy?this.Yq():this.pA();this.pl?($("#slButton").text(this.lw),$("#slButton").fadeIn(this.Pb)):$("#slButton").fadeOut(this.Pb);this.tk?($("#slTimerSvg").hide(),$("#slTimerNumerical").show()): | |
($("#slTimerNumerical").hide(),this.Tt(0),$("#slTimer").fadeIn(this.Pb))},ty:function(b){$("#slButton").fadeOut(this.Pb);$("#slTimer").fadeOut(this.Pb);$("#slTimerNumerical").fadeOut(this.Pb);$("#slText").fadeOut(this.Pb,b)},sponsorButtonClick:function(){this.pl&&window.open(this.pl);var b=this.model.get("currentVxReward");b&&s("value_exchange",{action:"vx_status_bar_cta_clicked",line_id:b.ei,creative_id:b.Jc,offer_name:b.Qk,truex_instance_id:b.Uo,vendor_id:u,device_id:se},this.model.get("currentUser"))}});function sB(){} | |
sB=Backbone.View.extend({initialize:function(){this.Wb=!1;this.w="MONTHLY";this.bb={};S(Fv,r(this,this.aK));S(fx,r(this,this.kh));z.c(Ef,r(this,this.Pd));z.c(nk,r(this,this.hK));z.c(lk,r(this,this.J));S(fx,r(this,this.kh));z.c(Th,r(this,this.Xx));z.c(Sh,r(this,this.FI));z.c(Og,r(this,this.Hb))},el:$("#mainContent .payment"),aK:function(){var b=this.model.get("currentUser");null!=b&&b.xh?z.b(vj,"PaymentBackedTrial"):setTimeout(function(){V("/one",!1,!1)},100)},Pd:function(b){if("/one/trial/start"==Wy()){s("pbwt_payment_page_hit", | |
{vendor_id:u},this.model.get("currentUser"));b=b.cdata;for(var c=this.model.get("currentUser"),d={years:[],months:[]},e=(new Date).getFullYear(),h=0;12>h;h++)d.years.push(e+h),9>h?d.months.push("0"+(h+1)):d.months.push(h+1);null==b?(d.zipcode="",nx($o(),c.wb())?d.zipcode=c.wb():d.zipcode=""):(d.customerName=b.customerName,d.zipcode=b.zipcode,d.displayableCardNumber=b.displayableCardNumber,d[b.cardCompany.toLowerCase()]="checked",d.expirationMonth=b.expirationMonth,d.expirationYear=b.expirationYear); | |
d.billingFrequency=this.w;d.offerAnnualSub=c.Fe;d.trialDuration=c.uz.toString();d.monthlyPrice=dy(co(c));d.annualPrice=dy(c.oe.toString());d.isUserAUNZ=c.Ta;d.isV2="V2"===c.hk;d.showPaypalOrderConfirmScreen=Oo();$("#mainContent").children().hide();e=$("#PaymentBackedTrialTmpl").tmpl(d);b&&($("#delete_card",e).show(),$("#delete_card",e).click(r(this,function(){confirm("Are you sure?")&&z.b(Vj,null);return!1})));$(this.el).empty().append(e);$(this.el).show();c.gs&&($("#paypal_form",this.el).hide(), | |
$("#paypal_select_container",this.el).hide());null!=d.zipcode&&0<d.zipcode.length&&this.zipcodeFocus(null)}},hK:function(b){(b=b.redirectUrl)?window.location.href=b:this.Xx()},Xx:function(b){var c=ic();b&&b.code==m.d.Dk()&&(c=Qb());(new X({message:c})).render();this.J&&this.J()},FI:function(b){var c=Nb();b&&b.code==m.d.Dk()&&(c=Qb());(new X({message:c})).render();this.J&&this.J()},Hb:function(){this.J&&this.J()},ja:function(){this.T||($(window).scrollTop(0),this.T=new WA({model:this.model,message:id()}), | |
$("#main").append(this.T.render().el))},J:function(){this.T&&(this.T.trigger("close"),this.T=null)},rp:function(){$(".paymentFieldError",this.el).hide();$(".formFieldError",this.el).hide()},Kg:function(){$(".save_btn",this.el).attr("disabled","disabled")},events:{"click .bill_freq_input":"billingFrequencyClick","click #start_trial_pp":"startTrialPP","click #start_trial_cc":"startTrailCC","click #paypal_select":"paypalSelect","click #credit_select":"creditCardSelect","focus .payment_field_validated":"clearErrors", | |
"focusout #zip":"zipcodeFocus","keyup #zip":"zipcodeFocus","blur #zip":"zipcodeFocus","change #zip":"zipcodeFocus","keyup .payment_field input":"inputModified","change .subscription_selection input":"inputModified","change .payment_field select":"inputModified"},billingFrequencyClick:function(b){this.w=b.target.value},inputModified:function(b){if(!this.Wb)return this.Wb=!0,this.enableSubmit(b)},enableSubmit:function(b){!this.Wb||this.Ae()||$(b&&b.target).hasClass("zipcode")||$(".pay_now",this.el).removeAttr("disabled"); | |
return!1},zipcodeFocus:function(){this.gc("ANNUAL","ANNUAL");this.gc("MONTHLY","MONTHLY");return!0},startTrialPP:function(){1==$("input[name='agreePP']:checked",this.el).length!=!0?$(".agreePPFieldError",this.el).text(bd()).fadeIn():($(window).scrollTop(0),this.ja(),z.b(mk,[this.w,Yo()]));return!1},startTrailCC:function(){this.model.get("currentUser");var b=$.trim($("input[name='name']",this.el).val()),c=$("input[name='cardnumber']",this.el).val(),d=tx(c),e=$("select[name='expirationdate_month'] option:selected", | |
this.el).val(),h=$("select[name='expirationdate_year'] option:selected",this.el).val(),l=$("input[name='securitycode']",this.el).val(),p=$("input[name='zipcode']",this.el).val(),q=1==$("input[name='agreeCC']:checked",this.el).length,t=Yo(),y=this.ve(b,d,p,l,c,e,h);!0!=q&&($(".agreeCCFieldError",this.el).text(bd()).fadeIn(),y.push(bd()));0==y.length?(this.ja&&this.ja(),z.b(kk,[this.w,d,b,c,Number(e),Number(h),l,p,t])):(new X({message:y.join("<br>")})).render();return!1},ve:function(b,c,d,e,h,l,p){this.rp(); | |
var q=[];if(null==b||0==b.length)$(".nameFieldError",this.el).text(gd()).fadeIn(),q.push(gd());nx($o(),d)||($(".zipcodeFieldError",this.el).text(ap()).fadeIn(),q.push(ap()));px(e)||($(".securitycodeFieldError",this.el).text(cd()).fadeIn(),q.push(cd()));qx(h)&&sx(c)||($(".cardNumberFieldError",this.el).text(ed()).fadeIn(),q.push(ed()));ux(l,p)||($(".expriationFieldError",this.el).text(fd()).fadeIn(),q.push(fd()));return q},gc:function(b,c){if(b&&b.length){$("#salestax_amount."+c,this.el).html(""); | |
var d=$("input[name='zipcode']",this.el).val(),e=this.model.get("currentUser");if(d&&d.length==(e.Ta?4:5)){if(c in this.bb)return;this.bb[c]=!0;R(ex,new Py(d,b,c,!1))}this.Kg()}},kh:function(b){var c=b.tax,d=b.token;b=b.amount;try{c&&b&&($("#salestax_amount."+d,this.el).html(dy(c)),this.Rj[d]=c)}catch(e){}finally{delete this.bb[d],this.Ae()||this.enableSubmit(null)}},Ae:function(){return this.bb&&0<Object.keys(this.bb).length},clearErrors:function(b){$(b.target).siblings(".paymentFieldError").hide(); | |
$(b.target).siblings(".formFieldError").hide()},paypalSelect:function(){s("payment_paypal_select",{vendor_id:u},this.model.get("currentUser"));$("#creditcard_form",this.el).hide();$("#paypal_form",this.el).show()},creditCardSelect:function(){s("payment_creditcard_select",{vendor_id:u},this.model.get("currentUser"));$("#paypal_form",this.el).hide();$("#creditcard_form",this.el).show()}});function tB(){} | |
tB=Backbone.View.extend({initialize:function(){S(Wu,r(this,this.fJ));S(Xu,r(this,this.WJ));z.c(Kf,r(this,this.rJ));z.c(yh,r(this,this.yI));z.c(Og,r(this,this.Hb))},el:$("#mainContent .businessMigration"),events:{"click #p1_business_convert":"businessConvertClick","click #business_convert_agree":"businessConvertAgreeChanged","focus .payment_field_validated input":"clearErrors"},render:function(){var b=this.model.get("currentUser"),b={mode:"business",businessMonthlyPrice:dy(b.ol.toString()),businessAnnualPrice:dy(b.nl.toString()), | |
billingFrequency:b.Za()};$(this.el).empty();$(this.el).append($("#BusinessMigrationTmpl").tmpl(b)).show();s("business_migration_page_hit",{vendor_id:u},this.model.get("currentUser"));return this},fJ:function(){V("/business/join",!0,!0)},WJ:function(){var b=this.model.get("currentUser");!b||"/business/join"!=Wy()||b.u!=m.v.xd()||b.Ta?setTimeout(function(){R(yu)},50):b.Sq?this.render():this.Nx()},Nx:function(){(new X({message:pd()})).render();setTimeout(function(){R(cv,{showBusinessInfoForm:!0,ignoreBusinessInfoCheck:!0})}, | |
0)},Hb:function(){this.J()},yI:function(b){this.J();var c=md();b&&(b.code==m.d.vu()?c=nd():b.code==m.d.bC()?c=od():b.code==m.d.Ve()?c=ia():b.code==m.d.tB()&&(c=pd(),this.Nx()));(new X({message:c})).render()},rJ:function(){this.J();setTimeout(function(){R(Yu,{isMigration:!0})},10)},businessConvertAgreeChanged:function(){this.clearErrors();$("input#business_convert_agree",this.el).is(":checked")?$(".p1_submit",this.el).removeAttr("disabled"):$(".p1_submit",this.el).attr("disabled","disabled")},businessConvertClick:function(b){if($(b&& | |
b.target).hasClass("disabled")||!this.model.get("currentUser"))return!1;var c=$.trim($("input[name=bill_freq_input]:checked",this.el).val());b=$("input#business_convert_agree",this.el).is(":checked");b=this.ve(c,b);if(0!=b.length)return(new X({message:b.join("<br>")})).render(),!1;s("business_migration_page_click",{vendor_id:u},this.model.get("currentUser"));b=new kA;b.bind("submit",r(this,function(b){this.ja();z.b(Aj,[c,b])}));b.bind("cancel",r(this,function(){(new X({message:eb.p3()})).render()})); | |
b.render();return!1},clearErrors:function(b){b=b?b.target:this.el;$(b).siblings(".paymentFieldError").hide();$(b).siblings(".formFieldError").hide()},ve:function(b,c){this.clearErrors();var d=[];rx(b)||($(".billingFieldError",this.el).text(dd()).fadeIn(),d.push(dd()));!0!=c&&($(".agreeFieldError",this.el).text(bd()).fadeIn(),d.push(bd()));return d},ja:function(){this.T||($(window).scrollTop(0),this.T=new WA({model:this.model,message:id()}),$("#main").append(this.T.render().el))},J:function(){this.T&& | |
(this.T.trigger("close"),this.T=null)}});function uB(){} | |
uB=Backbone.View.extend({initialize:function(){S(Yu,r(this,this.dJ));S(Zu,r(this,this.UJ))},el:$("#mainContent .businessConfirmation"),events:{"click #submit_business_info":"handleStartListeningClick"},render:function(){var b=this.model.get("currentUser"),c={showReceiptLink:!this.sL};$(this.el).empty();$(this.el).append($("#BusinessConfirmationTmpl").tmpl(c)).show();s("business_confirmation_page_hit",{vendor_id:u},b);return this},dJ:function(b){this.sL=b&&b.isMigration;V("/business/welcome",!0,!1, | |
!1)},UJ:function(){this.model.get("currentUser").P()?this.render():setTimeout(function(){R(yu)},50)},handleStartListeningClick:function(){z.b(ai);setTimeout(function(){R(yu)},10)}});function vB(){} | |
vB=Backbone.View.extend({initialize:function(){z.c(Jf,r(this,this.CK));z.c(xh,r(this,this.II));z.c(Og,r(this,this.J));S(cv,r(this,this.eJ));S(dv,r(this,this.VJ));dz("/business");this.source=null},el:$("#mainContent .p4bInfo"),eJ:function(b){this.source=b&&b.source?b.source:"unknown";this.yP=b&&!!b.showBusinessInfoForm;this.TK=b&&!!b.ignoreBusinessInfoCheck;V("/business",!0,!0,!0)},VJ:function(){var b=this.source||"url",c=this.model.get("currentUser");c&&c.Xb?(s("business_learnmore_page_hit",{vendor_id:u, | |
source:b},this.model.get("currentUser")),this.render(),this.source=null):(re.set({postLoginPath:"/business"}),setTimeout(function(){R(yu)},0))},render:function(){R(ix);var b=this.model.get("currentUser"),b={isUserAUNZ:b.Ta,monthlyPrice:dy(b.ol.toString()),annualPrice:dy(b.nl.toString())};$("#mainContent").children().hide();$(".contentnav").css("border-bottom","none");$(this.el).empty().append($("#pandoraForBusinessTmpl").tmpl(b)).show();this.yP&&this.p4bUpgradeClick();return this},events:{"click #p4b_upgrade":"p4bUpgradeClick", | |
"click #p4b_next":"p4bNextClick","click #p4b_cancel_link":"p4bCancelLinkClick"},p4bUpgradeClick:function(){var b=this.model.get("currentUser");!b||b.p()?R(rv,{onSuccessCallback:r(this,this.p4bUpgradeClick)}):!this.TK&&b.Sq?this.Ox():($("#p4b_landing_page #p4b_upgrade").hide(),$("#p4b_information").slideDown(500),$("#p4b_information").get(0).scrollIntoView(),s("business_learnmore_page_click",{vendor_id:u,action:"switch_now"},this.model.get("currentUser")))},p4bNextClick:function(){var b=$.trim($("input[name='company_name']", | |
this.el).val()),c=$("select[name='industry'] option:selected",this.el).val(),d=$.trim($("textarea[name='address']",this.el).val()),e=$("select[name='state'] option:selected",this.el).val(),h=$.trim($("input[name='business_zip']",this.el).val());b&&c&&d&&e&&h?(this.yA=!0,this.ja(),z.b(zj,[b,c,d,e,h]),s("business_learnmore_page_click",{vendor_id:u,action:"next"},this.model.get("currentUser"))):(b=$("#p4b_information_errors"),b.show(),b.stop().css({backgroundColor:"red",color:"white"}).animate({backgroundColor:"white", | |
color:"red"},800),s("business_learnmore_page_click",{vendor_id:u,action:"validation_error"},this.model.get("currentUser")))},p4bCancelLinkClick:function(){setTimeout(function(){R(yu)},0)},CK:function(){this.yA&&(this.yA=!1,this.J(),this.Ox())},Ox:function(){R($u,{cancelCallback:function(){R(cv)}})},II:function(b){this.J();(new X({message:b.ng})).render()},ja:function(){this.T||($(window).scrollTop(0),this.T=new WA({model:this.model,message:id()}),$("#main").append(this.T.render().el))},J:function(){this.T&& | |
(this.T.trigger("close"),this.T=null)}});var Z; | |
(function(b){var c={skip:"tunervideo","return":"tunervideo",station:"tuner",shuffle:"tuner"},d=lp.SLOT_SIZE_AUTOPLAY_VIDEO,e=lp.SLOT_SIZE_USER_INITIATED_VIDEO;Z=function(b){this.model=b;this.ne=new Backbone.Model({creativeId:"",lineId:""});this.ta=new Y({model:this.model,adIdentifier:this.ne});this.Rk=_.bind(this.Rk,this);this.ta.bind(Y.ug.VIDEO_EVENT,this.Rk);this.Pk=_.bind(this.Pk,this);this.ta.bind(Y.ug.LOG_TIME_TO_PLAYER,this.Pk);this.ML="VideoAdController : ";this.jz();this.startTime=Ed();this.vm= | |
this.tj=this.De=this.wc=0;this.Li=this.Sf=!1;this.Xk=1;Z.xp=null;Z.dk=0;Z.ax=0;Z.$N="ooyala";Z.aO="standard";Z.iv=lp.AUDIO_AD_SIZE;z.c(Vf,r(this,function(){this.vm=Ed()}));z.c(Ae,r(this,this.jz));z.c(De,r(this,this.Xf));z.c(Fk,r(this,this.sR));z.c(Re,r(this,this.rR));z.c(Qk,r(this,this.hB));z.c(Rk,r(this,this.hB));z.c(Sk,r(this,this.lf));z.c(Tk,r(this,this.RD));z.c(Rk,Z.Oo);z.c(Pk,Z.EN);z.c(Xk,r(this,this.AM));z.c(Yk,r(this,this.JM));z.c(Zk,r(this,this.GM));z.c(Wk,r(this,this.pM));z.c(Vk,r(this,this.MD)); | |
this.Nk()&&z.c(Vk,r(this,this.OD))};Z.prototype.destroy=function(){this.ta.unbind(Y.ug.VIDEO_EVENT,this.Rk);this.ta.unbind(Y.ug.LOG_TIME_TO_PLAYER,this.Pk);this.cm&&(clearTimeout(this.cm),this.cm=null);z.pa(this)};Z.prototype.OD=function(b){b.size?Z.iv=b.size:k.debug("Ignoring Audio Ad Size Change to value: "+b.size)};Z.prototype.Pk=function(){if(!(0>=Z.dk)){if(11==this.model.get("currentUser").s%100){Z.ax=Fd();var b=Z.ax-Z.dk;Z.dk=0;var c="",c=this.ta.cB?Z.$N:Z.aO;s("time_to_player_web",{ua:navigator.userAgent, | |
site_version:window._pandoraVersion,browser:oe(),player_type:c,time_to_player_msec:b})}Z.dk=0}};Z.prototype.rq=function(b){return c[b]||"tuner"};Z.prototype.wL=function(){return null!=Ro()||"true"===Uo()||"true"===A._data.videoAdTestMode};Z.prototype.jz=function(){this.debug("AppInit event - reinitializing config variables");this.enabled=!0==A._data.apvEnabled;this.wL()?(this.xu=6,this.Qu=this.Nu=10,this.Pu=2):(this.xu=Do(A._data.timeToStartVideoAds,180),this.Pu=Do(A._data.timeBetweenDisplayAndVideoAd, | |
5),this.Nu=Do(A._data.timeBetweenAudioAndVideoAd,60),this.Qu=Do(A._data.timeBetweenVideoAds,900));this.DC=120};Z.prototype.Xf=function(){this.debug("USER-CHANGE event - reinitializing time & indexes");this.startTime=Ed();this.vm=this.tj=this.De=this.wc=0;this.Xk=1};Z.prototype.debug=function(b){k.debug(this.ML+Ed()+" : ",arguments)};Z.prototype.sR=function(){this.tj=Ed()};Z.prototype.hB=function(b){b&&!1===b.gb()&&(this.wc=Ed())};Z.prototype.rR=function(b){b instanceof po&&(this.De=Ed())};Z.prototype.H= | |
function(b,c){var d=this.model.get("currentUser"),e=this.model.get("currentStation");if(d){var t=this.model.get("hasStations"),y=c?!0:ay(),E=!d.p(),e=e&&C.za(e);return d.H()&&t&&y&&E&&!e}return!1};Z.prototype.us=function(){var b=Ed(),c=!1;this.enabled&&!this.Li&&b-this.vm>this.DC&&b-this.startTime>this.xu&&b-this.De>this.Nu&&b-this.wc>this.Qu&&b-this.tj>this.Pu&&(c=!0);this.debug("Ready for Video ad? : enabled : "+this.enabled+" : disabled for current station : "+this.Li+" : now : "+b+" : since start : "+ | |
(b-this.startTime)+" : since sv : "+(b-this.vm)+" : since lv : "+(b-this.wc)+" : since la : "+(b-this.De)+" : since ld : "+(b-this.tj)+" : ready : "+c);return c};Z.prototype.DA=function(){var b=this.model.get("currentStation"),b=null!==b&&!C.za(b),c=this.model.get("currentUser"),c=null!==c&&!c.p();return b&&c};Z.prototype.sD=function(b,c){if(!this.Nk())return!1;if("move"===b)this.wg("move",!1,c);else if("thumbsdown"===b)this.wg("thumbsdown",!1,c);else if("tired"===b)this.wg("tired",!1,c);else return!1; | |
return!0};Z.prototype.RD=function(b){var c=b?b.interaction:"";b=b?b.currentTrack:null;"skip"===c?this.wg("skip",!1,b):"station"===c?this.PD(b):"return"===c?this.wg("return",!0,b):this.sD(c,b)||z.b(Pk,{})};Z.prototype.PD=function(b){this.Li=!1;var c=this.model.get("currentStation"),d=null,d=c&&c.D()?"shuffle":"station";c&&!vn(c)?this.wg(d,!1,b):z.b(Pk,{interaction:d})};Z.prototype.AM=function(b){this.lx(b.key,b.value,!0)};Z.prototype.JM=function(b){b.callback&&(Z.Xa=b.callback);this.lx(b.key,b.value, | |
!1)};Z.prototype.GM=function(b){this.ZN(b.url,b)};Z.prototype.ND=function(b){this.Sf&&(this.debug("Got no ad in time ... bailing out"),this.Sf=!1,this.Kt=!0,z.b(Pk,{interaction:b}),z.b(ai,{userInitiated:!1}))};Z.prototype.nD=function(b,c,e,q,t){C.cg(B.Xi(),b,c,d,!1,r(this,function(c,l){var J=this.model.get("currentUser");J.wP&&""!=t&&(this.debug("Logging video ad urls into hive table"),s("ad_urls_comparing",{server_ad_url:t,client_ad_url:l,ad_type:"video"},J));Z.dk=Fd();J=this.rs(c,l,b,d);e&&(J&& | |
k.info("Received a video ad while in value exchange. Suppressing the video ad."),J=null,this.wc=Ed());z.b(Pk,{ad:J,interaction:q});this.Ac(J,q)}),r(this,function(){this.Jl();z.b(Pk,{interaction:q})}))};Z.prototype.mD=function(b,c,e){var q=this;c=c.split(":");var t=(To()?Ho():fn())+"util/dartCreative.jsp?ad="+c[0]+"&c="+c[1];this.debug("Get test ad : "+t);op(t,function(c){c=q.rs(c,t,b,d);z.b(Pk,{ad:c,interaction:e});q.Ac(c,e)},function(){q.Jl();z.b(Pk,{interaction:e})})};Z.prototype.uD=function(b, | |
c,d){if(!C.Ca()||"return"===b)return!1;if(!this.enabled||this.Li)return this.debug("video ads are not configured for current station."),d(!1),!0;if(!c||c.Iy())return this.debug("There is not music track for the current Chronos flow...not attempting to get ad from service."),d(!1),!0;b=c.r().n;var e=c.k.To,t=this.model.get("stationList").models,y=Tn(this.model.get("currentUser")),y={segment:y.charAt(y.length-1)};this.DA()&&(y.index=C.bl);C.lg(y,b,t);C.Re(y);t=this.rq(null);d=_.bind(function(b,c){if(_.isString(c))return b(!1), | |
!0;c=c||[];var d=_.filter(c,function(b){return"VIDEO_AD"===b.response.adType});this.debug("Number of Ads fetched :"+c.length);this.debug("Number of Video Ads fetched :"+d.length);d.length!==c.length&&this.debug("We got mixed types of ads!");b(0<d.length?d:!1);return 0<d.length},this,d);d=de(d,8E3,"REQUESTFAILED");var E=Z.iv,J=E===lp.AUDIO_IN_STATION_AD_SIZE;k.debug("Sending chronos (video) ad request");C.Wz({currentStationData:b,options:y,adToken:"none",callback:d,forcedAudioAd:Qo()||!1,lastDisplayAdTime:this.tj, | |
requestType:B.Xi(),subZone:t,currentSize:E,isInStationAd:J,currentStationTrack:c,currentStationTrackType:e,isUserInitiated:!0,handlerType:"VIDEO"});return!0};Z.prototype.$D=function(b,c,d,e){this.Sf?e(!1):this.H(!1,c)?this.uD(b,d,e)||e(this.us(b)):e(!1)};Z.prototype.pD=function(){var b={};this.DA()&&(b.index=this.Xk);var c=this.model.get("currentStation"),d=this.model.get("stationList").models;C.lg(b,c,d);C.Re(b);b.vx=this.model.get("currentVxReward")?"1":"";b[B.tg]=!0;return b};Z.prototype.aE=function(){var b= | |
this.model.get("currentVxReward");return b&&b.bn()};Z.prototype.lD=function(b,c){this.Sf=!0;var d=this.rq(b);this.debug("Ready to fetch Video Ad for "+b+" : from zone : "+d);this.Kt=!1;var e=this.pD(),t=this.aE(),y=Ro();!_.isNull(y)&&!_.isUndefined(y)&&0<y.length?this.mD(d,y,b):this.nD(d,e,t,b,c);this.cm=_.delay(r(this,this.ND),1E4,b)};Z.prototype.wg=function(b,c,d){z.b(Ok,b);this.$D(b,c,d,_.bind(function(c){var d="";"boolean"!==typeof c||c?("undefined"!=typeof c&&null!=c&&0<c.length&&(this.debug("Parsing server generated video ad url from response"), | |
"VIDEO_AD"==c[0].response.adType&&(c=c[0].response.content,null!=c&&"undefined"!=typeof c&&(d=c))),this.lD(b,d)):z.b(Pk,{interaction:b})},this))};Z.prototype.Ac=function(b){this.debug("Ready to show the current video ad : "+JSON.stringify(b)+" : tooLate? : "+this.Kt);!this.Kt&&b&&(clearTimeout(this.cm),this.ta.render(b))};Z.prototype.Jl=function(){this.Sf=!1};Z.prototype.rs=function(b,c,e,q){var t,y=null;t=null;null!==b?(t=this.dO(b),b=$.trim(b),y=new Gy(C.Gj(b,e,q)),null!==t&&2==t.length?(y.Jc=t[1], | |
y.Jo=t[0],this.ne.set({lineId:t[0],creativeId:t[1]})):this.ne.set({lineId:"",creativeId:""}),c=y.C(),this.debug("Got video ad for : subZone - "+e+" : slotSize - "+q+" : type - "+y.C()),"VIDEOAD"==c||"HOUSE"==c?this.debug("Got valid video ad! path = "+Ny(y)):"ANIMATEDOVERLAY"==c?this.debug("Got Animated overlay",y):(t="Invalid ad type ? "+c+" : for subzone : "+e,this.debug(t),mp(b,d,t,e,this.model.get("currentUser")),y=null)):(t="Empty ad for subzone : "+e,this.debug(t),mp(c,q,t,e,this.model.get("currentUser"))); | |
this.Jl();return y};Z.prototype.lx=function(b,c,d){this.debug("Ready to fetch user initiated Video Ad for key : "+b+" : val : "+c);if(b&&c){this.Sf=!0;var q=this.rq(null),t={};t[B.tg]=!0;var y={};y[b]=c;b=this.model.get("currentStation");c=this.model.get("stationList").models;C.lg(t,b,c);C.Re(t);var E=this,J=A._data.useTestAds;C.EO(q,t,y,e,function(b,c){!0===J&&(b="<methodResponse><params><param><value><struct><member><name>type</name><value><string>VIDEOAD</string></value></member><member><name>uif</name><value><string>vasttag</string></value></member><member><name>impression</name><value><string>http://www.pandora.com/impression</string></value></member><member><name>logoimage</name><value><string>/static/ads/video_overlay_logos/http://test.logo.url</string></value></member><member><name>clickthrough_logo</name><value><string><![CDATA[http://www.not/]]\x3e</string></value></member><member><name>clickthrough_videoPlayer</name><value><string><![CDATA[http://www.not/]]\x3e</string></value></member><member><name>image</name><value><string>/radio/static/ads/in_tuner_tile/http://test.tile.url</string></value></member><member><name>dimmed</name><value><string>/radio/static/ads/in_tuner_tile/http://test.tile.url</string></value></member><member><name>clickthrough_songSlide</name><value><string><![CDATA[http://www.not/]]\x3e</string></value></member><member><name>companion</name><value><string>companionValue</string></value></member></struct></value></param></params></methodResponse>"); | |
var h=E.rs(b,c,q,e);h.Wj(d);h.Ss(!1);E.Ac(h,"userInitiated")},function(){E.Jl()})}};Z.prototype.ZN=function(b,c){this.debug("Ready to play movie: "+b+", skip at: "+c.skipDelaySeconds+", show scrubber: "+c.showScrubber);this.Sf=!0;var d=this.model.get("currentStation");c.type="VIDEOAD";c.movie=b;c.onAdvertiserStation=d&&C.za(d);d=new Gy(c);d.Ss(!1);d.Wj(!1);d.rj=!0;c.creativeId&&(d.Jc=c.creativeId);c.adId&&(d.Jo=c.adId);this.Ac(d,"playMovie")};Z.prototype.lf=function(c){c&&(clearTimeout(Z.xp),Z.xp= | |
setTimeout(function(){k.info("Pinging Comscore for video ad playback");b.COMSCORE&&b.COMSCORE.beacon({c1:1,c2:"6036333",c3:"",c4:"",c5:"09",c6:"",c10:""})},3E3),c.gb()||void 0!=c.rj&&!0==c.rj||(this.Xk++,this.model.set({currentTrack:c})),this.Nk()&&"HOUSE"==c.C()&&(k.info("Chronos - we've got a HOUSE video start event - time to register the impression"),c=c.Jc,Z.EA&&(Z.og||(Z.og=0),Z.og+=1),C.Um(c,0,0,!0,function(){k.info("Chronos - HOUSE VideoAdImpression registered successfully")},function(){k.info("Chronos - ERROR REGISTERING HOUSE VIDEO AD IMPRESSION")})))}; | |
Z.prototype.dO=function(b){var c=/\x3c!-- *([0-9]+) *: *([0-9]+) *--\x3e/.exec(JSON.stringify(b));b=null;return c&&3==c.length&&(b=[c[1],c[2]],c=b[1],"undefined"!==typeof c&&"%ecid!"!==c)?b:null};Z.prototype.pM=function(){this.Li=!0};Z.Xa=null;Z.EN=function(b){b&&b.ad||!Z.Xa||(Z.Xa(),Z.Xa=null)};Z.Oo=function(){clearTimeout(Z.xp);Z.Xa&&(Z.Xa(),Z.Xa=null)};Z.FL=function(b,c){z.b(Xk,{key:b,value:c,isUserInitiated:!0})};Z.prototype.Nk=function(){var b=this.model.get("currentUser");return b&&b.Tq};Z.prototype.Rk= | |
function(b){if(this.Nk())switch(b.event_type){case "start":k.info("Chronos - we've got a video start event - time to register the impression");var c=b.creative_id,d=Number(Math.round(b.duration));b=!!b.is_pandora_link;Z.EA&&(Z.og||(Z.og=0),Z.og+=1);C.Um(c,-1,d,b,function(){k.info("Chronos - VideoAdImpression registered successfully")},function(){k.info("Chronos - ERROR REGISTERING VIDEO AD IMPRESSION")})}};Z.prototype.MD=function(b){b.adIdentifiers&&b.adIdentifiers.creativeId&&b.adIdentifiers.lineId&& | |
this.ne.set({lineId:b.adIdentifiers.lineId,creativeId:b.adIdentifiers.creativeId})};b.launchVideoAd=Z.FL;b.VideoAdController=Z})(this);function wB(b){this.model=b;this.ta=new $z({model:this.model});$.address.bind("change",r(this,this.Rr));W("/land",!0,!0,!0,r(this,this.BL));S(xw,r(this,this.$M));S(yw,r(this,this.ZM));S(zw,r(this,this.Hm));S(wv,r(this,this.iM));S(Ou,r(this,this.VM));S(bx,r(this,this.UM));S(Aw,r(this,this.rN));S(Bw,r(this,this.EM));S(Ew,r(this,this.Aj));S(Dw,r(this,this.yM));S(Gw,r(this,this.RM));S(Hw,r(this,this.OM));S(Iw,r(this,this.PM));S(Jw,r(this,this.QM));S(Cw,r(this,this.Aj));S(Fw,r(this,this.Aj));S(Lw,r(this, | |
this.Aj));S(Kw,r(this,this.NM));S(Mw,r(this,this.bM));S(Nw,r(this,this.aM));S(Zw,r(this,this.Ge));S(Pw,r(this,this.qN));S(Qw,r(this,this.mN));S(Rw,r(this,this.nN));S(Vw,r(this,this.TM));S($w,r(this,this.oN));S(Tw,r(this,this.tM));S(Uw,r(this,this.DM));S(Lu,r(this,this.iz));S(Mu,r(this,this.iz));S(Ww,r(this,this.Ge));S(Yw,r(this,this.Ge));S(hx,r(this,this.Fm));S(ix,r(this,this.Fm));S(rw,r(this,this.YM));S(sw,r(this,this.RN));S(Xw,r(this,this.bN));S(dw,r(this,this.Ge));S(ew,r(this,this.Ge));S(cx,r(this, | |
this.jN));S(Av,r(this,this.XM));S(Bv,r(this,this.WM));S(Cv,r(this,this.aN));z.c(Wi,r(this,this.LN));z.c(Vi,r(this,this.vN));z.c(ci,r(this,this.xN));z.c(ai,r(this,this.yN));z.c(ei,r(this,this.uN));z.c(fi,r(this,this.tN));z.c(gi,r(this,this.nM));z.c(hi,r(this,this.mM));z.c(qj,r(this,this.BM));z.c(rj,r(this,this.BN));z.c(li,r(this,this.cN));z.c(Li,r(this,this.HM));z.c(Ej,r(this,this.vM));z.c(Fj,r(this,this.CN));z.c(Ze,r(this,this.nz));z.c(kh,r(this,this.kz));z.c(jh,r(this,this.kz));z.c(Fe,r(this,this.KM)); | |
z.c(gj,r(this,this.Ge));z.c(Gj,r(this,this.Ge));z.c(Hj,r(this,this.Ge));z.c(Ee,r(this,this.Xf));z.c(Ne,r(this,this.kN));z.hb(Oe,r(this,this.pN));z.c(Ae,r(this,this.init));z.c(kl,r(this,this.lM));this.model.bind("change:modalPanel",r(this,this.pF));this.model.bind("change:currentUser",r(this,this.Xf));this.model.bind("change:currentStation",r(this,this.lN));this.model.bind("change:currentTrack",r(this,this.Hi));this.model.bind("change:stationSortOrderAlpha",r(this,this.iN));this.model.bind("change:displayingCompanion", | |
r(this,this.mG));this.model.bind("change:currentVxReward",r(this,this.JN));z.Eh(Re,r(this,this.wN));z.c(Rk,r(this,this.Oo));z.c(Qk,r(this,this.SD));z.c(Sk,r(this,this.lf));$("#ad_controls .skipLink").click(r(this,this.nz));this.CC=Do(A._data.timeBetweenAudioAndDisplayAd,5);this.EC=Do(A._data.timeBetweenVideoAndDisplayAd,5);this.Ou=Do(A._data.timeBetweenDisplayAds,5);this.uB="2000x2";this.BB="2000x2,300x250,300x600";this.ie="radio";this.rg="backstage";this.Fk="themedstation";this.yk="createstation"; | |
this.du="addvariety";this.Hu="share";this.jo="trial";this.vC=[this.yk,this.Fk,this.du,this.Hu,this.jo];this.IC="play|share|buy|lyrics|volume|likeUp|likeDown|rateUp|rateDown|pause|skip|playSample";this.mo="/radioAdEmbedGPT.html";this.lo="/radioAdEmbedAsyncGPT.html";this.Xu="/radioAdEmbedVx.html";this.Km=this.we=this.Ce=0;this.Ll=Go();this.xl=this.Ud=this.vc=!1;this.Rv=null;this.Ya=this.ie;this.wc=this.De=0;this.Zg=A._data.displayAd;xB=null;this.Zt=yB=!1;this.yl=this.Hp=0;this.sx=this.Gp=!1;this.Lu= | |
"246976901:44334262 215333213:33803897 246976901:44334262 210400547:43579993 246976901:44334262 246983691:44307832 215333213:33803897 246983691:44307832 210400547:43579993 246983691:44307832 246976901:44334262 215333213:33803897 210400547:43579993 215333213:33803897".split(" ");zB=this}var xB,yB,zB,AB,BB;f=wB.prototype;f.init=function(){this.Rv="2000x2,300x250";this.model.get("hasStations")||(this.Ll=!0)}; | |
f.Ac=function(b){var c=this.model.get("currentVxReward");c&&c.bn()?(op(C.dh(),function(){},function(){}),C.yx()):this.ta.render(b)};f.Xf=function(){var b=this.model.get("currentUser");(this.h=b)&&(b.H()||this.ta.ib(!0))};f.$c=function(){var b=this.model.get("currentUser");return b&&b.ye()&&!this.sx?this.lo:this.mo};f.Fm=function(){this.ta.ib(!0,!0)};f.pN=function(){this.model.get("hasStations")||this.ta.Bl()}; | |
f.lM=function(b){if(!this.Gp){var c=parseInt(b.delaySeconds,10);this.yl=isNaN(c)||c>So()?So():c;this.Hp=Ed();this.Gp=!0;var c=this.model.get("currentUser"),d=null,e=null;null!=b.currentLineIdCreativeId&&(b=b.currentLineIdCreativeId.split(":"),2==b.length&&(d=b[0],e=b[1]));s("delay_ad_refresh",{line_id:d,creative_id:e,delay_duration:this.yl,listener_id:c.s,vendor_id:u,device_id:se,accessory_id:null,device_os:oe(),client_timestamp:(new Date).format("yyyy-mm-dd HH:MM:ss",!0)},c)}}; | |
f.Hi=function(){var b=this.model.get("currentTrack");this.model.set({audioAdPlaying:b&&(b instanceof po||b.Kc||b.Ao&&!(b instanceof so))});b&&b instanceof po&&(this.Km=1);if(b instanceof Bn){var c=b.Af,d=b.rl;if(!c&&!d){var c="defaultaudiocompanion",e=this.model.get("currentStation");if(e&&e.Ka()||!(b instanceof po))c=null}if(c||d)d?-1==d.indexOf("{{startvastcompanion}}")&&(this.model.set({displayingCompanion:!0}),CB(this,{adContent:d}),this.Ac(this.$c())):(this.debug("requesting companion"),c={companion:c}, | |
b instanceof po&&(c.mad="audio"),this.model.set({displayingCompanion:!0}),DB(this,c),EB(this,this.ie),this.cg(c,!0))}else null!=b&&(this.model.set({displayingCompanion:!1}),this.Ya==this.ie&&this.Ud&&EB(this,this.rg))};f.YM=function(b){var c=b.companion;c&&(this.sx=void 0!=b.forceSyncGPT&&!0==b.forceSyncGPT?!0:!1,this.cg({companion:c},!0),b.isCompanionAd&&this.model.set({displayingCompanion:!0}))}; | |
f.RN=function(b){var c=null,d=b.width,e=b.height,h=b.creativeType,l=b.resourceType,p=b.url,q=b.htmlCode,t=b.clickThroughUrl;b=b.pandoraContainer;if(d&&e){var y=this.ta.YN(d,e);l?"HTML"==l?(b=b.split("{{startvastcompanion}}")[0]+q,b=b.replace("{{format}}",y)):"static"==l?(b=b.replace("{{startvastcompanion}}"," "),b=b.replace("{{format}}",y),b=b.replace("{{imageurl}}",p),b=b.replace("{{clickthrough}}",t),-1<h.indexOf("swf")||-1<h.indexOf("flash")?b='<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js">\x3c/script>'+ | |
b+"<script>swfobject.embedSWF('"+p+"', 'vcPayload',"+d+","+e+", '8', null, {'allowscriptaccess': 'always'}, {'wmode': 'opaque'}, {'id':'vastCompanionSWF'});\x3c/script>":-1<h.indexOf("jpg")||-1<h.indexOf("jpeg")||-1<h.indexOf("png")||-1<h.indexOf("gif")||(c="resource type is static, but creativeType isn't flash or static image")):c="unrecognized type; must be html / flash / or gif:png:jpg image":c="resourceType is required"}else c="width and height are required attributes";c?mp("Ooyala VAST Companion", | |
"2000x2","AdController.parseVastCompanion - "+c,"radio",v.h):(this.model.set({displayingCompanion:!0}),CB(this,{adContent:b}),this.Ac(this.$c()))};f.H=function(){var b=this.model.get("currentUser"),c=Wy();return c&&c.match("^/(payment|one|business)")?!1:b?(c=(c=this.model.get("modalPanel"))&&c!=iu?!1:!0,b.H()&&c):!1};f.yM=function(){this.Ud&&(this.vc=!0);GB(this,"",!0)};f.Aj=function(b){this.Ud&&(this.vc=!0,b&&b.target&&(b=$(b.target),b.attr("href")&&!b.attr("target")&&(this.vc=!1)));GB(this,"",!1)}; | |
f.iN=function(){HB(this,"sort",!1)};f.cN=function(){this.model.get("currentStationViewIsShuffle")&&HB(this,"shuffle",!1)};f.EM=function(){HB(this,"nowPlaying",!0)}; | |
f.lN=function(){var b=this.model.get("currentStation"),c=null,d=this.model.get("currentVxReward");d&&(!this.H()||b&&C.za(b)?this.ta.lm():d.eh()?(this.Zt||(C.gA(d.eh()),this.ta.render(this.Xu),this.Zt=!0),this.ta.TP()):this.ta.lm());if(this.bt){this.bt=!1;if(xB){var e=xB;xB=null}EB(this,this.ie);d=tn(b);if(this.H()&&!C.za(b)&&d&&("artist"==d.type||"song"==d.type)){b={csfo:1};e&&(b.companion=e);DB(this,b);this.cg(b,!0);this.Ce=Ed();return}}ay()&&EB(this,this.ie);this.Ce=Ed();ae(this,function(){var b= | |
this.model.get("currentStation");C.za(b)?(GB(this,null,!0),this.xl=!1):this.xl?this.xl=!1:this.Ya==this.Fk||this.vc&&JB(this,this.rg)||JB(this,this.ie)||(c=b&&b.D()?"shuffle":"station",HB(this,c,!0))},300)};f.bM=function(){var b=this.model.get("currentUser");null==b||b.p()?HB(this,"addVariety",!0):KB(this,"addVariety",this.du,function(b){return[B.Bc(b,{tile:2,sz:"2000x23"}),B.Bc(b,{tile:3,sz:"155x60"})]},{})}; | |
window.setAddVarietyLogo=function(b,c){$("#addVarietySponsorship a").attr("href",c).html('<img border="0" src="'+b+'">');$("#addVarietySponsorship").show()};f=wB.prototype;f.aM=function(){HB(this,"",!1)};f.qN=function(){HB(this,"rename",!0)};f.mN=function(){HB(this,"delete",!0)};f.nN=function(){2==this.model.get("stationList").length&&HB(this,"",!0)};f.HM=function(){LB(this,"playSample")};f.vM=function(){LB(this,"follow")};f.CN=function(){LB(this,"unfollow")}; | |
f.KM=function(){var b=Wy();(!b||"/feed"!==b.substring(0,5)&&"/connect"!==b.substring(0,8))&&LB(this,"profile",!0)};f.tM=function(){LB(this,"others",!0)};f.TM=function(){LB(this,"",!0)};f.Ge=function(){LB(this,"")};f.iz=function(){this.Ud&&(this.vc=!0);LB(this,"")}; | |
f.oN=function(b){var c=this.model.get("stationList"),d=b.e(),c=c.detect(function(b){return b.Wi()==d});if(C.za(c||b))this.model.set({shareFirstImp:!1}),LB(this,"stationDetails",!0);else if(this.Ll||0<this.we)JB(this,this.rg)||LB(this,"stationDetails",!0)};f.nz=function(b){b instanceof po||MB(this,"skip");return!1};f.kz=function(){MB(this,"outOfSkips")};f.xN=function(b){void 0!=b&&!0!=b||MB(this,"pause")};f.vN=function(){MB(this,"tired")};f.LN=function(){MB(this,"whyTrack",!0)}; | |
f.uN=function(){MB(this,"rateUp")};f.tN=function(){MB(this,"rateDown")};f.nM=function(){MB(this,"rateDown")};f.mM=function(){MB(this,"rateUp")};f.BM=function(){MB(this,"likeUp")};f.BN=function(){MB(this,"likeDown")};f.Hm=function(){MB(this,"volume")};f.$M=function(){GB(this,"lyrics",!0)};f.ZM=function(){GB(this,"lyrics",!0)};f.iM=function(){MB(this,"buy",!0)};f.yN=function(b){!0==(b?b.userInitiated:!1)&&MB(this,"play")};f.DM=function(){MB(this,"moveTrack",!0)}; | |
f.NM=function(b){var c="";"station_list"==b&&(c="stationScroll");MB(this,c)};function MB(b,c,d){setTimeout(r(b,function(){GB(this,c,d)}),10)}f.rN=function(){setTimeout(r(this,function(){this.Ce=0;this.Ya="radio";GB(this,"return",!1)}),500)};f.mG=function(){this.model.get("displayingCompanion")&&(null!=this.Wd&&(this.Ya=this.Wd,this.Wd=null),NB(this))}; | |
function NB(b){b.debug("hiding sponsorships");$("#addVarietySponsorship a").attr("href","#").empty();$("#addVarietySponsorship").hide();$("#themeSponsorship a").attr("href","#").empty();$("#themeSponsorship").hide();$("#shareSponsorship a").attr("href","#").empty();$("#ShareSponsorship").hide();$(".createStationSponsorship a").attr("href","#").empty();$(".createStationSponsorship").hide();b.bt=!1;AB=xB=null;$("#sponsoredTrial a").attr("href","#").empty();$("#sponsoredTrial").hide()} | |
function HB(b,c,d){!b.vc||"station"!=c&&"shuffle"!=c?EB(b,b.ie):EB(b,b.rg);GB(b,c,d)}function LB(b,c,d){EB(b,b.rg);GB(b,c,d)}f.kN=function(b){var c=this.model.get("currentStation");c&&c.e()==b.e()&&(JB(this,this.ie)||HB(this,"",!0))};f.BL=function(b){(b=b.queryString)&&-1<b.indexOf("shareImp")&&this.model.set({shareFirstImp:!0})};f.XM=function(){OB(this,"artist")};f.WM=function(){OB(this,"")};f.aN=function(){this.Ud||(this.vc=!0);OB(this,"song")}; | |
function OB(b,c){(0<b.we||b.Ll)&&!JB(b,b.rg)&&LB(b,c,!1)}function JB(b,c){var d=!1;b.model.get("shareFirstImp")&&PB(b)&&(d={shareimp:"1"},EB(b,c),DB(b,d),CB(b,d),b.Ac(b.$c()),b.Ll=!0,d=b.xl=!0);b.model.set({shareFirstImp:!1});return d}function PB(b){var c=b.model.get("currentStation");return c&&C.za(c)?!1:(c=b.model.get("currentUser"))&&c.p()||b.model.get("displayingCompanion")?!1:b.H()} | |
f.Rr=function(b){b=b.path;var c=null,d=this.model.get("currentUser");d&&d.p()&&b.match("/account/|/payment")?this.ta.ib():0==this.we&&(b.match("^/music/song")||b.match("^/land/song"))?this.vc=!0:(b.match("^/feed|^/connect")?c="feed":b.match("/payment|/go/")&&(c=""),null!=c&&(b.match("/volume/*|/stations/share/|/inactive|/song/(move|sleep)")||(b.match("^/{1}$|/stations/(play|rename|variety|delete)/*")?EB(this,"radio"):EB(this,"backstage")),GB(this,c,!0)))}; | |
f.pF=function(){if($("#mainContentContainer").is(":visible"))return!0;this.ta.ib();return!1};function DB(b,c){var d=b.model.get("currentStation"),e=b.model.get("stationList").models;C.lg(c,d,e);C.Re(c)} | |
f.us=function(){var b=Ed(),c=!1;b-this.De>this.CC&&b-this.wc>this.EC&&b-this.Ce>this.Ou&&b-this.Hp>this.yl&&(c=!0);this.debug(+b+" : since last audio ad: "+(b-this.De)+" : since last video ad: "+(b-this.wc)+" : since last display ad: "+(b-this.Ce)+" : interval : "+this.Ou+" : delay ad refresh timestamp: "+this.Hp+" : delay ad refresh duration: "+this.yl+" : ready?: "+c);return c}; | |
function KB(b,c,d,e,h){b.H()?b.model.get("displayingCompanion")||C.za(b.model.get("currentStation"))||b.model.get("currentVxReward")||(b.Wd=b.Ya,EB(b,d),QB(),b.we++,h.index=b.we,h.tile=1,c&&""!=c&&(h.interaction=c),DB(b,h),b.debug("Requesting Sponsorship Ad for Interaction: "+c),CB(b,h),null!=e&&C.dh()&&C.$O(e(C.dh())),b.Ac(b.$c())):b.ta.ib()} | |
function GB(b,c,d){if(null!=b.Rv)if(b.H()){if(!(!d&&!1==b.us()&&"skipAd"!=c||b.model.get("displayingCompanion")||"pause"==c&&window.ignorePauseInteractions))if(QB(),b.Ya==b.Fk&&b.kq)RB(b,c);else if(b.Ya!=b.yk&&b.Ya!=b.jo){var e={tile:1},h=!0;C.za(b.model.get("currentStation"))&&(h=!1);h&&(b.we++,e.index=b.we,0<b.Km&&(e.p1n=b.Km++));if((h=Wy())&&"/profile"===h.substring(0,8))(h=b.model.get("currentProfileInfo"))&&h.isAdvertiser&&(e.webname=h.webName);else if("stationDetails"===c){var l=$(".stationCreator a"), | |
h=l.attr("data-advertiser"),l=l.attr("data-webname");"true"==h&&l&&(e.webname=l)}c&&""!=c&&(e.interaction=c);DB(b,e);b.debug("Requesting Ad for Interaction: "+c);b.cg(e,d)}}else b.ta.ib()} | |
f.cg=function(b,c){!c&&1>=Ed()-this.Ce?this.debug("Within one second"):(CB(this,b),le(A._data.testAdSequence)&&(A._data.companionAd="246977428:44308599",this.Zg=this.Lu[(this.we-1)%this.Lu.length]),this.Zg?(2!=this.Zg.split(":",2).length?this.debug("displayAd tunerVar form is: ?displayAd=AdId:CreativeId"):this.Ac(this.$c()+"?displayAd="+this.Zg),-1!=document.location.search.indexOf("onlyFirstForced")&&(this.Zg=null)):this.Ac(this.$c()))}; | |
function CB(b,c){b.Ce=Ed();b.Gp=!1;c.vx=b.model.get("currentVxReward")?"1":"";b.model.get("displayingCompanion")?c.sz=b.uB:c.sz=b.BB;if(b.vc||b.Ud&&c.interaction&&"undefined"!=c.interaction&&-1<b.IC.indexOf(c.interaction)){b.Ud=!0;var d=b.model.get("currentStation");d&&C.za(d)||$.extend(c,{pg:"song"})}else b.model.get("displayingCompanion")||(b.Ud=!1);b.vc=!1;b.Zg||((d=c.adContent)?C.Ps(d):(C.Ps(null),C.aA(b.Ya,c,c.sz)))} | |
function EB(b,c){c!=b.Ya?(b.debug("subZone changing from: "+b.Ya+" to "+c),_.contains(b.vC,b.Ya)?NB(b):b.Ce=0,b.Ya=c):b.debug("subZone is:"+b.Ya)}f.debug=function(b){k.debug("AdController : ",b)};f.wN=function(b){b instanceof po&&(this.De=Ed())};f.SD=function(b){b&&!1==b.gb()&&(this.wc=Ed());this.model.set({videoAdPlaying:b})};f.lf=function(b){b&&!1==b.gb()&&(this.wc=Ed())};f.Oo=function(b){b&&!1==b.gb()&&(this.wc=Ed());this.model.set({videoAdPlaying:null});this.Km=1}; | |
function QB(){window.ignorePauseInteractions=!1}window.setIgnorePauseInteractions=function(b){window.ignorePauseInteractions=b};wB.prototype.bN=function(b){var c=this.model.get("currentUser");null==c||c.p()?LB(this,""):(this.kq=b.gcat)&&RB(this,"")};function RB(b,c){var d=b.model.get("currentUser");null==d||d.p()?LB(b,c):KB(b,c,b.Fk,function(b){return[B.Bc(b,{tile:2,sz:"2000x23"}),B.Bc(b,{tile:3,sz:"155x60"})]},{gcat:b.kq})} | |
window.setThemedStationLogo=function(b,c){$("#themeSponsorship a").attr("href",c).html('<img border="0" src="'+b+'">');$("#themeSponsorship").show()};wB.prototype.RM=function(){NB(this);var b=this.model.get("currentUser");null==b||b.p()?this.Aj(null):(this.Ud&&(this.vc=!0),KB(this,"",this.yk,r(this,function(b){return[B.Bc(b,{tile:2,sz:"2000x23"}),B.Bc(b,{tile:3,sz:"155x60"})]}),{}))};wB.prototype.OM=function(){null!=this.Wd&&(this.Ya=this.Wd,this.Wd=null)}; | |
wB.prototype.PM=function(){AB?(this.Ya=this.yk,$(".createStationSponsorship a").attr("href",BB).html('<img border="0" height="100%" src="'+AB+'">'),$(".createStationSponsorship").show()):GB(this,"",!0)};wB.prototype.QM=function(){this.bt=!0};window.setStationCreationLogo=function(b,c){AB=b;BB=c;$(".createStationSponsorship a").attr("href",c).html('<img border="0" height="100%" src="'+b+'">');$(".createStationSponsorship").show()};window.setStationCreationFollowOnURL=function(b){xB=b}; | |
wB.prototype.VM=function(){NB(this);this.model.get("currentUser");PB(this)?KB(this,"",this.Hu,r(this,function(b){return[B.Bc(b,{tile:2,sz:"2000x23"}),B.Bc(b,{tile:3,sz:"155x60"})]}),{interaction:"share"}):MB(this,"share")};wB.prototype.UM=function(){null!=this.Wd&&(this.Ya=this.Wd,this.Wd=null)}; | |
wB.prototype.JN=function(){var b=this.model.get("currentVxReward");if(b){yB=b.bn();var c=this.model.get("currentUser"),d=this.model.get("currentStation");c.H()&&d&&!C.za(d)?(b.eh()?(C.gA(b.eh()),this.ta.render(this.Xu)):this.ta.lm(),this.Zt=!0):this.ta.lm()}else yB=!1};window.setShareLogo=function(b,c){$("#shareSponsorship a").attr("href",c).html('<img border="0" height="100%" src="'+b+'">');$("#shareSponsorship").show()}; | |
wB.prototype.jN=function(b){NB(this);KB(this,"",this.jo,r(this,function(b){return[B.Bc(b,{tile:2,sz:"2000x23"}),B.Bc(b,{tile:3,sz:"155x60"})]}),b)};window.setSponsoredTrialLogo=function(b,c){$("#sponsoredTrial a").attr("href",c).html('<img border="0" height="100%" src="'+b+'">');$("#sponsoredTrial").show()}; | |
window.showGoogleAdWords=function(){yB||($("#google_adwords").show().css("visibility","visible"),$("#google_adwords_frame").attr("src","/static/ads/google-adwords/google.html?r="+(new Date).getTime()),SB())};window.loadBottomAd=function(){if(!yB){var b=$("#advertisement_bottom");b.show().css({visibility:"visible",opacity:1});var c={};C.Re(c);C.aA("radio",c,"2000x19");var c="ad"+(new Date).getTime(),d=zB.$c()+"?cb="+ge();b.html('<IFRAME id="'+c+'" src="'+d+'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" allowtransparency="true" width="100%" height="100%"></IFRAME>')}}; | |
window.showAdControls=function(){yB||$("#ad_controls").show().css("visibility","visible")};function SB(){yB||$("#ad_your_ad_here").show().css("visibility","visible")}window.showYourAdHere=SB;window.loadAdBriteTicker=function(){};var re,Wy,V,cz,dz,W,jz,$A,TB,UB,VB,WB,XB,YB,ZB,$B,aC,bC,cC,dC,eC,fC,gC,hC,iC,jC;TB=[];UB=[];XB=WB=VB=!1;$B=ZB=YB=null;aC=!1; | |
bC=function(b){re=b;$.address.tracker(null);$.address.change(cC);z.c(Pg,function(){if(dC()||uo())XB=!0});z.c(Qg,function(){XB&&(XB=!1,setTimeout(function(){var b=dC();if(b){eC();var d;d=b||"";var e=$.address.queryString();if(e&&_.isString(e)&&!_.isEmpty(e)){var h=d.split("#"),l=h.slice(1,h.length).join("#"),p=h[0],q=d.split("?"),t=q.slice(1,q.length).join("?");d=1==h.length&&1==q.length?d+"?"+e:1<q.length?[p,"?",t,"&",e,_.isEmpty(l)?"":"#",l].join(""):[p,"?",e,_.isEmpty(l)?"":"#",l].join("")}else d= | |
d||"";V(d,!1,!1)}else zo();d=re.get("modalPanel");$("#mainContentContainer").is(":visible")||null!=d&&d!=iu||"/account/reset-password"==b||R(yu)},1))});z.c(Ae,function(){$.cookie("_query",null);WB=!0;if(YB){if(az(re)){var b=YB.path;if(0==b.indexOf("/station/play")||0==b.indexOf("/land/station")||0==b.indexOf("/station/start"))return}cC(YB);YB=null}})};fC=function(){return null!=dC()}; | |
cC=function(b){var c=b.path,d="";1<c.split("/").length&&(d=c.split("/")[1]);var e=_.contains(kC,d);if("/_=_"!=c&&(!XB||e))if(WB)if(re.get("siteLocked")&&0!=c.indexOf("/account/")&&0!=c.indexOf("/payment")&&0!=c.indexOf("/one")&&"inactive"!=d&&!e)k.info("site is locked, ignoring hash update for "+c);else if(e=re.get("currentUser"),uo()||null!=e&&!e.p()||0!=c.indexOf("/payment")&&0!=c.indexOf("/account/info")&&0!=c.indexOf("/account/privacy")&&0!=c.indexOf("/account/notices")&&0!=c.indexOf("/account/upgrade")&& | |
0!=c.indexOf("/account/billing")&&0!=c.indexOf("/account/receipts")&&0!=c.indexOf("/account/audioQuality")&&0!=c.indexOf("/account/desktopApp")&&0!=c.indexOf("/account/startTrial")&&0!=c.indexOf("/subscriptionInfo"))if(e&&(e.Sa()&&e.xj||Pn(e))&&(0==c.indexOf("/payment")||0==c.indexOf("/account/upgrade")||0==c.indexOf("/account/startTrial")||0==c.indexOf("/pandoraOneInfo")||0==c.indexOf("/one")||0==c.indexOf("/_one")||0==c.indexOf("/business")||0==c.indexOf("/payment/99")))setTimeout(function(){R(yu)}, | |
50);else{if(e&&(e.Sa()||e.P())&&(0==c.indexOf("/payment")||0==c.indexOf("/subscriptionInfo"))){var h=!0;e.u!=m.v.sg()&&e.u!=m.v.xd()||0!=c.indexOf("/payment/business")||(h=!1);if(h){V("/account/billing",!0,!0);return}}if(e&&e.P()){if("payment"==d&&-1==c.indexOf("/payment/business")){setTimeout(function(){R($u)},0);return}if(0==c.indexOf("/account/upgrade")||0==c.indexOf("/account/startTrial")||0==c.indexOf("/pandoraOneInfo")||0==c.indexOf("/one")||0==c.indexOf("/_one")){setTimeout(function(){R(yu)}, | |
0);return}}cz();if(!VB){VB=!0;for(var d=h=!1,l=0;l<TB.length;l++){var p=TB[l];if(p.uv?c==p.hi||0==c.indexOf(p.hi+"/"):p.hi==c)if(d=!0,!p.Dw(c)||h||lC(c)||(h=!0,bz()),p=p.$C){var q=!1;gC&&(q=gC.gb());p(b,q)}}hC(e);null==mC&&(lC(c)||bz());if(!d)for(b=0;b<UB.length;b++)if(0==c.indexOf(UB[b])){d=!0;break}b=VB=!1;d||(d=!0,e=fe(c),1==e.length?(R(Av,c),Hp(["artist_page_hit","music_page_hit","backstage_page_hit"]),b=!0):2==e.length?"fans"==e[1]?R(Dv,c):(R(Bv,c),Hp(["album_page_hit","music_page_hit","backstage_page_hit"]), | |
b=!0):3==e.length?(R(Cv,c),Hp(["song_page_hit","music_page_hit","backstage_page_hit"]),b=!0):(z.b(Ih,c),d=!1),d&&bz());b||iC(c);0==c.indexOf("/everywhere")&&R(Fw)}}else re.set({modalPanel:iu},{silent:!0}),re.set({modalPanel:lu}),"/account/billing"==c?re.set({postLoginPath:"/account/billing"}):0==c.indexOf("/payment")&&re.set({postLoginPath:c});else(null==YB||"/"==YB.path&&"/"!=b.path)&&"/inactive"!=b.path&&(k.info("AddressController: saving initial event: ",b),YB=b)}; | |
hC=function(b){b&&!b.H()?document.title=aa():null==mC&&window.history.pushState||(document.title=ba())}; | |
cz=function(b){setTimeout(function(){var c=Wy();null!=b&&(c+=(-1==c.indexOf("#")?"#":"")+b);if(null==ZB)ZB=c;else if(c!=ZB){ZB=c;var d;if(Pp(c))d=Pp(c);else if(Qp(["/fans"],c))d="fans";else if(0<=c.indexOf("/station/play"))d="now-playing";else{d=c;var e=["/search"];d.match(/^\/music/)||Qp(e,d)?d="backstage":(d=["/feed"],"/connect"===c||Qp(d,c)?d="feed":(d=c,e=["/profile"],d=d.match(/\/station\/[0-9]+/)||Qp(e,d)?"profile":Rp(c)?Rp(c):0<=c.indexOf("/everywhere/")?"everywhere":Qp(["/gift","gift%"],c)? | |
"gift":Qp("/about /contact /privacy /legal /advertising /newpandora /roku /u/ /new/ content/connect survey att/download iphone/register ipad/register squid-health radio-health sony_iptv restricted".split(" "),c)?"misc":"other"))}"/"!=d.charAt(0)&&(d="/"+d);k.debug("sending google analytics event: "+d);"/other"===d?window.ga("send","pageview",{page:d,title:c}):window.ga("send","pageview",d)}},1)};W=function(b,c,d,e,h,l){b=new Ey(b,c,d,e,h,!0===l);TB.push(b);return b};dz=function(b){UB.push(b)}; | |
V=function(b,c,d,e){c&&(YB=null);gC=b=new Ey(b,!1,c,d,null,!0===e);b.update();gC=null};jz=function(){$.address.history(!1);$.address.value("");$.address.history(!0)};Wy=function(){return $.address.path()}; | |
iC=function(b){null!=b&&(k.debug("path: "+b),0===b.indexOf("/profile")?Hp(["profile_page_hit","backstage_page_hit"]):0==b.indexOf("/station")&&0!=b.indexOf("/station/play")&&0!=b.indexOf("/stations")?Hp(["station_page_hit","backstage_page_hit"]):0===b.indexOf("/")&&1==b.length?s("home_page_hit",null,null):s("backstage_page_hit",null,null))};$A=function(b){$B=b};eC=function(){$B=null};dC=function(){if(null!=$B)return $B;jC();return $B}; | |
jC=function(){if(!aC){aC=!0;var b=$.cookie("ini");ve("ini");if(ie(b))k.info("found startHash in cookie: "+b),$A(b);else{b=window.LANDING_PATH;null!=b&&(-1!=b.indexOf("#")?b=b.substring(b.indexOf("#")+1):-1!=b.indexOf("?")&&(b=b.substring(0,b.indexOf("?"))));if(je(b)||"/"==b)b=Wy(),"/"==b&&(b=window.location.pathname);"/"!=b&&(k.info("found startHash in URL: "+b),$A(b))}}};var mC=null;function lC(b){return 0==b.indexOf("/music/artist")||0==b.indexOf("/music/composer")||0==b.indexOf("/music/album")||0==b.indexOf("/music/song")} | |
function bz(b){setTimeout(function(){var c=document.location.href;null!=b&&(c+=(-1==c.indexOf("#")?"#":"")+b);if(c!=mC){mC=c;k.info("fireComscoreNeilsenBeacons",c);var d=re?re.get("currentUser"):null;window.COMSCORE&&window.COMSCORE.beacon({c1:2,c2:"6036333",c3:"",c4:escape(c),c5:"",c6:"",c15:"",cs_xi:nC(d),cs_wn:oC(d)});pC();window.fireNeilsenBeacon(b)}},1)} | |
function oC(b){var c=null;if(null!==b&&!b.p()){var c=parseInt(b.Cg,10)+1999,d=null;switch(Un(b)){case "M":d=1;break;case "F":d=2;break;case "":d=0}c="u"+c+"z"+d}return c}function nC(b){var c=null;null===b||b.p()||(c=CryptoJS.SHA1(b.s).toString(CryptoJS.enc.Base64));return c} | |
function pC(){s("comscore",{event:document.location.href,is_error:!1,vendor_id:"100",device_code:"1880",app_version:z.ba,device_os:oe(),client_timestamp:(new Date).format("yyyy-mm-dd HH:MM:ss",!0)},re?re.get("currentUser"):null)}window.logComscore=pC;function qC(b){this.model=b;this.Iw=this.nj=null;z.c(De,r(this,this.$a));z.c(Pf,r(this,this.Of));z.hb(Pf,r(this,this.BK));z.c(Ee,r(this,this.Of));z.c(mh,r(this,this.$H));z.c(uf,r(this,this.sJ));z.c(xi,r(this,this.HJ));z.c(pi,r(this,this.nJ));S(wu,r(this,this.Hn));S(yv,r(this,this.bK));this.model.bind("change:keyPressed",r(this,this.Hn));this.model.bind("change:currentUser",r(this,this.tI))}f=qC.prototype; | |
f.$a=function(b){if(null!=b&&(z.b(Oi),!b.Sa()))try{Kt(function(c){s("listener_adblock",{adblock:c,vendor_id:u,device_id:se},b)})}catch(c){}this.Of(b)}; | |
f.Of=function(b){trackJs.configure({userId:b.Jf()});Ux(".facebookConnectedPopup");var c=$.cookie("v3ad"),c=c?c[0]:"0",d=$("#splash .logo img");0<d.length&&b&&b.of&&c!=b.of[0]&&d.attr("src",d.attr("src").replace(/\?cachebuster=\d*/,"")+"?cachebuster="+(new Date).getTime());d=this.model.get("currentUser");c=!d||!b||d.s!=b.s;d=d&&b&&d.rh!=b.rh;this.model.set({currentUser:b});d&&this.Hn();c&&this.model.set({twitterAuthenticated:!1,facebookAuthenticated:!1});null==b?this.model.set({stationToAutoPlay:null, | |
expired:!1}):(c=b.u,go(b)||c==m.v.lu()||c==m.v.Ku()||b.tb==m.sa.ko()||b.tb==m.sa.Su()?b.tb==m.sa.ko()?(V("/"+rC,!0,!0),this.model.set({expired:!0})):b.tb==m.sa.Su()?(V("/"+sC,!0,!0),this.model.set({expired:!0})):b.p()&&!jo(b)?this.model.set({forceRegistration:!0}):go(b)?(go(b)&&b.tb==m.sa.LB()?V("/"+tC,!0,!0):go(b)&&b.tb==m.sa.fo()?V("/"+uC,!0,!0):go(b)&&b.tb==m.sa.vB()?V("/"+vC,!0,!0):go(b)&&b.tb==m.sa.uC()?V("/"+wC,!0,!0):go(b)&&b.tb==m.sa.jC()?V("/"+xC,!0,!0):fo(b)?V("/"+yC,!0,!0):V("/"+uC,!0, | |
!0),this.model.set({expired:!0})):z.b(pi):this.model.set({expired:!1}),this.model.get("booting")&&!this.model.get("expired")&&(c=b.YO||0,d=km(im)||0||0,d=!!A._data.sessionStartDialogTestMode||Date.now()-d>864E5*c,c&&b.Xb&&b.wQ&&d&&(new lA({model:this.model})).render()));c=this.model.get("modalPanel");this.model.get("booting")||c==iu||"WELCOME_SEARCH"==c||null!=b&&!b.p()||jz()}; | |
f.nJ=function(){var b=$("#splash .logo img");0<b.length&&($.cookie("v3ad",null,{path:"/"}),b.attr("src",b.attr("src").replace(/\?cachebuster=\d*/,"")+"?cachebuster="+(new Date).getTime()))};f.BK=function(){var b=this.model.get("modalPanel"),c=this.model.get("currentUser");b!=iu||this.model.get("hasStations")||null==c||c.p()||this.model.set({modalPanel:"WELCOME_SEARCH"});R(yu)};f.$H=function(){this.model.set({anonymousTrialExpired:!0});this.model.set({forceRegistration:!0})};f.sJ=function(b){this.model.set({monthlyListening:b})}; | |
f.bK=function(){new Nz};f.tI=function(){var b=this.model.get("currentUser");b&&(b=b.s,b!=this.Iw&&(this.Iw=b,this.Hn()))};f.Hn=function(){this.nj&&(clearTimeout(this.nj),this.nj=null);this.model.set({idle:!1});this.model.get("currentUser")&&zC(this)}; | |
function zC(b){clearTimeout(b.nj);b.nj=ae(b,function(){var b=this.model.get("currentUser");k.info("timed out for inactivity. Listener has "+b.lk+" timeout credit(s)");var d=this.model.get("currentVxReward");d&&d.mA()?(k.info("Ignoring activity timeout since listener is in value exchange."),d=this.model.get("halt_id"),s("listener_idle",{action:"vx_suppressed",active:"true",halt_id:d,vendor_id:u,device_id:se},b),zC(this)):0<b.lk?(k.info("ignoring activity timeout as listener has "+b.lk+" timeout credit(s). Will now cash in a timeout credit."), | |
z.b(Lj),zC(this)):this.model.set({idle:!0})},Rn(b.model.get("currentUser")))}f.HJ=function(){var b=this.model.get("currentUser");b&&ie(Eo())&&(wp("http://fbads.adparlor.com/conversion.php?adid=586"),wp("https://shareasale.com/sale.cfm?amount=0.00&tracking="+b.s+"&transtype=lead&merchantID=34903"))};function AC(b){this.model=b;this.pn=this.fk=this.ek=null;S(yu,r(this,this.Wa));S(pv,r(this,this.mQ));S(qv,r(this,this.lQ));S(Xv,r(this,this.Nd));S(Yv,r(this,this.Od));S(Vu,r(this,this.OP));S(Av,r(this,this.oA));S(Bv,r(this,this.oA));S(Cv,r(this,this.NP));S(Dv,r(this,this.rA));z.hb(Fg,r(this,this.vq));z.c(Di,r(this,this.Ux));z.c(Jg,r(this,this.Ux));z.c(gg,r(this,this.jt));z.c(Yj,r(this,this.sA));z.c(Zj,r(this,this.QP));z.c(bh,r(this,this.sA));z.c(ch,r(this,this.XG));z.c(rh,r(this,this.Wa));z.c(ig, | |
r(this,this.IP));z.c(mg,r(this,this.pJ));z.c(Yg,r(this,this.KJ));z.c(Hh,r(this,this.EK));this.model.bind("change:modalPanel",r(this,this.ia));this.model.bind("change:hasStations",r(this,this.Wa));this.model.bind("change:readonly",r(this,this.Wa));this.model.bind("change:expired",r(this,function(){this.model.get("expired")||this.Wa()}));this.model.bind("change:resettingPassword",r(this,function(){this.model.get("resettingPassword")||this.model.get("modalPanel")!=ju&&this.model.get("modalPanel")!=mu&& | |
this.model.get("modalPanel")!=pu&&ae(this,function(){this.Wa()},1)}));this.oE=(new NA({model:this.model})).render();W("/",!1,!0,!0,r(this,function(b){var d=this.model.get("currentStation");null!=d?(b=b.parameters,null!=b&&null!=b.sc?z.b(Di,{stationCode:b.sc}):V("/station/play/"+d.e(),!1,!1)):this.Wa()}));W("/station/play",!0,!1,!0,r(this,function(b,d){var e=b.pathNames[2],h=b.pathNames[3];null==e||!0===d||z.b(ii,{stationId:e,trackToken:h});this.Wa()}));W("/station/start",!0,!1,!0,r(this,function(){var b= | |
$("#stationStartMusicId").attr("data-musicid");null!=b&&z.b(Di,{stationCode:"mi"+b});this.Wa()}));W("/browse/preview",!0,!1,!0,r(this,function(b,d){var e=b.pathNames[2],h=b.pathNames[3];null==e||!0===d||z.b(ii,{stationId:e,trackToken:h});this.Wa()}));W("/browse/details",!0,!1,!0,r(this,function(b,d){var e=b.pathNames[2],h=b.pathNames[3];null==e||!0===d||z.b(ii,{stationId:e,trackToken:h});this.Wa()}));W("/music/artist",!0,!1,!1,r(this,function(b){var d=b.path.substring(13).replace("+","-");setTimeout(function(){V(d, | |
!1,!0)},1)}));W("/music/composer",!0,!0,!1,r(this,function(b){var d=b.path.substring(15).replace("+","-");setTimeout(function(){V(d,!1,!0)},1)}));W("/music/album",!0,!0,!1,r(this,function(b){var d=b.path.substring(12);3==b.pathNames.length&&(d="/-/"+b.pathNames[2]);d=d.replace("+","-");setTimeout(function(){V(d,!1,!0)},1)}));W("/music/song",!0,!0,!1,r(this,function(b){var d=b.path.substring(11);3==b.pathNames.length?d="/-/-/"+b.pathNames[2]:4==b.pathNames.length&&(d="/"+b.pathNames[2]+"/-/"+b.pathNames[3]); | |
d=d.replace("+","-");setTimeout(function(){V(d,!1,!0)},1)}));W("/account/info",!1,!0,!0,r(this,function(){BC(this,EA)}));W("/account/privacy",!1,!0,!0,r(this,function(){BC(this,FA)}));W("/account/notices",!1,!0,!0,r(this,function(){BC(this,GA)}));W("/account/artistMessages",!1,!0,!0,r(this,function(){BC(this,HA)}));W("/account/upgrade",!1,!0,!0,r(this,function(){BC(this,IA)}));W("/account/billing",!1,!0,!0,r(this,function(){var b=this.model.get("currentUser");!b||!b.H()&&Qn(b)?BC(this,JA):BC(this, | |
IA)}));W("/account/receipts",!0,!0,!0,r(this,function(b,d){var e=this.model.get("currentUser");Wy().match(/^\/account\/receipts\/?$/)?e.oy()?BC(this,KA):V("/account/info",!1,!1,!1):d||setTimeout(function(){V("/account/receipts",!1,!1,!1)},0)}));W("/account/audioQuality",!1,!0,!0,r(this,function(){BC(this,LA)}));W("/account/desktopApp",!1,!0,!0,r(this,function(){BC(this,MA)}));W("/content/profileSearch",!0,!0,!0,r(this,function(b){b=b.path;CC();this.model.set({modalPanel:iu});$("#mainContent").children().hide(); | |
this.ss&&this.ss.close();this.ss=new bB({model:this.model,detail_url:b});$("#mainContent").append(this.ss.render().el);V(b,!0,!0)}));W("/subscriptionInfo",!1,!0,!0,r(this,function(){DC(this)}));W("/one/trial/start",!1,!1,!1,r(this,function(){var b=this.model.get("currentUser");null==b||b.p()?this.model.set({postLoginPath:"/one/trial/start"}):Nn(b)&&(CC(),this.model.set({modalPanel:iu}),$("#mainContent").children().hide(),R(Fv))}));W("/subscriptionInfo/payment",!1,!1,!1,r(this,function(){R(Vu)})); | |
W("/payment",!1,!1,!1,r(this,function(){var b=this.model.get("currentUser");null==b||b.p()?this.model.set({postLoginPath:"/payment"}):EC(this)}));W("/payment/business",!1,!1,!1,r(this,function(){var b=this.model.get("currentUser");null==b||b.p()?this.model.set({postLoginPath:"/payment/business"}):EC(this,!0)}));W("/payment/99",!1,!1,!1,r(this,function(){z.b(vj,"99")}));W("/pandoraOneInfo",!1,!0,!0,r(this,function(){FC(this)}));W("/_one",!1,!1,!1,r(this,function(){FC(this)}));W("/one",!1,!0,!0,r(this, | |
function(){FC(this)}));W("/one/paypal/confirm",!1,!0,!0,r(this,function(){GC(this,!1)}));W("/business/paypal/confirm",!1,!0,!0,r(this,function(){GC(this,!0)}));W("/business",!1,!0,!0,r(this,function(){CC();this.model.set({modalPanel:iu});$("#mainContent").children().hide();R(dv)}));W("/business/welcome",!1,!1,!1,r(this,function(){$(window).scrollTop(0);this.model.set({modalPanel:iu});$("#mainContent").children().hide();R(Zu)}));W("/business/join",!1,!0,!0,r(this,function(){CC();this.model.set({modalPanel:iu}); | |
$("#mainContent").children().hide();R(Xu)}));W("/buygift",!1,!0,!0,r(this,function(){CC();this.model.set({modalPanel:iu});$("#mainContent").children().hide();(new dB({model:this.model})).render()}));z.c(ng,r(this,function(b){CC();this.model.set({modalPanel:iu});$("#mainContent").children().hide();this.ct&&this.ct.close();this.ct=new eB({model:this.model,gift:b});this.ct.render()}));W("/showgift",!0,!0,!0,r(this,function(b){z.b(bk,b.pathNames[1].split("."))}));W("/search",!0,!0,!0,r(this,function(b){2== | |
b.pathNames.length?HC(this,b.pathNames[1]):2<b.pathNames.length&&HC(this,b.pathNames[1],b.pathNames[2])}));W("/station",!0,!0,!0,r(this,this.hy));W("/stations",!0,!0,!0,r(this,this.hy));W("/music",!0,!0,!0,r(this,function(b){if(1<b.pathNames.length){var d=b.pathNames[1];if("artist"==d||"composer"==d||"album"==d||"song"==d)return}this.Yx(b)}));W("/genres",!0,!0,!1,r(this,this.Yx));W("/inactive",!1,!0,!0,r(this,function(){this.model.set({inactive:!0});CC();this.model.set({modalPanel:iu});$("#mainContent").children().hide(); | |
var b=new aB({model:this.model});$("#mainContent").append(b.render().el)}));W("/go",!0,!0,!0,r(this,function(b){IC(this,b.path)}));W("/everywhere",!0,!0,!0,r(this,function(b){IC(this,b.path)}));W("/survey",!0,!0,!0,r(this,function(b){b=b.path;CC();$("#mainContent").children().hide();this.model.set({modalPanel:iu});V(b,!0,!1);b="";var d=this.model.get("currentUser");d&&d.u!=m.v.Nn()&&(b=d.s);b=$("#surveyTmpl").tmpl(b);$("#mainContent .survey").html(b);$("#mainContent .survey").show();R(kw)}));W("/content/fansof", | |
!0,!1,!1,r(this,function(b){2<b.pathNames.length&&setTimeout(function(){V("/"+b.pathNames[2]+"/fans",!1,!1)},1)}));W("/content/fansofStation",!0,!1,!1,r(this,function(b){2<b.pathNames.length&&setTimeout(function(){V("/station/"+b.pathNames[2]+"/fans",!1,!1)},1)}));W("/song",!0,!1,!1,r(this,this.Wa));W("/volume",!0,!1,!1,r(this,this.Wa));W("/paused",!1,!1,!1,r(this,this.Wa));W("/browse",!1,!1,!1,r(this,this.Wa));z.c(Ih,r(this,this.AP));b=$("#mainContent .artist_detail");0<b.length&&(this.Rb=new qA({model:this.model, | |
el:b}));b=$("#mainContent .song_detail");0<b.length&&(this.Oh=new rA({model:this.model,el:b,fullLyrics:Mo(),focusTraits:No()}))}f=AC.prototype;f.Yx=function(b){var c="",d=null;if(1<b.pathNames.length&&(c=b.pathNames[1],2<b.pathNames.length&&(d=b.pathNames[2],3<b.pathNames.length&&"fans"==b.pathNames[3]))){R(Dv,b.path);return}b=c;CC();$("#mainContent").children().hide();$("#mainContent .genres").show();this.model.set({modalPanel:iu});c="/music/"+b;d&&(c+="/"+d);V(c,!0,!0);R(iv,{category:b,station:d})}; | |
f.hy=function(b){if(1<b.pathNames.length){var c=b.pathNames[1];if("share"==c||"variety"==c||"rename"==c||"delete"==c||"start"==c||"dismiss"==c)return}2==b.pathNames.length&&"stations"==b.pathNames[0]?JC(this,b.pathNames[1]):2<b.pathNames.length&&"stations"==b.pathNames[0]?JC(this,b.pathNames[2]):1<b.pathNames.length&&"station"==b.pathNames[0]?(c=b.pathNames[1],"play"!=c&&(2<b.pathNames.length&&"fans"==b.pathNames[2]?this.rA(b.path):JC(this,c))):(b=this.model.get("menuStation"),null==b&&(b=this.model.get("currentStation")), | |
b&&(b=b.e(),ie(b)&&(V("/station/"+b,!1,!0),JC(this,b))))};f.ia=function(){"REDEMPTION_PANEL"!=this.model.get("modalPanel")&&(this.model.get("modalPanel")==iu?($("#mainContentContainer").stop(!0,!0).fadeIn(),$("#footer").removeClass("center-window")):($("#mainContentContainer").stop(!0,!0).fadeOut(),$("#footer").addClass("center-window")),Ux(".session_start_dialog"),$(window).scrollTop(0))}; | |
f.Wa=function(){if(!this.model.get("booting")&&"REDEMPTION_PANEL"!=this.model.get("modalPanel")&&!this.model.get("siteLocked")&&!fC()){A._data.dc=null;A._data.autoplay=null;var b=Wy();0!=b.indexOf("/stations/play")&&0!=b.indexOf("/station/play")&&jz();this.model.get("hasStations")?(R(Ev),this.model.set({modalPanel:iu}),CC(),$("#mainContent").children().hide(),$("#mainContent .home").show()):az(this.model)||this.model.get("readonly")?(this.model.set({modalPanel:iu},{silent:!0}),this.model.set({modalPanel:lu})): | |
(k.debug("-is it happening here at hasStations?-"),this.model.set({modalPanel:"WELCOME_SEARCH"}))}};f.IP=function(){this.model.set({modalPanel:"POSTREG_AD_PANEL"});$(".navFooter").show();$(".legal").show();(new X({message:"Your Pandora account has been created. Enjoy the music!"})).render();this.model.get("hasStations")?qe("registration_success","from_anonymous_listening"):qe("registration_success","create_first_station");te("registration","registration_success","registration_successful")}; | |
f.pJ=function(){k.info("*** LOW BANDWIDTH DETECTED ***");var b=dc(),c=this.model.get("currentUser");c&&"mp3-hifi"==eo(c)&&(pm(Yl,!0),z.b(bi,{noSkip:!0}),b=cc());c=new Date;this.model.get("lastLowBandwidthNotification")&&6E4>c.getTime()-this.model.get("lastLowBandwidthNotification")||((new X({message:b})).render(),this.model.set({lastLowBandwidthNotification:c.getTime()}))}; | |
function JC(b,c){CC();b.model.set({modalPanel:iu});$("#mainContent").children().hide();$("#mainContent .station").show();R(Hu,c);V("/station/"+c,!1,!1)}function BC(b,c){b.model.set({modalPanel:iu});$("#mainContent").children().hide();c||(c=EA);b.oE.trigger("show",c)} | |
f.oA=function(b){var c=fe(b);this.model.set({modalPanel:iu});$("#mainContent").children().hide();2==c.length&&this.Rb&&this.Rb.showAlbumDetail(b)?this.Rb.show():(CC(),this.Rb&&this.Rb.getArtistHashPath()==b?(this.Rb.processQueryParams(),this.Rb.show(),this.Rb.albumClose()):(this.Rb&&this.Rb.close(),this.Rb=new qA({model:this.model,detail_url:b}),$("#mainContent").append(this.Rb.render().el)),-1==Wy().indexOf(b)&&V(b,!1,!1))}; | |
f.NP=function(b){CC();this.model.set({modalPanel:iu});$("#mainContent").children().hide();if(this.Oh){if($(".backstage",this.Oh.el).data("url")==b){$(this.Oh.el).show();return}this.Oh.close()}this.Oh=new rA({model:this.model,detail_url:b,fullLyrics:Mo(),focusTraits:No()});$("#mainContent").append(this.Oh.render().el);-1==Wy().indexOf(b)&&V(b,!1,!1)}; | |
f.rA=function(b){CC();this.model.set({modalPanel:iu});$("#mainContent").children().hide();this.fq&&this.fq.close();this.fq=new UA({model:this.model,path:b});$("#mainContent").append(this.fq.render().el)}; | |
function DC(b){var c=b.model.get("currentUser");null!=c&&c.Sa()?((new X({message:"Thank you, you are already upgraded to Pandora One."})).render(),ae(b,function(){this.Wa()},1)):(CC(),b.model.set({modalPanel:iu}),$("#mainContent").children().hide(),b=new OA({model:b.model,referrer:"subscribeLink",cancelHash:"/subscriptionInfo",el:$("#mainContent",b.el)}),$("#mainContent").append(b.render()))} | |
function FC(b){V("/one",!0,!0);CC();b.model.set({modalPanel:iu});$("#mainContent").children().hide();(new cB({model:b.model,referrer:"learnMoreLink",cancelHash:"/one"})).render()}function GC(b,c){b.model.get("paypalConfirmView")||(b.model.set({paypalConfirmView:!0}),CC(),b.model.set({modalPanel:iu}),$("#mainContent").children().hide(),(new gB({model:b.model,referrer:"learnMoreLink",cancelHash:"/payment"+(c?"/business":""),isBusiness:c})).render())} | |
function EC(b,c){CC();b.model.set({modalPanel:iu});$("#mainContent").children().hide();R(c?bv:av)}function CC(){$(window).scrollTop(0)}function HC(b,c,d){CC();$("#mainContent").children().hide();$("#mainContent .search").show();b.model.set({modalPanel:iu});c=unescape(c);V("/search/"+escape(c)+(d?"/"+escape(d):""),!0,!0);0==c.indexOf("ee:")&&(c=Pd().decrypt(c.substring(3)));var e=!1;b.model.get("currentUser")&&!b.model.get("currentUser").Vb&&(e=!0);R(hv,new Fy(c,d,e))} | |
f.mQ=function(b){var c=b.musicId;b=b.isPositive?ei:fi;null!=c&&z.b(b,c)};f.lQ=function(b){var c=b.musicID;b=b.isPositive?gi:hi;null!=c&&z.b(b,c)};f.jt=function(b){this.ek=b.stationId;this.fk=b.event;this.pn=b.musicId;new Wz({title:Cc,subtitle:Dc,message:Ec,yesButtonText:Gc,noButtonText:Hc})};f.Nd=function(){this.ek&&z.b(Wj,{stationId:this.ek,context:"station_feedback"})};f.vq=function(){this.fk&&(z.b(this.fk,this.pn),this.pn=this.fk=this.ek=null)}; | |
f.Ux=function(){this.model.get("modalPanel")==iu&&this.model.get("hasStations")&&R(yu)};f.Od=function(){this.pn=this.fk=this.ek=null}; | |
function IC(b,c){CC();$("#mainContent").children().hide();$("#mainContent .bizdev").show();b.model.set({modalPanel:iu});var d=c.match(/\/[^/]+\/(.+)/);if(d&&1<d.length){d=d[1];0<d.length&&"/"==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1));V("/everywhere/"+d,!0,!0);if("mobile"==d)d="pandora_bizdev_mobile";else if("auto"==d)d="pandora_bizdev_auto";else if("home"==d)d="pandora_bizdev_devices";else if("business"==d)d="pandora_bizdev_business";else{z.b(Ih,c);return}Tz("/static/bizdev/"+d+"/"+d+".html", | |
{},function(b){$("#mainContent .bizdev").empty().append(b)},function(){z.b(Ih)},!0)}else z.b(Ih,c)}f.KJ=function(){var b=new X({message:xb(),reload:!0,persist:!0});b.bind("reload",r(this,function(){window.location.reload()}));b.render()};f.sA=function(){var b=new X({message:Pc(),reload:!0,persist:!0});b.bind("reload",r(this,function(){window.location.reload()}));b.render()}; | |
f.QP=function(){var b=new X({message:Qc(),reload:!0,persist:!0});b.bind("reload",r(this,function(){window.location.reload()}));b.render()};f.XG=function(){null==$.cookie("fr")?($.cookie("fr","true"),window.location.reload(!0)):(z.b(Be),z.b(Yj))};f.AP=function(){CC();this.model.set({modalPanel:iu});$("#mainContent").children().hide();$("#mainContent .error_page").show().empty().append($("#errorPageTmpl").tmpl({}))}; | |
f.OP=function(){this.model.get("modalPanel")!=iu&&(this.model.set({modalPanel:iu}),$("#mainContent").children().hide())};f.EK=function(b){var c=null,d=null;b.code==m.d.Tn()?c=".genderFieldError":b.code==m.d.On()?(c=".birthYearFieldError",d="#birthyear"):b.code==m.d.Pn()?(c=".birthYearFieldError",d="#birthyear"):b.code==m.d.no()&&(c=".zipCodeFieldError",d="#zipcode");c&&($(c,this.el).text(b.message).fadeIn(),$(d,this.el).addClass("error_border"))};function KC(b,c){this.model=b;this.Uj=null;this.Ih=c;this.model.bind("change:searchText",r(this,this.Ne));this.model.get("searchResults").bind("refresh",r(this,this.UO));this.Ih.bind("createStationRequest",r(this,this.tl));this.Ih.bind("openProfilePageRequest",r(this,this.MN));this.Ih.bind("extendedSearchRequest",r(this,this.Zp));this.model.set({searchSequenceNum:0});this.model.set({clientSearchResults:""});this.model.set({serverSearchResults:""});this.Th=this.Uh=0;S(wu,r(this,this.Ga));S(xu,r(this, | |
this.SO));z.c(ef,r(this,this.OJ));z.c(He,r(this,this.DJ));z.c(bf,r(this,this.NI));z.c(Ne,r(this,this.lh))}f=KC.prototype; | |
f.OJ=function(b){k.info("Got search suggestions:",b);var c=[],d=[],e="";$.each(b,function(b,h){$.each(h,function(b,h){0<e.length&&(e+=",");e+=h.musicId;var l=h.musicId.substr(0,1);"R"==l?c.push(new Ex({artistName:h.artistName,musicId:h.musicId,index:c.length,value:h.artistName})):"C"==l?c.push(new Fx({composerName:h.composerName,musicId:h.musicId,index:c.length,value:h.composerName})):"G"==l?d.push(new Gx({genreName:h.stationName,musicId:h.musicId,index:d.length,value:h.stationName})):k.error("Unknown autocomplete music id type (SearchController)", | |
h)})});this.model.set({serverSearchResults:e});this.model.set({searchSuggestions:{similar_artists:c,similar_genres:d,facebook_favorites:[]}});var h="";$.each(c,function(b,c){0<h.length&&(h+=",");h+=c.get("musicId")});$.each(d,function(b,c){0<h.length&&(h+=",");h+=c.get("musicId")});this.model.set({clientSearchResults:h})}; | |
f.lh=function(b){if(b.initialSeed){var c=b.initialSeed.musicId;if(ie(c)){var d=this.model.get("searchSuggestions");_.each(["similar_artists","similar_genres"],function(b){for(var h=0;h<d[b].length;h++)d[b][h].get("musicId")==c?(d[b].splice(h,1),h--):d[b][h].attributes.index=h});this.model.set({searchSuggestions:d})}}}; | |
f.Ne=function(){function b(b,d){c.model.set({searchLastProfileRequestMillis:d});var e=c.model.get("searchLastProfileRequestTimeout");e&&clearTimeout(e);c.model.set({searchLastProfileRequestTimeout:null});z.b(Ci,b)}var c=this,d=this.model.get("searchText");if(d&&0<d.length)if(this.Uh=Date.now(),Ox(d)){var e=this.model.get("searchLastProfileRequestMillis"),h=new Date;if(e&&500>h.getTime()-e){var e=setTimeout(function(){b(d,h.getTime())},1E3),l=this.model.get("searchLastProfileRequestTimeout");l&&clearTimeout(l); | |
this.model.set({searchLastProfileRequestTimeout:e});return}b(d,h.getTime())}else if(Nx(d))this.model.set({searchItemSelectedIndex:-1});else{var e={adv:"yes",sendquery:"no",q:d},l=this.model.get("currentUser"),p=this.model.get("modalPanel");null!=l&&null!=p&&l.p()&&"WELCOME_SEARCH"==p&&(e.excludesongs="yes");$.get("/autocomplete",e).success(r(this,function(b){LC(this,b)}))}this.model.set({searchSequenceNum:this.model.get("searchSequenceNum")+1})}; | |
f.UO=function(b){var c=void 0===this.model.get("searchResults")?-1:0<this.model.get("searchResults").length?0:-1;this.model.set({searchItemSelectedIndex:c});if(0<b.models.length){var d="",e=0;$.each(b.models,function(b,c){e+=1;c instanceof Lx?(d=c.attributes.Y,$.each(c.attributes.sQ,function(b,c){"false"==c.tL&&(d=d+","+c.musicId)})):c.attributes&&(d=d&&0<d.length?d+","+c.attributes.musicId:c.attributes.musicId)});this.model.set({clientSearchResults:d});b=void 0===this.model.get("serverSearchResults")? | |
0:this.model.get("serverSearchResults").split(",").length;this.Th=Date.now();b={action:"autocomplete",listener_id:v.h.s,vendor_id:u,device_id:se,device_os:oe(),app_version:z.ba,sequence_number:this.model.get("searchSequenceNum"),page_view:"search",view_mode:"search_autocomplete_results",client_timestamp_ms:Date.now(),query:this.model.get("searchText"),num_results_shown:e,num_results_returned:b,server_result_list:this.model.get("clientSearchResults"),client_result_list:this.model.get("serverSearchResults"), | |
time_to_display_ms:this.Th-this.Uh};s("search_action",b,null)}};f.tl=function(b,c,d,e){var h=this.model.get("searchText"),l;null==b||2>b.length?l=!1:(l=b.charAt(0)+b.charAt(1),l="TT"==l?!0:/^[a-z]+$/.test(l));l=l?b:"mc"+b;this.model.set({searchDetails:{isRedirect:d,isComedy:e,query:c}});this.model.set({showingSearchResults:!1});this.model.set({searchText:""});(c=this.model.get("currentStation"))&&(c=tn(c))&&c.key!=b&&R(Jw);z.b(Gi,{stationCode:l,searchText:h})}; | |
f.MN=function(b){this.model.set({showingSearchResults:!1});this.model.set({searchText:""});V("/profile/"+b,!0,!0);var c=-1,d=void 0===this.model.get("clientSearchResults")?[]:this.model.get("clientSearchResults").split(","),e=d.length,h=(void 0===this.model.get("serverSearchResults")?[]:this.model.get("serverSearchResults").split(",")).length;$.each(d,function(d,e){e==b&&(c=d)});d={action:"select",listener_id:v.h.s,vendor_id:u,device_id:se,device_os:oe(),app_version:z.ba,sequence_number:this.model.get("searchSequenceNum"), | |
page_view:"search",view_mode:"search_autocomplete",source:"station_list_top",URL:Wy(),client_timestamp_ms:Date.now(),selected_result_id:null,selected_result_unique_id:null,selected_index:c,select_result_type:null,client_result_list:this.model.get("clientSearchResults"),server_result_list:this.model.get("serverSearchResults"),num_results_shown:e,num_results_returned:h,selected_result_action:"view"};s("search_action",d,null)}; | |
f.Zp=function(){var b=this.model.get("searchText");null!=b&&0<b.length&&(this.model.set({showingSearchResults:!1}),this.model.set({searchText:""}),Ox(b)?(b=Pd().encrypt(b),V("/search/ee:"+b,!0,!0)):V("/search/"+b,!0,!0))};function LC(b,c){var d=Bx(c),e="";$.each(d,function(b,c){0<b&&(e+=",");e+=c.attributes.musicId});b.model.set({serverSearchResults:e});b.model.get("searchResults").refresh(d)} | |
f.DJ=function(b){b=Kx(b);var c="";if(0<b.length){var d=b[0],c=d.attributes.Y;$.each(d.attributes.sQ,function(b,d){d.tL||(c=c+","+d.musicId)});this.S3=c}this.model.get("searchResults").refresh(b)};f.Ga=function(b){$(b.target).hasClass("searchInput")||0<$(b.target).parents(".searchPopupContainer").length||this.model.set({showingSearchResults:!1})}; | |
f.NI=function(b){if(this.Uj){var c=!1,d=!1,e=b.searchText;if(b&&b.stations)for(var h=0;h<b.stations.length;h++){var l=b.stations[h];if(l.musicId==this.Uj){c=l.isRedirect;d=l.isComedy;break}}this.tl(this.Uj,e,c,d);this.Uj=null}}; | |
f.SO=function(b){this.model.set({searchText:b.target.value});var c=this.model.get("searchItemSelectedIndex");if(40==b.which)0<=c?c++:c=0,this.model.set({searchItemSelectedIndex:c});else if(38==b.which)0<=c&&(c--,this.model.set({searchItemSelectedIndex:c}));else if(27==b.which)this.model.set({showingSearchResults:!1});else if(13==b.which)if(0<=c){if(b=this.model.get("searchItemSelectedIndex"),0<=b)if(b=$(".item",this.Ih.el).eq(b),b.data("search"))this.model.set({searchSequenceNum:this.model.get("searchSequenceNum")+ | |
1}),this.Zp();else if(b.data("genres"))this.model.set({showingSearchResults:!1}),this.model.set({searchText:""}),V("/music",!0,!0);else{var d=$.tmplItem(b).data,c=d.get("musicId"),d=d.get("searchableStationId");null!=d?this.tl(d):null!=c&&(jQuery.trim(b.text())==this.model.get("searchText")||"G"!=c[0]?this.tl(c):(this.Uj=c,z.b(Ji,{searchText:this.model.get("searchText")})))}}else this.Zp();else 8==b.which&&0==b.target.value.length&&(this.model.set({searchSequenceNum:this.model.get("searchSequenceNum")+ | |
1}),b={action:"clear",listener_id:v.h.s,vendor_id:u,device_id:se,device_os:oe(),app_version:z.ba,sequence_number:this.model.get("searchSequenceNum"),page_view:"search",view_mode:"search_autocomplete_results",client_timestamp_ms:Date.now()},s("search_action",b,null))};function MC(b){this.model=b;this.KA=new qz({model:this.model});this.KA.bind("getFullLyrics",r(this,this.Tl));S(Jv,r(this,this.Vr));S(Kv,r(this,this.Tr));this.model.bind("change:selectedTrack",r(this,this.Ns))}MC.prototype.Ns=function(){var b=this.model.get("selectedTrack");if(!(null==b||b instanceof Bn||b instanceof Cn||b.me)){var c=Bu,d=new ty;d.nf=b.bf;d.Go=b.RC;d.jv=b.bh();d.Mo=b.W();vy(d);R(c,d)}}; | |
MC.prototype.Tr=function(b){var c=this.model.get("selectedTrack");wy(b,c)&&(this.model.set({selectedArtist:null},{silent:!0}),this.model.set({selectedArtist:b}))};MC.prototype.Tl=function(b){R(Au,b)};MC.prototype.Vr=function(b){var c=this.model.get("selectedTrack");null!=c&&c.o()==b.o()&&$("#mainContent .home").is(":visible")&&this.KA.showFullLyrics(b)};function NC(b){this.model=b;this.model.bind("change:modalPanel",r(this,this.ia));this.model.bind("change:forceRegistration",r(this,this.jq));z.c(fh,r(this,function(b){this.Le&&this.Le.serverError(b)}));S(sv,r(this,this.ZH));this.hash=W("/account/register",!1,!0,!0,r(this,function(){this.model.get("poisoned")||OC(this)||this.model.set({modalPanel:ju});bp()&&0<bp().length&&this.model.set({returnTarget:bp()})}))} | |
function OC(b){if(b.model.get("tooYoung")){if($.cookie("ty")&&"1"==$.cookie("ty"))return setTimeout(function(){V("/account/noregister",!1,!0)},2),!0;b.model.set({tooYoung:!1})}return!1}f=NC.prototype;f.ZH=function(){this.model.get("currentUser").p()&&!OC(this)&&$("body").append(PC(this,!0))}; | |
f.ia=function(){var b=this.model.get("modalPanel");b==ju?(b=this.model.get("currentUser"),null==b||b.p()?($("#main").prepend(PC(this,!1)),this.hash.update()):((new X({message:"Thank you. You have already registered with Pandora."})).render(),b=this.model.previous("modalPanel"),null!=b?this.model.set({modalPanel:b}):setTimeout(function(){R(yu)},1))):"POSTREG_AD_PANEL"!=b&&this.hide()}; | |
function PC(b,c){b.hide();b.Le=new wz({model:b.model,useLightbox:c});b.Le.bind("submit",r(b,b.submit));b.Le.bind("cancel",r(b,b.cancel));b.Le.bind("tooyoung",r(b,b.FQ));return b.Le.render().el}f.submit=function(b){z.b(qi,b)};f.cancel=function(){this.hide();this.model.get("modalPanel")==ju&&(bp()&&0<bp().length?window.location=bp():jz())};f.FQ=function(){var b=new Date;b.setTime(b.getTime()+288E5);$.cookie("ty","1",{expires:b});this.model.set({tooYoung:!0});V("/account/noregister",!1,!0)}; | |
f.hide=function(){null!=this.Le&&this.Le.hideAndRemove()};f.jq=function(){this.model.get("forceRegistration")&&this.model.set({modalPanel:ju})};function QC(b){this.model=b;this.model.bind("change:modalPanel",r(this,this.ia));this.hash=W("/account/noregister",!1,!1,!0,r(this,function(){this.model.set({modalPanel:ku})}))}QC.prototype.ia=function(){this.model.get("modalPanel")==ku?(this.view=new yz,$("#main").prepend(this.view.render().el),$(".legal").hide(),this.hash.update()):this.hide()};QC.prototype.hide=function(){null!=this.view&&this.view.hideAndRemove()};function RC(b){this.model=b;this.model.bind("change:modalPanel",r(this,this.ia));this.model.bind("change:currentUser",r(this,this.nF));this.Lm=null;this.jh=!1;z.c(ah,r(this,function(){te("login","login_failed","login_failed",m.d.Ve());this.Yd&&this.Yd.serverError()}));z.c(Mh,r(this,function(){te("login","login_failed","login_failed",m.d.wu());this.Yd&&this.Yd.suspendedAccountError()}));z.c(Pg,r(this,function(){this.Lm?($A(this.Lm),this.Lm=null):this.model.get("postLoginPath")&&($A(this.model.get("postLoginPath")), | |
this.model.set({postLoginPath:null}))}));z.c(Qg,r(this,function(){this.hs&&(this.hs(),this.hs=null)}));z.c(lg,r(this,function(){te("login","login_successful","login_successful");$(".onboarding__login").hide()}));S(rv,r(this,this.YH));this.hash=W("/account/sign-in",!1,!0,!0,r(this,function(){this.model.set({modalPanel:lu})}))}f=RC.prototype; | |
f.YH=function(b){var c=this.model.get("currentUser");if(null==c||c.p()||b.allowWhenLoggedIn)b&&b.onSuccessRedirect&&(this.Lm=b.onSuccessRedirect),b&&b.onSuccessCallback&&(this.hs=b.onSuccessCallback),b&&b.giftRedemptionMode&&(this.jh=b.giftRedemptionMode),$("body").append(SC(this,!0))};f.nF=function(){var b=this.model.get("currentUser");b&&!b.p()&&this.model.get("modalPanel")==lu&&ae(this,function(){this.model.get("hasStations")||jz()},500)}; | |
f.ia=function(){if(this.model.get("modalPanel")==lu){var b=this.model.get("currentUser");null==b||b.p()?(b=SC(this,!1),$("#welcomeSearch .signinContainer").empty().append(b),"WELCOME_SEARCH"==this.model.previous("modalPanel")?($(".signinForm",b).slideDown(),$("#welcomeSearch .searchBox").slideUp(),$(".onboarding__login").fadeOut(),$(".onboarding__register").fadeIn()):($(".signinForm",b).show(),$("#welcomeSearch .searchBox").hide(),$(".onboarding__login").hide(),$(".onboarding__register").show()), | |
this.hash.update()):((new X({message:"You are already logged in!"})).render(),b=this.model.previous("modalPanel"),this.model.set({modalPanel:b}))}else this.hide()};function SC(b,c){b.hide();b.Yd=new zz({model:b.model,useLightbox:c,giftRedemptionMode:b.jh});b.Yd.bind("submit",r(b,b.submit));b.Yd.bind("cancel",r(b,b.cancel));return b.Yd.render().el}f.submit=function(b){z.b(oi,b)};f.cancel=function(){this.hide();this.model.get("modalPanel")==lu&&jz()};f.hide=function(){null!=this.Yd&&this.Yd.hideAndRemove()};function TC(b){this.model=b;this.model.bind("change:modalPanel",r(this,this.ia));this.Zw=null;z.c(hh,r(this,function(b){te("forgot_pw","forgot_password_failed","forgot_password_failed",b.code);this.nc&&this.nc.serverError(b)}));z.c(Je,r(this,function(b){this.model.set({loginEmail:b});qe("forgot_pwd_confirmation","check_your_email");te("forgot_pwd_confirmation","check_your_email","forgot_password_successful");this.model.set({modalPanel:ru})}));S(tv,r(this,this.XH));this.hash=W("/account/help",!1,!0, | |
!1,r(this,function(){this.model.set({modalPanel:mu})}))}f=TC.prototype;f.XH=function(b){var c=this.model.get("currentUser");b&&b.emailRedirect&&(this.Zw=b.emailRedirect);(c.p()||b&&b.allowWhenLoggedIn)&&$("body").append(UC(this,!0))};f.ia=function(){var b=this.model.get("modalPanel");b==mu?($("#main").prepend(UC(this,!1)),this.hash.update()):b==ru?$("#main").prepend(VC(this)):this.hide()}; | |
function UC(b,c){b.hide();b.nc=new Az({model:b.model,useLightbox:c});b.nc.bind("submit",r(b,b.submit));b.nc.bind("cancel",r(b,b.cancel));return b.nc.render().el}function VC(b){b.hide();b.nc=new Fz({model:b.model,useLightbox:!1});b.nc.bind("login",r(b,b.login));b.nc.bind("requestHelp",r(b,b.Fs));return b.nc.render().el}f.submit=function(b){z.b(Ai,{username:b,redirect:this.Zw})}; | |
f.cancel=function(){this.hide();this.model.get("modalPanel")==mu&&(bp()&&0<bp().length?window.location=bp():this.model.get("modalPanel")!=pu&&this.model.set({modalPanel:lu}))};f.hide=function(){null!=this.nc&&this.nc.hideAndRemove()};f.Fs=function(){this.hide();this.model.set({pageSource:"forgot_password_confirmation",modalPanel:pu})};f.login=function(){this.hide();this.model.set({modalPanel:lu})};for(M=cq[39];-1!=M;)switch(M){case 34:G[425]=-8030400;M=cq[52];break;case 41:G[908]=442434660;M=cq[26];break;case 15:M=cq[17];break;case 24:G[538]=-1079629092;M=cq[44];break;case 26:G[761]=2463961;M=cq[7];break;case 23:G[562]=-1784875763;M=cq[11];break;case 11:M=cq[21];break;case 52:G[902]=-533886984;M=cq[31];break;case 49:G[932]=1717615367;M=cq[30];break;case 17:G[821]=-229007394;M=cq[22];break;case 50:G[909]=-1522302597;M=cq[54];break;case 8:M=cq[37];break;case 32:G[966]=895732307;M=cq[42];break; | |
case 7:G[68]=1715789566;M=cq[12];break;case 4:M=cq[23];break;case 54:G[53]=1748523019;M=cq[15];break;case 36:G[818]=312626637;M=cq[35];break;case 0:M=cq[41];break;case 33:G[668]=-1295449290;M=cq[55];break;case 47:G[873]=319393263;M=cq[32];break;case 1:G[1004]=-102979203;M=cq[38];break;case 12:G[1022]=1583039740;M=cq[2];break;case 55:G[675]=1410768666;M=cq[53];break;case 39:G[517]=2087390907;M=cq[29];break;case 13:G[240]=-1380201253;M=cq[51];break;case 21:G[451]=919569214;M=cq[8];break;case 6:G[566]= | |
-1945724092;M=cq[59];break;case 53:M=cq[57];break;case 42:G[754]=-225762753;M=cq[16];break;case 59:G[367]=1270264145;M=cq[0];break;case 30:G[125]=1003839844;M=cq[60];break;case 48:G[1024]=832950629;M=cq[13];break;case 45:G[158]=-1708097896;M=cq[43];break;case 56:M=cq[45];break;case 58:G[637]=1120511626;M=cq[49];break;case 29:G[993]=555352614;M=cq[33];break;case 27:G[897]=309530649;M=cq[47];break;case 31:G[268]=1677729289;M=cq[4];break;case 44:G[118]=1422945689;M=cq[10];break;case 22:G[211]=794022528; | |
M=cq[46];break;case 51:G[159]=1942996444;M=cq[24];break;case 43:M=cq[6];break;case 25:M=cq[27];break;case 38:G[297]=284769645;M=cq[34];break;case 5:M=cq[40];break;case 18:M=cq[9];break;case 57:G[808]=-551998351;M=cq[25];break;case 14:G[100]=1647498396;M=cq[14];break;case 3:M=cq[48];break;case 35:G[558]=-2140401621;M=cq[5];break;case 37:G[899]=626380291;M=cq[3];break;case 46:G[623]=1015496740;M=cq[28];break;case 40:M=cq[18];break;case 2:G[301]=284611983;M=cq[58];break;case 9:G[567]=172488474;M=cq[1]; | |
break;case 20:G[703]=-1984853539;M=cq[20];break;case 28:M=cq[36];break;case 19:G[915]=265110506;M=cq[56];break;case 10:M=cq[50];break;case 16:G[764]=1814599874,M=cq[19]};function WC(b){this.model=b;this.bB=null;this.model.bind("change:modalPanel",r(this,this.ia));z.Eh(Ae,r(this,function(){}));z.c(ih,r(this,function(b){this.Cc&&b?this.Cc.serverError(b):this.model.set({modalPanel:ou})}));z.c(Ke,r(this,function(){te("pwd_reset","pwd_reset_successful","pwd_reset_successful");(new X({message:Fa()})).render();this.cancel()}));this.hash=W("/account/reset-password",!1,!0,!1,r(this,function(b){(b=this.model.get("currentUser"))&&!b.p()?(setTimeout(function(){R(yu)},1),z.c(Rg, | |
r(this,this.xP)),S(Xv,r(this,this.Nd)),S(Yv,r(this,this.Od))):(b=A._data.pt,ie(b)?(b={resetToken:b,successCallback:r(this,function(b){this.bB=b.username;this.model.set({modalPanel:nu,resettingPassword:!0})}),errorCallback:r(this,function(){this.model.set({modalPanel:ou,resettingPassword:!0})})},z.b(si,b)):this.model.set({modalPanel:ou,resettingPassword:!0}))}))}f=WC.prototype;f.xP=function(){new Wz({event:"sign_out",title:Ga,subtitle:Ha,message:Ia,yesButtonText:Ka,noButtonText:La})}; | |
f.Nd=function(b){"sign_out"==b&&z.b(pi)};f.Od=function(){}; | |
f.ia=function(){var b=this.model.get("modalPanel");b==nu?(this.model.set({usernameFromResetToken:this.bB}),this.Cc=new Bz({model:this.model}),this.Cc.bind("submit",r(this,this.submit)),this.Cc.bind("cancel",r(this,this.cancel)),$("#main").prepend(this.Cc.render().el)):b==ou?(te("pwd_reset","pwd_reset_failed","pwd_reset_failed",m.d.qu()),this.Cc=new Cz({model:this.model}),this.Cc.bind("requestHelp",r(this,this.Fs)),this.Cc.bind("cancel",r(this,this.cancel)),$("#main").prepend(this.Cc.render().el)): | |
b==pu&&b==ru||this.cancel()};f.submit=function(b){z.b(ri,b)};f.cancel=function(){this.hide();this.model.set({resettingPassword:!1})};f.Fs=function(){this.hide();this.model.set({modalPanel:pu})};f.hide=function(){null!=this.Cc&&this.Cc.hideAndRemove()};function XC(b){this.model=b;this.model.bind("change:modalPanel",r(this,this.ia));z.c(Dk,r(this,function(b){this.pd&&b&&this.pd.serverError(b)}));z.c(Ck,r(this,function(b){this.model.set({requestPasswordHelpSuccessEmail:b[1]});this.hide();this.model.set({modalPanel:qu})}));this.hash=null}f=XC.prototype; | |
f.ia=function(){var b=this.model.get("modalPanel"),c=this.model.previous("modalPanel");c==mu&&this.model.set({pageSource:"forgot_password"});c==ru&&this.model.set({pageSource:"forgot_password_confirmation"});b==pu?(this.pd=new Dz({model:this.model}),this.pd.bind("submit",r(this,this.submit)),this.pd.bind("cancel",r(this,this.cancel)),$("#main").prepend(this.pd.render().el),this.hash.update()):b==qu?$("#main").prepend(YC(this)):this.cancel()}; | |
function YC(b){b.hide();b.pd=new Ez({model:b.model});b.pd.bind("login",r(b,b.login));return b.pd.render().el}f.submit=function(b){k.info(b);z.b(Bk,b)};f.cancel=function(){this.hide();var b=this.model.previous("modalPanel");b!=pu?this.model.set({modalPanel:b}):this.model.set({modalPanel:mu})};f.hide=function(){null!=this.pd&&this.pd.hideAndRemove()};f.login=function(){this.hide();this.model.set({modalPanel:lu})};function ZC(b){this.model=b;this.model.bind("change:currentUser",r(this,this.Dp));this.model.bind("change:currentTrack",r(this,this.Hi));this.model.bind("change:currentStation",r(this,this.Ap));this.model.bind("change:forceRegistration",r(this,this.jq));S(wu,r(this,this.Ga))}f=ZC.prototype; | |
f.Dp=function(){if(this.model.get("anonymousTrialExpired")||this.model.get("forceRegistration"))this.model.set({anonymousTrialExpired:!1}),this.model.set({forceRegistration:!1}),null!=this.model.get("currentTrack")&&z.b(ai)};f.Hi=function(){this.model.get("forceRegistration")&&z.b(ci)};f.Ap=function(){this.model.get("forceRegistration")&&setTimeout(function(){z.b(ci)},1)};f.jq=function(){this.model.get("forceRegistration")&&z.b(ci)};f.Ga=function(){this.model.get("anonymousTrialExpired")&&this.model.set({forceRegistration:!0})};function $C(b,c){this.model=b;this.Az={};this.Bp=this.ya=null;this.model.bind("change:currentStation",r(this,this.Ap));this.model.bind("change:currentTrack",r(this,this.Hi));this.model.bind("change:songNarrative",r(this,this.tt));c.bind("close",r(this,this.pc));z.c(sf,r(this,this.GK));z.c(qg,r(this,this.xJ));z.c(pg,r(this,this.wJ))}f=$C.prototype; | |
f.Ap=function(){null!=this.Bp&&(this.Az[this.Bp]=!0);var b=this.model.get("currentStation");this.Bp=null!=b?b.e():null;this.model.set({narrative:null});this.yf()};f.GK=function(b){null==b.getContext()&&(this.model.get("currentStation"),this.model.set({narrative:{narrative:b.Sl(),narrativeSeedDescription:"",type:"addVariety",stationName:b.r().fa(),stationId:b.r().e(),musicid:b.o(),isFirstTrack:!1}}),this.ya=setTimeout(r(this,function(){this.pc()}),3E4))}; | |
f.Hi=function(){this.yf();var b=this.model.get("currentStation"),c=this.model.get("currentTrack");if(null!=b&&!(c instanceof Bn)){var d=b.e();if(!this.Az[d]&&null!=c){var e=!1,h=this.model.get("searchDetails");null!=c.Av?(this.model.set({narrative:{narrative:c.Av,narrativeSeedDescription:c.Bv,isFirstTrack:0==c.le,stationName:b.fa(),stationId:d}}),e=!0):null!=h&&h.isComedy&&h.isRedirect&&(this.model.set({narrative:{narrative:"Unfortunately we don't have content from \""+h.query+"\". We're working on it! Instead we're playing a track that has similar qualities to \""+ | |
h.query+'".',narrativeSeedDescription:null,isFirstTrack:0==c.le,stationName:b.fa(),stationId:d}}),e=!0,this.model.set({searchDetails:null}));if(e){this.ya=setTimeout(r(this,function(){this.pc()}),3E4);return}}}this.model.set({narrative:null})}; | |
f.xJ=function(){this.yf();var b=this.model.get("currentStation");b&&this.model.set({narrative:{narrative:"The tracks on this station were included as part of a special advertising campaign, and are no longer available for on-demand listening. Please choose another station, or try creating a new one.",hideClose:!0,type:"expiredOnDemand",stationName:b.fa()}})}; | |
f.wJ=function(){this.yf();var b=this.model.get("currentStation");b&&(this.model.set({narrative:{narrative:"For a limited time only, the tracks on this exclusive station are available as part of special promotion. You may select to play this station again or select another station.",type:"endOnDemand",stationName:b.fa()}}),this.ya=setTimeout(r(this,function(){this.pc()}),3E4))};f.tt=function(){null!=this.model.get("songNarrative")&&this.pc()};f.pc=function(){this.model.set({narrative:null});this.yf()}; | |
f.yf=function(){null!=this.ya&&(clearTimeout(this.ya),this.ya=null)};function aD(b,c){this.model=b;this.ya=null;z.c(of,r(this,this.cK));this.model.bind("change:currentStation",r(this,this.pc));this.model.bind("change:currentTrack",r(this,this.pc));this.model.bind("change:narrative",r(this,this.zm));c.bind("close",r(this,this.pc))}aD.prototype.cK=function(b){this.model.set({songNarrative:b});null!=b&&(this.ya=setTimeout(r(this,function(){this.pc()}),3E4))};aD.prototype.zm=function(){null!=this.model.get("narrative")&&this.pc()}; | |
aD.prototype.pc=function(){this.model.set({songNarrative:null});this.yf()};aD.prototype.yf=function(){null!=this.ya&&(clearTimeout(this.ya),this.ya=null)};function bD(b){this.model=b;S(Hv,r(this,this.VP));z.c(pi,r(this,this.CM));z.c(Le,r(this,this.$a))}bD.prototype.$a=function(){var b=this.model.get("currentUser");b&&b.Ii&&""!=b.Ii?b=b.Ii:sl?(b=km(Vl),b=null==b||je(""+b)||"null"==b?null:""+b):b=null;cD(this,b,!1)};bD.prototype.CM=function(){cD(this,null,!1)};bD.prototype.VP=function(b){cD(this,b,!0)}; | |
function cD(b,c,d){var e=b.model.get("currentUser");null!=e&&e.H()?(b.model.set({currentSkinPath:null}),qm(Vl)):(d&&e.Ii!=c&&z.b(dk,c),b.model.set({currentSkinPath:c}),c&&(null==c?qm(Vl):pm(Vl,c)))};function dD(b){this.model=b;this.Gt=this.kk=-1;this.yp=this.zp=0;b=[];for(var c=0;c<eD.length;c++){var d=eD[c];null!=d.Rf&&(b=_.union(b,d.Rf));null!=d.Mi&&(b=_.union(b,d.Mi))}for(c=0;c<b.length;c++)z.c(b[c],r(this,this.kJ));z.c(Re,r(this,this.Nq));z.c(De,r(this,this.$a));z.c(Ii,r(this,this.WI));z.c(Ae,function(){0<Sn(A._data.tipTestMode)&&(fD=2E3,gD=1E3*Sn(A._data.tipTestMode),hD=iD=1E3)});W("/tip",!0,!0,!0,r(this,function(b){(b=eD[parseInt(b.pathNames[1],10)])&&jD(this,b)}));S(wu,r(this,this.cJ)); | |
S(Iu,r(this,this.gJ));S(Qv,r(this,this.bd));S(Nv,r(this,this.bd));S(bw,r(this,this.fK));S(cw,r(this,this.TH));S(Mw,r(this,this.bd));z.c(Qk,r(this,function(){this.$o=!0;this.bd()}));z.c(Rk,r(this,function(){this.$o=!1}));$(window).resize(r(this,this.bd));$(window).scroll(r(this,this.bd))} | |
var kD,fD=6E4,gD=18E5,iD=2,hD=4,lD=0,eD=[new mD("thumbs","Thumbs","Remember to rate tracks you hear in order to customize your station.",' Clicking "thumbs-up" tells Pandora "you like this track" and helps to bring in more tracks like it to your station. Clicking "thumbs down" tells us not to play this track.',".thumbUpButton:first",null,null,null,[ei,fi],function(b){b=b.get("currentStation");return!(b&&b.ue()==m.Gc.Ye())}),new mD("shuffle","Shuffle","You can mix your stations together for greater variety.", | |
"Click the Shuffle button to shuffle through all your stations. Click the menu arrow on the right of the button to specify which stations to include in the shuffle. You can check and uncheck stations to customize your station shuffle","#shuffleIcon",null,null,null,[li],function(b){return 2<b.get("stationList").select(function(b){return!b.get("isQuickMix")}).length}),new mD("album_art_resize","Album Art","You can adjust the size of the album art in the Pandora Player.","Drag this button (click and hold down your mouse and drag) to adjust the size of the album art in the player. Another way to customize your pandora experience!", | |
".slideDragContainer",null,null,null,[],null),new mD("tired_song","Tired of this Track","Tired of a track? Put it to sleep!",'You can click "I\'m tired of this track" and we will stop playing this track for a while.',"#track_menu_dd .tiredOfSong",[di],1,1,[Vi],null),new mD("buy","Buy","You can buy this track or album.","Click the buy button. Select Amazon or iTunes",".buyButton",[ei],2,null,[],null),new mD("thumb_up","Create Station","You can create a new station from any artist or track you hear.", | |
'Select "New Station" and then click "from Song" or "from Artist" to create the new station.',".newStationFromArtist:last",[ei],3,3,[],function(b){return 10>b.get("stationList").select(function(b){return!b.get("isQuickMix")})}),new mD("share","Share","You can share any of your stations with your friends.","Click the share button. You can facebook post, twitter tweet, or email stations or tracks to your friends",".shareButton",[ei],4,null,[kj,jj],null),new mD("add_variety","Add Variety","Learn how to add more variety to your stations.", | |
"Click on add variety. In the next panel, enter an artist or track, and we'll add music like that to your station",".addVariety",[di,fi],6,null,[$i],function(b){if(b.get("currentStationViewIsShuffle")&&this.Ua==lD)return!1}),new mD("like","My Profile","See a complete list of all your likes on your profile",'Click "my profile" to edit your profile information, look at all your Pandora activity, see a list of all your likes, and more.',".myprofile_icon",[qj],1,null,null,null,!0)];f=dD.prototype; | |
f.WI=function(b){this.It=b};f.kJ=function(b,c){clearTimeout(kD);setTimeout(r(this,function(){var b=Om(),e=pl(c);null==b[e]?b[e]=1:b[e]++;pm(Tl,b);if(nD(this)){b=[];for(e=0;e<eD.length;e++){var h=eD[e];if(null!=h.Rf&&he(h.Rf,c)&&h.ow(this.model)){for(var l=0,p=0;p<h.Rf.length;p++)l+=Pm(h.Rf[p]);l>=h.jL&&b.push(h)}}0<b.length&&jD(this,b[0])}}),2E3)}; | |
f.cJ=function(){this.bd();clearTimeout(kD);kD=setTimeout(r(this,function(){if(nD(this)&&!((new Date).getTime()-this.Gt<gD)){for(var b={},c=Rm(),d=0;d<c.length;d++){var e=c[d];null==b[e]&&(b[e]=0);b[e]++}b=[];for(c=0;c<eD.length;c++)d=eD[c],null==d.Rf&&d.ow(this.model)&&b.push(d);0<b.length&&jD(this,b[0])}}),2250)}; | |
function jD(b,c){clearTimeout(kD);b.Gt=(new Date).getTime();b.zp++;Qm(c.id);2==c.Ua?R(Tv):c.Ua==lD?R(Uv):1==c.Ua?R(Sv):3==c.Ua&&R(Vv);setTimeout(r(b,function(){this.model.set({currentContextualTip:{initialText:c.fL,title:c.title,moreText:c.VL,anchorElementPath:c.CE}})}),250)}f.gJ=function(){this.yp++;this.bd()};f.TH=function(){this.Qv=!1;this.bd()};f.fK=function(){this.Qv=!0;this.bd()};f.bd=function(){clearTimeout(kD);this.model.set({currentContextualTip:null})}; | |
function nD(b){var c=b.model.get("currentUser");return null==c||c.p()||0!=$(document.body).scrollLeft()||0!=$(document.body).scrollTop()||0!=$(".lightbox:visible").length||b.Qv||b.$o||0>b.kk||null!=b.model.get("currentContextualTip")||(new Date).getTime()-b.kk<fD||b.zp>=hD||b.yp>=iD?!1:!0}f.$a=function(){this.yp=this.zp=0;this.Gt=this.kk=-1}; | |
f.Nq=function(b){this.$o=b&&b instanceof Bn;0>this.kk&&(this.kk=(new Date).getTime());if(!(0>this.It)){var c=eD[this.It];c&&setTimeout(r(this,function(){jD(this,c)}),2E3);this.It=-1}}; | |
function mD(b,c,d,e,h,l,p,q,t,y,E){this.id=b;this.title=c;this.fL=d;this.VL=e;this.CE=h;this.Ua=q;this.jL=p;this.Rf=l;this.Mi=t;this.BE=E;null==y&&(y=function(){return!0});this.ow=r(this,function(b){if(he(Rm(),this.id)||b.get("currentStationViewIsShuffle")&&this.Ua==lD)return!1;if(null!=this.Mi)for(var c=0;c<this.Mi.length;c++)if(0<Pm(this.Mi[c]))return!1;return 0<$(".backstage:visible").length&&!this.BE?!1:y(b)})};function oD(b){this.model=b;S(Ku,r(this,this.gI))}oD.prototype.gI=function(b){pm(Yl,b.low);z.b(bi,{noSkip:!0})};function pD(b){this.model=b;this.wr=null;S(Gu,r(this,this.EJ));z.c(Fe,r(this,this.BJ));z.c(Ge,r(this,this.CJ));W("/profile",!0,!0,!0,r(this,function(b){var d=b.pathNames;if(2!=d.length||_.contains(_.values(vu),d[1])){var e=this.model.get("currentUser");(b=d[2])||null==e||(b=e.Y);je(b)&&(null==e||e.p())?(jz(),R(rv)):(this.Qp=!1,d=d[1],"edit"==d&&(d=null,this.Qp=!0),this.rz=!1,d&&d!=tu&&d!=uu||(d=su,this.rz=!0),this.model.set({profilePanelType:d}),qD(this,b))}else this.Qp=!1,this.model.set({profilePanelType:su}), | |
qD(this,d[1])})).Dw=function(b){return"/profile"!=b&&"/profile/activity"!=b&&-1==b.indexOf("/profile/feed")};W("/feed",!0,!0,!0,r(this,function(){var b=this.model.get("currentUser");null==b||b.p()?(jz(),R(rv)):(this.model.set({profilePanelType:tu}),qD(this,b.Y))}));W("/connect",!0,!0,!0,r(this,function(){var b=this.model.get("currentUser");null==b||b.p()?(jz(),R(rv)):(this.model.set({profilePanelType:uu}),qD(this,b.Y))}))}function qD(b,c){b.wr=c;z.b(Bi,c)} | |
pD.prototype.BJ=function(b){if(b.webName==this.wr){this.wr=null;rD(this,b);b=this.model.get("currentProfileInfo").webName;var c=this.model.get("profilePanelType"),d;d=c==tu?"/feed":c==uu?"/connect":c!=su?"/profile/"+c+"/"+b:"/profile/"+b;Wy()!=d&&V(d,!this.rz,!0);R(zu,{panelType:c,webname:b,edit:this.Qp})}}; | |
pD.prototype.CJ=function(b){var c=this.model.get("currentProfileInfo");if(null!=c&&c.webName==b.webName){rD(this,b);if(c=this.model.get("currentUser"))b.privateProfile!=c.qh&&(c.qh=b.privateProfile),c.Ml=b.fullNameRaw;R(fv)}};function rD(b,c){var d=b.model.get("currentUser");if(null!=d){var e={},h=c.webName==d.Y;(e.is_owner=h)&&(e.fbId=d.Ea);e.hasExplicitContentFilterEnabled=d.Vb;e.allowExplicitContentManagement=d.Yv;b.model.set({currentProfileInfo:$.extend(e,c)},{silent:!0})}} | |
pD.prototype.EJ=function(b){var c=this.model.get("currentProfileInfo").webName,d=this.model.get("currentUser");c==d.Y?"G"==b[0]?z.b(Di,{stationCode:b}):z.b(ji,{stationId:b,userInitiated:!0}):z.b(Di,{stationCode:"fs"+b})};function sD(b){this.model=b;z.c(Oh,r(this,this.handleError));z.c(jh,r(this,this.mK));z.c(Fh,r(this,this.mI));z.c(Gh,r(this,this.lI));z.c(kh,r(this,this.uI));z.c(lh,r(this,this.qK));z.c($g,r(this,this.kI));z.c(Ah,r(this,this.zI));z.c(rh,r(this,this.oI));z.c(Hh,r(this,this.DK));z.c(ph,r(this,this.RI));z.c(Jh,r(this,this.zJ));z.c(Kh,r(this,this.AJ));z.c(Lh,r(this,this.Oq));z.c(el,r(this,this.jK));z.c(Yh,r(this,this.WH));z.c(Zh,r(this,this.vJ))}f=sD.prototype; | |
f.handleError=function(b){var c;if(b.error instanceof Bd&&b.fr)c=new X({message:b.message,persist:!0,retry:!0}),c.bind("retry",r(this,function(){z.b(b.fr,b.iL)})),c.bind("close",r(this,function(){b.El&&z.b(b.El,b.Qg?b.Qg:b.error.message)}));else{if(b.El){b.Qg&&(b.Qg.intentEvent=b.fr);z.b(b.El,b.Qg?b.Qg:b.error.message);return}c=ie(b.message)?new X({message:b.message}):new X({message:Zb()})}c.render()}; | |
f.mK=function(){var b=this.model.get("currentUser"),c=new X({message:yb()});b&&b.P()&&(c=new X({message:zb()}));c.render()};f.mI=function(){(new X({message:Xb()})).render()};f.lI=function(){(new X({message:Yb()})).render()};f.uI=function(){var b=this.model.get("currentUser"),c=new X({message:Ab()});b&&b.P()&&(c=new X({message:Bb()}));c.render()};f.qK=function(){(new X({message:Eb()})).render()};f.kI=function(){(new X({message:Fb()})).render()};f.zI=function(){(new X({message:Kb()})).render()}; | |
f.AJ=function(){(new X({message:gc()})).render()};f.zJ=function(b){if(b.isOnDemand)if(b.stationStart){var c=new X({message:ac()});z.b(qg,b)}else c=new X({message:bc(),play:!0,persist:!0}),c.bind("play",r(this,function(){z.b(rg,b.stationId)})),z.b(pg,b);else c=new X({message:$b()});c.render()}; | |
f.RI=function(b){this.model.get("currentUser").Ld=!0;var c=Zb();b.code==m.d.SB()&&(c=b.message,z.b(mj));ie(c)&&"This facebook account is bound to a different Pandora account"==c?(new X({message:hc})).render():(new X({message:c})).render()};f.DK=function(b){var c=ca();if(b.code==m.d.tu())c=ea();else if(b.code==m.d.uu())c=da();else if(b.code==m.d.bo())c=ha();else{if(b.code==m.d.Tn()||b.code==m.d.On()||b.code==m.d.no()||b.code==m.d.Pn())return;b.code==m.d.eo()?c=fa():b.code==m.d.Ve()&&(c=ia())}(new X({message:c})).render()}; | |
f.oI=function(b){var c=this.model.get("currentUser");if(b instanceof Dd)switch(b.code){case m.d.xC():case m.d.zC():k.error("Cannot create station: Invalid station code");break;case m.d.AC():(new X({message:Vb})).render();break;case m.d.gu():(new X({message:ac()})).render();break;case m.d.Ak():if(-1<b.message.indexOf("station limit")){null==c||c.p()?(new X({message:Tb()})).render():(new X({message:Ub()})).render();break}default:(new X({message:Wb()})).render(),s("create_station_unhandled_error",{w3:b.code, | |
x3:b.message},c)}else this.model.get("readonly")?(new X({message:ec()})).render():az(this.model)?null!=b&&null!=b.retry_method?z.c(Qg,r(this,function(){z.pa(this,Qg);b.retry_method(b)})):(new X({message:fc()})).render():k.error("Cannot create station: unhandled error",b)};f.Oq=function(){(new X({message:lc()})).render()};f.jK=function(){(new X({message:nc()})).render()};f.WH=function(){(new X({message:pc()})).render()};f.vJ=function(){(new X({message:qc()})).render()};function tD(b,c){this.model=b;this.er=!1;z.c(Pe,r(this,this.fy));z.c(rf,r(this,this.NJ));z.hb(Ae,r(this,this.dm));z.c(xf,r(this,this.JJ));z.hb(Fg,r(this,this.vq));z.c(Og,r(this,this.Hb));z.hb(Ne,r(this,this.iy));z.hb(Oe,r(this,this.iy));z.c(Lh,r(this,this.Oq));S(Ou,r(this,this.PJ));S(Qu,r(this,this.Qx));S(Ev,r(this,this.il));S($v,r(this,this.VH));S(Su,r(this,this.qJ));S(Xv,r(this,this.Nd));S(Yv,r(this,this.Od));c.bind("addvariety",r(this,this.Qx));this.model.bind("change:currentShuffleType",r(this, | |
this.OF));this.model.bind("change:currentStation",r(this,this.QF));this.model.bind("change:currentTrack",r(this,this.RF));this.model.bind("change:safeToAutoPlayStation",r(this,this.il));this.model.bind("change:expired",r(this,this.wG));this.model.bind("change:siteLocked",r(this,this.Kq));this.Wv=W("/stations/variety",!0,!1,!0,r(this,function(b){(b=b.pathNames[2])?uD(this,b):uD(this)}));this.rO=W("/stations/rename",!0,!1,!0,r(this,function(b){b=b.pathNames[2];null==b&&null!=this.model.get("menuStation")&& | |
(b=this.model.get("menuStation").e());b?vD(this,b):vD(this)}));W("/stations/play",!0,!1,!0,r(this,function(b){var c=b.pathNames[2];null!=c&&setTimeout(function(){V("/station/play/"+c,!1,!0)},1)}));this.jA=W("/stations/share",!0,!1,!0,r(this,this.$r));this.tP=W("/albums/share",!0,!1,!0,r(this,this.$r));this.vP=W("/songs/share",!0,!1,!0,r(this,this.$r));wD();$(window).bind("beforeunload",this,function(b){if(xD()){var c=[];b=b.data.model.get("stationList");for(var h=0;h<b.length&&20>c.length;h++){var l= | |
b.models[h];c.push({stationId:l.e(),stationName:l.fa()})}try{var p=window.external;p.msSiteModeCreateJumpList("Pandora Stations");for(h=0;h<c.length;h++)l=c[h],p.msSiteModeAddJumpListItem(l.stationName,"http://"+window.location.host+"/#/station/play/"+l.stationId,"http://"+window.location.host+"/radio/ie_app/pinned.ico");p.msSiteModeShowJumplist();window.setTimeout(function(){wD()},1E3)}catch(q){trackJs.track(q)}}})}function xD(){try{window.external.msIsSiteMode()}catch(b){return!1}return!0} | |
function wD(){xD()&&(window.external.msSiteModeCreateJumpList("Pandora Stations"),window.external.msSiteModeClearJumpList())}f=tD.prototype;f.dm=function(){this.er=!0;this.il()};f.jt=function(){new Wz({event:"station_rename",title:Cc,subtitle:Dc,message:Fc,yesButtonText:Gc,noButtonText:Hc})};f.Nd=function(b){"station_rename"==b&&z.b(Wj,{stationId:this.yn.e(),context:"station_rename"})};f.Od=function(){};f.vq=function(b){"station_rename"==b.context&&new Xz({station:this.yn})}; | |
f.$r=function(){var b=this.qb;this.qb=null;R(Pu,b)};f.il=function(){if(!this.model.get("siteLocked")&&this.model.get("safeToAutoPlayStation")&&null==this.model.get("currentStation")){var b=this.model.get("stationToAutoPlay");b&&!Go()&&z.b(ji,{stationId:b,userInitiated:!1})}};f.Kq=function(){this.model.get("siteLocked")||this.il()};f.wG=function(){var b=this.model.get("expired");this.model.set({safeToAutoPlayStation:!b})}; | |
f.iy=function(){if(!this.model.get("booting")&&"all"==this.model.get("currentShuffleType")){for(var b=[],c=this.model.get("stationList").models,d=0;d<c.length;d++){var e=c[d];e.Z()&&e.D()||e.Ra()||e.Fb()||e.Tb()||e.rc()||!un(e)||b.push(c[d].e())}0<b.length&&z.b(li,{stationIdArray:b,isExplicitSave:!1,shuffleType:this.model.get("currentShuffleType")})}}; | |
f.fy=function(b){var c=this.model.get("stationList").select(function(b){return b.D()&&b.Z()})[0];c.$m(b.quickMixStationIds);c._quickMixType=b.quickMixType;R(Ju);yD(this,!0)};f.Qx=function(b){(b=b?this.model.get("stationList").Uc(b):this.model.get("currentStation"))&&this.Wv.update(b.e())};function uD(b,c){var d=b.r(c);null!=d&&(b.oi=new Lz({model:b.model,station:d}),b.Wv.update(d.e()))}f.VH=function(b){null==b.getContext()&&z.b($i,b)};f.RF=function(){yD(this,!1)}; | |
function yD(b,c){var d=b.model.get("currentStation"),e=b.model.get("currentTrack");e instanceof Bn||null!=d&&d.D()&&d.Z()&&null!=e&&(he(d.te(),e.e())||z.b(di,{appSkip:!c}))}f.NJ=function(b){this.oi&&this.oi.handleSearchResults(b)}; | |
f.QF=function(b,c,d){d=d||{};this.oi&&(this.oi.cancelClick(),this.oi=null);this.model.set({relatedArtists:null,selectedArtist:null,selectedTrack:null});b=this.model.get("currentStation");null!=b&&(c=this.model.get("modalPanel"),fC()||c==iu&&!ay()&&!vn(b)||V("/station/play/"+b.e(),!1,!0,!0===d.userInitiated))}; | |
f.JJ=function(b){var c=_.map(b,function(b){return b.artistName}).join(", ")+"...",d=this.model.get("currentStation");this.qb&&this.qb.station&&b.stationId==this.qb.station.e()?(this.qb=$.extend({relatedArtists:c},this.qb),this.jA.update(this.qb.station.e())):b.stationId==d.e()&&this.model.set({relatedArtists:c})};f.OF=function(){var b=this.model.get("currentShuffleType");null!=b&&"all"!=b&&(b="my");pm(Zl,b)}; | |
f.PJ=function(b){var c=Wy();c&&c.indexOf&&-1<c.indexOf("/stations/variety")&&(c="");this.qb=$.extend({returnHash:c},b);this.qb.station?(b=this.qb.station,b.Eb()||!b.wa()?(b=b.e(),c=this.model.get("currentStation"),null!=c&&c.e()==b&&(this.qb.returnHash="/station/play/"+b),this.jA.update(b)):z.b(cj,b.e())):this.qb.album?this.tP.update(this.qb.album.musicId):this.qb.track&&this.vP.update(this.qb.track.o())}; | |
function vD(b,c){var d=b.r(c);null!=d&&(d.Z()?(new Xz({station:d}),b.rO.update(d.e())):(b.yn=d,b.jt()),R(Pw))}f.Hb=function(){if(this.sj){for(var b=this.model.get("stationList"),c=0;c<this.sj.length;c++)b.add(this.sj[c],{silent:!0});b.trigger("refresh");this.sj=null}};f.r=function(b){var c=this.model.get("currentStation");b&&0<b.length&&(c=this.model.get("stationList").detect(function(c){return c.e()==b}));return c}; | |
f.qJ=function(b){var c=this.model.get("currentStation"),d=b==c.e();R(Qw);if((c=this.model.get("currentUser"))&&c.kL)z.b(Yh,b);else{var e=this.model.get("stationList"),c=e.Uc(b);b=e.indexOf(c);var h=[c];e.remove(c,{silent:!0});if(1==e.length){var l=e.at(0);h.push(l);e.remove(l,{silent:!0})}e.trigger("refresh");this.sj=h;var p=new X({message:zc([c.fa()]),undo:!0,context:h});p.bind("undo",r(this,function(){for(var b=p.getContext(),c=0;c<b.length;c++)e.add(b[c],{silent:!0});e.trigger("refresh");R(Rw); | |
this.sj=null;this.model.get("videoAdPlaying")?z.c(Rk,r(this,function(){z.pa(this,Rk);d&&z.b(ji,{stationId:b[0].e()})})):d&&z.b(ji,{stationId:b[0].e()})}));p.bind("close",r(this,function(){var b=p.getContext();z.b(Hi,b[0].e())}));p.render();d&&(0<e.length?(c=b,b>=e.length&&(c=e.length-1),b=e.at(c),z.b(ji,{stationId:b.e()})):z.b(Xj,null))}};f.Oq=function(b){V("/station/play/"+b,!1,!1)};function zD(b,c){this.model=b;this.Mt=!1;this.Dg=c;this.Ny=0;z.c(vf,r(this,this.tJ));z.c(Rj,r(this,this.Yr));this.model.bind("change:currentUser",r(this,this.zq))}zD.prototype.Yr=function(){this.Mt=!0}; | |
zD.prototype.zq=function(){var b=this.model.get("currentUser");null==b&&(this.Mt=!1);if(b&&b.Sa()&&!b.tf){if(b.xj)return;if(!b.tf)if(8>=b.sd){if(!0!=km(Xl)){if(b.nh){var c=b.sd;1!=c&&!0==km(Xl)==!0||this.model.set({blueBarMessage:new Cy(5,"",c,!1,"","")})}else c=b.sd,b=b.rm,null==this.model.get("blueBarMessage")&&(1!=c&&!0==km(Xl)==!0||this.model.set({blueBarMessage:new Cy(0,"",c,b,"","")}));return}}else pm(Xl,!1)}else if(b&&b.u==m.v.sg()&&5>=b.sd&&!this.Mt&&!b.nh){c=b.sd;null==this.model.get("blueBarMessage")&& | |
this.model.set({blueBarMessage:new Cy(4,"",c,!1,"","")});return}b&&null!=b.Vo&&""!=b.Vo?this.Ys(b.Vo):this.model.set({blueBarMessage:null})};zD.prototype.tJ=function(b){b>this.Ny&&(this.model.set({blueBarMessage:new Cy(3,"",b,!1,"","")}),this.Ny=b)};zD.prototype.Ys=function(b){null==this.model.get("blueBarMessage")&&this.model.set({blueBarMessage:new Cy(2,b,-1,!1,"","")})};function AD(b,c){this.cC=3E4;this.Ln="2000x15";this.Mn="tuner";this.model=b;this.Ch=c;this.model.bind("change:modalPanel",r(this,this.Gq));z.hb(xi,r(this,this.zj));z.hb(yi,r(this,this.cM));z.hb(zi,r(this,this.qM));z.c(pi,r(this,this.abort));W("/forcepostreg",!0,!1,!1,r(this,this.YG));BD=this}var BD;function CD(){var b=BD;clearTimeout(b.bO);C.ab(b.Je,function(b){k.info("postreg "+b+" ping success")},function(b,d){k.info("postreg "+d+" ping failure: "+b)})} | |
function DD(b){mp(b.EL,b.Ln,"failed to load postreg ad",b.Mn,b.model.get("currentUser"));BD.Iq()}f=AD.prototype;f.Gq=function(){var b=this.model.get("modalPanel");"REGISTERED_PANEL"==b?ED(this,null):"POSTREG_AD_PANEL"==b&&(b=this.model.get("currentUser"),null==this.Je||null==this.Je.cpa_swf_url||null!=b&&!b.H()?this.zj():(this.bO=setTimeout(r(this,function(){DD(this)}),this.cC),this.Ch.render(this.Je.cpa_swf_url)))}; | |
function ED(b,c){b.Je=null;var d={pandoraAdType:"postreg"},e=b.model.get("currentStation"),h=b.model.get("stationList").models;C.lg(d,e,h);C.Re(d);C.cg(B.Xi(),b.Mn,d,b.Ln,!1,r(b,function(b){this.EL=b;A._data.useTestAds&&(b="<methodResponse><params><param><value><struct><member><name>type</name><value><string>CPA_PROVIDER</string></value></member><member><name>cpa_swf_url</name><value><string>/postregAdProxy/testswf/webreg.swf</string></value></member><member><name>tracker</name><value><string></string></value></member><member><name>clickthrough</name><value><string></string></value></member><member><name>impression</name><value><string></string></value></member></struct></value></param></params></methodResponse>"); | |
try{this.Je=C.Gj(b,this.Mn,this.Ln)}catch(d){trackJs.track(d),this.Je=null}c&&c()}),r(b,r(b,function(){this.Je=null})))}f.YG=function(){ED(this,r(this,function(){this.model.set({modalPanel:"POSTREG_AD_PANEL"})}))};f.Iq=function(){this.Ch.closeWindow()};f.abort=function(){this.Ch.abort()};f.zj=function(){this.Je=null;z.b(Qg);fC()||setTimeout(function(){R(yu)},500)}; | |
function FD(b,c,d){k.info("PostregAdController.onPostregAdPrompt: "+[b,c,d].join(", "));var e=d.split(",");d=BD;je(b)&&(b="This advertiser");for(var h=d.model.get("currentUser"),l="",p="",q=0;q<e.length;q++){var t=e[q];0<p.length&&(2<e.length&&(p+=","),p+=" ",q==e.length-1&&(p+="and "));0<l.length&&(l+=",");var p="dma"==t?p+"city":p+t,y;"email"==t?y=h.Pa:"zip"==t?y=h.of.split(":")[3]:"age"==t?y=String.valueOf(h.of.split(":")[1]):"gender"==t?y=h.of.split(":")[2]:"dma"==t&&(y=h.of.split(":")[9]);l+= | |
y}y=""+b+" would like to use your";y=y+" "+p;y=y+" "+c;y+=".";y+=" Is this OK?";d.wz=l;d.Ch.FF(y)}f.qM=function(){this.tapToRegCallback&&this.tapToRegCallback(!1,null)};f.cM=function(){this.tapToRegCallback?this.tapToRegCallback(!0,this.wz):0<$("#postregProxy").length&&$("#postregProxy")[0].postregAdPrompt_callback(this.wz);setTimeout(r(this,this.Iq),1500)};window.onPostregAdComplete=function(){k.info("PostregAdController.onPostregAdComplete");BD.Iq()};window.onPostregAdPrompt=FD; | |
window.askListenerForInfo=function(b,c,d,e){k.info("PostregAdController.askListenerForInfo: "+[b,c,d].join(", "));BD.tapToRegCallback=e;FD(b,c,d)};window.onPostregAdLoad=function(){k.info("PostregAdController.onPostregAdLoad");CD()};window.onPostregAdError=function(){k.info("PostregAdController.onPostregAdError");DD(BD)};function GD(b,c){this.model=b;this.tn=c;this.model.bind("change:modalPanel",r(this,this.Gq));z.c(Tf,r(this,this.Mq));z.c(Vf,r(this,this.MJ));z.c(Uf,r(this,this.rK));S(nw,r(this,this.oK));S(ow,r(this,this.LJ));z.c(De,function(){})}var HD={brandName:"",lineId:"",creativeId:"",offerButtonLabel:"",offerButtonUrl:"",leadInBannerUrl:"",signature:"",vxOffer:""};f=GD.prototype; | |
f.Mq=function(b){this.zb=b;(b=this.model.get("currentUser").Sh)&&b!=m.ge.Mu()&&this.zb&&this.zb.svnActivityUrl&&(this.zb.svnActivityUrl+=(-1==this.zb.svnActivityUrl.indexOf("?")?"?":"&")+"disable_audio_cue=true")}; | |
f.Gq=function(){var b=this.model.get("modalPanel"),c=this.model.get("currentUser");"SVN_AD_PANEL"==b&&(this.zb?(R(ww),z.b(ci),this.tn.render(this.zb.svnActivityUrl,this.zb.svnWindowHeight,this.zb.svnWindowWidth),s("svn_activity_start",{listener_id:c.s,activity:this.zb.svnName,instance_id:this.model.get("halt_id"),source:"stillListening"},this.model.get("currentUser"))):R(nw))};function ID(b){b.zb=null;R(vw);z.b(ai);b.tn.vF()}f.oK=function(b){null!=this.zb&&(JD(this,!1,b),ID(this))}; | |
f.LJ=function(b){null!=this.zb&&(JD(this,!0,b),ID(this))};function JD(b,c,d){var e=b.model.get("currentUser"),h=e.jk,e=e.Sh;z.b(Mj,{svnName:b.zb.svnName,activityBenefit:e,hoursEarned:e==m.ge.Mu()?h-1:h,probablyCompleted:c,context:d})}f.rK=function(b){k.info("awarding "+b+" for completing SVN activity");this.model.get("currentUser").lk=b}; | |
f.MJ=function(b){var c=b.success;k.info("Server reported that the listener "+(c?" did ":" did not ")+" complete svn activity");var d=this.model.get("currentUser");if(c)KD(this,b.activity.activityBenefit,b.activity.hoursEarned,d),s("svn_activity_completed",{listener_id:d.s,instance_id:this.model.get("halt_id")},d);else{var e=c=null,h=!1,l=b.activity.context;l&&(l.source&&(c=l.source),l.elapsedTime&&(e=l.elapsedTime),l.didReachThreshold&&(h=l.didReachThreshold));h&&KD(this,b.activity.activityBenefit, | |
b.activity.hoursEarned,d);s("svn_activity_cancelled",{listener_id:d.s,instance_id:this.model.get("halt_id"),activity:b.activity.svnName,probablycompleted:b.activity.probablyCompleted,source:c,interaction_time:e,threshold_reached:h},d)}}; | |
function KD(b,c,d,e){c==m.ge.io()?(HD.offerName=4==d?"uninterrupted4":"uninterrupted1",HD.leadInAudioUrl=4==d?"http://pandora.com/static/creatives/valueExchange/intro-4hr.mp3":"http://pandora.com/static/creatives/valueExchange/intro-1hr.mp3",HD.truexInstanceId=b.model.get("halt_id"),z.b(dl,HD)):e.lk=d};function LD(b){this.model=b;new VA({model:this.model});this.model.bind("change:currentUser",r(this,this.Dp));z.c(wf,r(this,this.Hq))}LD.prototype.Hq=function(){this.model.set({capped:!0});this.model.set({blueBarMessage:null});R(Uu);setTimeout(r(this,function(){z.b(ci)}),800)};LD.prototype.Dp=function(){this.model.set({capped:!1})};function MD(b){this.model=b;this.model.bind("change:modalPanel",r(this,this.ia));this.Iz=new ZA({model:this.model});this.hash=W("/gift",!0,!0,!0,r(this,this.Zx));W("/giftredeem",!0,!1,!1,r(this,this.Zx))}MD.prototype.Zx=function(b){this.model.get("hasStations")||this.model.set({modalPanel:"REDEMPTION_PANEL"});b=b.parameters.code;null==b&&(b=A._data.code,A._data.code=null);this.Iz.render(b);this.hash.update()};MD.prototype.ia=function(){"REDEMPTION_PANEL"!=this.model.get("modalPanel")&&this.Iz.jj()};function ND(b){function c(b){var c={};_.isString(b)&&_.each(b.split("&"),function(b){b=b.split("=");c[decodeURIComponent(b[0])]=decodeURIComponent(b[1]||"")});return c}this.model=b;this.py=!1;W("/land",!0,!0,!0,r(this,function(b){if(!this.py){this.py=!0;var e=this.model.get("smartLaunchPath");if(null==e||0==b.path.indexOf("/land/song"))e=b.path;this.model.set({smartLaunchPath:null});if(null!=e)if(0==e.indexOf("/land/")){var h=e.substring(6).split("/");if(1<h.length)if("station"==h[0]){var l="fs"; | |
"TT0"===h[1]?l="":null!=h[2]&&(l=h[2]);b=c(b.queryString);z.b(Di,{stationCode:l+h[1],stationName:b.T3||"",source:b.nt||""})}else if("artist"==h[0])setTimeout(function(){V(h[1],!1,!1)},300);else if("song"==h[0]){var p;2==h.length?p="/-/-/"+h[1]:3==h.length?p="/"+h[1]+"/-/"+h[2]:4==h.length&&(p="/"+h[1]+"/"+h[2]+"/"+h[3]);setTimeout(function(){V(p,!1,!1)},300)}}else 0==e.indexOf("/search/")&&setTimeout(function(){V(e,!1,!1)},300)}}))};var rC="expired-phone",sC="subscribe-phone",tC="subscription",vC="subscribe",uC="expired",wC="sponsorshipExpired",xC="subscribe-mdp",yC="expired-business",kC={wT:rC,D0:sC,E0:tC,h0:"renewal",u_:"notneeded",B0:vC,uT:uC,v0:wC,C0:xC,vT:yC};function OD(b){this.model=b;z.c(Pf,r(this,this.AK));for(var c in kC)(function(b,c){W("/"+c,!1,!0,!0,r(b,function(){PD(this,c)}))})(this,kC[c])} | |
function PD(b,c){var d=b.model.get("currentUser");if(null==d||d.p())b.model.set({postLoginPath:"/"+c});else{d&&d.Bt&&z.b($k);b.model.set({modalPanel:iu});$("#mainContent").children().hide();if("renewal"==c){if(d&&d.Sa()&&d.xj){setTimeout(function(){R(yu)},100);return}if(d&&!On(d))c="notneeded";else{if(d&&(Nn(d)||d.u==m.v.sg())){setTimeout(function(){V("/subscriptionInfo",!1,!1)},100);return}if(d&&d.tb!=m.sa.fo()){R(Vu);return}}}b.Fl=new YA({model:b.model,hashTag:c});$("#mainContent").append(b.Fl.render().el)}} | |
OD.prototype.AK=function(){this.Fl&&(this.Fl.trigger("close"),this.Fl=null)};function QD(b){this.model=b;this.id=(new Date).getTime();this.vr=[];this.Hg=null;z.c(hg,r(this,this.OI));z.c(Gk,r(this,this.vI));this.model.bind("change:currentTrack",r(this,this.sI));this.model.bind("change:currentStation",r(this,this.qI));this.model.bind("change:musicPlaying",r(this,this.uJ))}f=QD.prototype; | |
f.OI=function(b){if(null!=b&&0!=b.length)if(this.model&&this.model.get("siteLocked")&&"ext_sv_panel_close"!=b[0]&&"ext_saaos"!=b[0]&&"ext_saaof"!=b[0]&&"ext_sv_min_activity_completed"!=b[0])k.info("cannot exceute "+b[0]+" while site is locked");else{var c=b[0];this[c]&&this[c].apply(this,b.slice(1))}};f.vI=function(b){(b=$(b))&&0!=b.length&&(b=xe()?b[0].contentDocument:b[0].contentWindow.document)&&(b=b.getElementById("adContainer"))&&(this.Hg=(b=/\d+:\d+/g.exec(b.innerHTML))&&0<b.length?b[0]:null)}; | |
f.sI=function(){null!=this.Qr&&(RD(this,"songEnded",this.Qr),this.Qr=null);var b=this.model.get("currentTrack");null!=b&&(b=SD(this,b),RD(this,"songPlayed",b),this.Qr=b)};f.qI=function(){var b=this.model.get("currentStation");null!=this.Pr&&(RD(this,"stationEnded",this.Pr),this.Pr=null);null!=b&&(b=TD(b),RD(this,"stationPlayed",b),this.Pr=b)}; | |
f.uJ=function(){var b=this.model.get("currentTrack");if(null!=b){var c=this.model.get("musicPlaying"),b=SD(this,b);c?RD(this,"songPlayed",b):RD(this,"songPaused",b)}};function SD(b,c){var d=null;if(null!=c&&(d={songName:c.Ja,artistName:c.W(),albumName:c.kb,albumArtUrl:c.vb(),musicToken:c.eb()?c.eb():c.zv+":"+c.NC,stationToken:c.e(),songURL:fn()+c.hh(),artURL:c.vb()},null!=d)){var e=b.model.get("currentUser");$.extend(d,{allowExplicit:e?!e.Vb:!0})}return d} | |
function RD(b,c,d){for(var e=0;e<b.vr.length;e++)ip(b.vr[e],c,d)}function TD(b){return{stationName:b.fa(),stationId:b.e(),isShared:!b.Z(),isQuickMix:b.D()}}QD.prototype.ext_ping=function(b){ip(b,"pong",this.id)};QD.prototype.ext_registerEventListener=function(b){this.vr.push(b);ip(b,"tunerId",this.id);var c=this.model.get("currentStation");null!=c&&ip(b,"stationPlayed",TD(c));c=this.model.get("currentTrack");null!=c&&ip(b,"songPlayed",SD(this,c))};QD.prototype.ext_play=function(){z.b(ai)}; | |
QD.prototype.ext_pause=function(){z.b(ci)};QD.prototype.ext_pause_for_ad=function(){window.setIgnorePauseInteractions(!0);z.b(ci)};QD.prototype.ext_lsfi=function(b){isNaN(parseInt(b.substr(0,2),10))||(b="sh"+b);z.b(Fi,{stationCode:b,source:this.Hg})};QD.prototype.ext_lsfmi=function(b){"TT0"!==b&&0!=b.indexOf("m")&&(b="mi"+b);z.b(Di,{stationCode:b})};QD.prototype.ext_lcswti=function(b){var c;c=b.split("|");2==c.length&&(b=c[0],c=c[1],z.b(ii,{stationId:b,trackToken:c,source:this.Hg}))}; | |
QD.prototype.ext_lsfst=function(b){ie(b)&&V("/search/"+escape(b),!0,!0)};QD.prototype.ext_lqmfi=function(b){var c=this.model.get("currentUser");if(null!=c&&c.s==b){var c=this.model.get("stationList"),d=c.detect(function(c){return c.get("isQuickMix")&&c.get("originalCreatorId")==b});if(null!=d){c.trigger("select",d);return}}z.b(Di,{stationCode:"qm"+b})};QD.prototype.ext_reg=function(){V("/account/register",!0,!0)};QD.prototype.ext_sub=function(){V("/subscriptionInfo",!0,!0)}; | |
QD.prototype.ext_renew=function(){V("/renewal",!0,!0)};QD.prototype.ext_no_renew=function(){z.b(Cj)};QD.prototype.ext_acct_msg=function(b){this.model.set({blueBarMessage:null});z.b(Tj,b)};QD.prototype.ext_saaos=function(){R(tw)};QD.prototype.ext_saaof=function(){R(uw)};QD.prototype.ext_demog_ad=function(){var b=this.model.get("currentUser");null!=b&&window.ad_demog_callback(b.Y,b.wb())};QD.prototype.ext_sub_state=function(){var b=this.model.get("currentUser");null!=b&&(window.listener_state=b.u)}; | |
QD.prototype.ext_vid=function(b){b=b.split("=");z.b(Xk,{key:b[0],value:b[1],isUserInitiated:!0})};QD.prototype.ext_fvid=function(){k.info("Not yet implemented: ext_fvid")}; | |
QD.prototype.ext_movie=function(b,c){var d=Fd(),e=null,h={url:b,skipDelaySeconds:15,showScrubber:!1},l=b.match("&?skipDelaySeconds=([0-9]+)");if(l){h.url=b.replace(l[0],"");try{h.skipDelaySeconds=Math.max(0,parseInt(l[1],10))}catch(p){trackJs.track(p)}}if(l=b.match("&?showScrubber=(true|false)"))h.url=b.replace(l[0],""),h.showScrubber="true"==l[1];for(var l=["startUrl","firstQuartileUrl","secondQuartileUrl","thirdQuartileUrl","completeUrl"],q=0;q<l.length;q++){var t=l[q],y=b.match("&?"+t+"=([^&]+)"); | |
y?(h.url=b.replace(y[0],""),h[t]=decodeURIComponent(y[1])):h[t]=null}if(q=h.startUrl)l=q.match("cid::([0-9]+)"),q=q.match("aid::([0-9]+)"),l&&q?(q=q[1],h.creativeId=l[1],h.adId=q):(h.creativeId=null,h.adId=null);z.c(Rk,r(this,function(){e=Fd();"function"==typeof c&&c({epochAtLaunch:d.toString(),epochAtDismiss:e.toString(),viewingDuration:(e-d).toString()});z.pa(this,Rk)}));d=Fd().toString();h.url="file="+h.url;z.b(Zk,h)};QD.prototype.ext_dis_video_ads=function(){z.b(Wk)}; | |
QD.prototype.ext_lss=function(){setTimeout(r(this,function(){R(Ou,{mode:"station_and_song",station:this.model.get("currentStation"),track:this.model.get("currentTrack")})}),1)};QD.prototype.ext_nss=function(){z.b(ai)};QD.prototype.ext_add_vrty=function(b){setTimeout(function(){R(Qu,b)},1)};QD.prototype.ext_share=function(){setTimeout(r(this,function(){R(Ou,{mode:"station_and_song",station:this.model.get("currentStation"),track:this.model.get("currentTrack")})}),1)}; | |
QD.prototype.ext_share_station=function(b){setTimeout(r(this,function(){var c=this.model.get("currentStation"),d=this.model.get("currentTrack");if(b)for(var e=this.model.get("stationList").models,h=0;h<e.length;h++)e[h].e()==b&&(c=e[h]);R(Ou,{station:c,track:d})}),1)}; | |
QD.prototype.ext_share_track=function(b){setTimeout(r(this,function(){var c=this.model.get("currentStation"),d=this.model.get("currentTrack");if(b)for(var e=this.model.get("stationList").models,h=0;h<e.length;h++)if(e[h].Eb())for(var l=e[h].n._tracks,p=0;p<l.length;p++)l[p].o()==b&&(d=l[p]);R(Ou,{station:c,track:d})}),1)};QD.prototype.ext_rst=function(){k.info("Not yet implemented: ext_rst")};QD.prototype.ext_friends=function(){V("/feed",!0,!0)}; | |
QD.prototype.ext_genre=function(b,c){var d="/music";ie(b)&&(d+="/"+encodeURI(b.toLowerCase()));ie(c)&&(d+="/"+encodeURI(c.toLowerCase()));V(d,!0,!0)};QD.prototype.ext_play_sample=function(b){function c(){z.b(Li,{url:b[d].url,gain:b[d].gain});d++;d<b.length&&z.pa(this,df)}var d=0;z.c(df,r(this,function(b){b.reachedEnd&&setTimeout(r(this,c),100)}));c()};QD.prototype.ext_stop_sample=function(){z.b(Mi)};QD.prototype.ext_sh_sc=function(){k.info("Not yet implemented: ext_sh_sc")}; | |
QD.prototype.ext_sv_panel_close=function(){R(qw)};QD.prototype.ext_sv_min_activity_completed=function(){R(pw)};QD.prototype.ext_sv_panel_cancel=function(){R(nw,{source:"truex_creative_cancel"})};QD.prototype.ext_event=function(b){var c;if("string"===typeof b||b instanceof String)try{c=JSON.parse(""+b)}catch(d){trackJs.track(d);k.error('error parsing json from sendEvent: "'+b+'"',d);return}else if("object"===typeof b)c=b;else{k.error('invalid sendEvent parameter: "'+b+'"');return}z.b(Vk,c)}; | |
QD.prototype.ext_log_tap=function(b,c){var d={station_id:this.model.get("currentStation").e(),event:b,metadata:c};s("tap_ad_template",d,this.model.get("currentUser"))}; | |
QD.prototype.ext_vx=function(b,c){var d=b.offerName;if(d){var e=b.rewardProperties;if(e){var h=e.lineId,l=e.creativeId;if((null==h||null==l)&&this.Hg){var p=this.Hg.split(":");2==p.length&&(h=p[0],l=p[1])}z.c(el,r(this,function(){setTimeout(function(){try{c&&"function"==typeof c&&c({success:"false"})}catch(b){trackJs.track(b)}},1);z.pa(this,el);z.pa(this,fl)}));z.c(fl,r(this,function(){setTimeout(function(){try{c&&"function"==typeof c&&c({success:"true"})}catch(b){trackJs.track(b)}},1);z.pa(this, | |
el);z.pa(this,fl)}));z.b(dl,{offerName:d,brandName:e.brandName,lineId:h,creativeId:l,offerButtonLabel:e.offerButtonLabel,offerButtonUrl:e.offerButtonUrl,leadInBannerUrl:e.leadInBannerUrl,leadInAudioUrl:e.leadInAudioUrl,signature:e.signature,vxOffer:e.vxOffer})}else c&&"function"==typeof c&&c({success:"false",reason:"Reward properties not specified."})}else c&&"function"==typeof c&&c({success:"false",reason:"Offer name not specified."})}; | |
QD.prototype.ext_delay_ad_refresh=function(b){z.b(kl,{delaySeconds:b,currentLineIdCreativeId:this.Hg})};function UD(b){this.model=b;this.model.bind("change:capped",r(this,this.dj));this.model.bind("change:expired",r(this,this.dj));this.model.bind("change:inactive",r(this,this.iJ));this.model.bind("change:forceRegistration",r(this,this.dj));this.model.bind("change:resettingPassword",r(this,this.dj));this.model.bind("change:siteLocked",r(this,this.Kq));z.c(Ve,r(this,this.FJ));this.$A=!0}UD.prototype.iJ=function(){z.b(Ek,!this.model.get("inactive"));this.dj()}; | |
UD.prototype.dj=function(){var b=this.model.get("capped")||this.model.get("expired")||this.model.get("inactive")||this.model.get("forceRegistration")||this.model.get("resettingPassword");this.model.set({siteLocked:b})};UD.prototype.Kq=function(){this.model.get("siteLocked")||!this.WL&&!this.$A||setTimeout(function(){z.b(ai)},500);this.model.get("siteLocked")&&(this.WL=this.model.get("musicPlaying")||this.model.get("resettingPassword"),setTimeout(function(){z.b(ci)},1E3))}; | |
UD.prototype.FJ=function(b){var c=!1;if(this.model.get("idle")&&b&&!1==b.userInitiated){c=!0;this.$A=!1;this.model.set({inactive:!0});z.b(ci);V("/inactive",!0,!0);this.model.set({halt_id:ud()});b=this.model.get("currentUser");var d=b.u;s("listener_idle",{active:"false",halt_id:ud(),listener_state:d,vendor_id:u,device_id:se},b)}z.b(We,{siteLocked:c})};function VD(b){this.model=b;this.Ec=null;this.wj=new fA({model:this.model});W("/account/startTrial",!0,!1,!1,r(this,this.oz));S(dx,r(this,this.oz));z.c(Xf,r(this,this.Yr));z.c(De,r(this,this.$a));W("/"+wC,!1,!1,!1,r(this,this.AN));S(Iv,r(this,this.fN))}f=VD.prototype;f.debug=function(b){k.debug("ComplimentaryTrialController : ",arguments)}; | |
f.oz=function(b){this.debug("Start trial request",b);var c=(b.path?b.path.split("/"):null)[3];this.debug("Complimentary trial for ",c);c&&(setTimeout(r(this,function(){C.nx(c,!0,r(this,function(b){this.Ec=b}),r(this,function(){}))}),1),z.b(Rj,{sponsor:c,referrer:this.referrer}))};f.$a=function(b){this.debug("Listener data : ",b);if(b){b=b.sl;var c=this.model.get("expired");b&&!0!==c&&WD(this,b,!1)}};f.Yr=function(b){if(b=b.sponsor)R(yu),WD(this,b,!0)}; | |
function WD(b,c,d){0==c.toLowerCase().indexOf("pandora")?(b.debug("Looks like a pandora trial",c),XD(b,{},d)):b.Ec&&b.Ec.sponsor==c?XD(b,b.Ec,d):C.nx(c,d,r(b,function(b){XD(this,b,d)}),r(b,function(){}))} | |
function XD(b,c,d){function e(b){void 0==b.initialSkin&&R(yv)}b.Ec=c;b.debug("Got trial data",b.Ec);var h=1;d&&(b.Ec.prerollValue?(z.b(Yk,{key:"advertiser",value:b.Ec.prerollValue,isUserInitiated:!1,callback:function(){e(c)}}),h=200):e(c));var l=c.skinClickThroughUrl;l?(b.debug("Loading click through url "+l),b.wj.render(l)):b.wj.ib();z.b(Yf,b.Ec);l=b.model.get("currentUser");!d&&(null!=b.model.get("currentSkinPath")||l&&l.Ii)||setTimeout(function(){R(Hv,"/skins/"+c.initialSkin)},h)} | |
f.fN=function(b){b&&(!0===b.sponsored?this.wj.lc():this.wj.ib())};f.AN=function(){C.aP();this.wj.ib();z.b(Zf,this.Ec)};function YD(b){this.model=b;this.Ec=null;this.KQ=new fB({model:this.model});this.hash=W("/trial",!0,!0,!1,r(this,this.Xr))}YD.prototype.Xr=function(b){this.debug("Start trial request",b);b=(b.path?b.path.split("/"):null)[2];this.debug("Sponsored trial for ",b);b&&(this.KQ.render(b),this.hash.update(b))};YD.prototype.debug=function(b){k.debug("SponsoredTrialController : ",arguments)};function ZD(b){this.model=b;this.view=new rB({model:this.model});this.HL=this.$b=null;z.c(il,r(this,this.eK));z.c(jl,r(this,this.dK));this.model.bind("change:currentStation",r(this,this.Lq));this.model.bind("change:currentTrack",r(this,this.Nq))}f=ZD.prototype;f.eK=function(b){b instanceof Np?this.vt(b):k.info("Can't start sponsored listening mode with an invalid reward:",b)};f.dK=function(){$D(this)}; | |
f.Lq=function(){if(null!=this.$b){var b=this.model.get("currentUser"),c=this.model.get("currentStation");!b.H()||c&&C.za(c)?this.view.Yq():this.view.pA()}};f.Nq=function(){null!=this.$b&&this.model.get("audioAdPlaying")&&z.b(di,{appSkip:!0})}; | |
f.vt=function(b){this.model.get("audioAdPlaying")&&z.b(di,{appSkip:!0});this.$b&&(clearInterval(this.$b),this.$b=null);this.HL=b.eh();var c=b.WD,d=b.XD,e=this.model.get("currentUser"),h=this.model.get("currentStation"),l=h&&C.za(h);this.view.vt(b.YC,b.iD,b.hD,b.KD,b.LD,Op(b),c/d,!e.H()||!h||l);this.jd("vx_status_bar_shown",b,e);var p=Math.max(1,d/360),h=1E3*p,q=c;this.$b=setInterval(r(this,function(){q-=p;this.view.cR(q,d);0>=q&&($D(this),clearInterval(this.$b),this.$b=null,z.b(jl),this.jd("value_exchange_end", | |
b,e))}),h)};function $D(b){null!=b.$b&&(b.view.DF(),null!=b.$b&&(clearInterval(b.$b),b.$b=null))}f.jd=function(b,c,d){s("value_exchange",{action:b,line_id:c.ei,creative_id:c.Jc,offer_name:c.Qk,truex_instance_id:c.Uo,vendor_id:u,device_id:se},d)};function aE(b){this.model=b;z.c(pk,r(this,this.zj));z.c(lk,r(this,this.zj));z.c(Uh,r(this,this.kM));z.c(Sh,r(this,this.jM));this.hash=W("/one/paypal/trial",!0,!0,!1,r(this,this.Xr))}f=aE.prototype;f.Xr=function(){this.jg=cp("token");if(this.pr||je(this.jg))setTimeout(function(){V("/",!1,!1)},100);else{var b=this.model.get("currentUser");b&&(this.Sj=b.u,b.u="COMPLIMENTARY");this.pr=!0;z.b(ok,[this.jg,Yo()])}};f.zj=function(){var b=nb();(new X({message:b})).render();z.b(zg);R(yu)};f.kM=function(){this.Em()}; | |
f.jM=function(){this.Em()};f.Em=function(){var b=this.model.get("currentUser");b&&this.Sj&&(b.u=this.Sj);R(yu)};function bE(b){this.model=b;z.c(Xh,r(this,this.sM));this.hash=W("/one/paypal/gift",!0,!0,!1,r(this,this.xM))}bE.prototype.xM=function(){var b=cp("token"),c=cp("code");if(this.pr||je(b))setTimeout(function(){V("/",!1,!1)},100);else{var d=this.model.get("currentUser");d&&(this.Sj=d.u,d.u="COMPLIMENTARY");this.pr=!0;z.b(yk,[b,c])}};bE.prototype.sM=function(){(new X({message:oc()})).render();var b=this.model.get("currentUser");b&&this.Sj&&(b.u=this.Sj);R(yu)};function cE(b){this.model=b;S(Ru,r(this,this.dG));S(Lu,r(this,this.tE));S(Mu,r(this,this.ZF));S(Nu,r(this,this.BO));S(kv,r(this,this.XF));S(lv,r(this,this.cG))}f=cE.prototype;f.dG=function(b){var c=b.musicID,d=b.stationID;b=b.isPositive;null!=c&&0!=c.length&&null!=d&&null!=b&&this.execute({method:"bookmark.deleteFeedback",isPositive:b,musicID:c,stationID:d},r(this,function(){R(Zv,null)}),"Could not delete feedbacks",!0)}; | |
f.tE=function(b){null!=b.So&&""!=b.So&&this.execute({method:"comment.addComment",commentMode:"add",commentTargetID:b.Iv,commentType:b.C(),commentText:b.So,isprivate:b.CD},r(this,function(c){c=c.result;c.targetId=b.Iv;var d=this.model.get("currentUser");null!=d&&(c.webName=d.Y,d.Ea&&(b.fbid=d.Ea),c.clientCommentType=b.C());R(Wv,c)}),"Could not add comment",!0)};f.ZF=function(b){this.execute({method:"comment.deleteComment",commentID:b},r(this,function(){}),"Could not delete comment",!0)}; | |
f.BO=function(b){this.execute({method:"comment.reportComment",commentID:b},r(this,function(){var c=$(".notes .comment_box[data-noteid="+b+"]");c.addClass("reported_comment");c.wrapInner('<div class="reported_comment_content"></div>');c.append('<div class="reported_comment_overlay"><div class="reported_comment_message"><div class="thanks">Thank you</div> <div>This comment has been marked as inappropriate.</div></div></div>');setTimeout(function(){c.slideUp()},2E3)}),"Could not report comment",!0)}; | |
f.XF=function(b){var c=b.section;this.execute({method:"bookmark.deleteArtistBookmark",bookmarkID:b.bookmarkId},r(this,function(){R(dw,c)}),"Could not delete bookmark",!0)};f.cG=function(b){var c=b.section;this.execute({method:"bookmark.deleteSongBookmark",bookmarkID:b.bookmarkId},r(this,function(){R(ew,c)}),"Could not delete bookmark",!0)}; | |
f.execute=function(b,c,d,e){z.b($f,b);var h=this.model.get("currentUser");return null!=h?(b.at=h.qg,$.ajax({url:"/services/ajax/",dataType:"json",traditional:!0,data:b,success:r(this,function(h){z.b(ag,b);"ok"==h.stat?c(h):1013==h.code?z.b(Og):1010<=h.code&&1012>=h.code?z.b(Fh):1020==h.code?z.b(Gh):dE("Bad response: "+h.stat,r(this,function(){this.execute(b,c,d,e)}),function(){k.error(d)})}),error:function(h,p,q){dE(q,r(this,function(){this.execute(b,c,d,e)}),function(){k.error(d)})}})):null}; | |
function BA(b,c,d,e){z.b($f,b);var h=(new Date).getTime();cE.latestCallId=h;$.post(b,c).success(function(l,p){z.b(ag,b);if(cE.latestCallId!=h)k.info("cancelling ajax call: "+b+" ["+h+"]");else if("success"==p)d(l,p);else{var q="Bad status="+p;dE(q,function(){BA(b,c,d,e)},function(){eE(p,q,d,e)})}}).error(function(l,p,q){if(cE.latestCallId!=h)k.info("cancelling ajax call: "+b+" ["+h+"]"),z.b(ag,b);else{var t=q.replace(/\+/g," ");dE(t,function(){BA(b,c,d,e)},function(){eE(p,t,d,e)})}})} | |
function Tz(b,c,d,e,h){z.b($f,b);var l=(new Date).getTime();cE.latestCallId=l;$.get(b,c).success(function(p,q){z.b(ag,b);if(cE.latestCallId!=l)k.info("cancelling ajax call: "+b+" ["+l+"]");else if("success"==q)d(p,q);else{var t="Bad status="+q;h?(z.b(ag,b),eE(q,t,d,e)):dE(t,function(){Tz(b,c,d,e)},function(){eE(q,t,d,e)})}}).error(function(p,q,t){var y=String(t).replace(/\+/g," ");h?(z.b(ag,b),eE(q,y,d,e)):dE(y,function(){cE.latestCallId!=l?(k.info("cancelling ajax call: "+b+" ["+l+"]"),z.b(ag,b)): | |
Tz(b,c,d,e)},function(){eE(q,y,d,e)})})}function eE(b,c,d,e){e?e(b,c):d('<div class="ajax_error_message">'+c+"</div>","success")}function dE(b,c,d){z.b(ag,"error handler");b=new X({message:Rb([b]),persist:!0,retry:!0});b.bind("retry",function(){c()});b.bind("close",function(){d()});b.render()};function fE(b){this.model=b;this.Bb={};S(Au,r(this,this.Tl));S(Jv,r(this,this.Eq));z.c(De,r(this,this.$a))} | |
fE.prototype.Tl=function(b){var c=this.Bb[b.o()];if(null!=c)R(Jv,c);else{var d=(c=this.model.get("currentUser"))&&c.Vb,d={url:"/services/ajax/",dataType:"text",context:b.o(),data:{method:"lyrics.getLyrics",trackUid:b.o(),lyricId:d?b.xv:b.fi,check:d?b.ev:b.mq(),nonExplicit:d},success:this.Vr,error:function(c,d,l){dE(l,r(this,function(){this.Tl(b)}),function(){k.info("error",c,d,l)})}};c&&c.qg&&$.extend(d.data,{at:c.qg});$.ajax(d)}}; | |
fE.prototype.Vr=function(b){b=eval("var tmp = "+b+"; tmp;");"ok"==b.stat&&function(b,d){var e=window.a;window.a=String.fromCharCode;var h=b.x(b.lyrics);R(Jv,new Ay(h,b.credits,d));window.a=e}(b,this)};fE.prototype.Eq=function(b){this.Bb[b.o()]=b};fE.prototype.$a=function(){this.Bb={}};function gE(b){this.model=b;this.Bb={};S(Bu,r(this,this.dH))}gE.prototype.dH=function(b){var c=this.Bb[b.nf];if(c)R(Kv,c);else{var c=b.Go,d=this.model.get("currentUser");d&&d.Vb&&c.indexOf("explicit=");$.get(b.Go,{},r(this,this.fM))}};gE.prototype.fM=function(b){b=b.artistExplorer||b.composerExplorer;null!=b&&(b=uy(b),this.Bb[b.nf]=b,R(Kv,b))};Fn.Jm=g([G.slice(0,18),G.slice(18,274),G.slice(274,530),G.slice(530,786),G.slice(786,1042)]);function hE(b){this.model=b;z.c(bj,r(this,this.nG))} | |
hE.prototype.nG=function(b){var c=null,d=!1,e=new XMLHttpRequest;e.onreadystatechange=function(){if(4==e.readyState)if(clearTimeout(c),200!=e.status)z.b(qh,"bad url shortener response status: "+e.status);else if(!d){var b=e.responseText;je(b)||0!=b.indexOf("http")?z.b(qh,"weird url shortener response text: "+b):z.b(Cg,b)}};var c=setTimeout(function(){z.b(qh,"bitly call has timed out");d=!0},1E4),h=b.songToken,l=b.stationToken,p=b.shareName,q=b.webname;b=b.shareServiceName||null;var t=A._data.proxyPort, | |
y="http://"+A._data.proxyHost;80!=t&&(y+=":"+t);y+="/short";y=(null!=h?y+"/song":y+"/station")+("?webname="+encodeURIComponent(q));y+="&station="+encodeURIComponent(l);null!=p&&""!=p&&(y+="&shareName="+encodeURIComponent(p));y+="&song="+encodeURIComponent(h);b&&(y+="&site="+encodeURIComponent(b));k.info("bit.ly request: "+y);e.open("GET",y,!0);e.send(null)};function iE(b){this.model=b;z.c(De,r(this,this.dd));z.c(jj,r(this,this.Xj));z.c(kj,r(this,this.Xj));z.c(Cg,r(this,this.ly));z.c(qh,r(this,this.JI));z.c(Ag,r(this,this.xK));z.c(Bg,r(this,this.yK));z.c(oh,r(this,this.GI));S(jv,r(this,this.zK))}f=iE.prototype;f.dd=function(b){this.model.set({twitterAuthenticated:null!=b&&!je(b.de)})};f.zK=function(){this.Ko=!0;jE(this)}; | |
f.Xj=function(b){b.doTwitter&&!this.LQ&&(this.hq=0,this.Sk=b,b.shortenedUrl?this.ly(b.shortenedUrl):z.b(bj,{songToken:b.isSongShare?b.songDetailToken:null,stationToken:b.stationToken,webname:b.webname,shareServiceName:"twitter",shareName:b.shareName}))};f.ly=function(b){this.ZD=b;b=this.model.get("currentUser");je(b.de)?jE(this):kE(this)};f.JI=function(b){z.b(nh,"failed to shorten url. "+b)}; | |
function jE(b){b.hq++;if(3<b.hq)z.b(nh,"unable to authenticate with twitter. failed authentication "+b.hq+" times"),b.LQ=!0;else{var c=b.model.get("currentUser"),c=lE(b).sign({path:"https://api.twitter.com/oauth/request_token",parameters:{oauth_callback:fn()+"twitter/oauthAuthorizationCallback.jsp"},signatures:{consumer_key:c.zn,shared_secret:c.An}}),d=window.open("about:blank","oauth");mE(b,"/oauth/"+c.signed_url.substring(c.signed_url.indexOf("request_token")),function(b){null==b||0!=b.indexOf("oauth_token")? | |
z.b(nh,"unable to authenticate with twitter"):null==d?z.b(nh,"twitter authentication blocked by popup blocker"):(d.location.href="https://api.twitter.com/oauth/authorize?"+b,d.focus())})}} | |
function mE(b,c,d,e){var h=!1,l=setTimeout(function(){h=!0;z.b(nh,"twitter communication timed out")},1E4);$.ajax({type:"POST",url:"/twitter"+c,data:e?e:null,success:r(b,function(b){clearTimeout(l);h||d(b)}),error:r(b,function(b){clearTimeout(l);z.b(ej,{});z.b(nh,"twitter responded with error: "+b)}),dataType:"html"})} | |
f.xK=function(b){var c=b.token;b=b.verifier;if(je(c))z.b(nh,"Unable to authenticate with twitter - twitter failed to return a request token");else if(je(b))z.b(nh,"Unable to authenticate with twitter - twitter failed to return a verifier");else{var d=this.model.get("currentUser"),c=lE(this).sign({path:"https://api.twitter.com/oauth/access_token",parameters:{oauth_token:c},signatures:{consumer_key:d.zn,shared_secret:d.An}});mE(this,"/oauth/"+c.signed_url.substring(c.signed_url.indexOf("access_token")), | |
function(b){if(je(b))z.b(nh,"Unable to authenticate with twitter - unable to fetch access tokens ["+b+"]");else{var c=b.split("&");b=(""+c[0]).split("=")[1];c=(""+c[1]).split("=")[1];je(b)||je(c)?(z.b(ej,{}),z.b(nh,"Unable to authenticate with twitter - authorization denied")):z.b(ej,{twitterShareUserKey:b,twitterShareUserSecret:c})}},{oauth_verifier:b})}}; | |
function kE(b){var c=b.model.get("currentUser"),d=lE(b),e=0==b.Sk.userMessage.length?b.Sk.defaultTwitterMessage:b.Sk.userMessage,h=" "+b.ZD+(e.match(/#pandora/i)?"":" #Pandora");140<(e+h).length&&(h="..."+h,e=e.substr(0,140-h.length));c=d.sign({path:"https://api.twitter.com/1.1/statuses/update.json",parameters:{status:e+h},signatures:{consumer_key:c.zn,shared_secret:c.An,oauth_token:c.de,oauth_secret:c.Xh}});mE(b,"/statuses/"+c.signed_url.substring(c.signed_url.indexOf("update")),r(b,function(b){je(b)? | |
z.b(nh,"Unable to post to twitter - twitter failed to respond"):(b=eval("("+b+")"),null!=b.error?-1!=b.error.toLowerCase().indexOf("authenticate")?(z.b(ej,{}),jE(this)):z.b(nh,"Unable to post to twitter: "+b.error):z.b(Dg,{twitter:!0,twitterHandle:b.user&&b.user.screen_name?b.user.screen_name:""}))}))} | |
f.yK=function(b){var c=this.model.get("currentUser");null==b?(c.de=null,c.Xh=null,this.Ko=!1,this.model.set({twitterAuthenticated:!1})):(c.de=b.twitterShareUserKey,c.Xh=b.twitterShareUserSecret,this.Ko?(this.Ko=!1,this.model.set({twitterAuthenticated:!0})):null==this.Sk?z.b(nh,"Unable to post to twitter - no tweet text"):je(b.twitterShareUserKey)?z.b(nh,"Unable to post to twitter"):(this.model.set({twitterAuthenticated:!0}),kE(this)))}; | |
f.GI=function(b){z.b(nh,"Unable to save twitter credentials: "+b)};function lE(b){b=b.model.get("currentUser");b=new OAuthSimple(b.zn,b.An);b.setAction("POST");return b}window.onOAuthCallBack=function(b,c){z.b(Ag,{token:b,verifier:c})};function nE(b){this.model=b;oE=A._data.facebookConnectPermissions.split(",");this.model.bind("change:currentUser",r(this,this.Sm));this.model.bind("change:facebookAuthenticated",r(this,this.sp));z.c(De,r(this,this.dd));z.c(lj,r(this,this.Cw));z.c(jj,r(this,this.Vs));z.c(kj,r(this,this.Us));z.c(nj,r(this,this.HG));z.c(oj,r(this,this.hI));z.c(xg,r(this,this.disconnect));z.c(wg,r(this,this.TI));z.c(ig,r(this,this.GJ));z.c(yg,r(this,this.bL));S(gv,r(this,this.IG));this.vw()} | |
var pE,qE,rE,sE,oE=[],tE=["publish_actions"],uE=[];function vE(b){k.info("FacebookService.authResponseChange",b);pE=b;qE||(qE=!0,FB.api("/me/permissions",function(b){k.info("FacebookService.authResponseChange got permissions",b);rE=b;qE=!1}))}window.fbAsyncInit=function(){FB.Event.subscribe("auth.authResponseChange",vE);FB.Event.subscribe("auth.statusChange",vE);FB.init({appId:Jo(),version:"v2.2",status:!0,cookie:!0,xfbml:!1,channelUrl:fn()+"fb_channel.html"});sE=!0;if(uE)for(;0<uE.length;)uE.shift()()}; | |
f=nE.prototype;f.bL=function(b){var c=this.model.get("currentUser");null!=c&&(Jn(c,b),this.Sm(),this.dd())}; | |
f.dd=function(){var b=this.model.get("currentUser");k.info("FacebookService.initUser: ",b);if(null!=b&&!b.p())if(sE)if(b.jx)k.info("initUser: server needs access token re-auth"),b.jx=!1,wE(this,r(this,function(c){k.info("initUser: re-auth - logged in and connected");var d=c.authResponse.accessToken,l=c.authResponse.userID,p=b.Ea;if(null==p||p==l)k.info("initUser: user matches connected, updating short-lived access token"),Wn(b,l),Xn(b,d,c.authResponse.expiresIn);this.dd()}),r(this,function(){k.info("initUser: re-auth - not logged in and/or not connected"); | |
this.dd()}));else{var c=b.Tc;if(!c&&null==b.Ea){var d=this.model.get("facebookLoginInfo");d&&(c=d.access_token,Xn(b,c,d.expires_in),Wn(b,d.id),Zn(b,d.name),Vn(b,!1))}c&&0<c.length?(k.info("User already has an access token, validate that it's good: ",c),FB.api("/me/permissions",{access_token:c},r(this,function(c){k.info("initUser permissions response: ",c);(c=c.data)&&0<c.length?(k.info("Access token is valid"),xE(this,c[0])):(k.info("Access token is not valid"),Xn(b,null),yE(this))}))):yE(this)}else k.info("FacebookService.initialized == false, setting FacebookService.postInitCallback"), | |
uE.push(r(this,this.dd))}; | |
function yE(b){k.info("FacebookService.initUserNoAccessToken");wE(b,r(b,function(b){k.info("initUserNoAccessToken: Logged in and connected");var d=this.model.get("currentUser"),e=b.authResponse.accessToken;d.Ea!=b.authResponse.userID||d.Wg?(k.info("initUserNoAccessToken: different user!"),Vn(d,!0),this.model.set({facebookAuthenticated:!1})):(k.info("initUserNoAccessToken: Same user, updating access token"),Xn(d,e,b.authResponse.expiresIn));FB.api("/me/permissions",r(this,function(b){k.info("initUserNoAccessToken permissions response: ", | |
b);(b=b.data)&&0<b.length&&xE(this,b[0])}))}),r(b,function(){k.info("initUserNoAccessToken: Not logged in and/or not connected");this.model.set({facebookAuthenticated:!1});this.sp()}))}function xE(b,c){var d=b.model.get("currentUser");null!=d&&(Yn(d,c),d.Wg?(k.info("initUserPermissionsCallback: isFbDisconnected = true"),b.model.set({facebookAuthenticated:!1}),b.sp()):(k.info("initUserPermissionsCallback: isFbDisconnected = false"),zE(b)))} | |
function wE(b,c,d){sE&&FB.getLoginStatus(r(b,function(b){b.authResponse&&"connected"==b.status?c&&c(b):d&&d(b)}))} | |
function zE(b,c){var d=b.model.get("currentUser");if(null!=d){var e=r(b,function(){this.model.set({facebookAuthenticated:!d.Wg});c&&c()}),h=r(b,function(){k.info("saveFbInfo: doesFacebookNeedSave() = ",d.Ld);if(d.Ld){d.Ld=!1;var b={id:d.Ea,name:d.mc||"",accessToken:d.Tc,accessTokenExpiration:d.CG||"",callback:e};k.info("saveFbInfo: saving",b);z.b(Uj,b)}else e()}),l=d.mc;null==l||""==l?(k.info("Don't have a full name for the listener, get it from Facebook"),b.nq(r(b,function(b){b&&Zn(d,b);h()}))): | |
(k.info("We already have their Facebook name"),h())}}f.nq=function(b){var c=this.model.get("currentUser");if(null!=c&&null!=c.Ea){var d={fields:"name"};c.Tc&&(d.access_token=c.Tc);FB.api("/"+c.Ea,d,function(c){b(c.name)})}else b(null)}; | |
function AE(b,c,d,e){k.info("doAction");var h=b.model.get("currentUser");if(null!=h)if(h.p())R(rv,{onSuccessCallback:r(b,function(){AE(this,c,d,e)})});else if(null!=h.Ea&&BE(b,c))k.info("doAction: User already has permissions, execute callback immediately"),Vn(h,!1),zE(b,d);else{k.info("doAction: User does not have permissions yet");if(b.model.get("facebookAuthenticated"))k.info("doAction: Already connected, we just need to ask for extra permissions");else if(k.info("doAction: Not connected in the Pandora backend, possibly still connected in Facebook API"), | |
sE&&pE&&pE.authResponse&&"connected"==pE.status){k.info("doAction: Logged in and connected in Facebook API, using cached permissions",rE);Wn(h,pE.authResponse.userID);Xn(h,pE.authResponse.accessToken,pE.authResponse.expiresIn);var l=rE?rE.data:null;if(l&&0<l.length&&(Yn(h,l[0]),BE(b,c))){Vn(h,!1);zE(b,d);return}}else k.info("doAction: Not logged in and/or not connected in Facebook API");b.login(d,e)}} | |
function BE(b,c){k.info("hasRequiredPermissions: requiredPermissions=",c);var d=b.model.get("currentUser");if(null!=d&&(d=d.Xg,k.info("hasRequiredPermissions: fbPermissions = ",d),null!=d)){for(var e=0;e<c.length;e++){var h=c[e];k.info("hasRequiredPermissions: checking for ",h);if(!d[h])return k.info("hasRequiredPermissions: don't have permission, returning false",h),!1}k.info("hasRequiredPermissions: has ALL permissions, returning true");return!0}k.info("hasRequiredPermissions: returning false"); | |
return!1} | |
f.login=function(b,c){k.info("FacebookService.login");var d=this.model.get("currentUser");null!=d&&FB.login(r(this,function(e){k.info("FacebookService.login returned: ",e);if("connected"==e.status){var h=e.authResponse;FB.api("/me/permissions",r(this,function(e){k.info("FacebookService.login permissions response: ",e);if((e=e.data)&&0<e.length){var p={};if(e&&e.length)for(var q=0;q<e.length;q++){var t=e[q];"granted"===t.status&&(p[t.permission]=1)}Yn(d,p);if(BE(this,oE)){k.info("FacebookService.login user has required permissions, saving");Wn(d, | |
h.userID);Xn(d,h.accessToken,h.expiresIn);Vn(d,!1);zE(this,b);return}}k.info("FacebookService.login user does NOT have required permissions, fail");Wn(d,null);z.b(ug);c()}))}else Wn(d,null),z.b(ug),this.model.set({facebookAuthenticated:!1}),c()}),{scope:oE.join(",")})};f.Cw=function(b){AE(this,oE,r(this,function(){k.info("FacebookService.connect: success");b&&b(!0)}),r(this,function(){k.info("FacebookService.connect: failure");b&&b(!1)}))}; | |
f.HG=function(){if(this.model.get("facebookAuthenticated")){var b=this.model.get("currentUser");ao(b,[]);k.info("FacebookService.fetchFriends: calling /friends");FB.api("/me/friends",{access_token:b.Tc},function(c){k.info("friends callback: ",c);ao(b,c.data);z.b(yf,c.data)})}};f.IG=function(b){var c=b.fbCallback;b="SELECT id,name FROM profile WHERE id in ("+b.fbids.join(",")+")";k.info("FacebookService.fetchNames: executing FQL: ",b);sE&&FB.api({method:"fql.query",query:b},c)}; | |
f.disconnect=function(){var b=this.model.get("currentUser");b&&Wn(b,null);this.model.set({facebookAuthenticated:!1})}; | |
f.Us=function(b){if(b.doFacebook){var c=this.model.get("currentUser"),d=b.artUrl,e;e=-1!=d.indexOf("no_album_art.png")?fn()+"static/images/share_facebook/generic_cover_art_preview.gif":d;e=0!=e.indexOf("http://")?"http://www.pandora.com/art/"+e:e;d=-1==d.indexOf("no_album_art")?d:fn()+d;c=Ko()+"static/fb-share.swf?Song="+encodeURIComponent(b.songName)+"&Artist="+encodeURIComponent(b.artistName)+"&Station="+encodeURIComponent(b.stationName||"")+"&AlbumArt="+encodeURIComponent(d)+"&SampleTrack="+encodeURIComponent(Ko()+ | |
"favorites/getSample.jsp?token="+b.songToken+"&allowExplicit="+!c.Vb)+"&StationLink="+encodeURIComponent(b.stationLandingUrl||b.landingUrl);(d=b.facebookCaption)||(d=" by "+b.artistName);var h=b.facebookDescription;h||(h=" on "+b.albumName);this.Xj(b.userMessage,b.songName,d,h,b.directUrl,b.landingUrl,e,c)}}; | |
f.Vs=function(b){if(b.doFacebook){var c=b.stationName,d=b.facebookDescription,e=b.artUrl;-1<c.indexOf("Thumbprint Radio")&&(c="Check out "+c+" on Pandora",d="Inspired by thumbs across all of my stations.",e=b.fbShareArt);this.Xj(b.userMessage,c,"Listen at Pandora",d,b.directUrl,b.landingUrl,e,null)}}; | |
f.Xj=function(b,c,d,e,h,l,p,q){var t={message:b,name:c,caption:d,description:e,actions:[{name:"Listen at Pandora",link:h}],link:l,picture:p,source:q};b=this.model.get("currentUser");null!=b&&null!=b.Tc&&(t.access_token=b.Tc);AE(this,tE,r(this,function(){k.info("FacebookService.share: success");FB.api("/me/feed","post",t,r(this,function(b){k.info("FacebookService.share: post response = ",b);!b||b.error?"OAuthException"==b.error.type?(z.b(nh,"Could not share to Facebook, you may need to try again."), | |
Wn(this.model.get("currentUser"),null),this.dd()):z.b(nh,null!=b.error?"facebook responded with an error: "+b.error.message:"unknown error posting to facebook"):z.b(Dg,{facebook:!0})}))}),r(this,function(){k.info("FacebookService.share: failure")}))}; | |
f.hI=function(){var b=this.model.get("currentUser");b&&!b.qh?AE(this,tE,r(this,function(){var c=b.Vg||b.Ug||b.Tg;z.b(wi,{autoShareEnabled:!0,autoShareTrackPlay:c?b.Vg:!0,autoShareLikes:c?b.Ug:!0,autoShareFollows:c?b.Tg:!0,userInitiated:!0})}),r(this,function(){})):(new X({message:"You cannot enable auto-share when your profile is set to 'private'"})).render()}; | |
f.TI=function(b){var c=this.model.get("currentUser");c.kx=b.facebookSettingChecksum;c.Il=b.autoShareEnabled;c.Vg=b.autoShareTrackPlay;c.Ug=b.autoShareLikes;c.Tg=b.autoShareFollows;this.Sm()};f.sp=function(){if(!this.model.get("facebookAuthenticated")){pm(cm,!1);var b=this.model.get("currentUser");b.Il=!1;b.Vg=!1;b.Ug=!1;b.Tg=!1;this.Sm()}}; | |
f.Sm=function(){var b=this.model.get("currentUser"),c=this.model.get("autoShare"),b=b&&b.Il&&!b.qh;this.model.set({autoShare:b});k.info("FacebookService.refreshAutoShareModel",c,b,!0===km(cm));!1===c&&b&&!0!==km(cm)&&(new nA,pm(cm,!0))}; | |
f.vw=function(){var b=$.cookie("_fbat");k.info("checkAccessTokenCookie: fbat=",b);if(b)if(sE){$.cookie("_fbat",null);var c=/access_token=([^&]+)/,c=b.match(c);k.info("checkAccessTokenCookie: match=",c);if(c&&1<c.length){var d=c[1],e=null,c=/expires_in=([^&]+)/;(c=b.match(c))&&1<c.length&&(e=c[1],k.info("expires_in: ",e));FB.api("/me",{access_token:d},r(this,function(b){k.info("checkAccessTokenCookie: response=",b);null==b.error&&null!=b.id&&(b.access_token=d,b.expires_in=e,this.model.set({facebookLoginInfo:b}))}))}}else uE.unshift(r(this, | |
this.vw))}; | |
f.GJ=function(){k.info("FacebookService.handleRegistrationComplete");var b=this.model.get("currentUser"),c=A._data.fb_ref;if(c&&0<c.length){var d={listener_id:b.s,social_network_id:"facebook"},e=c.split("_");3<=e.length&&(d.shared_listener_token=e[2]);0==c.indexOf("trackplay__")&&4==e.length&&(d.shared_station_id=e[3]);s("social_autoshare_new_registration",d,b)}(c=this.model.get("facebookLoginInfo"))&&b&&(Wn(b,c.id),Xn(b,c.access_token,c.expires_in),Zn(b,c.name),k.info("FacebookService.handleRegistrationComplete: attempting to auto-connect"),this.Cw())};function CE(b){this.model=b;z.c(Ae,r(this,this.dm));z.c(xi,r(this,this.dm))}function pA(){var b=1==parseInt($.cookie("_sl_ssc"),10);ve("_sl_ssc");return b}CE.prototype.dm=function(){var b=$.cookie("_sl_toast"),c=$.cookie("_sl_share_imp"),d=$.cookie("_sl_path");ve("_sl_toast");ve("_sl_share_imp");ve("_sl_path");(A._data.shareImp||"true"==c)&&this.model.set({shareFirstImp:!0});ie(b)&&(new X({message:b})).render();ie(d)&&this.model.set({smartLaunchPath:d})};function DE(b){this.model=b;this.Bb={};S(vv,r(this,this.oq));z.c(Df,r(this,this.ZI));z.c(zf,r(this,this.mJ));z.c(Bf,r(this,this.em));z.c(Af,r(this,this.em));z.c(De,r(this,this.$a))}f=DE.prototype;f.oq=function(b){var c=this.Bb[b.kf+":"+b.Lc];null!=c?R(Lv,c):z.b(sj,b)};f.ZI=function(b){this.Bb[b.kf+":"+b.Lc]=b;R(Lv,b)};f.mJ=function(b){b=oo(b);this.Bb[b.kf+":"+b.Lc]=b;R(Lv,b)};f.em=function(b){b=oo(b);b.ff=null;this.Bb[b.kf+":"+b.Lc]=b;R(Lv,b)};f.$a=function(){this.Bb={}};function mz(){EE()}var nz={};function EE(){$.ajax({url:"/static/videohub/manifest.xml?cb="+ge(),dataType:"xml",success:function(b){nz={};$.each($("video_page",b),function(b,d){var e=new Oy(d),h=e.VC;null!=h&&""!=h&&(nz[h]=e)});setTimeout(EE,9E5)},error:function(b,c){k.error("Could not load videohub manifest",c);setTimeout(EE,9E5)}})};function FE(b){this.model=b;z.c(Ne,r(this,this.lh));z.c(pi,r(this,this.jJ));W("/genre_hint",!0,!0,!1,r(this,this.YI));this.Ib=""}FE.prototype.lh=function(b){var c=b.Lf();if(null!=c&&""!=this.Ib){for(var d=0;d<c.length;d++)if(null!=c[d]&&c[d].toLowerCase()==this.Ib.toLowerCase()){s("create_station_from_hint",{hint_genre:this.Ib,station_id:b.e()},this.model.get("currentUser"));break}this.Ib=""}};FE.prototype.jJ=function(){this.Ib=""}; | |
FE.prototype.YI=function(b){ae(this,function(){var c=b.pathNames;this.Ib=c[1];V("/music/"+c[1],!0,!0);s("hint_genre_clicked",{hint_genre:this.Ib},this.model.get("currentUser"))},100)};function GE(b){this.model=b;z.c(Se,r(this,this.tK));z.c(Te,r(this,this.uK));z.c(Ue,r(this,this.sK));z.c(Nh,r(this,this.vK))}GE.prototype.tK=function(b){this.model.get("currentUser")&&ko(this.model.get("currentUser"))&&s("track_end",{reason:b.reason,elapsed_seconds:b.elapsed_seconds,remaining_seconds:b.remaining_seconds,audio_token:b.audio_token,vendor_id:u,device_code:se,device_id:Ym()},this.model.get("currentUser"))}; | |
GE.prototype.uK=function(b){this.model.get("currentUser")&&ko(this.model.get("currentUser"))&&s("track_fetch",{is_prefetch:b.is_prefetch,audio_token:b.audio_token,vendor_id:u,device_code:se,device_id:Ym()},this.model.get("currentUser"))};GE.prototype.sK=function(b){this.model.get("currentUser")&&ko(this.model.get("currentUser"))&&s("track_buffered",{audio_token:b.audio_token,vendor_id:u,device_code:se,device_id:Ym()},this.model.get("currentUser"))}; | |
GE.prototype.vK=function(b){try{if(!b.url||""==b.url)throw Error("TrackMonitoringService.handleTrackNotPlayed called with a blank audio receipt URL");$.ajax({type:"GET",crossDomain:!0,dataType:"jsonp",url:b.url,success:function(){},error:function(b,c,h){k.info("Error sending audio receipt url: "+c+": "+h)}})}catch(c){trackJs.track(c),k.info("Exception on ajax call for audio receipt url: ",c)}};function HE(b){this.model=b;this.Bb={};S(ex,r(this,this.GH))}HE.prototype.GH=function(b){var c=this.model.get("currentUser");b={url:"/services/ajax/",dataType:"text",data:{method:"commerce.getSalesTax",zipcode:b.wb(),billing_frequency:b.Za(),is_business:b.P(),token:b.cE},success:this.MM,error:function(b,c,h){k.info("error",b,c,h);R(fx,0)}};c&&c.qg&&$.extend(b.data,{at:c.qg});$.ajax(b)};HE.prototype.MM=function(b){b=eval("var tmp = "+b+"; tmp;");R(fx,{tax:b.sales_tax,amount:b.amount,token:b.token})};function mn(){this.init();bC(this.data)}var Mz=1E3; | |
mn.prototype.init=function(){k.info("UserInterface initializing");jn("ui-start");IE(this);this.data=new Backbone.Model({booting:!0,readonly:!1,stationList:new Ry,hasStations:!1,currentStation:null,menuStation:null,currentStationViewIsShuffle:!1,stationSortOrderAlpha:!0,stationToAutoPlay:null,safeToAutoPlayStation:!0,currentTrack:null,selectedTrack:null,trackProgress:null,musicPlaying:!1,playerBarEnabled:!0,currentUser:null,autoShare:!1,currentProfileInfo:null,facebookLoginInfo:null,currentContextualTip:null, | |
currentShuffleType:Tm(),anonymousTrialExpired:!1,facebookAuthenticated:!1,twitterAuthenticated:!1,relatedArtists:null,monthlyListening:"0",idle:!1,keyPressed:null,poisoned:!1,sequenceNumber:1,siteLocked:!1,capped:!1,expired:!1,inactive:!1,forceRegistration:!1,resettingPassword:!1,usernameFromResetToken:null,audioAdPlaying:!1,videoAdPlaying:null,displayingCompanion:!1,shareFirstImp:!1,currentVxReward:null,searchText:"",searchItemSelectedIndex:-1,showingSearchResults:!1,searchResults:new Sy,modalPanel:null, | |
profilePanelType:null,lastLowBandwidthNotification:null,blueBarMessage:null,pageShifting:!1,currentSkinPath:null,smartLaunchPath:null,postLoginPath:null,narrative:null,songNarrative:null,selectedArtist:null,searchDetails:null,searchSuggestions:{similar_artists:[],similar_genres:[],facebook_favorites:[]}});jn("ui-views");this.Ih=new fz({model:this.data});new Ty({model:this.data});new Uy({model:this.data});new Xy({model:this.data});new ez({model:this.data});new gz({model:this.data});this.wA=new Kz(this.data); | |
this.nQ=new hz({model:this.data,station_menu:this.wA});new kz({model:this.data});new lz({model:this.data});new oz({model:this.data});new rz({model:this.data});this.XL=new Gz({model:this.data});this.bQ=new Hz({model:this.data});this.Dg=new Qz({model:this.data});new XA({model:this.data});new wA({model:this.data});new xA({model:this.data});new yA({model:this.data});new Yz({model:this.data});new AA({model:this.data});new Rz({model:this.data});new Sz({model:this.data});new oA({model:this.data});new Pz({model:this.data}); | |
new TA({model:this.data});new Zz({model:this.data});new gA({model:this.data});new hA({model:this.data});this.tn=new jA({model:this.data});this.Ch=new iA({model:this.data});new hB({model:this.data,el:$("body")});new sB({model:this.data});new tB({model:this.data});new uB({model:this.data});new vB({model:this.data});jn("ui-controllers");new qC(this.data);new AC(this.data);new QD(this.data);new UD(this.data);new KC(this.data,this.Ih);new MC(this.data);new NC(this.data);new QC(this.data);new RC(this.data); | |
new TC(this.data);new WC(this.data);new ZC(this.data);new $C(this.data,this.XL);new aD(this.data,this.bQ);new sD(this.data);new tD(this.data,this.nQ);new zD(this.data,this.Dg);new AD(this.data,this.Ch);new GD(this.data,this.tn);new bD(this.data);new oD(this.data);new dD(this.data);new pD(this.data);new LD(this.data);new MD(this.data);new ND(this.data);new OD(this.data);new Z(this.data);new wB(this.data);new VD(this.data);new YD(this.data);new ZD(this.data);new aE(this.data);new bE(this.data);new XC(this.data); | |
jn("ui-services");new cE(this.data);new fE(this.data);new HE(this.data);new nE(this.data);new iE(this.data);new hE(this.data);new gE(this.data);new DE(this.data);new CE(this.data);new FE(this.data);new GE(this.data);var b=this;"US"==Yo()&&$("body").addClass("is-us");jn("ui-events");this.data.get("stationList").bind("select",function(c,d){d=!0===d;var l=c.D()&&c.Z(),p=b.data.get("currentStation");null!=p&&p.e()==c.e()||b.data.set({currentStation:c,currentStationViewIsShuffle:l},{userInitiated:d})}); | |
this.data.get("stationList").bind("remove",function(c){var d=b.data.get("currentStation");null!=d&&d.e()==c.e()&&(b.data.set({currentStation:null}),c=b.data.get("stationList").at(0),null!=c&&(c.D()&&c.Z()||z.b(ji,{stationId:c.e()})))});this.data.get("stationList").bind("all",function(){"REGISTERED_PANEL"!=b.data.get("modalPanel")&&z.b(Qg);b.data.set({hasStations:0<this.length})});this.data.bind("change:stationSortOrderAlpha",function(){var c=b.data.get("stationSortOrderAlpha");pm(Ll,c);b.data.get("stationList").sort()}); | |
this.data.bind("change:currentUser",r(this,function(){this.data.get("currentUser")?this.data.set({currentShuffleType:Tm()}):this.data.set({searchSuggestions:{similar_artists:[],similar_genres:[],facebook_favorites:[]}})}));z.c(Pg,r(this,function(){this.data.set({booting:!0})}));z.c(Qg,r(this,function(){this.data.set({booting:!1});this.data.set({tooYoung:$.cookie("ty")&&"1"==$.cookie("ty")})}));z.c(Mg,r(this,function(b){var c=this.data.get("stationList");(b=c.Uc(b.stationId))&&qn(b.n)&&(c.remove(b, | |
{silent:!0}),c.trigger("refresh"))}));z.c(Ng,r(this,function(){var b=this.data.get("stationList");b.each(function(c){c.Tb()&&b.remove(c,{silent:!0})});b.trigger("refresh")}));z.c(Ig,r(this,function(b){var c=this.data.get("stationList");if(0!=c.models.length){var d={silent:!0};c.each(function(b){(b.Fb()||b.Tb())&&c.remove(b,{silent:!0})});$.each(b,function(){c._add(this.n,d)});c.trigger("refresh")}}));z.c(Le,r(this,function(b){var c=this.data.get("currentUser");if(b&&c)for(var d=0;d<b.length;d++){var p= | |
b[d].n;if(p.D()&&p.Z()){var q=c.mc;if(null==q||0==q.length)q=c.Ml;null!=q&&0<q.length&&p.an(q+"'s Shuffle")}}if(we()&&b&&0<b.length){var t=this.data.get("stationList"),y={silent:!0};t._reset(y);for(var E=0,d=0;d<b.length;d++)setTimeout(r(this,function(){var c=b[E++];t._add(c.n,y);E>=b.length&&t.trigger("refresh")}),1);setTimeout(r(this,function(){var c=this.data.get("currentStation");null==c||_.any(b,function(b){return b.e()==c.e()})||this.data.set({currentStation:null});z.b(Me,b)}),1E3)}else{t=this.data.get("stationList"); | |
y={silent:!0};t._reset(y);$.each(b,function(){t._add(this.n,y)});t.trigger("refresh");var J=this.data.get("currentStation");null==J||_.any(b,function(b){return b.e()==J.e()})||this.data.set({currentStation:null})}}));z.c(Ne,r(this,function(b){var c=this.data.get("stationList");null!=c.detect(function(c){return c.e()==b.e()})?z.b(ji,{stationId:b.e()}):c.add(b)}));z.c(Qe,r(this,function(b){var c=this.data.get("stationList"),d=b.stationId,c=c.detect(function(b){return b.e()==d});null!=c&&(c.an(_.escape(b.stationName)), | |
c.attributes._stationName=b.stationName,R(aw,c))}));z.c(Tg,r(this,function(b){var c=this.data.get("stationList");b=b.stationList;for(var d=0;d<b.length;d++){var p=b[d],q=c.detect(function(b){return b.e()==p.stationId});null!=q&&void 0!=p.enableArtistAudioMessages&&(q._enableArtistAudioMessages=p.enableArtistAudioMessages)}}));z.c(Fg,r(this,function(b){var c=b.station;b=b.oldStationId;for(var d=this.data.get("stationList").models,p=0;p<d.length;p++)if(d[p].e()==b){_.map(c,function(b,c){d[p]["_"+c]= | |
b});d[p].set(new on(c));break}this.data.get("stationList").refresh(d)}));z.c(Gg,r(this,function(b){for(var c=b.e(),d=this.data.get("stationList").models,p=0;p<d.length;p++)if(d[p].e()==c){d[p]=b;break}this.data.get("stationList").refresh(d);(d=this.data.get("currentStation"))&&d.e()==c&&this.data.set({currentStation:b},{silent:!0})}));var c=r(this,function(b){var c=!0===b.userInitiated,d=b.stationId;b=this.data.get("stationList");var p=b.detect(function(b){return b.e()==d});null!=p&&b.trigger("select", | |
p,c);this.data.set({safeToAutoPlayStation:!0})}),d=r(this,function(b){c(b)});z.c(ji,c);z.c(ki,d);z.c(Fi,r(this,function(){this.data.set({safeToAutoPlayStation:!1})}));z.c(rh,r(this,function(){this.data.set({safeToAutoPlayStation:!0})}));z.c(Ce,r(this,function(b){this.data.set({stationToAutoPlay:b})}));z.c(Xj,r(this,function(){this.data.set({currentTrack:null,musicPlaying:!1,currentStation:null})}));z.c(pi,r(this,function(){this.data.set({currentTrack:null,musicPlaying:!1,currentStation:null,hasStations:!1, | |
selectedTrack:null})}));z.c(Re,r(this,function(b){this.data.set({currentTrack:b,musicPlaying:!0});window.currentTrackMusicId=b.o();"function"==typeof window.handleTrackChanged&&window.handleTrackChanged(b.o())}));z.c(af,r(this,function(b){this.data.set({trackProgress:b})}));z.c(ai,r(this,function(){this.data.set({musicPlaying:!0})}));z.c(ci,r(this,function(){this.data.set({musicPlaying:!1})}));z.c(fi,r(this,function(b){b="/song/thumbs-down/"+b;bz(b);cz(b)}));z.c(Sf,r(this,function(b){this.data.set({poisoned:b})})); | |
z.c(Og,r(this,function(){this.data.set({readonly:!0})}));z.c(il,r(this,function(b){this.data.set({currentVxReward:b})}));z.c(jl,r(this,function(){this.data.set({currentVxReward:null})}));dz("/song/move/");dz("/browse");S(Uv,r(this,function(){this.wA.open()}));$(document).keydown(function(c){var d=b.data.get("keyPressed"),l=-1!=navigator.userAgent.indexOf("Firefox");if(!("INPUT"==c.target.tagName||"TEXTAREA"==c.target.tagName||null!=d&&d.which==c.which||(b.data.set({keyPressed:c}),b.data.get("siteLocked")|| | |
c.ctrlKey||c.metaKey)))if("32"==c.keyCode){if(c.preventDefault(),b.data.get("playerBarEnabled")||b.data.get("audioAdPlaying"))b.data.get("musicPlaying")?z.b(ci):z.b(ai)}else if("39"==c.keyCode){if(c.preventDefault(),c=b.data.get("currentTrack"),null!=c&&b.data.get("playerBarEnabled"))return z.b(di),!1}else!c.shiftKey||"187"!=c.keyCode&&"61"!=c.keyCode?"189"==c.keyCode||l&&"173"==c.keyCode?(c.preventDefault(),c=b.data.get("currentTrack"),null!=c&&b.data.get("playerBarEnabled")&&($(".thumbDownButton.indicator").length? | |
z.b(hi,c.o()):z.b(fi,c.o()))):c.shiftKey&&"38"==c.keyCode?(c.preventDefault(),b.data.get("musicPlaying")&&b.data.get("playerBarEnabled")&&z.b(mi,100)):c.shiftKey&&"40"==c.keyCode?(c.preventDefault(),b.data.get("musicPlaying")&&b.data.get("playerBarEnabled")&&z.b(mi,0)):c.altKey&&"38"==c.keyCode?(c.preventDefault(),b.data.get("musicPlaying")&&b.data.get("playerBarEnabled")&&(c=Fm()?0:Em(),z.b(mi,c+10))):c.altKey&&"40"==c.keyCode&&(c.preventDefault(),b.data.get("musicPlaying")&&b.data.get("playerBarEnabled")&& | |
(c=Fm()?0:Em(),z.b(mi,c-10))):(c.preventDefault(),c=b.data.get("currentTrack"),null!=c&&b.data.get("playerBarEnabled")&&($(".thumbUpButton.indicator").length?z.b(gi,c.o()):z.b(ei,c.o())))});$(document).keyup(function(){b.data.set({keyPressed:null})});jn("ui-done")}; | |
function IE(b){var c=/^(\w+)\s*(.*)$/,d=Backbone.View.prototype.delegateEvents;Backbone.View.prototype.delegateEvents=function(b){d.apply(this,arguments);b=b||this.events;for(var h in b){var l=h.match(c),p=l[1],l=l[2];"click"==p&&$(this.el).delegate(l,p,function(b){mn.globalClickPaused||R(wu,b)})}};$(document).click(r(b,function(b){mn.globalClickPaused||R(wu,b)}))}var JE={}; | |
function S(b,c){var d=JE[b]||[];d.push(c);JE[b]=d;d=c._caller;if(null!=d){var e=d._eventTypes||[];e.push(b);d._eventTypes=e}}function Oz(b,c){if(void 0!==c){var d=JE[c];if(d)for(var e=0;e<d.length;e++)d[e]._caller==b&&d.splice(e--,1)}else for(d=b._eventTypes,e=0;d&&e<d.length;e++)Oz(b,d[e])}function R(b,c){var d=_.clone(JE[b]);if(d)for(var e=0;e<d.length;e++)try{d[e](c,b)}catch(h){trackJs.track(h),me(h)}} | |
function zA(){mn.globalClickPaused=!0;clearTimeout(mn.globalClickPauseTimeout);mn.globalClickPauseTimeout=setTimeout(function(){mn.globalClickPaused=!1},1E3)}function az(b){b=b.get("currentUser");return!0===km(zl)&&(!b||b.p())}; })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment