Skip to content
Bailey520 edited this page Apr 11, 2018 · 1 revision

Welcome to the TUMBR wiki! ebpackJsonp([8],{0:function(e,t,i){i(1319),i(1453),i(1454),i(1455),i(1456),i(1457),i(1458),i(1459),i(1460),i(1461),i(1462),i(1463),i(1464),e.exports=i(1465)},289:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(187),a=new n({setUpSelector:function(e){e.on("change",o.bind(this.__select_change,this))},__select_change:function(e){var t=s(e.currentTarget);this.__update_select(t)},__update_select:function(e){var t=e.siblings("label");t.text(e.find(":selected").text())}});e.exports=a},935:function(e,t,i){"use strict";var s=i(3),o=i(8),n=i(214),a=i(136),r=i(936),l=i(939),u=i(940),p=n.extend({name:"EmbedManager",harnessCollection:{},harnessRequests:{},requestID:0,currentlyPlaying:null,initialize:function(){return r.on("embed*",s.bind(this._handleMessage,this)),this.listenTo(a,"CrtControl:playerCreated",this.createCrtHarness),this.on("harnessCreated",this.__onHarnessCreated),this},createCrtHarness:function(e){e.on("ready",s.bind(function(){var t=e.$el.attr("id");t in this.harnessCollection||(this.harnessCollection[t]=new u(e,t),this.trigger("harnessCreated",this.harnessCollection[t]))},this)),e.on("teardown",s.bind(function(){var t=e.$el.attr("id");this.currentlyPlaying===this.harnessCollection[t]&&(this.currentlyPlaying=null),delete this.harnessCollection[t]},this))},createHarness:function(e){e.embedID in this.harnessCollection?this.harnessCollection[e.embedID].channel.setWindow(e.source):(this.harnessCollection[e.embedID]=new l(e),this.trigger("harnessCreated",this.harnessCollection[e.embedID]))},getHarness:function(e){var t=o.Deferred();return this.harnessCollection[e]?t.resolve(this.harnessCollection[e]):(t.requestID=++this.requestID,t.embedID=e,this.harnessRequests[t.requestID]=t),t.promise()},_handleMessage:function(e){var t,i=/^(embed-.+?):(.+?):(.+?):_syn$/,s=JSON.parse(e.data);s&&s.method&&(t=s.method.match(i))&&(s.embedID=t[1],s.service=t[2],s.postID=t[3],s.source=e.source,this.createHarness(s))},__onHarnessCreated:function(e){s.forEach(this.harnessRequests,s.bind(function(t){t.embedID===e.getData().embedID&&(t.resolve(e),delete this.harnessRequests[t.requestID])},this)),this.listenTo(e,"stateChange",this.__onHarnessStateChange)},__onHarnessStateChange:function(e,t){"playing"===e||"focus"===e?(this.currentlyPlaying&&this.currentlyPlaying!==t&&this.currentlyPlaying.pause(),this.currentlyPlaying=t):this.currentlyPlaying===t&&(this.currentlyPlaying=null)}});e.exports=new p},939:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(214),a=i(936),r=i(136),l=i(138),u="autoplaying",p=n.extend({name:"MediaEmbedHarness",$post:null,channel:null,watcher:null,_data:{service:"",embedID:"",postID:"",source:""},videoState:"",initialize:function(e){e.embedID&&(this._data=o.pick(e,o.keys(this._data)),this.$iframe=s("#"+this._data.embedID),this.iframe=this.$iframe.get(0),this.$post=this.$iframe.closest(".post"),this.post=this.$post.get(0),this.postId=this.$post.data("post-id"),this.isPinned=this.$post.data("is-pinned"),this.channel=new a({namespace:this._data.embedID+":"+this._data.service+":"+this._data.postID,window:this._data.source}),this.channel.on_connection(o.bind(function(){this.channel.listen_to("stateChanged",this.__onStateChange,this),this.channel.listen_to("playerReady",this.__autoplayPinnedPost,this),this.channel.listen_to("heightChanged",this.__onHeightChange,this)},this)),this._setupWatcher())},__autoplayPinnedPost:function(){this.isPinned&&this.autoplay()},autoplay:function(){this.channel&&this.channel.send("autoplay")},play:function(){this.channel&&this.channel.send("play")},pause:function(){this.channel&&this.channel.send("pause")},getState:function(){this.channel.call("getState").then(function(e,t){return t})},getData:function(){return this._data},_setupWatcher:function(){this.post&&(this.watcher=l.create(this.post,-52),this.watcher.fullyEnterViewport(o.bind(function(){this.videoState===u&&this.autoplay(),this.trigger("fullyEnterViewport")},this)),this.watcher.partiallyExitViewport(o.bind(function(){this.trigger("partiallyExitViewport")},this)),this.watcher.exitViewport(o.bind(function(){this.trigger("exitViewport")},this)))},onStateChange:function(e){this.videoState=e;var t={loggingData:o.extend({},o.omit(this._data,"source"),{state:e})};t.loggingData.postID&&"null"!==t.loggingData.postID||(t.loggingData.postID=this.postId?this.postId.toString():""),this.trigger("stateChange",e,this),r.trigger("post:embed:stateChange",t)},onHeightChange:function(e){this.$iframe.parent().addBack().height(e)}});e.exports=p},940:function(e,t,i){"use strict";var s=i(8),o=i(939),n=o.extend({player:{},$post:{},initialize:function(e,t){this.player=e,this.post=this.player.$el.closest(".post")[0],this.$post=s(this.post),this._data={},this.data.embedID=t,this.data.service="tumblr",this.data.postID=this.$post.data("post-id"),this.connected=!0,this.setupWatcher(),this.listenTo(this.player,"change:paused",this.__onStateChange),this.listenTo(this.player,"change:autoplay",this.__onStateChange)},play:function(){var e=this.getState();"autoplaying"===e?this.player.restart():"playing"!==e&&this.player.play({onDock:!0})},pause:function(){"paused"!==this.getState()&&this.player.pause()},getState:function(){var e=this.player.get("paused"),t=this.player.get("autoplay");return e?"paused":t?"autoplaying":"playing"},__onStateChange:function(){var e=this.getState();o.prototype.__onStateChange.call(this,e)}});e.exports=n},1319:function(e,t,i){"use strict";var s=i(1320);i(1452),s.start()},1320:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(180),a=i(129),r=i(5),l=i(136),u=i(182),p=i(945),d=i(1321),c=i(236),h=i(1348),m=i(935),=i(224),f=i(826),g=i(1351),b=i(1354),v=i(1365),y=i(1373),w=i(1377),k=i(1381),x=i(1383),C=i(1387),S=i(1388),T=i(1390),$=i(1395),A=i(1415),P=i(1115),E=i(1426),F=i(1428),I=i(1439),j=i(1442),L=i(1444),M=i(1445),D=i(1446),R=i(1448),O=r.extend({logs:function(){return o.union([i(1451)],r.prototype.logs.apply(this))},routes:{"dashboard(/)":"dashboard","dashboard/blog/:blog_name":"dashboard","dashboard/blog/:blog_name/:post_id":"dashboard","dashboard/:page(/:hash)(/)":"dashboard","(blog/:channel_id/)new/post-it-forward(/)":"postItForward","(blog/:channel_id/)new/:type(/)":"newPost","(blog/:channel_id/)followers":"followers","(blog/:channel_id/)followers/page/:page_id":"followers","edit/:id(/)":"editPost","reblog/:id/:key(/)":"reblogPost",inbox:"inbox","blog/:tumblelog(/:subsection)":"blogTumblelog",likes:"likes","liked/by/:user(/*subpage)":"likedBy","followed/by/:user(/*subpage)":"followedBy","tagged/:tag(/*subpage)":"tagged",following:"following","message/:blog_name":"message","blogpack/:blogpack_id(/*subpage)":"blogpack"},initialize:function(){this.header=,this.footer=f,this.crtControl=p,this.mediaEmbedManager=m,this.user=u(),this.abuseForm=new d,a.has("Components/NotificationPoller")&&(this.toastr=new F,this.notificationPoller=new I),n.bool("promotion_flow")&&(this.promoteDrawer=new $),n.bool("reblog_graphs")&&v(o.bind(function(e){this.reblogGraph=new e},this)),a.has("Components/PostFormBuilder")&&(this.postFormBuilder=new c),this.mobileAppBanner=new A({type:"download-banner",attachTo:'[prima-component="MobileAppBanner"]'}),this.mobileAppBanner.render(),this.dashboardLoginCheck=new M,this.dashboardLoginCheck.run()},setup:function(){this.keycommandGuide=new h,this.elevator=new g,n.bool("right_column_dashboard_ad")&&(n.bool("standalone_darla")||(this.yamPlusAd=new P),this.sidebarAd=new j)},dashboard:function(){var e=this;if(this.setup(),this.avatarManager=new C,n.bool("show_onboarding_tour_guide")){var t=n.bool("onboarding_tag_bingo"),i="onboarding:tag_bingo_interstitial:completed";y(function(s){e.tourGuide=new s({wait:t,waitEvent:i,tumblelogName:e.user.get("primary")})})}a.has("Components/WebExtensionCta")&&R(function(t){e.webExtensionCta=new t}),this.remnant_ad=new w,this.takeover_banner=new k,this.recommended_blog=new x,this.standaloneAd=new E,this.dfpAd=new D,this.adblockCookie=new L,this.listenTo(l,"Dashboard:should_hide_posts_on_unfollow",o.bind(function(){l.trigger("Dashboard:hide_posts_on_unfollow")},this)),n.bool("rapid_like_recommendation")&&(this.rapidRecommendations=T()),this.initializeRecommendedBlogs(),n.bool("abp_detection")&&this.detectAdBlockPlus()},postItForward:function(e){return n.bool("post_it_forward")?(this.setup(),this.avatarManager=new C,void(this.postFormBuilder&&l.trigger("postForms:open",{updateURL:!1,postFormType:c.containerType("inline"),postType:"photo",tags:["PostItForward"],showPhotoBooth:"postitforward-watermark"}))):this.newPost(e)},newPost:function(e,t){this.setup(),this.avatarManager=new C,this.postFormBuilder&&l.trigger("postForms:open",{updateURL:!1,postFormType:c.containerType("inline"),postType:t})},editPost:function(e){this.setup(),this.avatarManager=new C,this.postFormBuilder&&l.trigger("postForms:open",{updateURL:!1,postFormType:c.containerType("modal"),detached:!0,editId:e})},reblogPost:function(e,t){this.setup(),this.avatarManager=new C,this.postFormBuilder&&l.trigger("postForms:open",{updateURL:!1,postFormType:c.containerType("modal"),reblogId:e,reblogKey:t})},inbox:function(){this.setup(),this.avatarManager=new C},blogTumblelog:function(e,t){this.setup(),"queue"!==t&&(this.avatarManager=new C)},likes:function(){this.setup(),this.avatarManager=new C,this.initializeRecommendedBlogs()},followers:function(e){this.followers=new S({viewOptions:{blogName:e}})},likedBy:function(e){this.setup(),this.avatarManager=new C,this.initializeRecommendedBlogs()},followedBy:function(e){this.setup(),this.avatarManager=new C,this.initializeRecommendedBlogs()},tagged:function(e){this.setup(),this.avatarManager=new C,s("#tagged_actions_display").hasClass("is_featured_tag")||this.initializeRecommendedBlogs()},following:function(){this.setup(),this.avatarManager=new C},blogpack:function(){this.setup(),this.avatarManager=new C},initializeRecommendedBlogs:function(){var e=new b({el:".controls_section.follow_list",exploreLink:!0});return e.getView()},detectAdBlockPlus:function(){l.trigger("ads-interaction:abp-detection-"+window.Tumblr.ABP)},message:function(e){this.setup(),o.defer(function(){l.trigger("messaging:conversation:open:name",e,"permalink")}),history.replaceState({},null,"/dashboard")}});e.exports=O},1321:function(e,t,i){"use strict";var s=i(214),o=i(136),n=i(831),a=i(1322),r=s.extend({name:"AbuseForm",initialize:function(){this.drawerManager=n(),this.bindEvents()},bindEvents:function(){this.listenTo(o,"abuseform:open",this.open),this.listenTo(o,"abuseform:close",this.close)},close:function(){this.drawerManager.close()},open:function(e){this.drawerManager.isSuspended()||(this.drawerManager.isOpen()?this.drawerManager.replace(a,e):this.drawerManager.open(a,e))}});e.exports=r},1322:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(129),a=i(136),r=i(191),l=i(180),u=i(1323),p=i(1328),d=i(1330),c=i(1332),h=i(1341),m=i(1342),=i(1343),f=i(1345),g=i(1346),b=i(1347),v=i(1052),y=i(1340),w=u.extend({templates:{layout:f,success:g,error:b},className:"abuse-form",survey:y,initialize:function(e){if(e=e||{},u.prototype.initialize.call(this,e),this.set("mobileMode",e.mobileMode||!1),this.listenTo(a,"drawer:close",this.teardown),this.contexts=w.CONTEXTS,e.mode)switch(this.mode=e.mode,this.mode){case"standalone":var t=e.formType;e.formType&&this.survey[t]&&"start"!==t||(t="abuse"),this.set("surveyStep",t);break;case"blogcard":this.set("surveyStep","start"),this.tumblelog=new r({name:e.tumblelog}),this.posts=this.getBlogcardPosts();break;case"post":this.set("surveyStep","start"),this.tumblelog=new r({name:e.post.get("tumblelog_name")}),this.posts=[{id:e.post.get("post_id"),rootId:e.post.get("root_id"),postUrl:e.post.get("post_url")}],this.embedCode=e.post.get("embed_code");break;case"message":this.set("surveyStep","start"),this.sender=e.sender&&new r({name:e.sender}),this.tumblelog=new r({name:e.post.get("tumblelog-name")}),this.posts=[{id:e.post.get("id"),rootId:e.post.get("root_id"),postUrl:e.post.get("post_url")}];break;default:this.mode="standalone",this.set("surveyStep","abuse")}else this.mode="standalone",this.set("surveyStep","abuse");this.fillTemplateAttributes()},teardown:function(){s("body").removeClass("abuseform-open"),this.selfDestroyTimer&&(clearTimeout(this.selfDestroyTimer),this.selfDestroyTimer=null)},fillTemplateAttributes:function(){var e=n.get("Components/AbuseForm")||{};if(this.set("nativeApp",e.native_app||!1),this.templateAttributes.Flags=l,this.templateAttributes.recaptcha=e.recaptcha,this.templateAttributes.email=e.email,this.templateAttributes.lang=e.lang,this.templateAttributes.languageNotice=e.language_notice,this.templateAttributes.formToken=e.form_token,this.templateAttributes.safesearch=s(".nsfw_filter_enabled").length,this.templateAttributes.tumblelog=this.tumblelog,this.templateAttributes.posts=this.posts,this.templateAttributes.mode=this.mode,this.templateAttributes.hideTitles="standalone"===this.mode,this.templateAttributes.inNativeApp=!!this.get("nativeApp"),this.templateAttributes.prefillFields=e.prefill_fields,this.templateAttributes.prefillFields){if(o.delay(function(){a.trigger("drawerform:validation:trigger")}),this.templateAttributes.prefillFields.urlreporting){var t=this.templateAttributes.prefillFields.urlreporting,i=v.isUrl(t);i||(this.templateAttributes.prefillFields.urlreporting="")}if(this.templateAttributes.prefillFields.email){var r=this.templateAttributes.prefillFields.email,u=v.isEmail(r);u||(this.templateAttributes.prefillFields.email="")}}this.tumblelog&&(this.templateAttributes.tumblelogUrl=this.tumblelog.get("url")),this.templateAttributes.sender=this.sender,this.templateAttributes.supportsFileChooser=this.supportsFileChooser()},getBlogcardPosts:function(){var e=this.tumblelog.get("highlighted_post"),t=[];return o.each(e,function(e){e=s(e),t.push({id:e.data("id"),rootId:e.data("root_id"),postUrl:e.data("json").share_popover_data.post_url})},this),t},getFlaggedContent:function(){switch(this.mode){case"post":case"message":return s('.post[data-post-id="'+this.posts[0].id+'"]').first();case"blogcard":var e=s(".indash_header_wrapper.tumblelog_name"+this.tumblelog).first();return 0===e.find(".recent_posts").length&&(e=e.closest(".popover")),e}},hideFlaggedContent:function(){var e=this.getFlaggedContent();e&&e.addClass("is_flagged")},displaySuccessMessage:function(){this.templateAttributes.customSuccessMessage=!1,this.survey[this.get("surveyStep")].customSuccessMessage&&(this.templateAttributes.customSuccessMessage=this.survey[this.get("surveyStep")].customSuccessMessage),this.templateAttributes.alternativeResponseText=this.get("surveyStep").indexOf("someoneelse")>=0,this.$el.html(this.templates.success(this.templateAttributes)),a.trigger("drawer:disableCloseConfirmation"),this.selfDestroyTimer&&clearTimeout(this.selfDestroyTimer),this.selfDestroyTimer=setTimeout(function(){a.trigger("abuseform:close"),a.trigger("Kraken:abuseform:close")},15e3)},displayErrorMessage:function(e){this.removeErrorMessage(),this.errorMessage=s(this.templates.error(o.extend(this.templateAttributes,{errors:e}))),this.errorMessage.appendTo(this.$surveyStep)},removeErrorMessage:function(){this.errorMessage&&(this.errorMessage.remove(),this.errorMessage=null)},getPlatform:function(){return this.get("nativeApp")?this.get("nativeApp"):this.get("mobileMode")?"mobileweb":"web"},logSubmission:function(e){e=e||{},e.reason||(e.reason=this.get("surveyStep")),e.blocked=this.get("blockFlagSet"),e.platform=this.getPlatform(),a.trigger("Kraken:abuseform:submitted",{loggingData:e}),this.get("blockFlagSet")&&a.trigger("Kraken:blocks:block_added",{loggingData:{from:"abuseform"}})},render:function(){return this.$el.append(this.templates.layout(this.templateAttributes)),this.$surveyContainer=this.$(".survey"),this.$surveyStep=this.$(".survey-step"),s("body").addClass("abuseform-open"),this.header=new p({title:this.survey[this.get("surveyStep")].title,description:this.survey[this.get("surveyStep")].description,inNativeApp:this.templateAttributes.inNativeApp}),this.header.render().$el.insertBefore(this.$surveyContainer),"standalone"!==this.mode&&(this.contentPreview=new d({abuseform:this}),this.contentPreview.render().$el.insertAfter(this.$surveyContainer)),this.formView=new h({el:this.$surveyStep,abuseform:this,recaptcha:this.templateAttributes.recaptcha}),this.navigation=new _({abuseform:this}),this.dynamicfields=new m({el:this.$surveyContainer,abuseform:this}),this.surveyView=new c({el:this.$surveyContainer,abuseform:this}),this.surveyView.displaySurveyStep(this.get("surveyStep")),this}});e.exports=w},1323:function(e,t,i){"use strict";var s=i(1324);e.exports=s},1324:function(e,t,i){"use strict";var s=i(8),o=i(219),n=i(130),a=i(230),r=i(136),l=i(1325),u=i(1326),p=i(1327),d=o.extend({mixins:[a],templateAttributes:{:n,formKey:s("#tumblr_form_key").attr("content")},initialize:function(e){e=e||{},this.set("complete",!1),this.fieldValidation=new u({el:this.$el}),this.imageUpload=new l({el:this.$el}),this.errortags=new p({mobileMode:"undefined"!=typeof e.mobileMode&&e.mobileMode}),this._bindEvents()},_bindEvents:function(){this.listenTo(r,"drawer:close",this._teardown),this.listenTo(r,"drawerform:validation",this._updateCompleteStatus)},_updateCompleteStatus:function(e){this.set("complete",e.status)},_teardown:function(){this.fieldValidation.remove(),this.imageUpload.remove(),this.errortags.remove()},isAndroidKitKatWebView:function(e){if(null==e)return!1;e=e.toLowerCase();var t=e.indexOf("android 4.4")!==-1,i=e.indexOf("version/")!==-1;return t&&i},supportsFileChooser:function(){return!this.isAndroidKitKatWebView(navigator.userAgent)}});e.exports=d},1325:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(130),a=i(219),r=i(136),l=15e6,u=a.extend({events:{"change .image-upload":"onImageUploadClick","click .btn-remove-uploaded":"onRemoveImageClick"},onImageUploadClick:function(e){var t=e.currentTarget;if(this.imageUploadEl=s(".image-upload-input"),this.imagePreviewEl=s(".image-upload-preview"),t.files&&t.files[0]){if(t.files[0].size>l)return r.trigger("drawerform:errortag:show",{field:this.imageUploadEl,text:n("File is too big.")}),void s(t).replaceWith(s(t).val("").clone(!0));r.trigger("drawerform:errortag:remove",{field:this.imageUploadEl}),this.imageUploadEl.addClass("hidden");var i=new FileReader;i.readAsDataURL(t.files[0]),i.onload=o.bind(function(e){this.imagePreviewEl.removeClass("hidden"),e.target.result&&e.target.result.length?(this.imagePreviewEl.find("img").attr("src",e.target.result),this.imagePreviewEl.addClass("shown")):this.imageUploadEl.removeClass("hidden")},this)}},onRemoveImageClick:function(e){e.preventDefault();var t=s(".image-upload-input input");t.replaceWith(t.val("").clone(!0)),s(".image-upload-input input").trigger("change"),this.imagePreviewEl.removeClass("shown"),this.imageUploadEl.removeClass("hidden")}});e.exports=u},1326:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(130),a=i(219),r=i(136),l=i(1052),u=5e3,p=a.extend({events:{'change [data-validate-input="dropdown"]':"fieldValidationHandler",'keyup [data-validate-input="email"]':"fieldValidationHandler",'blur [data-validate-input="email"]':"fieldValidationHandler",'keyup [data-validate-input="text"]':"fieldValidationHandler",'blur [data-validate-input="text"]':"fieldValidationHandler",'keyup [data-validate-input="url"]':"fieldValidationHandler",'blur [data-validate-input="url"]':"fieldValidationHandler",'change [data-validate-input="file"]':"fieldValidationHandler",'change [data-validate-input="checkbox"]':"validateAllFields"},validationErrorMessages:{email:"We gotta write you back, though",url:"Invalid URL"},initialize:function(){this.listenTo(r,"drawerform:validation:trigger",this.validateAllFields)},validateAllFields:function(){var e=s("[data-validate-input]"),t=e.length>0;o.each(e,function(e){var i=s(e),o=i.data("validate-input"),n=i.val(),a=i.prop("required");if(!this.isFieldValid(n,o,a))return t=!1,!1},this),r.trigger("drawerform:validation",{status:t})},fieldValidationHandler:function(e){var t=s(e.target),i=t.val().trim(),o=t.data("validate-input"),a=t.prop("required");this.isFieldValid(i,o,a)?(t.hasClass("error")&&t.removeClass("error"),r.trigger("drawerform:errortag:remove",{field:t}),"focusout"===e.type&&"url"===o&&i.length&&0!==i.indexOf("http")&&s(e.target).val("http://"+i)):"focusout"===e.type&&(t.addClass("error"),r.trigger("drawerform:errortag:show",{field:t,text:n(this.validationErrorMessages[o])})),this.validateAllFields()},isFieldValid:function(e,t,i){var s;if(i="undefined"!=typeof i&&i,l.isBlank(e))return!i;switch(t){case"email":s=l.isEmail(e);break;case"text":s=l.maxLength(e,u);break;case"file":s=!0;break;case"dropdown":s=!0;break;case"url":s=l.isUrl(e);break;case"checkbox":s=this.isAtLeastOneChecked()}return s},isAtLeastOneChecked:function(){var e=s('input[type="checkbox"]:checked');return e.length>0}});e.exports=p},1327:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(130),a=i(230),r=i(219),l=i(136),u=i(235),p=r.extend({mixins:[a],el:".form-container",defaultText:"A few details, please",initialize:function(e){this.set("mobileMode",!("undefined"==typeof e||!e.mobileMode)&&e.mobileMode),this.errorTags={},this.listenTo(l,"drawerform:errortag:show",this.showErrorTag),this.listenTo(l,"drawerform:errortag:remove",this.removeErrorTag),this.listenTo(l,"drawerform:errortag:removeall",this.removeAllErrorTags)},showErrorTag:function(e){if("undefined"!=typeof e&&e.field){var t=e.field,i=e.text||n(this.defaultText),a=t.attr("name");if(!this.errorTags[a])if(this.errorTags[a]=s("

").addClass("drawer-error-tag").text(i),this.get("mobileMode")){this.groupName&&this.labelName||(this.formClass=t.parents(".form").parent().attr("class"),"help-form"===this.formClass?(this.groupName=".form-group",this.labelName=".group-label"):"abuse-form"===this.formClass&&(this.groupName=".form-row",this.labelName=".row-label"));var r=t.parents(this.groupName),l=r.find(this.labelName);this.errorTags[a].addClass(a).appendTo(l),u.animate(this.errorTags[a],"fadeIn",{duration:100,easing:"easeInOut"}),u.animate(this.errorTags[a],"fadeOut",{duration:100,easing:"easeIn",delay:3e3,complete:o.bind(function(){this.removeErrorTag({field:t})},this)})}else"undefined"==typeof this.drawer&&(this.$drawer=s(".drawer"),this.$drawer.on("scroll",o.bind(this.updateErrortagPosition,this))),this.errorTags[a].css({top:t.offset().top,right:this.$drawer.width()}).insertAfter(this.$drawer),u.animate(this.errorTags[a],{translateX:["-5px","0px"]},{duration:100,easing:"easeInOut"})}},removeErrorTag:function(e){var t=e.field,i=t.attr("name");"undefined"!=typeof this.errorTags&&this.errorTags[i]&&(this.errorTags[i].remove(),delete this.errorTags[i])},removeAllErrorTags:function(){"undefined"!=typeof this.errorTags&&this.errorTags&&o.each(this.errorTags,function(e,t){e&&(e.remove(),e="",delete this.errorTags[t])},this)},updateErrortagPosition:function(){"undefined"!=typeof this.errorTags&&this.errorTags&&o.each(this.errorTags,function(e,t){var i=s('.form-container [name="'+t+'"]');i.length||(i=s('form [name="'+t+'"]')),i?e.css({top:i.offset().top}):(e.remove(),this.removeErrorTag({field:i}))},this)},remove:function(){return this.removeAllErrorTags(),"undefined"!=typeof this.$drawer&&this.$drawer.off("scroll",o.bind(this.updateErrortagPosition,this)),r.prototype.remove.apply(this)}});e.exports=p},1328:function(e,t,i){"use strict";var s=i(130),o=i(219),n=i(1329),a=o.extend({className:"form-header",initialize:function(e){return e=e||{},this.templateAttributes={:s,title:"undefined"!=typeof e.title?e.title:"",description:"undefined"!=typeof e.description?e.description:"",inNativeApp:e.inNativeApp},this},render:function(){return this.$el.html(n(this.templateAttributes)),this}});e.exports=a},1329:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(keys(imports),"return "+function(obj){function print(){__p+=__j.call(arguments,"")}obj||(obj={});var __t,__p="",__e=.escape,__j=Array.prototype.join;with(obj)__p+='

',__p+=title?" "+(null==(t=(title))?"":__t)+" ":" "+e(("Report this"))+" ",__p+='

',description instanceof Array?(__p+=" ",.each(description,function(e){__p+=" ",__p+=e.link?'

'+(null==(t=(e.text,'',""))?"":__t)+"

":'

'+(null==(t=(e.text))?"":__t)+"

",__p+=" "}),__p+=" "):__p+=description?" "+(null==(t=(description))?"":__t)+" ":inNativeApp?" "+(null==(t=("Seeing something you shouldn't? This is the place to tell us about it."))?"":__t)+" ":" "+(null==(t=("Seeing something you shouldn't? This is the place to tell us about it. %1$sLearn more%2$s about how we handle these matters and what you can do to help.",'',""))?"":__t)+" ",__p+="
";return p}.toString()).apply(void 0,_values(_imports))},1330:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(130),a=i(136),r=i(219),l=i(235),u=i(654),p=i(1331),d=r.extend({className:"content-preview hidden",template:p,templateAttributes:{:n},animation:{collapseDuration:300,expandDuration:350,easing:[.545,.42,.435,1.065]},events:{"click .toggle-preview":"togglePreview"},initialize:function(e){e=e||{},this.abuseform=e.abuseform,this.mode=e.abuseform.mode,this.tumblelog=e.abuseform.tumblelog,this.posts=e.abuseform.posts,this.listenTo(a,"abuseform:contentpreview:close",this.hidePreview),this.isExpanded=!0},togglePreview:function(){this.isExpanded?this.hidePreview():this.showPreview()},hidePreview:function(){this.isExpanded&&(this.animateContentPreview(!0),this.animatePostContainer(!0),this.isExpanded=!1)},showPreview:function(){this.isExpanded||(this.animateContentPreview(!1,o.bind(this.scrollToPost,this)),this.animatePostContainer(!1),this.isExpanded=!0)},animateContentPreview:function(e,t){var i;if(e)i=s(".form-container").height()-this.$el.position().top+50;else{var n=s(".survey");i=n.outerHeight(!0)+n.position().top-this.$el.position().top}l.animate(this.$el,{translateY:[i,0]},{duration:e?this.animation.collapseDuration:this.animation.expandDuration,easing:this.animation.easing,complete:o.bind(function(){this.$el.toggleClass("is-hidden"),e?l.animate(this.$el,{translateY:[0,50]},{delay:50,duration:this.animation.collapseDuration,complete:o.bind(function(){this.$el.attr("style","")},this)}):this.$el.attr("style",""),"function"==typeof t&&t()},this)})},animatePostContainer:function(e){l.animate(this.$contentPreviewContainer,{translateY:e?[0,0]:[0,200],opacity:e?[0,1]:[1,0],"max-height":e?[0,99999]:[99999,99999]},{delay:.3*(e?this.animation.collapseDuration:this.animation.expandDuration),duration:e?this.animation.collapseDuration:this.animation.expandDuration,easing:this.animation.easing})},scrollToPost:function(){this.$el.velocity("scroll",{container:s(".drawer")})},cloneFlaggedContent:function(){switch(this.mode){case"post":var e=this.abuseform.getFlaggedContent();if(e.length){var t=this.cleanupClonedPost(e);this.attachFlaggedContent(t)}else this.attachFlaggedContent(this.abuseform.embedCode),s.getScript("/post.js");break;case"blogcard":this.blogCardView=new u({model:this.tumblelog}),this.listenToOnce(this.blogCardView,"ready",function(){this.attachFlaggedContent(this.blogCardView.render().el)});break;case"message":var i=this.abuseform.getFlaggedContent();this.attachFlaggedContent(i.clone())}},cleanupClonedPost:function(e){e.hasClass("is_video")&&e.find(".dockable_video_embed").hasClass("docked")&&(e=e.find(".dockable_video_embed"));var t=e.clone();return t.hasClass("post_full")&&t.find(".post_avatar").remove(),t.find(".dock_video_button")&&t.find(".dock_video_button").remove(),t},attachFlaggedContent:function(e){e&&(this.$contentPreviewContainer.append(e),this.$el.removeClass("hidden"))},render:function(){return this.$el.append(this.template(this.templateAttributes)),this.$contentPreviewContainer=this.$(".content-preview-container"),this.cloneFlaggedContent(),this}});e.exports=d},1331:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='
'+e(("Hide"))+''+e(("Show"))+'
';return __p}.toString()).apply(void 0,values(imports))},1332:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(235),a=i(219),r=i(136),l=i(1333),u=i(1335),p=i(1336),d=i(1337),c=i(1338),h=i(1339),m=i(1340),=a.extend({survey:m,templates:{surveyStep:u,surveyOptions:p,surveyMessage:d,surveyForm:c},duration:200,events:{"click [data-survey-nav-to]":"surveyLinkHandler","click [data-survey-nav-back]":"surveyBackHandler"},initialize:function(e){e=e||{},this.abuseform=e.abuseform,this.abuseform.on("change:complete",o.bind(this.updateSubmitButton,this)),this.abuseform.on("change:loading",o.bind(this.updateLoadingIndicator,this)),this.history=[],this.$surveyContainer=this.abuseform.$surveyContainer,this.$surveyStep=this.abuseform.$surveyStep},updateSubmitButton:function(){this.abuseform.get("complete")===!0?this.submitButton.removeAttr("disabled"):this.submitButton.attr("disabled","disabled")},updateLoadingIndicator:function(){this.submitButton.toggleClass("loading",this.abuseform.get("loading"))},surveyLinkHandler:function(e){this.history.push(this.abuseform.get("surveyStep"));var t=s(e.currentTarget).data("survey-nav-to");this.displaySurveyStep(t)},surveyBackHandler:function(){var e=this.history.pop();this.displaySurveyStep(e,!0)},displaySurveyStep:function(e,t){var i,a,u=this.survey[e];r.trigger("abuseforms:formview:savestate",this.abuseform.get("surveyStep")),this.abuseform.set("surveyStep",e),r.trigger("Kraken:abuseform:stepviewed",{loggingData:{step:e}}),u.displayBackButton=!!this.history.length,r.trigger("drawerform:errortag:removeall");var p=this.$surveyStep.clone().addClass("dummy-step");"start"===e?(this.flaggingForm=new l({abuseform:this.abuseform}),this.$surveyStep.html(this.flaggingForm.render().$el)):(u.options&&(i=this.templates.surveyOptions(o.extend(u,this.abuseform.templateAttributes))),u.message&&(i=this.templates.surveyMessage(o.extend(u,this.abuseform.templateAttributes))),u.form&&(u.formName=e,i=this.templates.surveyForm(o.extend(u,this.abuseform.templateAttributes)),this.captcha=new h),u.stepContent=i,this.$surveyStep.html(this.templates.surveyStep(o.extend(u,this.abuseform.templateAttributes))),!this.abuseform.get("wasPreviewAutoclosed")&&this.history.length>0&&(r.trigger("abuseform:contentpreview:close"),r.trigger("Kraken:abuseform:contentpreview:close"),this.abuseform.set("wasPreviewAutoclosed",!0))),this.abuseform.navigation.update(u),this.abuseform.dynamicfields.update(),p.appendTo(this.$surveyContainer),this.abuseform.get("mobileMode")&&p.is(":empty")||(n.animate(p,{translateX:[t?"290px":"-290px","0"],opacity:[0,1]},{duration:this.duration,easing:"easeOut",complete:function(e){s(e).remove()}}),u.options&&(a=this.$surveyStep.find(".option"),a.css("opacity",0),o.each(a,function(e,i){n.animate(e,{translateX:[0,t?"-70px":"70px"],opacity:[1,0]},{delay:this.duration/4*(i+1),duration:this.duration,easing:"easeOut"})},this)),n.animate(this.$surveyStep,{translateX:["0",t?"-290px":"290px"],opacity:[1,0]},{duration:this.duration,easing:"easeOut"})),this.submitButton=this.abuseform.$el.find("[data-survey-submit]"),r.trigger("drawerform:validation:trigger"),u.form&&(r.trigger("abuseforms:formview:restorestate",e),r.trigger("drawer:enableCloseConfirmation"))}});e.exports=},1333:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(130),a=i(192),r=i(219),l=i(230),u=i(1334),p=r.extend({mixins:[l],events:{"change [data-flag-action]":"onFlagClick", "click [data-submit-flag-form]":"onFlagFormSubmit",'change input[type="radio"]':"onInputChange",'change input[type="checkbox"]':"onInputChange","submit form":"onSubmit",'change input[name="block"]':"onBlockChange"},initialize:function(e){e=e||{},this.abuseform=e.abuseform,this.set("loading",!1),this.on("change:loading",this.updateLoadingIndicator),this.abuseform.set("blockFlagSet","message"!==this.abuseform.mode||!!this.abuseform.sender),this.abuseform.set("optionFlagSet",!1)},onBlockChange:function(e){this.abuseform.set("blockFlagSet",s(e.target).prop("checked")),this.updateFlagButton()},onInputChange:function(){var e=!1;o.each(this.$radiosAndCheckboxes,function(t){e=s(t).is(":checked")||e}),this.$submitButton.attr("disabled",!e)},onFlagFormSubmit:function(e){e.preventDefault(),this.set("loading",!0);var t=[];this.$form.find("[name=flag]:checked").length&&t.push(s.ajax({url:"/svc/flag",type:"POST",data:this.getFlagRequestData(),withFormKey:!0})),this.abuseform.get("blockFlagSet")&&t.push(this.abuseform.sender?this.abuseform.sender.block():this.abuseform.tumblelog.block()),a.all(t).then(o.bind(this.onSubmitSuccess,this),o.bind(this.onSubmitError,this)).finally(o.bind(this.onCallComplete,this))},getFlagRequestData:function(){var e=this.$form.serializeArray(),t={};return o.each(e,function(e){t[e.name]=e.value}),"post"===this.abuseform.mode||"message"===this.abuseform.mode?(t.post_id=this.abuseform.posts[0].id,t.root_id=this.abuseform.posts[0].rootId,t.context=this.abuseform.mode):"blogcard"===this.abuseform.mode&&(t.context="blogcard"),t.tumblelog_name=this.abuseform.tumblelog.get("name"),t},onSubmitSuccess:function(){this.abuseform.hideFlaggedContent();var e=this.$("form").find("input[type=radio]:checked"),t={reason:e.length?e.val():"block_only"};this.abuseform.logSubmission(t),this.abuseform.displaySuccessMessage()},onSubmitError:function(){this.abuseform.displayErrorMessage()},onCallComplete:function(){this.set("loading",!1)},onSubmit:function(e){e.preventDefault()},updateLoadingIndicator:function(){this.$submitButton.toggleClass("loading",this.get("loading"))},updateFlagButton:function(){var e=s(".chrome.flag");this.abuseform.get("blockFlagSet")&&this.abuseform.get("optionFlagSet")?e.find(".label").text(n("Flag & Block")):this.abuseform.get("blockFlagSet")?e.find(".label").text(n("Block")):e.find(".label").text(n("Flag"))},onFlagClick:function(e){var t=s(e.target).data("flag-action"),i=s(".chrome.flag"),o=s(".chrome.continue");this.abuseform.set("optionFlagSet",!0),this.updateFlagButton(),"cg"===t?(i.hide(),o.show()):(i.show(),o.hide())},render:function(){return this.$el.html(u(this.abuseform.templateAttributes)),this.$form=this.$("form"),this.$submitButton=this.$("[data-submit-flag-form]"),this.$radiosAndCheckboxes=this.$('input[type="radio"], input[type="checkbox"]'),this}});e.exports=p},1334:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){function print(){__p+=__j.call(arguments,"")}obj||(obj={});var __t,__p="",__e=.escape,__j=Array.prototype.join;with(obj)__p+='

'+(null==(t=("What's going on?"))?"":__t)+"

","message"!==mode&&(__p+='
'+e(("Report sensitive content"))+" ",safesearch&&(__p+='
'+(null==(t=("Adult-oriented content is currently being hidden ( %1$s ) but this post still showed up.",''))?"":__t)+"
"),__p+="
"),__p+='
'+e(("Report spam"))+'
'+e(("Report something else"))+"
","message"===mode?(__p+=" ",sender&&(__p+='
'+(null==(t=("Block %1$s",sender))?"":__t)+"
"),__p+=" "):__p+='
'+(null==(t=("Block %1$s",tumblelog))?"":__t)+"
",__p+='
',__p+="message"!==mode||sender?' '+(null==(t=("Block"))?"":__t)+' <button class="chrome big blue right continue" type="button" data-survey-nav-to="'+(null==(__t="message"===mode?"harassment-self-message":"abuse")?"":__t)+'">'+(null==(t=("Continue"))?"":__t)+" ":' '+e(("Report"))+' '+(null==(t=("Continue"))?"":__t)+" ",__p+="
";return __p}.toString()).apply(void 0,_values(_imports))},1335:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(_imports),"return "+function(obj){function print(){__p+=__j.call(arguments,"")}obj||(obj={});var __t,__p="",__j=Array.prototype.join;with(obj)__p+='
',hideTitles||(__p+='

'+(null==(t=(title))?"":__t)+"

"),__p+=" ","undefined"!=typeof tagline&&(__p+=' <p class="form-subheading-tagline '+(null==(__t=hideTitles?"bold":"")?"":__t)+' ">'+(null==(t=(tagline))?"":__t)+" "),__p+='
'+(null==(__t=stepContent)?"":__t)+"
";return __p}.toString()).apply(void 0,_values(_imports))},1336:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){function print(){__p+=__j.call(arguments,"")}obj||(obj={});var __t,__p="",__j=Array.prototype.join;with(obj)__p+='
',.each(options,function(e){__p+=" ",__p+="standalone"!==mode&&"undefined"!=typeof e.flaggingTo?' <div class="option" data-survey-nav-to="'+(null==(__t=e.flaggingTo)?"":__t)+'"> '+(null==(t=(e.name))?"":__t)+"
":' <div class="option" data-survey-nav-to="'+(null==(__t=e.to)?"":__t)+'"> '+(null==(t=(e.name))?"":__t)+"
",__p+=" "}),__p+=" ";return __p}.toString()).apply(void 0,_values(_imports))},1337:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){function print(){__p+=__j.call(arguments,"")}obj||(obj={});var __t,__p="",__j=Array.prototype.join;with(obj)__p+='
',.each(message,function(e){__p+='
',"text"===e.type?(__p+=" ",__p+="undefined"!=typeof e.link?"

"+(null==(t=(e.text,'',""))?"":__t)+"

":"

"+(null==(t=(e.text))?"":__t)+"

",__p+=" "):"link"!==e.type||inNativeApp?"highlight"===e.type&&(__p+='

'+(null==(t=(e.text))?"":__t)+"

"):__p+=' <a href="'+(null==(__t=e.href)?"":__t)+'" target="_blank">'+(null==(t=(e.text))?"":__t)+" ",__p+="
"}),__p+="
";return __p}.toString()).apply(void 0,values(imports))},1338:function(module,exports,webpack_require){var =webpack_require(3),imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(keys(imports),"return "+function(obj){function print(){__p+=__j.call(arguments,"")}obj||(obj={});var __t,__p="",__e=.escape,__j=Array.prototype.join;with(obj)__p+=' ',formToken&&(__p+=' '),__p+=" ",languageNotice&&(__p+='
'+e(("Just so you know, we're not yet able to address queries that are written in [language]. You can still use this form to contact our Support team, but you'll need to fill it out in English. Sorry about that, and thanks for your patience."))+"
"),__p+=" ",
.each(form,function(e){__p+='
',__p+="vertical-layout"===e.groupType?'
':'
',__p+=" "+e((e.groupLabel))+"
",__p+="vertical-layout"===e.groupType?'
':'
',__p+=" ",.each(e.fields,function(e){__p+='
',"text"===e.type?(__p+=" ",__p+="undefined"!=typeof e.link?"

"+(null==(t=(e.text,'',""))?"":__t)+"

":"

"+e((e.text))+"

",__p+=" "):"input"===e.type?(__p+=" ",__p+=e.optional===!0?'
'+e(("Optional"))+"
":' ',__p+=" "):"post-id"===e.type?(__p+=' ',__p+=sender?' '+e(("Message from %1$s",sender))+" ":' '+e(("Anonymous message"))+" ",__p+=" "):"input-link"===e.type?(__p+=" ","urlreporting"===e.name&&"standalone"!==mode?(__p+=" ",posts.length>0?(__p+=" ",.each(posts,function(t){__p+=' '}),__p+=" "):"undefined"!=typeof tumblelogUrl&&(__p+=' '),__p+=" "):(__p+='
',__p+=e.optional===!0?'
<input class="text_field input-link" name="'+e(e.name)+'[]" data-field-group-name="'+e(e.name)+'[]" data-validate-input="url" placeholder="'+e(e.placeholder?(e.placeholder):("URL"))+'" data-original-placeholder="'+e(e.placeholder?(e.placeholder):("URL"))+'" data-add-url-field>
'+e(("Optional"))+"
":'
<input class="text_field input-link" data-validate-input="url" required name="'+e(e.name)+'[]" data-field-group-name="'+e(e.name)+'[]" placeholder="'+e(e.placeholder?(e.placeholder):("URL"))+'" data-original-placeholder="'+e(e.placeholder?(e.placeholder):("URL"))+'" data-add-url-field value="'+__e(.get(prefillFields,e.name,""))+'">
',__p+='
'+e(("Edit"))+'
'+e(("Done"))+"
"),__p+=" "):"input-name"===e.type?(__p+=" ",__p+=e.optional===!0?' <input class="text_field" data-validate-input="text" name="'+__e(e.name)+'" placeholder="'+e(("Name"))+'">
'+e(("Optional"))+"
":' <input class="text_field" data-validate-input="text" required name="'+__e(e.name)+'" placeholder="'+e(("Name"))+'"> ',__p+=" "):"input-email"===e.type?(__p+=" ",__p+=email||prefillFields&&prefillFields[e.name]?' <input class="text_field" value="'+__e(.get(prefillFields,e.name,email))+'" data-validate-input="email" required name="'+__e(e.name)+'" placeholder="'+e(("Email address"))+'"> ':' <input class="text_field" data-validate-input="email" required name="'+__e(e.name)+'" placeholder="'+e(("Email address"))+'"> ',__p+=" "):"textarea"===e.type?__p+=' <textarea name="'+__e(e.name)+'" data-validate-input="text" required cols="30" rows="5" placeholder="'+__e(__(e.placeholder))+'"></textarea> ':"file"===e.type&&supportsFileChooser?__p+='
<div class="btn_remove btn-remove-uploaded" data-tooltip="'+e(("Remove image"))+'">
':"checkbox"===e.type&&(__p+='
'+e((e.text))+"
"),__p+="
"}),__p+="
"}),__p+=" "+(null==(__t=recaptcha)?"":__t)+"
";return __p}.toString()).apply(void 0,_values(_imports))},1339:function(e,t,i){"use strict";var s=i(226),o=i(136),n=i(3),a=i(8),r=s.extend({defaults:{target:"g-recaptcha",sitekey:""},initialize:function(e){this.options=e||{};var t=document.createElement("script");t.src="//www.google.com/recaptcha/api.js?render=explicit&onload=onNocaptchaCallback",window.onNocaptchaCallback=n.bind(this.setupCaptcha,this);var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(t,i)},setupCaptcha:function(){this.sitekey=a(".g-recaptcha").data("sitekey"),window.grecaptcha.render(this.options.target||"g-recaptcha",{callback:this.options.callback||function(){},theme:this.options.theme||"light",type:this.options.type||"image",sitekey:this.options.sitekey||a(".g-recaptcha").data("sitekey")}),o&&o.on("abouttumblr:change",function(e){0!==e&&5!==e||window.grecaptcha.reset()})},refresh:function(){window.grecaptcha.reset()}});e.exports=r},1340:function(e,t){"use strict";var i={start:{title:"",description:"",template:"start"},abuse:{title:"What kind of violation is it?",options:[{name:"Copyright violation",to:"copyright"},{name:"My privacy is being violated",to:"privacy"},{name:"Harm to minors",to:"minors"},{name:"Malicious or hate speech",to:"maliciousspeech"},{name:"I’m being harassed",to:"harassment"},{name:"Self-harm",to:"selfharm"},{name:"Misattribution",to:"misattrib"},{name:"Trademark violation",to:"trademark"},{name:"Confusion or impersonation",to:"confusion"},{name:"Gore, mutilation, bestiality, or necrophilia",to:"gore"}],prev:"start"},harassment:{title:"Harassment",tagline:"Are you the person being harassed?",description:"Being a jerk. Circumventing the ignore feature in order to send someone mean and hateful messages.",options:[{name:"Yes",to:"harassment-self",flaggingTo:"harassment-self-blog"},{name:"No",to:"harassment-someoneelse-blog"}],prev:"harm"},"harassment-self":{title:"Harassment",tagline:"Where on Tumblr is the harassment taking place?",options:[{name:"Somewhere on a blog or in a post (including tags)",to:"harassment-self-blog"},{name:"In an inbox message (an Ask or Fan Mail)",to:"harassment-self-message-notice"}],prev:"harassment"},"harassment-self-blog":{title:"Harassment",form:[{groupLabel:"Content you're reporting",fields:[{type:"input-link",name:"urlreporting",placeholder:"URL of the post"}]},{groupLabel:"A little about yourself",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]}],button:{type:"submit"},prev:"harassment-self"},"harassment-self-message":{title:"Harassment",form:[{groupLabel:"Content you're reporting",fields:[{type:"post-id",name:"post-id"}]},{groupLabel:"A little about yourself",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]}],button:{type:"submit"},prev:"start"},"harassment-self-message-notice":{title:"Harassment",message:[{type:"highlight",text:"In an inbox message (an Ask or Fan Mail)"},{type:"text",text:'Good news: You can now report harassment directly from your inbox. Just go to the offending message, hit the three-dot button, and select "Flag". We'll help you take care of the rest.'}],button:{type:"link",href:"/inbox",text:"Go to my inbox"},prev:"harassment-self"},"harassment-self-message-anon-notice":{title:"Harassment",message:[{type:"text",text:"We're sorry you've had a negative experience with anonymous messages on Tumblr. Because not all anonymous messages are associated with a​ Tumblr​ account, we can't always take action against a specific account. However, there are some steps that you can take to prevent any further unwanted interactions."},{type:"text",link:"/docs/social#ask",text:"First, you can block the IP address from which any given anonymous message was sent. Just click or tap the ellipses on the message, select Block and you'll permanently prevent any anonymous messages from that ​IP ​address from ever getting to your inbox. Just an FYI: There is no way to undo this action. Additionally, the person sending unwanted anonymous messages could still send you anonymous messages from another IP address. If you're receiving these anonymous messages from multiple IP addresses, you can disable anonymous messages or even disable the Ask feature entirely in your blog settings. If you need help with any aspect of Asks, just check the %1$shelp docs%2$s."}],button:{type:"dismiss"},prev:"start"},"harassment-someoneelse-blog":{title:"Harassment",form:[{groupLabel:"Content you're reporting",fields:[{type:"input-link",name:"urlreporting",placeholder:"URL of the post"}]},{groupLabel:"A little about yourself",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]}],button:{type:"submit"},prev:"harassment"},privacy:{title:"Privacy Violation",description:"Posting content that violates anyone's privacy, especially personally identifying or confidential information like credit card numbers, social security numbers, unlisted contact information, or private photos.",tagline:"Is it your privacy that's being violated?",options:[{name:"Yes",to:"privacy-self"},{name:"No",to:"privacy-someoneelse"}],prev:"harm"},"privacy-someoneelse":{title:"Privacy Violation",tagline:"What, specifically, was posted?",options:[{name:"My name ",to:"privacy-self-name"},{name:"My IP address ",to:"privacy-self-ip"},{name:"My private home address",to:"privacy-someoneelse-form"},{name:"My private email address",to:"privacy-someoneelse-form"},{name:"My private telephone number was posted",to:"privacy-someoneelse-form"},{name:"Something else private was posted ",to:"privacy-someoneelse-form"}],prev:"privacy"},"privacy-self":{title:"Privacy Violation",tagline:"What, specifically, was posted?",options:[{name:"My name ",to:"privacy-self-name"},{name:"My IP address ",to:"privacy-self-ip"},{name:"My private home address",to:"privacy-self-form"},{name:"My private email address",to:"privacy-self-form"},{name:"My private telephone number was posted",to:"privacy-self-form"},{name:"Private images of me have been posted ",to:"privacy-self-image"},{name:"Something else private was posted ",to:"privacy-self-form"}],prev:"privacy"},"privacy-self-name":{title:"Privacy Violation",tagline:"What, specifically, was posted?",message:[{type:"highlight",text:"Name"},{type:"text",text:"Unfortunately, your name isn't considered private information, and posting it isn't a violation of either the law or of our Community Guidelines. If you're uncomfortable with the post, try to communicate with the person who posted it and make your feelings on it known."}],button:{type:"dismiss"},prev:"privacy-self"},"privacy-self-ip":{title:"Privacy Violation",tagline:"What, specifically, was posted?",message:[{type:"highlight",text:"IP address"},{type:"text",text:"Unfortunately, your IP address isn't considered private information, and posting it isn't a violation of either the law or of our Community Guidelines. If you're uncomfortable with the post, try to communicate with the person who posted it and make your feelings on it known."}],button:{type:"dismiss"},prev:"privacy-self"},"privacy-self-form":{title:"Privacy Violation",form:[{groupLabel:"Content you're reporting",fields:[{type:"input-link",name:"urlreporting",placeholder:"URL of the post"}]},{groupLabel:"Source of the private information, if known",fields:[{type:"input-link",optional:!0,name:"source-link",placeholder:"URL of information source"}]},{groupLabel:"A little about yourself",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]}],button:{type:"submit"},prev:"privacy-self"},"privacy-someoneelse-form":{title:"Privacy Violation",form:[{groupLabel:"Content you're reporting",fields:[{type:"input-link",name:"urlreporting",placeholder:"URL of the post"}]},{groupLabel:"Source of the private information, if known",fields:[{type:"input-link",optional:!0,name:"source-link",placeholder:"URL of information source"}]},{groupLabel:"A little about yourself",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]}],button:{type:"submit"},prev:"privacy-someoneelse"},"privacy-self-image":{title:"Privacy Violation",form:[{groupLabel:"Proof of identity",fields:[{type:"text",text:"We'll need some proof of your identity to pursue this. A picture of your photo ID would be perfect, but if you don't have one handy then you can take a picture of yourself holding up a sign that reads “Tumblr, this is me.” Don't worry, these photos are kept private."},{type:"file",name:"userphoto"}]},{groupLabel:"Content you're reporting",fields:[{type:"input-link",name:"urlreporting",placeholder:"URL of the post"}]},{groupLabel:"Source of the private information, if known",fields:[{type:"input-link",optional:!0,name:"source-link",placeholder:"URL of information source"}]},{groupLabel:"A little about yourself",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]}],button:{type:"submit"},prev:"privacy-self"},minors:{title:"Harm to minors",description:"Sexually suggestive or violent depictions of minors; or bullying, even by another minor.",form:[{groupLabel:"Content you're reporting",fields:[{type:"input-link",name:"urlreporting",placeholder:"URL of the post"}]},{groupLabel:"Some explanation",fields:[{type:"textarea",name:"description",placeholder:"Describe, as best you can, how it violates Tumblr's Community Guidelines"}]},{groupLabel:"A little about yourself",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]}],button:{type:"submit"},prev:"harm"},selfharm:{title:"Promotion or glorification of self-harm",description:"Encouraging others to injure themselves in ways large or small, or celebrating such injuries in any fashion. Glamorizing anorexia, bulimia, or other eating disorders.",form:[{groupLabel:"Content you're reporting",fields:[{type:"input-link",name:"urlreporting",placeholder:"URL of the post"}]},{groupLabel:"A little about yourself",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]}],button:{type:"submit"},prev:"harm"},misattrib:{title:"Misattribution or non-attribution",description:"Stealing something that someone else made and trying to pass it off as your own (probably by downloading it and reposting it, instead of reblogging it like a decent human being). This also includes reblogging something and gratuitously injecting a link back to your blog.",tagline:"Is it your work that's being misattributed, or that's missing an attribution?",options:[{name:"Yes",to:"misattrib-self"},{name:"No",to:"misattrib-someoneelse"}],prev:"misuse"},"misattrib-someoneelse":{title:"Misattribution or non-attribution",tagline:"Is it your work that's being misattributed, or that's missing an attribution?",message:[{type:"highlight",text:"No"},{type:"text",text:"Thanks for letting us know. Unfortunately, in situations like this, we need to hear directly from the user whose work has been misattributed, or is missing attribution. Get in contact with them if you can, and refer them to our %1$sabuse form %2$s.",link:"/abuse/misattrib"}],button:{type:"dismiss"},prev:"misattrib"},"misattrib-self":{title:"Misattribution or non-attribution",tagline:"Did you originally post this work on Tumblr, or somewhere else?",options:[{name:"I posted it to Tumblr",to:"misattrib-self-tumblr"},{name:"I posted it somewhere else",to:"misattrib-self-somewhereelse"}],prev:"misattrib"},"misattrib-self-somewhereelse":{title:"Misattribution or non-attribution",tagline:"Did you originally post this work on Tumblr, or somewhere else?",message:[{type:"highlight",text:"I posted it somewhere else"},{type:"text",text:"You'll need to file a request under the Digital Millenium Copyright Act (DMCA). Don't worry, we've got a form for that."},{type:"link",text:"File a DMCA request",href:"/dmca"}],button:{type:"dismiss"},prev:"misattrib-self"},"misattrib-self-tumblr":{title:"Misattribution or non-attribution",tagline:"Which of the following best describes your issue?",options:[{name:"Someone reposted it instead of reblogging it",to:"misattrib-self-tumblr-repost"},{name:"Someone reblogged it and injected a link back to their own blog",to:"misattrib-self-tumblr-link"}],prev:"misattrib-self"},"misattrib-self-tumblr-repost":{title:"Misattribution or non-attribution",form:[{groupLabel:"Original content",fields:[{type:"input-link",name:"urloriginal",placeholder:"URL of the original content"}]},{groupLabel:"Repost",fields:[{type:"input-link",name:"urlreporting",placeholder:"URL of the repost"}]},{groupLabel:"A little about yourself",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]}],button:{type:"submit"},prev:"misattrib-self-tumblr"},"misattrib-self-tumblr-link":{title:"Misattribution or non-attribution",form:[{groupLabel:"Original content",fields:[{type:"input-link",name:"urloriginal",placeholder:"URL of the original content"}]},{groupLabel:"Reblog",fields:[{type:"input-link",name:"urlreporting",placeholder:"URL of the reblog"}]},{groupLabel:"A little about yourself",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]}],button:{type:"submit"},prev:"misattrib-self-tumblr"},copyright:{title:"Copyright infringement",description:"Posting someone else's copyrighted work without their permission, or without a legal exemption like fair use.",tagline:"Did you originally post this work on Tumblr, or somewhere else?",options:[{name:"I posted it to Tumblr",to:"misattrib"},{name:"I posted it somewhere else",to:"copyright-dmca"}],button:{type:"submit"},prev:"misuse"},"copyright-dmca":{title:"Copyright infringement",tagline:"Are you making a copyright claim or reporting an attribution issue?",message:[{type:"highlight",text:"Copyright"},{type:"text",text:"You'll need to file a request under the Digital Millenium Copyright Act (DMCA). Don't worry, we've got a form for that."},{type:"link",text:"File a DMCA request",href:"/dmca"}],button:{type:"dismiss"},prev:"copyright"},trademark:{title:"Trademark infringement",description:"Using someone else's trademark without their permission.",tagline:"Are you the trademark holder or an authorized representative?",options:[{name:"Yes",to:"trademark-holder"},{name:"No",to:"trademark-notholder"}],prev:"misuse"},"trademark-notholder":{title:"Trademark infringement",tagline:"Are you the trademark holder or an authorized representative?",message:[{type:"highlight",text:"No"},{type:"text",text:"Thanks for bringing this to our attention, but we need to hear directly from the trademark holder or their authorized representative. Get in contact with them if you can, and refer them to our %1$sabuse form%2$s.",link:"/abuse/trademark"}],button:{type:"dismiss"},prev:"trademark"},"trademark-holder":{title:"Trademark infringement",form:[{groupLabel:"Your information",fields:[{type:"input-name",name:"name"},{type:"input",name:"company",optional:!0,placeholder:"Your company, if applicable"},{type:"input-email",name:"email"},{type:"input",name:"contactinfo",optional:!0,placeholder:"Other contact info, like your address"}]},{groupLabel:"Trademark information",fields:[{type:"input",name:"trademark",placeholder:"Trademark"},{type:"input",name:"trademark-type",placeholder:"Type of trademark (e.g., word, design, etc)"},{type:"input",name:"trademark-jurisdiction",placeholder:"Jurisdiction"},{type:"input",name:"trademark-regnumber",optional:!0,placeholder:"Registration number (if not granted)"},{type:"input",name:"trademark-serialnumber",optional:!0,placeholder:"Serial number "}]},{groupLabel:"Registration documentation",fields:[{type:"file",name:"trademark-regdocument"},{type:"input-link",name:"urlreporting",placeholder:"URL of the content you're reporting"}]},{groupLabel:"How is this content infringing your trademark(s)?",fields:[{type:"textarea",name:"description",placeholder:"Short explanation"}]},{groupLabel:"",fields:[{type:"checkbox",name:"consent",text:"I understand that Tumblr may provide third parties, for example the reported blogger(s), with details of this report, such as the reported blog or post. Your contact information, like your email address, will not be disclosed."}]}],button:{type:"submit"},prev:"trademark"},confusion:{title:"Confusion or impersonation",description:"A deliberate attempt to appear to be someone or something else, like a teacher, classmate, celebrity, or corporation. Someone trying to be a better version of him or herself is all cool though.",tagline:"Whose identity is being impersonated or confused?",options:[{name:"My own",to:"confusion-own"},{name:"My company, brand, or organization",to:"trademark"},{name:"Someone else's",to:"confusion-else"}],prev:"misuse"},"confusion-own":{title:"Confusion or impersonation",form:[{groupLabel:"Some information about you",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]},{groupLabel:"Where confusion or impersonation takes place",fields:[{type:"input-link",name:"urlreporting",placeholder:"URL with an example of the impersonation"}]},{groupLabel:"Explain how you're being impersonated",fields:[{type:"textarea",name:"explanation",placeholder:"Short explanation"}]}],button:{type:"submit"},prev:"confusion"},"confusion-else":{title:"Confusion or impersonation",tagline:"Whose identity is being impersonated or confused?", message:[{type:"highlight",text:"Someone else's"},{type:"text",text:"We appreciate your bringing this to our attention. In these cases, we need to hear directly from the person being impersonated by this blog. Get in contact with them if you can, and refer them to our %1$sabuse form%2$s.",link:"/abuse/confusion"}],button:{type:"dismiss"},prev:"confusion"},"confusion-company-notauthorized":{title:"Confusion or impersonation",tagline:"Are you an authorized representative for the company, brand, or organization being impersonated?",message:[{type:"highlight",text:"No"},{type:"text",text:"We appreciate your bringing this to our attention. In these cases, we need to hear directly from an authorized representative for the company, brand or organization being impersonated by this blog. Get in contact with them if you can, and refer them to our %1$sabuse form%2$s.",link:"/abuse/confusion"}],button:{type:"dismiss"},prev:"confusion-company"},"confusion-company-authorized":{title:"Confusion or impersonation",tagline:"Are you reporting an impersonation/confusion issue or a trademark violation?",options:[{name:"Impersonation/confusion",to:"confusion-company-authorized-impersonation"},{name:"Trademark violation",to:"trademark"}],prev:"confusion-company"},"confusion-company-authorized-impersonation":{title:"Confusion or impersonation",form:[{groupLabel:"Some information about you",fields:[{type:"input-name",name:"name"},{type:"input-email",name:"email"}]},{groupLabel:"Information about company",fields:[{type:"input",name:"impersonated-company",placeholder:"Company/brand/organization"},{type:"input",name:"affiliation",placeholder:"Your affiliation"}]},{groupLabel:"Examples of the impersonation or confusion",fields:[{type:"input-link",name:"urlreporting"},{type:"textarea",name:"explanation",placeholder:"Explain how these examples are impersonating or causing confusion with your brand"}]}],button:{type:"submit"},prev:"confusion-company-authorized"},gore:{title:"Gore, mutilation, bestiality, or necrophilia",description:"Showcasing the mutilation or torture of human beings, animals, or their remains. Doing so just to be a dick.",form:[{groupLabel:"Content you're reporting",fields:[{type:"input-link",name:"urlreporting",placeholder:"URL of the post"}]},{groupLabel:"Which of these things does it contain",fields:[{type:"checkbox",name:"gore",text:"Gore/mutilation"},{type:"checkbox",name:"bestiality",text:"Bestiality"},{type:"checkbox",name:"necrophilia",text:"Necrophilia"}]},{groupLabel:"A little about yourself",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]}],button:{type:"submit"},prev:"hateful"},maliciousspeech:{title:"Malicious speech",description:"Encouraging violence or hatred on the basis of things like race, ethnic origin, religion, disability, gender, age, veteran status, or sexual orientation.",form:[{groupLabel:"Content you're reporting",fields:[{type:"input-link",name:"urlreporting",placeholder:"URL of the post"}]},{groupLabel:"Describe, as best you can, how it violates Tumblr's Community Guidelines",fields:[{type:"textarea",name:"description",placeholder:"Short explanation"}]},{groupLabel:"A little about yourself",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]}],button:{type:"submit"},prev:"hateful"},"video-appeal":{title:"Appeal a Video Removal",description:"We don't allow sexually explicit videos to be uploaded to Tumblr. If your video was removed and you think there was a mistake (it happens), you can appeal using this form and we'll take another look.",customSuccessMessage:"Cool. Your appeal has been sent. If the post was removed in error, we'll restore it. We'll let you know (either way) as soon as it's been reviewed.",form:[{groupLabel:"Post that was removed",fields:[{type:"input-link",name:"urlreporting",placeholder:"URL of the post"}]},{groupLabel:"A little about yourself",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]}],button:{type:"submit"}},nsfw:{title:"Unflagged NSFW Content",description:'Tumblr is home to millions of readers and creators from a variety of locations, cultures, and backgrounds who hold different points of view concerning adult-oriented content. We ask our users that regularly post sexual or adult-oriented content to respect the choices of people in our community who would rather not see such content by flagging their blog (which you can do on your blog's Settings page) as Not Suitable for Work ("NSFW").',form:[{groupLabel:"URL of unflagged NSFW content",fields:[{type:"input-link",name:"urlreporting",placeholder:"URL of the blog or post"}]},{groupLabel:"A little about yourself",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]}],button:{type:"submit"}},edr:{title:"EMERGENCY DISCLOSURE REQUEST FORM",description:[{text:'Please provide completed responses to the questions on this form to assist Tumblr, Inc. ("Tumblr") in determining whether to exercise its discretion to disclose information to respond to an emergency situation.'},{text:"For more information about our Emergency Disclosure policies, please refer to %1$sTumblr's Law Enforcement Guidelines%2$s.",link:"https://tumblr.com/docs/en/law_enforcement"},{text:"Please email %1$slawenforcement@tumblr.com%2$s during business hours, if you have any questions about this form.",link:"mailto:lawenforcement@tumblr.com"}],customSuccessMessage:[{text:"We have received your emergency disclosure request and a member of our team will be in touch shortly."},{text:"For more information on Tumblr's law enforcement processes, please review our %1$sLaw Enforcement Guidelines%2$s.",link:"https://tumblr.com/docs/en/law_enforcement"}],form:[{groupType:"vertical-layout",groupLabel:"Information in Tumblr's possession that you are seeking to obtain on an emergency basis",fields:[{type:"textarea",name:"description"}]},{groupType:"vertical-layout",groupLabel:"Tumblr username/URL (e.g. staff.tumblr.com) of the account(s) containing information necessary to prevent the emergency",fields:[{type:"textarea",name:"bloginfo"}]},{groupType:"vertical-layout",groupLabel:"Identity of the individual in danger or serious physical injury",fields:[{type:"textarea",name:"identity"}]},{groupType:"vertical-layout",groupLabel:"Describe the nature of the emergency involving danger of death or serious physical injury.",fields:[{type:"textarea",name:"nature"}]},{groupType:"vertical-layout",groupLabel:"Describe the imminence of the threatened death or serious physical injury. If possible, provide information that suggests that there is a specific deadline before which it is necessary to receive the requested information.",fields:[{type:"textarea",name:"threat"}]},{groupType:"vertical-layout",groupLabel:"Explain/describe how the specific information requested will assist in averting the threatened death or serious physical injury.",fields:[{type:"textarea",name:"explanation"}]},{groupType:"vertical-layout",groupLabel:"Links to any specific posts containing relevant information",fields:[{type:"textarea",name:"links"}]},{groupType:"vertical-layout",groupLabel:"Describe and attach any other relevant details or context regarding the particular circumstances. For example, if a Tumblr post made by the user is the basis for the emergency, please include the post permalink in this form and explain its relevance in the area below.",fields:[{type:"textarea",name:"context"}]},{groupType:"vertical-layout",groupLabel:"I declare that the foregoing is true and correct."},{groupLabel:"Digital signature of Law Enforcement Officer",fields:[{type:"input-name",name:"signature"}]},{groupLabel:"Date",fields:[{type:"input",name:"date"}]},{groupLabel:"Printed Name of Law Enforcement Officer",fields:[{type:"input-name",name:"name"}]},{groupLabel:"Phone number",fields:[{type:"input",name:"phone"}]},{groupLabel:"Email address",fields:[{type:"input-email",name:"email"}]}],button:{type:"submit"}},other:{title:"Some other reason",description:"Pretty sure you found a post that doesn't belong on Tumblr, but don't see the violation you're looking for? Let us know about it.",form:[{groupLabel:"Content you're reporting",fields:[{type:"input-link",name:"urlreporting",placeholder:"URL of the post"}]},{groupLabel:"Describe, as best you can, how it violates Tumblr's Community Guidelines",fields:[{type:"textarea",name:"description",placeholder:"Short explanation"}]},{groupLabel:"A little about yourself",fields:[{type:"input-name",optional:!0,name:"name"},{type:"input-email",name:"email"}]}],button:{type:"submit"},prev:"abuse"}};e.exports=i},1341:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(192),a=i(219),r=i(136),l=i(265),u=a.extend({events:{"click [data-survey-submit]":"onSubmitClick","click [data-survey-dismiss]":"onDismissClick"},initialize:function(e){this.abuseform=e.abuseform,this.savedFormState={},this.recaptcha=e.recaptcha,this.listenTo(r,"abuseforms:formview:savestate",this.saveFormState),this.listenTo(r,"abuseforms:formview:restorestate",this.restoreFormState)},onSubmitClick:function(e){switch(e.preventDefault(),this.abuseform.set("loading",!0),this.abuseform.get("surveyStep")){case"gore":case"minors":case"selfharm":var t=this.getReportedBlogs(),i=this.abuseform.templateAttributes.email;null!=i&&t?this.sendReportedBlogsToModeration(t):this.createTicket();break;default:this.createTicket()}},getReportedBlogs:function(){var e=this.$("[data-abuse-form]"),t=o.pluck(o.filter(e.serializeArray(),{name:"urlreporting[]"}),"value"),i=[];return o.each(t,function(e){var t=l.parseTumblelogUrl(e);t&&!t.post_id&&i.push(t.tumblelog_name)}),!!i.length&&i},sendReportedBlogsToModeration:function(e){var t=[];o.each(e,function(e){var i={};i.context="blog",i.flag=this.getModerationFlagType(this.abuseform.get("surveyStep")),i.tumblelog_name=e,t.push(s.ajax({url:"/svc/flag",type:"POST",data:i,withFormKey:!0}))},this),this.abuseform.get("blockFlagSet")&&t.push(this.abuseform.sender?this.abuseform.sender.block():this.abuseform.tumblelog.block()),n.all(t).done(o.bind(this.onSubmitSuccess,this),o.bind(this.onSubmitError,this))},createTicket:function(){var e=[];e.push(s.ajax({url:"/abuse/ticket/new",type:"POST",contentType:!1,processData:!1,data:this.prepareData(),withFormKey:!0})),this.abuseform.get("blockFlagSet")&&e.push(this.abuseform.sender?this.abuseform.sender.block():this.abuseform.tumblelog.block()),n.all(e).done(o.bind(this.onSubmitSuccess,this),o.bind(this.onSubmitError,this))},getModerationFlagType:function(e){switch(e){case"gore":return"gore";case"minors":return"minors";case"selfharm":return"selfharm"}},prepareData:function(){var e=this.$("[data-abuse-form]");return new FormData(e[0]||{})},saveFormState:function(e){this.$("[data-abuse-form]").length&&(this.savedFormState[e]=this.$("[data-abuse-form]").serializeArray())},restoreFormState:function(e){if(this.savedFormState[e]){var t=this.savedFormState[e];o.each(t,function(e){if(e.value&&!o.isEmpty(e.value)){var t=this.$('input[name="'+e.name+'"]').length?this.$('input[name="'+e.name+'"]'):this.$('textarea[name="'+e.name+'"]');t.val(e.value).trigger("blur")}},this),r.trigger("drawerform:validation:trigger")}},onSubmitSuccess:function(){this.abuseform.set("loading",!1),this.abuseform.hideFlaggedContent(),this.abuseform.logSubmission(),this.abuseform.displaySuccessMessage()},onSubmitError:function(e){this.abuseform.set("loading",!1);var t=s.parseJSON(e.responseText||{}),i=t.response&&t.response.errors&&t.response.errors.errors||"";this.abuseform.displayErrorMessage(i)},onDismissClick:function(){this.abuseform.get("mobileMode")?"undefined"!=typeof window.history&&window.history.length>2?window.history.go(-1):window.location="https://www.tumblr.com/dashboard":(r.trigger("abuseform:close"),r.trigger("Kraken:abuseform:close"))}});e.exports=u},1342:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(130),a=i(136),r=i(235),l=i(219),u=10,p=l.extend({events:{"click [data-edit-button]":"onEditButtonClick","click [data-done-button]":"onDoneButtonClick","keyup [data-add-url-field]":"onInputKeyup","click [data-remove-url-field]":"onRemoveButtonClick"},initialize:function(){this.editMode=!1},addAttributesToField:function(e){var t=e.find(".optional-tag").length,i=e.find("input"),s=i.data("original-placeholder"),o=i.data("field-group-name");i.attr({name:o,placeholder:s}),t||i.prop("required",!0)},addUrlField:function(e){var t=s(e.target).data("field-group-name"),i=this.containers[t],o=i.find(".input-row").last(),a=o.find("input");i.removeClass("no-edit-button"),a.attr("name")||this.addAttributesToField(o),o.removeClass("no-remove-button");var l=o.clone(!0).addClass("no-remove-button");l.find("input").val("").removeClass("error").removeAttr("required").removeAttr("name").attr("placeholder",n("Add a new URL")),r.animate(l,{opacity:[1,0]},{duration:200,easing:"easeIn"}),l.appendTo(i)},onEditButtonClick:function(e){this.enterEditMode(e)},onDoneButtonClick:function(e){this.exitEditMode(e)},onRemoveButtonClick:function(e){var t=s(e.target).data("field-group-name"),i=this.containers[t],o=s(e.target).next("input");if(a.trigger("drawerform:errortag:remove",{field:o}),s(e.target).parent().remove(),1===i.find(".input-row").length){var n=i.find(".input-row").last();i.addClass("no-edit-button"),this.addAttributesToField(n),this.exitEditMode(e)}a.trigger("drawerform:validation:trigger")},exitEditMode:function(e){this.editMode=!1;var t=s(e.target).data("field-group-name");this.containers[t].removeClass("edit-mode")},enterEditMode:function(e){this.editMode=!0;var t=s(e.target).data("field-group-name");this.containers[t].addClass("edit-mode")},onInputKeyup:function(e){if(this.editMode)return void this.exitEditMode(e);var t=s(e.target).data("field-group-name"),i=this.containers[t].find("input");i.last().val().trim().length&&i.length<u&&this.addUrlField(e)},update:function(){this.containers={};var e=this.$el.find(".dynamic-fields");e.each(o.bind(function(e,t){var i=s(t),o=s(t).data("field-group-name");this.containers[o]=i},this))}});e.exports=p},1343:function(e,t,i){"use strict";var s=i(3),o=i(219),n=i(1344),a=o.extend({className:"form-row",template:n,events:{"click [data-survey-nav-to]":"surveyLinkHandler","click [data-survey-nav-back]":"surveyBackHandler","click [data-survey-submit]":"onSubmitClick","click [data-survey-dismiss]":"onDismissClick"},initialize:function(e){e=e||{},this.abuseform=e.abuseform,this.abuseform.get("mobileMode")&&this.$el.addClass("fixed-row")},surveyLinkHandler:function(e){this.abuseform.get("mobileMode")&&this.abuseform.surveyView.surveyLinkHandler(e)},surveyBackHandler:function(e){this.abuseform.get("mobileMode")&&this.abuseform.surveyView.surveyBackHandler(e)},onSubmitClick:function(e){this.abuseform.get("mobileMode")&&this.abuseform.formView.onSubmitClick(e)},onDismissClick:function(e){this.abuseform.get("mobileMode")&&this.abuseform.formView.onDismissClick(e)},update:function(e){s.extend(e,{complete:this.abuseform.get("complete")}),this.$el.html(this.template(e)),this.abuseform.get("mobileMode")?this.$el.insertAfter(this.abuseform.$surveyContainer):this.abuseform.$surveyStep.append(this.$el)}});e.exports=a},1344:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(_imports),"return "+function(obj){function print(){__p+=__j.call(arguments,"")}obj||(obj={});var __t,__p="",__j=Array.prototype.join;with(obj)displayBackButton&&(__p+=' '+(null==(t=("Go back"))?"":__t)+" "),__p+=" ","undefined"!=typeof button&&(__p+=" ","submit"===button.type?(__p+=" ",__p+=complete?' ':' ',__p+=" ",__p+=this.abuseform.get("blockFlagSet")?' '+(null==(t=("Submit & Block"))?"":__t)+" ":' '+(null==(t=("Submit"))?"":__t)+" ",__p+=' '):"dismiss"===button.type?__p+=' '+(null==(t=("Got it"))?"":__t)+" ":"link"===button.type&&(__p+=' <a href="https://www.tumblr.com'+(null==(__t=button.href)?"":__t)+'" class="chrome big right blue">'+(null==(t=(button.text))?"":__t)+" "),__p+=" "),__p+="";return __p}.toString()).apply(void 0,_values(_imports))},1345:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(_imports),"return "+function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='
';return __p}.toString()).apply(void 0,_values(_imports))},1346:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(keys(imports),"return "+function(obj){function print(){__p+=__j.call(arguments,"")}obj||(obj={});var __t,__p="",__e=.escape,__j=Array.prototype.join;with(obj)__p+='

'+(null==(t=("Got it"))?"":__t)+"

",customSuccessMessage?(__p+=" ",customSuccessMessage instanceof Array?(__p+=" ",.each(customSuccessMessage,function(e){__p+=" ",__p+=e.link?'

'+(null==(t=(e.text,'',""))?"":__t)+"

":'

'+(null==(t=(e.text))?"":__t)+"

",__p+=" "}),__p+=" "):__p+='

'+__e(customSuccessMessage)+"

",__p+=" "):__p+=alternativeResponseText?'

'+e(("Thanks for bringing this to our attention. We're looking into it."))+"

":'

'+e(("It may take us a day or two, but we're on the case and we'll get back to you as quickly as we can."))+'

'+e(("Also: We know it's tempting to submit the same thing a few times in hopes that it'll get addressed sooner, but really it just clogs up our system and makes it harder for us to respond quickly. We're kind of like an elevator button."))+"

",__p+="
";return __p}.toString()).apply(void 0,_values(_imports))},1347:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){function print(){__p+=__j.call(arguments,"")}obj||(obj={});var __t,__p="",__j=Array.prototype.join;with(obj)errors?(__p+=" ",.each(errors,function(e){__p+='
'+(null==(__t=e.error)?"":__t)+"
"}),__p+=" "):__p+='
'+(null==(t=("Oops. There was an error. Try again."))?"":__t)+"
";return __p}.toString()).apply(void 0,_values(_imports))},1348:function(e,t,i){"use strict";var s=i(8),o=i(214),n=i(136),a=i(831),r=i(232),l=i(1349),u=o.extend({name:"keycommandguide",mixins:[r],defaults:{canOpen:!0},keycommands:{"keydown:shift+forwardslash":"open"},initialize:function(){this.drawerManager=a(),this.listenTo(this.drawerManager,"open:keycommand-guide",this.open),this.listenTo(n,"dialog:opened peepr:open",this.disableKeys),this.listenTo(n,"dialog:closed peepr:close",this.enableKeys)},open:function(){n.trigger("keycommands:open_guide"),n.trigger("Kraken:keycommands:open_guide");var e=s(document.activeElement).is("input,textarea,div[contenteditable]");this.drawerManager.canOpen()&&!e?(this.drawerManager.open(l,null,null,"keycommandguide"),this.soloKeys()):(this.drawerManager.close(),this.unSoloKeys())}});e.exports=u},1349:function(e,t,i){"use strict";function s(){return navigator.platform.match(/^Mac/i)}var o=i(180),n=i(226),a=i(1350),r=n.extend({template:a,className:"keycommand-guide",defaults:function(){return{option:s()?"option":"alt",zOption:s()?"option":"Z",meta:s()?"cmd":"ctrl",shift:"shift",auto_paginate:o.bool("keycommand_auto_paginate")}}});e.exports=r},1350:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='

'+e(("Keyboard shortcuts"))+'

  • '+e(("Navigation"))+'
  • '+e(("Scroll down"))+'
    J
  • '+e(("Scroll up"))+'
    K
  • '+e(("Back to the top"))+'
    .
  • '+e(("Like a post"))+'
    L
  • '+e(("Share a post"))+'
    S
  • '+e(("View a post's notes"))+'
    N
  • '+e(("Open a post's blog"))+'
    enter
  • '+e(("Follow a recommended blog"))+'
    F
  • '+e(("Reject a recommended blog"))+'
    X
  • '+e(("Search Tumblr"))+'
    /
  • '+e(("Switch between your blogs"))+'
    '+__e(zOption)+'+ tab
  • '+e(("Posting"))+'
  • '+e(("Compose a new post"))+'
    '+__e(zOption)+'+ C
  • '+e(("Fast reblog a post"))+'
    '+__e(option)+'+ R
  • '+e(("Add a post to your queue"))+'
    '+__e(option)+'+ E
  • '+e(("Composing"))+'
  • '+e(("Bold"))+'
    '+__e(meta)+'+ B
  • '+e(("Italic"))+'
    '+__e(meta)+'+ I
  • '+e(("Headline"))+'
    '+__e(meta)+'+ '+__e(shift)+'+ 2
  • '+e(("Link"))+'
    '+__e(meta)+'+ K
  • '+e(("Strikethrough"))+'
    '+__e(meta)+'+ '+__e(shift)+'+ 6
  • '+e(("Ordered list"))+'
    '+__e(meta)+'+ '+__e(shift)+'+ 7
  • '+e(("Unordered list"))+'
    '+__e(meta)+'+ '+__e(shift)+'+ 8
  • '+e(("Blockquote"))+'
    '+__e(meta)+'+ '+__e(shift)+'+ 9
  • '+e(("Remove formatting"))+'
    '+__e(meta)+'+ '+__e(shift)+'+ 0
  • '+e(("Preformatted text"))+'
    '+__e(meta)+'+ '+__e(shift)+'+ X
  • '+e(("Superscript"))+'
    '+__e(meta)+'+ .
  • '+e(("Subscript"))+'
    '+__e(meta)+'+ ,
  • '+e(("Small"))+'
    '+__e(meta)+'+ '+__e(shift)+'+ -
  • '+e(("Insert photo"))+'
    '+__e(meta)+'+ '+__e(shift)+'+ P
  • '+e(("Insert video"))+'
    '+__e(meta)+'+ '+__e(shift)+'+ M
  • '+e(("Insert horizontal line"))+'
    '+__e(meta)+'+ '+__e(shift)+'+ L
  • '+e(("Insert read-more link"))+'
    '+__e(meta)+'+ '+__e(shift)+'+ K
  • '+e(("Insert GIF"))+'
    '+__e(meta)+'+ '+__e(shift)+'+ G
';return __p}.toString()).apply(void 0,_values(_imports))},1351:function(e,t,i){"use strict";var s=i(214),o=i(180),n=i(1352),a=s.extend({name:"elevator",selector:"body",autoAppend:!0,view:function(e){return!o.bool("is_mobile")&&new n(e)}});e.exports=a},1352:function(e,t,i){"use strict";var s=i(8),o=i(226),n=i(136),a=o.extend({template:i(1353),className:"elevator-wrapper",defaults:{fadeScrollDistance:2e3,visible:!1},events:{click:"elevate"},initialize:function(){this.listenTo(n,"DOMEventor:flatscroll",this.onScroll),this.on("change:visible",this.toggleVisibility)},elevate:function(){s("html").velocity("scroll",1e3)},onScroll:function(e){e&&(e.windowScrollY>=this.get("fadeScrollDistance")?this.set("visible",!0):this.set("visible",!1))},toggleVisibility:function(e,t){this.$el.toggleClass("visible",t)}});e.exports=a},1353:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(_imports),"return "+function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='
';return __p}.toString()).apply(void 0,_values(_imports))},1354:function(e,t,i){"use strict";var s=i(3),o=i(8),n=i(136),a=i(214),r=i(1355),l=a.extend({name:"RecommendedBlogUnit",defaults:{tumblelogs:[],exploreLinkLabel:"Explore all of Tumblr"},initialize:function(e){this.options=s.defaults(e,this.defaults);var t=o(this.options.el),i=t.data("json");t.removeData("json"),i&&(i.tumblelogs&&(this.options.tumblelogs=i.tumblelogs),i.exploreLinkLabel&&(this.options.exploreLinkLabel=i.exploreLinkLabel))},getView:function(){var e=new r(this.options).render();return s.defer(function(){n.trigger("recommended-blogs-unit:rendered")}),e}});e.exports=l},1355:function(e,t,i){"use strict";var s=i(3),o=i(219),n=i(1356),a=i(1357),r=i(1359),l=i(1363),u=o.extend({defaults:{header:!0,tumblelogs:[],dismissable:!0,refresh:!0,numShow:4,primaTumblelogPopover:!1,exploreLink:!1},initialize:function(e){this.options=s.defaults(e,this.defaults),this.pageUrl=this.getPageUrl(),this.options.header&&(this.headerView=new a({$el:this.$(".section_header")})),this.options.exploreLink&&(this.exploreLinkView=new l({exploreLinkLabel:this.options.exploreLinkLabel})),this.collection=new n(this.options.tumblelogs),this.listView=new r({el:this.el,collection:this.collection,dismissable:this.options.dismissable,refresh:this.options.refresh,numShow:this.options.numShow,primaTumblelogPopover:this.options.primaTumblelogPopover,pageUrl:this.getPageUrl(),wordedFollowButton:this.options.wordedFollowButton})},getPageUrl:function(){return window.location.pathname.split("/")[1]},render:function(){return this.headerView&&this.$el.append(this.headerView.render().el),this.$el.append(this.listView.render().el),this.exploreLinkView&&this.$el.after(this.exploreLinkView.render().el),this},updateTumblelogs:function(e){this.collection.reset(e)}});e.exports=u},1356:function(e,t,i){"use strict";var s=i(3),o=i(190),n=i(191),a=o.extend({url:"/svc/search/get_recommended_tumblelogs",model:n,defaults:{limit:6},initialize:function(e){this.options=s.defaults(e,this.defaults),this.on("remove",this.onTumblelogRemoved)},onTumblelogRemoved:function(){var e={limit:1,remove:!1,page:this.getPageUrl()};this.fetch(e)},getPageUrl:function(){return window.location.pathname.split("/")[1]},parse:function(e){return e.response.blogs}});e.exports=a},1357:function(e,t,i){"use strict";var s=i(3),o=i(219),n=i(130),a=i(1358),r=o.extend({tagName:"li",className:"section_header no_push recommended-blogs-unit-header",template:a,defaults:{headline:"Recommended Blogs"},initialize:function(e){this.options=s.defaults({},e,this.defaults)},render:function(){return this.$el.html(this.template({headline:n(this.options.headline)})),this}});e.exports=r},1358:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){ obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+=__e(headline);return __p}.toString()).apply(void 0,_values(_imports))},1359:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(219),a=i(136),r=i(1360),l=n.extend({captureIsReady:!1,impressionLogQueue:[],initialize:function(e){this.options=o.defaults(e,this.defaults),this.subviews=[],this.viewed=[],this.pageUrl=this.options.pageUrl,this.bindEvents()},bindEvents:function(){this.listenTo(this.collection,"add",this.onTumblelogAdded),this.listenTo(this.collection,"remove",this.onTumblelogRemoved),this.listenTo(this.collection,"dismiss",this.onDismiss),this.listenTo(this.collection,"reset",this.onTumblelogsReset),this.listenTo(this.collection,"change:following",this.onFollow),this.listenTo(a,"TumblelogPopover:show",this.onPopoverShow),this.listenTo(a,"TumblelogPopover:hide",this.onPopoverHide),this.listenToOnce(a,"capture:init",this.flushQueue)},onTumblelogAdded:function(e){var t=!o.isUndefined(e.get("pt"))&&e.get("pt"),i=!!e.get("premium"),s=new r({model:e,dismissable:this.options.dismissable&&!i,primaTumblelogPopover:this.options.primaTumblelogPopover,pageUrl:this.pageUrl,pt:t,sponsored:i,wordedFollowButton:this.options.wordedFollowButton});this.subviews.push(s),this.$el.append(s.render().el),"explore"!==this.pageUrl&&this.logImpression()},onTumblelogRemoved:function(e,t,i){this.subviews=o.filter(this.subviews,function(t){return t.model!==e})},onTumblelogsReset:function(){o.each(this.subviews,function(e){e.remove()}),this.subviews=[],this.render()},onFollow:function(e,t){if(t&&this.options.refresh&&this.collection.length>this.options.numShow){var i=this.getView(e);this.popoverShown?this.queuedView=i:(this.collection.remove(e),this.slideUp(i))}},onDismiss:function(e){if(this.options.refresh){var t=this.getView(e);this.slideLeft(t),this.collection.remove(e)}"explore"!==this.pageUrl&&s.ajax({method:"POST",url:"/svc/search/log_dismissal",data:{tumblelog_name:e.get("name"),page:this.pageUrl},withFormKey:!0})},onPopoverShow:function(){this.popoverShown=!0},onPopoverHide:function(){this.popoverShown=!1,this.queuedView&&this.options.refresh&&(this.slideUp(this.queuedView),this.collection.remove(this.queuedView.model),this.queuedView=null)},logImpression:function(){o.forEach(this.collection.slice(0,this.options.numShow),function(e,t){var i=this.getView(e);return o.isEmpty(i)||o.indexOf(this.viewed,e)!==-1?this:(this.viewed.push(e),this.triggerEvent("impression",this.prepLoggingData(!1,e,i)),void this.impressionLogQueue.push(o.bind(function(){a.trigger("Capture:push","recommended_blog_impressions","impressions",this.prepLoggingData(!0,e,i))},this)))},this),this.captureIsReady&&this.flushQueue()},prepLoggingData:function(e,t,i){var s={tumblelog_name:t.get("name"),algorithm_id:t.get("algorithm_id")||"",format:"RECOMMEND_FORMAT_DASH_SIDEBAR"};return e&&(s=o.extend(s,{page:this.pageUrl,ts:Math.floor(o.now()/1e3)})),s},triggerEvent:function(e,t){a.trigger("recommendedBlogs:"+e,{loggingData:t})},flushQueue:function(){for(var e=0;e<this.impressionLogQueue.length;e++)this.impressionLogQueuee;this.impressionLogQueue=[],this.captureIsReady=!0},getView:function(e){return o.find(this.subviews,{model:e})},render:function(){return this.collection.each(o.bind(this.onTumblelogAdded,this)),this},slideLeft:function(e){e.$el.animate({left:-1e.$el.width()},250).slideUp(300,e.$el.remove)},slideUp:function(e){e.$el.animate({opacity:0},100).slideUp(300,e.$el.remove)}});e.exports=l},1360:function(e,t,i){"use strict";var s=i(3),o=i(219),n=i(136),a=i(1361),r=i(348),l=i(653),u=i(1362),p=o.extend({tagName:"li",className:"item",template:u,mixins:[a,r],defaults:{followSource:"FOLLOW_SOURCE_RECOMMENDED_BLOG",wordedFollowButton:!1},events:{"click .follow_list_item_blog":"onPeeprOpen","click .icon_close":"dismissClicked"},initialize:function(e){this.options=s.defaults(e,this.defaults),this.options.primaTumblelogPopover&&this.isLoggedIn()&&this.$el.hoverIntent({over:s.bind(this.showBlogCardPopover,this),out:s.noop,sensitivity:3}),s.extend(this.events,{"click [data-follow-button]":this.isLoggedIn()?"followClicked":this.redirect("/register?redirect_to=/"+this.options.pageUrl)}),this.delegateEvents(),this.bindEvents()},bindEvents:function(){this.listenTo(this.model,"change:following",this.onFollow)},render:function(){var e=s.extend(this.model.toJSON(),this.options);return this.$el.html(this.template(e)),this.cacheSelectors(),this},cacheSelectors:function(){this.$followButton=this.$el.find("[data-follow-button]"),this.$dismissButton=this.$el.find(".dismiss")},onFollow:function(e,t){this.$followButton.removeClass("hide"),this.$followButton.toggleClass("is-following",t),this.$dismissButton.toggle(!t)},onPeeprOpen:function(){n.trigger("useraction:click:peepr",{model:this.model,loggingData:this.loggingData({userAction:"posts"})})},logRow:function(e){"explore"===this.options.pageUrl&&n.trigger(e,{loggingData:{tumblelog:this.model.get("name"),position:this.$el.index()}})},triggerEvent:function(e,t){n.trigger("recommendedBlogs:"+e,{loggingData:t})},followClicked:function(e){e.preventDefault(),this.triggerEvent("follow",{tumblelog:this.model.get("name"),position:this.$el.index()}),this.logRow("tumblelog:log_follow"),this.model.follow({source:this.options.followSource,pt:this.model.get("pt")})},dismissClicked:function(){this.triggerEvent("dismiss",{userAction:"blog_dismissal"}),this.model.trigger("dismiss",this.model),n.trigger("useraction:dismiss:recommended_tumblelog",{model:this.model,loggingData:this.loggingData({userAction:"blog_dismissal"})})},showBlogCardPopover:function(){return this.popover&&this.popover.isRendered()?this:(this.logRow("TumblelogPopover:log_follow_open"),this.popover=new l({model:this.model,pinnedTarget:this.$el,shift:{x:-120,y:0}}),void this.popover.openPopover())}});e.exports=p},1361:function(e,t,i){"use strict";var s=i(187),o=i(180),n=new s({isLoggedIn:function(){return o.bool("is_logged_in")},redirect:function(e){return function(t){t.preventDefault(),window.location.href=e}},redirectLink:function(e){return e||(e="/register"),function(t){var i=t.currentTarget.attributes.href,s=e+"?redirect_to=";s+=i?encodeURIComponent(i.value):encodeURIComponent(window.location.href),t.preventDefault(),window.location.href=s}}});e.exports=n},1362:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){function print(){__p+=__j.call(arguments,"")}obj||(obj={});var __t,__p="",__e=.escape,__j=Array.prototype.join;with(obj)__p+='<a href="'+__e(url)+'" class="follow_list_item_blog blog'+__e(following?"":" has_follow_button")+__e(pt?" pt":"")+__e(wordedFollowButton?" has-worded-follow-button":"")+'" data-pt="'+__e(pt)+'" data-log-index="'+__e(sponsored?1:0)+'" data-peepr='{"tumblelog":"'+__e(name)+'"}'><div class="hide_overflow '+__e(following?"":" has_follow_button")+'"> '+__e(name)+'
'+__e(sponsored?"Sponsored":title)+'
',following||(__p+=" ",__p+=wordedFollowButton?' <a class="follow-button-right worded-follow-button" data-follow-button href="/follow/'+__e(name)+'" data-tumblelog-name="'+__e(name)+'" data-follow-source="'+__e(followSource)+'" data-peepr='{"tumblelog":"'+__e(name)+'"}'>><div class="follow-text" title="'+(null==(t=("Follow"))?"":__t)+'">'+(null==(t=("Follow"))?"":__t)+" ":' <a class="follow plus-follow-button" data-follow-button href="/follow/'+__e(name)+'" data-tumblelog-name="'+__e(name)+'" data-follow-source="'+__e(followSource)+'" title="'+(null==(t=("Follow"))?"":__t)+'"> ',__p+=" "),__p+=" ",dismissable&&(__p+='
');return __p}.toString()).apply(void 0,_values(_imports))},1363:function(e,t,i){"use strict";var s=i(3),o=i(136),n=i(219),a=i(1364),r=n.extend({tagName:"a",className:"sidebar_link avatar_align",template:a,defaults:{exploreLinkHref:"/explore",exploreLinkLabel:"Explore all of Tumblr"},events:{click:"onClick"},initialize:function(e){this.options=s.defaults(e,this.defaults),this.$el.attr({href:this.options.exploreLinkHref})},render:function(){return this.$el.html(this.template(this.options)),this},onClick:function(){o.trigger("explore-links:click",{loggingData:{source:"recommended-blogs-unit"}})}});e.exports=r},1364:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+=__e(exploreLinkLabel);return __p}.toString()).apply(void 0,_values(_imports))},1365:function(e,t,i){"use strict";var s=i(248),o=function(e){i.e(9,function(t){try{e(i(1366))}catch(e){s(e,"reblog-graph")}})};e.exports=o},1373:function(e,t,i){"use strict";var s=i(248),o=function(e){i.e(10,function(t){try{e(i(1374))}catch(e){s(e,"tour_guide")}})};e.exports=o},1377:function(e,t,i){"use strict";var s=i(3),o=i(214),n=i(136),a=i(8),r=i(1378),l=i(1379),u=o.extend({name:"RemnantAd",initialize:function(){var e=this.getOwnData();e&&this.inject(e),this.listenTo(n,"component:RemnantAd",this.inject)},$placeholderFor:function(e){return a("#remnant-units-"+e)},inject:function(e){e||(e=[]),s.forEach(e,function(e){var t=this.$placeholderFor(e.uuid).closest(".remnant-units");this.unit_left_view=new r({el:a(".post_brick:eq(0)",t)}),this.unit_right_view=new r({el:a(".post_brick:eq(1)",t)}),"square"!==e.alignment&&t&&(this.units_view=new l({el:t}))}.bind(this))}});e.exports=u},1378:function(e,t,i){"use strict";var s=i(3),o=i(219),n=i(136),a=i(180),r=o.extend({events:function(){var e={"click [data-remnant]":"_click"};return a.bool("dashboard_remnant_ad_dismiss")&&(e["click .dismiss"]="_dismiss"),e},initialize:function(){this.pt=this.$el.data("pt"),this.logIndex=this.$el.data("log-index")},_dismiss:function(){this.$el.addClass("dismissed"),n.trigger("remnant:dashboard:dismiss"),s.delay(s.bind(this._remove,this),500),this._logEvent("dismiss")},_logEvent:function(e){n.trigger("useraction:dashboard_click:remnant",{loggingData:{pt:this.pt,userAction:e,logIndex:this.logIndex}})},_remove:function(){o.prototype.remove.call(this)},_click:function(e){this._logEvent("click_thru")}});e.exports=r},1379:function(e,t,i){"use strict";var s=i(3),o=i(219),n=i(8),a=i(136),r=i(1380),l=o.extend({defaults:{minHeight:136},initialize:function(e){this.$unit_left=n(".post_brick:eq(0)",this.$el).addClass("left"),this.$unit_right=n(".post_brick:eq(1)",this.$el).addClass("right"),this._balanceMediaHeights(n(".ad_media",this.$unit_left),n(".ad_media",this.$unit_right)),this._balanceContentHeights(n(".content",this.$unit_left),n(".content",this.$unit_right)),this.$el.height(this.$unit_left.height()+20),a.on("remnant:dashboard:dismiss",this.checkContainer,this),this.fillerTemplate=r},checkContainer:function(){if(0===this.$(".post_brick:not(.dismissed)").length)this.$el.closest(".remnant-unit-container").addClass("remove"),s.delay(s.bind(function(){this.$el.closest(".remnant-unit-container").remove()},this),500);else{var e=4;this.$unit_right.hasClass("dismissed")?(this.$el.append(this.fillerTemplate({floatClass:"right"})),this.$(".empty-remnant").height(this.$unit_left.height()-e)):(this.$el.prepend(this.fillerTemplate({floatClass:"left"})),this.$(".empty-remnant").height(this.$unit_right.height()-e))}},_balanceContentHeights:function(e,t){e.outerHeight()<t.outerHeight()?e.add(t).outerHeight(parseInt(t.outerHeight(),10)):e.outerHeight()>t.outerHeight()&&t.add(e).outerHeight(parseInt(e.outerHeight(),10))},_balanceMediaHeights:function(e,t){var i=e.add(t);if(i.addClass("resized"),e.height()!==t.height()){var s=this._shortestHeight(e,t),o=s>this.defaults.minHeight?s:this.defaults.minHeight;i.height(o)}},_shortestHeight:function(e,t){return e.height()<=t.height()?e.height():t.height()}});e.exports=l},1380:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='
'+e(("For your relaxation, here is an empty hole."))+"
";return __p}.toString()).apply(void 0,_values(_imports))},1381:function(e,t,i){"use strict";var s=i(214),o=i(8),n=i(1382),a=s.extend({name:"TakeoverBanner",initialize:function(){var e=o(".takeover-container");e.length&&(this.takeover_banner_view=new n({el:e}))}});e.exports=a},1382:function(e,t,i){"use strict";var s=i(7),o=i(219),n=i(136),a=i(348),r=o.extend({mixins:[a],events:{"click .takeover-banner-link":"onBannerClick"},onBannerClick:function(e){var t=this.$el.data("pt"),i=this.$el.data("log-index");t&&(this.model=new s.Model({pt:t,"serve-id":t}),n.trigger("useraction:dashboard_click:takeover_banner",{loggingData:this.loggingData({userAction:"click_thru",logIndex:i})}))}});e.exports=r},1383:function(e,t,i){"use strict";var s=i(214),o=i(191),n=i(136),a=i(8),r=i(3),l=i(1384),u=i(1385),p=s.extend({name:"RecommendedBlog",initialize:function(){var e=this.getOwnData();e&&this.inject(e),this.listenTo(n,"component:RecommendedBlog",this.inject)},$placeholderFor:function(e){return a('#posts .recommended-blog-placeholder[data-recommended-blogs-id="'+e+'"]')},inject:function(e){r.isArray(e)?r.each(e,r.bind(this.injectSingleUnit,this)):this.injectSingleUnit(e)},injectSingleUnit:function(e){e||(e={});var t=r.map(e.blogs,function(e){return new o(e)}),i={el:this.$placeholderFor(e.uuid).closest(".recommended-unit-container"),blogs:t,blog_card_type:e.blog_card_type,tooltip_text:e.tooltip_text};"compact"===e.blog_card_type?new u(i):new l(i)}});e.exports=p},1384:function(e,t,i){"use strict";var s=i(219),o=i(136),n=i(8),a=s.extend({initialize:function(e){n(function(){o.trigger("component:DashboardBlogCard:attach_to_el",{$el:e.el,blogs:e.blogs})})}});e.exports=a},1385:function(e,t,i){"use strict";var s=i(219),o=i(136),n=i(1386),a=i(8),r=i(3),l=s.extend({template:n,events:{"click .post_dismiss":"remove"},initialize:function(e){this.options=r.extend({},e);var t=e.tooltip_text[Math.floor(Math.random()e.tooltip_text.length)],i={message:t};this.$el.append(this.template(i)),a(function(){o.trigger("component:DashboardBlogCard:attach_to_el",{$el:e.el,blogs:e.blogs,blog_card_type:e.blog_card_type})})},remove:function(){this.$el.addClass("remove");var e=r.map(this.options.blogs,function(e){return e.get("name")}).join(",");a.ajax({method:"POST",url:"/svc/search/log_dismissal",data:{tumblelog_names:e,page:"dashstreamblog"},withFormKey:!0}),r.delay(r.bind(s.prototype.remove,this),1e3)}});e.exports=l},1386:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='

'+e(("Some more blogs:"))+'

'+(null==(__t=message)?"":__t)+'
';return __p}.toString()).apply(void 0,values(imports))},1387:function(e,t,i){"use strict";var s,o=i(8),n=i(3),a=i(214),r=i(138),l=i(136),u=i(262),p=i(220).transition,d=i(180),c=a.extend({name:"AvatarManager",selector:"#posts",defaults:{topOffset:68,stickOffset:17,bottomOffset:132,avatarOffset:85,minWindowWidth:970,peeprDistance:100,avatarHeight:64},initialize:function(e){if(this.$posts=o(this.container),this.$postContainer=this.$posts.find(".post_container"),this.avatarClass=d.bool("one_true_post")?".post-header .post-avatar":".post_avatar",o(".site-notification").length){this.$posts.addClass("has-site-notifications");var t=o(".l-header-container");this.set("topOffset",t.offset().top+t.height()+this.get("stickOffset")),this.set("bottomOffset",this.get("topOffset")+this.get("avatarHeight"))}this.$postContainer.length&&this.bindAvatars()},bindAvatars:function(){this.stickySupport=this.detectStickySupport(),this.stickySupport===!0?this.listenTo(l,"postView:createPost",this.bindAvatarsWithPositionSticky):(this.$fixedAvatar=this.$posts.find(".post-avatar--fixed"),this.$fixedAvatar=this.$fixedAvatar.length?this.$fixedAvatar:null,this.$mainContainer=o(".l-container"),this.leftFixedPosition=this.$postContainer.offset().left-this.get("avatarOffset"),this.windowWidth=window.innerWidth,this.listenTo(l,"postView:createPost",this.bindAvatarsWithScrollmonitor),this.listenTo(l,"DOMEventor:flatresize",this.handleResize),this.listenTo(l,"DOMEventor:updateRect",function(){n.defer(this.triggerScrollMonitorUpdate)}),this.listenTo(l,"drawer:open",this.drawOpen),this.listenTo(l,"drawer:close",this.drawClose),this.listenTo(l,"peepr:open",this.drawOpen),this.listenTo(l,"peepr:close",this.drawClose),this.handleResize())},triggerScrollMonitorUpdate:function(){r.update()},detectStickySupport:function(){for(var e=["","-webkit-","-moz-","-ms-"],t=document.createElement("div"),i=0;i<e.length;i++)try{t.style.position=e[i]+"sticky"}catch(e){}return""!==t.style.position},fixAvatar:function(e){e.css({left:this.leftFixedPosition+"px"}).addClass("post-avatar--fixed").removeClass("post-avatar--absolute"),this.$fixedAvatar=e.length?e:null},stickAvatarToBottom:function(e){e.css({left:""}).removeClass("post-avatar--fixed").addClass("post-avatar--absolute"),e===this.$fixedAvatar&&(this.$fixedAvatar=null)},removeAvatarStyles:function(e){e.css({left:""}).removeClass("post-avatar--fixed").removeClass("post-avatar--absolute"),e===this.$fixedAvatar&&(this.$fixedAvatar=null)},bindAvatarsWithScrollmonitor:function(e){var t=n.get(e,"view"),i=t.$el.find(this.avatarClass);this.pixelatedAvatar(t);var s=d.bool("one_true_post")?t.$el:t.$el.parent(),o=r.create(s,{top:this.get("topOffset"),bottom:-this.get("bottomOffset")});o.stateChange(n.bind(function(){o.isInViewport?o.isInViewport&&o.isAboveViewport?(this.leftFixedPosition=this.$postContainer.offset().left-this.get("avatarOffset"),this.fixAvatar(i)):o.isAboveViewport?this.stickAvatarToBottom(i):this.removeAvatarStyles(i):o.isAboveViewport?this.stickAvatarToBottom(i):o.isBelowViewport&&this.removeAvatarStyles(i)},this)),o.triggerCallbacks()},drawOpen:function(){this.positionAvatarAbsolutely()},drawClose:function(){p(this.$mainContainer,n.bind(function(){this.positionAvatarFixed()},this))},positionAvatarAbsolutely:function(){if(null!==this.$fixedAvatar){var e=this.$fixedAvatar.closest(".post"),t=document.body.scrollTop-e.offset().top+this.get("topOffset");this.$fixedAvatar.css({left:-this.get("avatarOffset")+"px",position:"absolute",top:t+"px"})}},positionAvatarFixed:function(){null!==this.$fixedAvatar&&(this.$fixedAvatar.css({position:"",top:""}),setTimeout(n.bind(function(){this.handleResize()},this),0))},pixelatedAvatar:function(e){var t=e.$el.find(".pixelated-avatar");t.removeClass("hide").addClass("show"),u.drawPixelatedImages(e)},bindAvatarsWithPositionSticky:function(e){var t=n.get(e,"view");this.pixelatedAvatar(t),t.$el.find(this.avatarClass).addClass("post-avatar--sticky")},handleResize:function(){this.leftFixedPosition=this.$postContainer.offset().left-this.get("avatarOffset"),this.windowWidth=window.innerWidth,null!==this.$fixedAvatar&&this.$fixedAvatar.css({left:this.leftFixedPosition+"px"}),this.windowWidth<this.get("minWindowWidth")?this.$posts.addClass("post-avatar--static"):this.$posts.removeClass("post-avatar--static")}});e.exports=function(){return s||(s=new c),s}},1388:function(e,t,i){"use strict";var s=i(214),o=i(1389),n=s.extend({name:"Followers",view:o});e.exports=n},1389:function(e,t,i){"use strict";var s=i(226),o=i(8),n=i(3),a=i(130),r=i(212),l=i(262),u=i(213),p=i(191),d=s.extend({el:"#followers-list",events:{"click .follow_button":"onFollowClick",'click .follower [data-action="block"]':"onBlockClick","submit .is-user-friend":"onSubmit"},initialize:function(e){this.blogName=e.blogName;var t=this.$el.find(".pixelated-avatar");n.each(t,n.bind(function(e){o(e).removeClass("hide").addClass("show"),l.drawPixelatedImages(this)},this))},onFollowClick:function(e){e.preventDefault();var t=e.currentTarget.attributes["data-user-name"].value,i=new p({name:t});i.save_following({following:!0});var s=this.$("#loading"+t);o(e.currentTarget).hide(),s.hide()},onBlockClick:function(e){e.preventDefault();var t=e.currentTarget.attributes["data-user-name"].value,i={blockedTumblelog:t};r.confirmBlock(i).then(n.bind(this.blockBlog,this))},blockBlog:function(e){var t=new p({name:e});t.block().then(n.bind(this.afterBlock,this,e))},afterBlock:function(e){var t=this.$("[data-user-name='"+e+"']");t.closest(".follower").remove()},onSubmit:function(e){e.preventDefault();var t=this.$(".user-to-check-for").val();if(t===this.blogName)return u.alert(a("That's you!")),!1;this.loader=this.$(".check-if-user-is-friend-loader"),this.bubble=this.$(".user-is-friend-bubble"),this.otherMessage=this.$(".other-message"),setTimeout(n.bind(this.hideFriendTimer,this),4e3),this.loader.show();var i=o.ajax({url:"/svc/blog/followed_by",type:"GET",data:{tumblelog:this.blogName,query:t}});i.always(n.bind(function(){this.loader.hide()},this)),i.done(n.bind(function(e){var t=e.response.message;this.otherMessage.text(t),this.bubble.show(),this.otherMessage.show()},this)),i.fail(n.bind(function(e){var t=o.parseJSON(e.responseText);this.otherMessage.text(t.response),this.bubble.show(),this.otherMessage.show()},this))},hideFriendTimer:function(){this.bubble.hide(),this.otherMessage.hide()}});e.exports=d},1390:function(e,t,i){"use strict";var s,o=i(3),n=i(136),a=i(214),r=i(129),l=i(1391),u=a.extend({name:"RapidPostRecommendations",viewsLeft:0,defaults:{viewLimit:3},initialize:function(e){var t=r.get("Components/RapidRecommendations");t&&(this.postsWithRecs=t.posts||[],this.options=o.defaults(e||{},this.defaults),this.viewsLeft=this.options.viewLimit,this.bindEvents())},bindEvents:function(){this.listenTo(n,"post:like:set",this.handlePostLike),this.listenTo(n,"post:like:success",this.handlePostLike),this.listenTo(n,"post:fastreblog:set post:reblog:set",this.handlePostReblog),this.listenTo(n,"component:RapidRecommendations",this.onDashboardAjax)},handlePostLike:function(e,t,i){var s="keyboard"===i||"mouse"===i;s&&this.handleAction({model:t,action:"like"})},handlePostReblog:function(e){this.handleAction({model:e.model,action:"reblog"})},handleAction:function(e){var t=e.model,i=this.getRecommendationData(t),s=this.viewsLeft<=0;if(i&&!s){if(this.subview){if(this.subview.model.id===t.get("root_id"))return;this.subview.remove()}this.addSubview(new l({likePostModel:t,recData:i,action:e.action}))}},getRecommendationData:function(e){var t=e.get("root_id");return this.postsWithRecs[t]},onDashboardAjax:function(e){this.viewsLeft=this.options.viewLimit,this.postsWithRecs=o.merge(this.postsWithRecs,e.posts)},addSubview:function(e){o.isFunction(e.canViewDock)&&!e.canViewDock()||(this.subview=e,this.viewsLeft--,this.listenToOnce(this.subview,"remove",this.removeSubview))},removeSubview:function(){this.subview=null}});e.exports=function(){return s||(s=new u),s}},1391:function(e,t,i){"use strict";var s=i(3),o=i(8),n=i(130),a=i(219),r=i(136),l=i(277),u=i(1392),p=i(1393),d=i(1394),c=a.extend({className:"rapid-recs-container",mixins:[l],template:p,defaults:{postCount:4,timeout:5e3},$$cacheKeys:{"rapid-recs":".rapid-recs"},events:{"click .post_micro":"onPostClick","click .close":"onCloseClick"},initialize:function(e){return this.options=s.defaults(e,this.defaults),this.model=new d({},{sourcePostModel:this.options.likePostModel,recData:this.options.recData}),this.$postEl=o('[data-pageable="post'+this.options.likePostModel.id+'"]'),this.$postEl.length?(this.$postEl.append(this.$el),this.titleText=u.getTitle(this.options.action),s.bindAll(this,"removeFadeOut"),this.bindEvents(),this.model.fetch({timeout:this.options.timeout}),void(this._loadStartTime=Date.now())):void this.destroy()},render:function(){if(this.model.get("posts").length<this.options.postCount)return this.log("post-underserved"),this;var e={model:this.model.toJSON(),postCount:this.options.postCount,title:n(this.titleText)};return this.$el.html(this.template(e)),this._visible=!0,this._openTime=Date.now(),this._openCount=1,this.logPostsServed(),window.requestAnimationFrame?requestAnimationFrame(this.removeFadeOut):s.defer(this.removeFadeOut),this},removeFadeOut:function(){this.$$(".rapid-recs").removeClass("fade-out")},bindEvents:function(){this.listenTo(this.model,"sync",this.render),this.listenTo(this.model,"error",this.onModelError)},toggleVisibility:function(e){var t=Date.now();e!==this._visible&&(this.$$(".rapid-recs").toggleClass("fade-out",!e),this._visible=e,e?(this._openTime=t,this._openCount++,this.log("show",{open_count:this._openCount})):this.log("hide",{duration:t-this._openTime,open_count:this._openCount}))},destroy:function(){this.toggleVisibility(!1),this.trigger("remove"),s.delay(s.bind(a.prototype.remove,this),300)},onPostClick:function(e){var t=o(e.currentTarget);this.log("post-click",{post_id:t.data("id"),blogname:t.data("tumblelog")}),this.listenToOnce(r,"peepr:open",this.onPeeprOpen),this.listenToOnce(r,"peepr:close",this.onPeeprClose)},onPeeprOpen:function(){this.$el.prependTo("body"),this.$el.addClass("peepr-open")},onPeeprClose:function(){this.$el.removeClass("peepr-open"),this.$postEl.append(this.$el)},onCloseClick:function(){this.log("dismiss-click",{served_post_ids:this.servedPostIds()}),this.destroy()},onModelError:function(e,t){this.log("ajax-error",{xhr_status:t.statusText})},logPostsServed:function(){this.log("posts-served",{served_post_ids:this.servedPostIds(),fetch_time:Date.now()-this._loadStartTime})},servedPostIds:function(){if(this._servedPostIds)return this._servedPostIds;var e=this.model.get("posts").slice(0,this.options.postCount);return this._servedPostIds=s.pluck(e,"post_id"),this._servedPostIds},log:function(e,t){var i={loggingData:s.defaults({root_post_id:this.model.id,root_blogname:this.model.getRootblogName(),title_text:this.titleText||""},t||{})};r.trigger("rapid-recommendations:"+e,i)}});e.exports=c},1392:function(e,t,i){"use strict";var s=i(3),o=i(130),n=i(215),a=n.extend({titles:{like:[o("You might like these, too"),o("More you might like"),o("These are good, too"),o("Try these, maybe"),o("For your consideration"),o("Also worth your time"),o("Since you liked that")],reblog:[o("Other excellent posts"),o("Try these, eh?"),o("For your consideration"),o("Reblog-worthy stuff"),o("Since you reblogged that"),o("Since you're into that")]},getAllTitles:function(){return s.flatten(s.values(this.titles))},getTitle:function(e){return e?s.sample(this.titles[e]):s.sample(this.getAllTitles())}});e.exports=new a},1393:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){function print(){__p+=__j.call(arguments,"")}obj||(obj={});var __t,__p="",__e=.escape,__j=Array.prototype.join;with(obj){__p+='

'+__e(title)+':

    ';for(var i=0;i<postCount;i++)__p+='
  • '+(null==(__t=model.posts[i].html)?"":__t)+"
  • ";__p+="
"}return p}.toString()).apply(void 0,values(imports))},1394:function(e,t,i){"use strict";var s=i(3),o=i(185),n=o.extend({urlRoot:"/svc/related/posts/",initialize:function(e,t){this.sourcePostModel=t.sourcePostModel,this.id=this.sourcePostModel.get("root_id"),this.recData=t.recData},url:function(){return this.urlRoot+this.getRootblogName()+"/"+this.id},getRootblogName:function(){return this.sourcePostModel.rootTumblelog?this.sourcePostModel.rootTumblelog.id:this.sourcePostModel.tumblelog.id},parse:function(e){return this.recData.ignore_list.length&&(e.response.posts=s.reject(e.response.posts,function(e){return this.recData.ignore_list.indexOf(e.post_id)>-1},this)),e.response}});e.exports=n},1395:function(e,t,i){"use strict";var s=i(214),o=i(136),n=i(831),a=i(1396),r=s.extend({name:"promoteDrawer",defaults:{canOpen:!0},initialize:function(){this.drawerManager=n(),this.bindEvents()},bindEvents:function(){this.listenTo(this.drawerManager,"open:promote-drawer",this.open),this.listenTo(o,"promote-drawer:close",this.close)},close:function(){this.drawerManager.close()},open:function(e){this.drawerManager.canOpen()?this.drawerManager.open(a,e):this.drawerManager.close()}});e.exports=r},1396:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(130),a=i(129),r=i(136),l=i(230),u=i(289),p=i(235),d=i(945),c=i(1323),h=i(1328),m=i(1397),=i(1399),f=i(1401),g=i(1403),b=i(1405),v=i(1407),y=i(1409),w=i(1411),k=i(1412),x=i(1413),C=c.extend({mixins:[l,u],templates:{layout:w},className:"promote-form",defaults:{hostUrl:"https://gemini.yahoo.com/internal/advertiser/",isReverse:!1,count:0,gap:195},events:{"keypress .new-post-field":"createOnEnter","click .close":"drawerClose","click .back":"goToPreviousView","click .next":"goToNextView"},saveData:function(e){this.templateAttributes.YAMID=e,s.ajax({url:"/svc/promoteflow",type:"POST",withFormKey:!0,data:{yam_id:e,blog_id:this.templateAttributes.channel_id}})},goToPreviousView:function(){this.isReverse=!0,this.goToNextView()},initialize:function(e){e=e||{},c.prototype.initialize.call(this,e),this.stepmodel=new k,this.postCollection=new x,this.VIEW_TYPES={PROMOTE_MENU:0,LIST_POST:1,LIST_IFRAME:2},this.listenTo(this.postCollection,"add",this.addOne),this.listenTo(r,"promotiondrawer:update:count",this.updateCount),this.listenTo(r,"promotiondrawer:update:avatar",this.updateAvatar),this.listenTo(r,"promotiondrawer:view:back",this.goToPreviousView),this.listenTo(r,"promotiondrawer:view:addpost",this.addNewPost),this.listenTo(this.stepmodel,"change:step",this.updateStep),this.fillTemplateAttributes()},updateAvatar:function(){this.addAvatars(this.postCollection.promoted())},toggleLoading:function(e){this.$loader.toggle(e),this.$input.prop("disabled",e)},loadPostsContent:function(){this.listJSONPost="",s.ajax({url:"/svc/indash_blog",withFormKey:!0,data:{tumblelog_name_or_id:this.templateAttributes.channel_name,limit:10,has_reblog:!1},success:o.bind(function(e){this.toggleLoading(!1),this.listJSONPost=e.response.posts,0===this.listJSONPost.length&&s(".nopost-error-tag").removeClass("hidden"),this.loadJSONPost()},this)})},loadSinglePost:function(e){this.singlePost=!0,this.listJSONPost="",s.ajax({url:"/svc/indash_blog",withFormKey:!0,data:{tumblelog_name_or_id:this.templateAttributes.channel_name,post_id:e},success:o.bind(function(e){this.listJSONPost=e.response.posts,this.$input.val(""),this.loadJSONPost()},this)})},loadJSONPost:function(){o.each(this.listJSONPost,function(e){var t=s(e);t[0].channel_id=this.templateAttributes.channel_id,t[0].channel_avatar=this.templateAttributes.channel_avatar,t[0].channel_name=this.templateAttributes.channel_name,t[0].channel_url=this.templateAttributes.channel_url,this.singlePost?"undefined"!=typeof t[0].reblogged_from_name?(r.trigger("drawerform:errortag:show",{field:this.$postlist,text:n("Reblogged post cannot be sponsored")}),setTimeout(o.bind(function(){r.trigger("drawerform:errortag:remove",{field:this.$postlist})},this),3e3)):(this.postCollection.unshift(t[0]),this.postCollection.first().toggle(!0)):this.postCollection.add(t[0])},this),s(".loader").fadeOut(), this.$video=this.$("video[data-crt-video]"),d.playerFactory(this.$video,{attributes:{autoplay:!0}})},goToNextView:function(){if(this.isReverse)return void this.setCount();var e=this.$promoteMenuContainer.find(".yamid-select"),t=e.val().trim(),i=this.$promoteMenuContainer.find(".promote-tab").hasClass("active");switch(this.count=this.stepmodel.get("step"),this.count){case this.VIEW_TYPES.PROMOTE_MENU:if(!i&&!this.count)return void r.trigger("drawerform:errortag:show",{field:s(".promote-tab"),text:o("Please pick a category")});if(!(o.isFinite(o.parseInt(t))&&t>=0)&&this.count<=0)return void r.trigger("drawerform:errortag:show",{field:e,text:n("Oops. This needs to be a number. Try again.")});if(this.saveData(t),s("#promote-blog").hasClass("active"))return void this.generateLink(!0,t);this.setCount();break;case this.VIEW_TYPES.LIST_POST:if(this.promoted=this.postCollection.promoted(),0===this.promoted.length)return void r.trigger("drawerform:errortag:show",{field:this.$postlist,text:n("You need to select at least one post")});r.trigger("drawerform:errortag:remove",{field:this.$postlist}),this.setCount();break;case this.VIEW_TYPES.LIST_IFRAME:this.generateLink(!1,!1)}},removeErrorTags:function(){var e=this.$promoteMenuContainer.find(".text_field"),t=s(".promote-tab"),i=this.$postlist;e&&r.trigger("drawerform:errortag:remove",{field:e}),t&&r.trigger("drawerform:errortag:remove",{field:t}),i&&r.trigger("drawerform:errortag:remove",{field:i})},setCount:function(){this.count=this.isReverse?this.count-1:this.count+1,this.stepmodel.set("step",this.count)},fillTemplateAttributes:function(){var e=a.get("Components/PromoteForm")||{};this.templateAttributes=o.pick(e,"title","description","posts","channel_name","channel_id","YAMIDs","selected_yam_id","channel_avatar"),o.extend(this.templateAttributes,{iframeview:"",channel_url:this.templateAttributes.channel_name+".tumblr.com"})},drawerClose:function(){r.trigger("promote-drawer:close")},initFirstView:function(){"undefined"==typeof this.promotemenu&&(this.promotemenu=new m(this.templateAttributes),this.promotemenu.render()),this.setview(this.promotemenu,"firstview",!1),this.newview.css("opacity",1)},updateStep:function(){this.step=this.stepmodel.get("step"),this.currentView&&(s(".iframe-container .scroll-bar-container").empty(),this.animationOut()),this.removeErrorTags()},switchview:function(){switch(this.step){case this.VIEW_TYPES.PROMOTE_MENU:this.initFirstView(),this.newview.css("opacity",0);break;case this.VIEW_TYPES.LIST_POST:var e="undefined"==typeof this.listposts;e&&(this.listposts=new b(this.templateAttributes),this.listposts.render()),this.setview(this.listposts,"secondview",!0),this.$loader=this.$(".loader .Knight-Rider-loader"),this.$postlist=this.$(".post-list"),this.plusicon=s(".plus-button"),e&&(this.$input=this.$(".new-post-field"),this.toggleLoading(!0),this.loadPostsContent());break;case this.VIEW_TYPES.LIST_IFRAME:"undefined"==typeof this.campaign&&(this.campaign=new v(this.templateAttributes),this.campaign.render()),this.setview(this.campaign,"thirdview",!0)}this.animationIn()},setview:function(e,t,i){var s=this.$(".footer-form");this.currentView=e,this.newview=e.$el.insertAfter(this.$(".form-header")),this.newview.css("opacity",0),this.$form.removeClass(),this.$form.addClass("form-container "+t),i?s.addClass("sticky"):(s.insertAfter(this.newview),s.removeClass("sticky"))},animationOut:function(){p.animate(this.currentView.$el,{translateX:[this.isReverse?"100%":"-100%",0],opacity:[0,1]},{duration:100,easing:"easeOut",complete:o.bind(function(e){this.switchview(),this.isReverse&&(this.isReverse=!1)},this)})},animationIn:function(){p.animate(this.newview,{translateX:[0,this.isReverse?"-100%":"100%"],opacity:[1,0]},{duration:200,easing:"easeIn",complete:o.bind(function(e){this.step===this.VIEW_TYPES.LIST_IFRAME&&this.addIframes()},this)})},verifyIfPostExist:function(e){if(this.$scrollbar=this.$(".scroll-bar-container"),this.$scrollbar.scrollTop(0),0!==this.postCollection.length){var t=this.postCollection.get(parseInt(e,10));return!!t&&(t.toggle(!0),this.lastElementTop=s(".scroll-bar-container .item"+t.id).position().top-this.get("gap"),this.$scrollbar.animate({scrollTop:this.lastElementTop}),!0)}return!1},generateLink:function(e,t){var i=this.$el.find(".type").val(),n=this.$el.find(".site").val(),a=[],r="selector",l=t?t:this.templateAttributes.YAMID,u=this.postCollection.promoted();0!==u.length&&o.each(u,function(e){var t=s(e);a.push(t[0].id)},this),a=a.join(","),e&&(i="F",n="T",a="",r="new");var p=this.getYamLandingPageUrl(l,i,a,n,r);window.open(p)},createUrl:function(e){return this.get("hostUrl")+e},getYamLandingPageUrl:function(e,t,i,o,n){var a=s.param({cma:t,cms:o,cmp:i,cmu:this.templateAttributes.channel_name}),r="/tumblr/"+n+"?";return this.createUrl(e)+r+a},addIframes:function(){var e=this.postCollection.promoted();0!==e.length&&o.each(e,function(e){var t=s(e);this.addOneIframe(t[0])},this)},addOne:function(e){s(".nopost-error-tag").addClass("hidden");var t=new f({model:e});this.singlePost?this.$postlist.prepend(t.render().el):this.$postlist.append(t.render().el)},addOneAvatar:function(e){var t=new g({model:e});s(".avatar-list").append(t.render().el)},addAvatars:function(e){s(".avatar-list").empty(),o.each(e,function(e){var t=s(e);this.addOneAvatar(t[0])},this),this.plusicon.appendTo(".avatar-list")},addOneIframe:function(e){var t=new y({model:e,type:s(".type").val()});s(".iframe-container .scroll-bar-container").append(t.$el)},createOnEnter:function(e){13===e.which&&this.$input.val().trim()&&this.addNewPost()},addNewPost:function(){var e=this.$input.val().trim();if(e.match(//post/([0-9]+)/)){var t=e.match(//post/([0-9]+)/);this.verifyIfPostExist(t[1])||this.loadSinglePost(t[1])}else o.isFinite(o.parseInt(e))&&e>=0&&(this.verifyIfPostExist(e)||this.loadSinglePost(e))},updateCount:function(){var e=this.postCollection.promoted();o.each(e,function(e,t){var i=s(e);i[0].set("numberChecked",t+1)},this)},render:function(){return this.$el.append(this.templates.layout(this.templateAttributes)),this.$footer=this.$(".footer-form"),this.$form=this.$(".form-container"),this.$promoteMenuContainer=this.$(".promote-menu-container"),this.header=new h({title:this.templateAttributes.title,description:this.templateAttributes.description}),this.$el.append(this.header),this.header.render().$el.insertBefore(this.$promoteMenuContainer),this.footer=new _,this.footer.render().$el.insertBefore(this.$promoteMenuContainer),this.stepmodel.set("step",0),this.initFirstView(),this.$promoteMenuContainer=this.$(".promote-menu-container"),this}});e.exports=C},1397:function(e,t,i){"use strict";var s=i(8),o=i(130),n=i(219),a=i(136),r=i(1398),l=n.extend({className:"promote-menu-container",events:{"click .promote-tab":"toggleTab","change select":"updateSelectLabel"},initialize:function(e){return e=e||{},this.templateAttributes={:o,YAMIDs:"undefined"!=typeof e.YAMIDs?e.YAMIDs:[],selected_yam_id:"undefined"!=typeof e.selected_yam_id?e.selected_yam_id:""},this},render:function(){return this.$el.html(r(this.templateAttributes)),this},toggleTab:function(e){e.preventDefault(),s(".promote-tab").removeClass("active"),s(e.currentTarget).addClass("active"),a.trigger("drawerform:errortag:remove",{field:s(".promote-tab")})},updateSelectLabel:function(e){var t=s(e.currentTarget);t.siblings(".current_selection").text(t.children(":selected").text())}});e.exports=l},1398:function(module,exports,webpack_require){var _=webpack_require(3),imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(keys(imports),"return "+function(obj){function print(){__p+=__j.call(arguments,"")}obj||(obj={});var __t,__p="",__e=.escape,__j=Array.prototype.join;with(obj)__p+='

'+__e(("Yahoo Ad Manager ID"))+'

',.forEach(YAMIDs,function(e){__p+=" ",__p+=e===selected_yam_id?' '+__e(e)+" ":' '+__e(e)+" ",__p+=" "}),__p+=' '+__e(selected_yam_id)+'

'+e(("Don't have a login? Contact your brand specialist."))+"

";return p}.toString()).apply(void 0,_values(_imports))},1399:function(e,t,i){"use strict";var s=i(8),o=i(130),n=i(219),a=i(136),r=i(1400),l=n.extend({className:"footer-form",events:{"click .avatar-container .title":"toggle","click .avatar-list .plus-button":"goback"},initialize:function(e){return e=e||{},this.templateAttributes={:o},this},goback:function(){a.trigger("promotiondrawer:view:back")},render:function(){return this.$el.html(r(this.templateAttributes)),this.$el.find(".avatar-content").hide(),this},toggle:function(){s(".avatar-content").toggle("slow")}});e.exports=l},1400:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='
'+e(("Selected Posts"))+'

    '+e(("Cancel"))+' '+e(("Continue"))+'
    ';return __p}.toString()).apply(void 0,_values(imports))},1401:function(e,t,i){"use strict";var s=i(219),o=i(1402),n=s.extend({tagName:"li",template:o,events:{click:"togglepost"},initialize:function(e){this.listenTo(this.model,"change",this.render)},render:function(){return this.$el.html(this.template(this.model.attributes)),this.$el.toggleClass("promoted",this.model.get("promoted")),this.$(".post_permalink").remove(),this.$input=this.$(".edit"),this.$el.addClass("item"+this.model.get("id")),this},togglepost:function(){this.model.toggle()}});e.exports=n},1402:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(keys(imports),"return "+function(obj){function print(){__p+=__j.call(arguments,"")}obj||(obj={});var __t,__p="",__e=.escape,__j=Array.prototype.join;with(obj)__p+='
    '+__e(numberChecked)+'
    '+__e(channel_name)+" ","undefined"!=typeof reblogged_from_name&&(__p+=' '+__e(reblogged_from_name)+" ","undefined"!=typeof reblogged_from_followed&&reblogged_from_followed===!1&&(__p+=' <a href="/follow/'+__e(reblogged_from_name)+'" class="reblog_follow_button" data-tumblelog-name="'+__e(reblogged_from_name)+"" title="- _('Follow') ?> "+__e(reblogged_from_name)+'">- _(\'Follow\') ?> '),__p+=" "),__p+='
    '+(null==(__t=post_html)?"":__t)+'
    ',.isObject(notes)&&(__p+='
    <div class="post_notes_label note_count '+__e(notes.count<=0?"no_notes":"")+'"> // Note Count ?> '+__e(notes.current)+"
    "),__p+="
    ";return __p}.toString()).apply(void 0,_values(_imports))},1403:function(e,t,i){"use strict";var s=i(219),o=i(1404),n=s.extend({tagName:"li",className:"item",render:function(){return this.$el.html(o(this.model.toJSON())),this}});e.exports=n},1404:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='';return p}.toString()).apply(void 0,_values(_imports))},1405:function(e,t,i){"use strict";var s=i(130),o=i(219),n=i(136),a=i(1406),r=o.extend({className:"posts-form-container",events:{"click .icon_plus":"addPost"},initialize:function(e){return e=e||{},this.templateAttributes={:s},this},render:function(){return this.$el.html(a(this.templateAttributes)),this},addPost:function(){n.trigger("promotiondrawer:view:addpost")}});e.exports=r},1406:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='
    <input class="new-post-field" class="text_field" placeholder="'+e(("Enter the Post ID or URL of the content you wish to sponsor"))+'" value="">
    '+e(("Blog Posts"))+'

    '+e(("None of the last 10 posts on this blog are eligible to be sponsored, please enter the ID or URL for the post you wish to sponsor."))+'

      ';return p}.toString()).apply(void 0,_values(_imports))},1407:function(e,t,i){"use strict";var s=i(130),o=i(219),n=i(8),a=i(136),r=i(1408),l=i(289),u=o.extend({className:"campaign-container",mixins:[l],initialize:function(e){return e=e||{},this.templateAttributes={:s,channel_avatar:"undefined"!=typeof e.channel_avatar?e.channel_avatar:"",channel_name:"undefined"!=typeof e.channel_name?e.channel_name:"",channel_url:"undefined"!=typeof e.channel_url?e.channel_url:""},this},render:function(){this.$el.html(r(this.templateAttributes)),this.setUpSelector(this.$el.find(".type")),this.setUpSelector(this.$el.find(".site")),this.setUpSelector(this.$el.find(".device-select")),this.setUpSelector(this.$el.find(".radar-select"));var e=this.$el.find(".type");return e.change(function(){a.trigger("promotiondrawer:type:update",{data:n(this).val()})}),this}});e.exports=u},1408:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='
      '+__e(channel_name)+'
      '+_e(channel_url)+'
      '+e(("Campaign"))+'

      '+e(("Type"))+'

      '+e(("Cost per install"))+' '+e(("Cost per engagement"))+' '+e(("Cost per view"))+' '+e(("Cost per impression"))+''+e(("Cost per engagement"))+'

      '+e(("Site"))+'

      '+e(("Tumblr"))+' '+e(("Yahoo + Tumblr"))+''+e(("Tumblr"))+'
      '+e(("Post Preview"))+'
      ';return p}.toString()).apply(void 0,_values(_imports))},1409:function(e,t,i){"use strict";var s=i(130),o=i(3),n=i(219),a=i(8),r=i(289),l=i(136),u=i(1410),p=n.extend({className:"iframe-item",mixins:[r],events:{"change [data-validate-input]":"onFieldInputChange"},initialize:function(e){return e=e||{},this.templateAttributes={:s,PLACEMENT_DASH_RADAR:"10",PLACEMENT_INSTREAM_WEB:"20",PLACEMENT_INSTREAM_MOBILE:"21",PLACEMENT_INSTREAM_MOBILE_CPI:"22",uri:"undefined"!=typeof e.uri?e.uri:"",placement_location:"20",externalIframeUrl:"",id:this.model.id,selectoption:s("Web"),iframeUrl:""},this.render(),this.generateIframe(),this.listenTo(l,"promotiondrawer:type:update",this.updatetype),this},toggleLoading:function(e){this.$loader.toggle(e)},updatetype:function(e){e||(e={}),this.templateAttributes.placement_location=this.templateAttributes.PLACEMENT_INSTREAM_WEB,this.generateIframe()},generateIframe:function(){this.setvaluedropdown(),a.ajax({url:"/svc/promoteflow/adpreview",type:"POST",withFormKey:!0,data:{post_id:this.model.id,blog_id:this.model.get("channel_id"),post_url:this.model.get("post_url"),type:this.templateAttributes.type},success:o.bind(function(e){this.templateAttributes.uri=e.response.uri,this.templateAttributes.uriPreview=e.response.uripreview,this.loadiframe()},this)})},loadiframe:function(){this.setUpSelector(this.$el.find(".device-select")),this.setvaluedropdown(),this.render(),this.toggleLoading(!1);var e="preview
      "+this.model.id;null!==typeof document.getElementById(e)&&(window.addEventListener("message",function(t){var i=JSON.stringify(t.data);i=i.split(":")[0],i=i.replace(/[^\w\s]/gi,""),"height"===i&&(document.getElementById(e).style.height=t.data.split(":")[1]+"px")}),document.getElementById(e).onload=o.bind(function(e){var t=e.target.contentWindow.document.body.offsetHeight;this.$el.find(".preview_frame").css("height",t)},this))},setvaluedropdown:function(){this.templateAttributes.placement_location===this.templateAttributes.PLACEMENT_DASH_RADAR?(this.templateAttributes.type="web_radar",this.templateAttributes.iframeUrl="/dashboard/radar/iframe?"+this.templateAttributes.uri,this.templateAttributes.externalIframeUrl="/ad_preview/mb_iframe?"+this.templateAttributes.uriPreview,this.templateAttributes.selectoption=s("Radar")):this.templateAttributes.placement_location===this.templateAttributes.PLACEMENT_INSTREAM_MOBILE?(this.templateAttributes.type="mobile_instream",this.templateAttributes.iframeUrl="/dashboard/radar/iframe?is_mobile=true&"+this.templateAttributes.uri,this.templateAttributes.externalIframeUrl="/ad_preview/mb_iframe?"+this.templateAttributes.uriPreview,this.templateAttributes.selectoption=s("Mobile")):this.templateAttributes.placement_location===this.templateAttributes.PLACEMENT_INSTREAM_WEB&&(this.templateAttributes.type="web_instream",this.templateAttributes.iframeUrl="/dashboard/post/iframe?"+this.templateAttributes.uri,this.templateAttributes.externalIframeUrl="/ad_preview/mb_iframe?"+this.templateAttributes.uriPreview,this.templateAttributes.selectoption=s("Web"))},render:function(){this.$el.html(u(this.templateAttributes)),this.$loader=this.$(".loader");var e=this.$el.find("option[value="+this.templateAttributes.placement_location+"]");e.attr("selected","selected");var t=this.$el.find(".device-select");return t.change(o.bind(function(e){this.templateAttributes.placement_location=a(e.target).val(),this.generateIframe()},this)),this}});e.exports=p},1410:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){function print(){__p+=__j.call(arguments,"")}obj||(obj={});var __t,__p="",__e=.escape,__j=Array.prototype.join;with(obj)__p+='

      '+e(("Select Device"))+'

      '+e(("Web"))+' '+e(("Mobile"))+' '+e(("Radar"))+''+__e(selectoption)+"
      ","undefined"!=typeof externalIframeUrl&&(__p+='
      <a href="'+(null==(__t=externalIframeUrl)?"":__t)+'" target="_blank" class="help_text">'+e(("View post in separate window"))+"
      "),__p+="
      ",""!=typeof iframeUrl&&(__p+='
      ',"undefined"!=typeof uri&&placement_location==PLACEMENT_DASH_RADAR&&(_p+='
      <iframe class="preview_frame" id="preview'+(null==(__t=id)?"":__t)+'" frameborder="0" allowtransperency="true" scrolling="no" src="'+__e(iframeUrl)+'"></iframe>
      '),__p+=" ","undefined"==typeof uri||placement_location!=PLACEMENT_INSTREAM_MOBILE&&placement_location!=PLACEMENT_INSTREAM_MOBILE_CPI||(_p+='
      <iframe class="preview_frame" id="preview'+(null==(__t=id)?"":__t)+'" frameborder="0" allowtransperency="true" scrolling="no" src="'+__e(iframeUrl)+'"></iframe>
      '),__p+=" ","undefined"!=typeof uri&&placement_location==PLACEMENT_INSTREAM_WEB&&(__p+='
      <iframe class="preview_frame" frameborder="0" allowtransperency="true" scrolling="no" id="preview_'+__e(id)+'" src="'+__e(iframeUrl)+'"></iframe>
      '),__p+="
      "),__p+='
      ';return __p}.toString()).apply(void 0,_values(_imports))},1411:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='
      ';return __p}.toString()).apply(void 0,_values(_imports))},1412:function(e,t,i){"use strict";var s=i(185),o=s.extend({defaults:{step:0}});e.exports=o},1413:function(e,t,i){"use strict";var s=i(190),o=i(1414),n=s.extend({model:o,promoted:function(){return this.filter(function(e){return e.get("promoted")})}});e.exports=n},1414:function(e,t,i){"use strict";var s=i(3),o=i(185),n=i(136),a=o.extend({defaults:{promoted:!1,numberChecked:0},toggle:function(e){var t=this.get("thumbnail_url"),i=!!e||!this.get("promoted");this.set("promoted",i),this.get("photos")&&this.get("photos")[0].alt_sizes&&(t=s.filter(this.get("photos")[0].alt_sizes,function(e){return 75===e.width}),t=t[0].url?t[0].url:""),i&&this.set("numberChecked",0),this.set("postPreviewURL",t),n.trigger("promotiondrawer:update:avatar"),n.trigger("promotiondrawer:update:count")}});e.exports=a},1415:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(214),a=i(1416),r=i(1424),l=n.extend({name:"MobileAppBanner",defaults:{type:"download-banner"},initialize:function(e){this.options=o.extend(this.defaults,e||{})},render:function(){return this.data&&(o.extend(this.data,this.options),this.data.is_redpop_banner?this.bannerView=(new r).render().el:(this.data.has_app||"app-gate"===this.options.type)&&(this.bannerView=new a(this.data).render().el),s(this.options.attachTo).append(this.bannerView)),this}});e.exports=l},1416:function(e,t,i){"use strict";var s=i(3),o=i(219),n=i(342),a=i(8),r=i(276),l=i(230),u=i(1417),p=i(1418),d=i(1420),c=i(1422),h=o.extend({className:"mobile-app-banner",mixins:[r,l],events:{"click .open.mobile-banner-button":"__clickOpen","click .mobile-banner-close":"__clickClose"},template:u,__clickOpen:function(e){if(this.isIos()&&!this.isAtLeastIos9()){e.preventDefault();var t=e.target.href;this.openInAppOrStore(t)}},__clickClose:function(e){e.preventDefault(),this.closeBanner(),this.setCookie(),this.hideBanner()},closeBanner:function(){this.$el.remove()},setCookie:function(){var e=new Date;e.setDate(e.getDate()+3),n.set("hide_download_app_prompt","1",e)},showBanner:function(){a(document.documentElement).addClass("mobile-app-banner-visible")},hideBanner:function(){a(document.documentElement).removeClass("mobile-app-banner-visible")},isIos:function(){var e=this.attributes.handset;return"iphone"===e||"ipad"===e},getMajorIosVersion:function(){var e=/\bOS ([0-9]+)/g.exec(navigator.userAgent);return!!(this.isIos()&&e&&2===e.length&&e[1])&&parseInt(e[1],10)},isAtLeastIos9:function(){return this.getMajorIosVersion()>=9},openInAppOrStore:function(e){var t="itms-apps://itunes.com/apps/tumblr/tumblr",i=document.getElementById("app_protocol_check")||document.createElement("iFrame");i.setAttribute("id","app_protocol_check"),i.style.display="none",document.body.appendChild(i),i.src=e,setTimeout(function(){document.location.href=t},1e3)},initialize:function(e){s.extend(this.attributes,e),this.$el.addClass(this.get("type")),"app-gate"===this.get("type")?this.get("has_app")?this.subViews.bannerInternals=new d(e):this.subViews.bannerInternals=new c(e):this.subViews.bannerInternals=new p(e)},render:function(){return!n.get("hide_download_app_prompt")&&(this.showBanner(),this.$el.html(this.template(this.toJSON())),this.attachSubViews(),this)}});e.exports=h},1417:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='
      ';return __p}.toString()).apply(void 0,_values(_imports))},1418:function(e,t,i){"use strict";var s=i(3),o=i(219),n=i(230),a=i(1419),r=o.extend({mixins:[n],template:a,initialize:function(e){s.extend(this.attributes,e)},render:function(){return this.set("install_url",this.get("install_url").replace("campaign_name","mobile_banner_dashboard")),this.set("open_url",this.get("open_url")+"&referrer=mobile_banner_dashboard"),this.$el.html(this.template(this.toJSON())),this}});e.exports=r},1419:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){function print(){__p+=__j.call(arguments,"")}obj||(obj={});var __t,__p="",__e=.escape,__j=Array.prototype.join;with(obj)__p+='
      '+e(("Use the Tumblr app!"))+''+e(("It's faster and a zillion times better."))+'
      '+e(("Open"))+''+e(("Install the app"))+" ",show_close_button&&(__p+=' '),__p+="
      ";return __p}.toString()).apply(void 0,_values(_imports))},1420:function(e,t,i){"use strict";var s=i(3),o=i(219),n=i(230),a=i(1421),r=o.extend({mixins:[n],template:a,initialize:function(e){s.extend(this.attributes,e)},render:function(){return this.set("install_url",this.get("install_url")+"?referrer=mobile_gate"),this.set("open_url",this.get("open_url")+"&referrer=mobile_gate"),this.$el.html(this.template(this.toJSON())),this}});e.exports=r},1421:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='
      '+e(("Want to see more stuff?"))+''+e(("Use the Tumblr app!"))+'
      ";return __p}.toString()).apply(void 0,_values(_imports))},1422:function(e,t,i){"use strict";var s=i(3),o=i(219),n=i(230),a=i(1423),r=o.extend({mixins:[n],template:a,initialize:function(e){s.extend(this.attributes,e)},render:function(){return this.$el.html(this.template(this.toJSON())),this}});e.exports=r},1423:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='
      '+e(("Want to see more stuff?"))+'
      ";return __p}.toString()).apply(void 0,_values(_imports))},1424:function(e,t,i){"use strict";var s=i(219),o=i(342),n=i(8),a=i(1425),r=s.extend({className:"mobile-app-banner",template:a,events:{"click .switch":"clickSwitch","click .ignore":"clickIgnore"},showBanner:function(){n(document.documentElement).addClass("mobile-app-banner-visible")},hideBanner:function(){n(document.documentElement).removeClass("mobile-app-banner-visible")},render:function(){return this.showBanner(),this.$el.html(this.template()),this},clickSwitch:function(e){e&&e.preventDefault(),o.set("redpop",1,new Date("1/1/2099"),{path:window.location.pathname}),window.location.reload(!0)},clickIgnore:function(e){e&&e.preventDefault(),this.$el.remove(),this.hideBanner(); }});e.exports=r},1425:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='
      '+e(("Try our new mobile dashboard!"))+''+e(("It's way faster and a zillion times more flavorful. We think you'll love it."))+'
      ';return __p}.toString()).apply(void 0,_values(_imports))},1426:function(e,t,i){"use strict";var s=i(3),o=i(214),n=i(136),a=i(8),r=i(1427),l=o.extend({name:"StandaloneAd",initialize:function(){this.data&&this.inject(this.data),this.listenTo(n,"component:StandaloneAd",this.inject)},inject:function(e){e||(e=[]),s.forEach(e,function(e){this.view=new r({el:a("#standalone-ad-"+e.serve_id)})}.bind(this))}});e.exports=l},1427:function(e,t,i){"use strict";var s=i(219),o=i(136),n=s.extend({events:{"click .call-to-action,.ad_media,.attribution":"_click"},initialize:function(){this.pt=this.$el.data("pt"),this.logIndex=this.$el.data("log-index")},_logEvent:function(e){o.trigger("useraction:dashboard_click:standalone_ad",{loggingData:{pt:this.pt,userAction:e,logIndex:this.logIndex}})},_remove:function(){s.prototype.remove.call(this)},_click:function(e){this._logEvent("click_thru")}});e.exports=n},1428:function(e,t,i){"use strict";var s=i(214),o=i(1429),n=s.extend({name:"Toastr",selector:"body",view:o,autoAppend:!0});e.exports=n},1429:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(136),a=i(226),r=i(1430),l=i(1434),u=i(727),p=i(1436),d=i(1437),c=i(1438),h=a.extend({className:"toastr",template:d,defaults:{toastTime:5e3,toastDelay:800,canShowToast:!1,pageIsVisible:!0,toastQueue:[],toastFadeOutDuration:500},events:{mouseenter:"toastEnter",mouseleave:"toastLeave"},mixins:[u],subviews:{toast:{constructor:r,collection:function(e){return e.collection}}},initialize:function(e){this.collection=new c,this.listenTo(p,"notifications:updateNotifications",this.pushToasts),this.listenTo(n,"toastr:canDisplayToggle",this.toggleToastrDisplay),this.listenTo(n,"post:reblog:set post:fastReblog:showtoast",this.selfReblog),this.listenTo(n,"nukeAllToasts",this.nukeAllToasts),s(document).on("visibilitychange",o.bind(this.visibilitychange,this))},toastEnter:function(e){this.collection.each(function(e,t){clearTimeout(e.get("timeout"))},this)},toastLeave:function(e){this.collection.each(function(e,t){var i=this.toast[t].$el,s=setTimeout(o.bind(function(){this.popToast(i)},this),this.get("toastTime")+t
      (this.get("toastDelay")/2));e.set("timeout",s)},this)},visibilitychange:function(){this.set("pageIsVisible",!document.hidden),this.flushToastsFromQueue()},nukeAllToasts:function(){this.toast.forEach(function(e,t){this.popToast(e.$el,!0)},this)},toggleToastrDisplay:function(e){this.set("canShowToast",!e),this.flushToastsFromQueue()},flushToastsFromQueue:function(){this.get("canShowToast")&&this.get("pageIsVisible")&&this.get("toastQueue").length&&o.each(this.get("toastQueue").splice(0),function(e,t){this.displayToast(e,t)},this)},selfReblog:function e(t){var e={from_tumblelog_avatar:t.toastOptions.avatar,from_tumblelog_name:t.toastOptions.fromTumblelogName,type:t.toastOptions.type};this.pushToasts([e])},pushToasts:function(e){if(!o.isArray(e)&&e.isTumblrbot){var t={summary:e.msg,from_tumblelog_avatar:"/images/toast_tumblrbot.png",type:"tumblrbot",from_tumblelog_name:"tumblrbot"};e=[t]}this.get("canShowToast")&&this.get("pageIsVisible")?o.each(e,function(e,t){"audio post"===e.noun_type&&(e.noun_type="audio"),this.displayToast(e,t),this.logToast("toast-display",e.type)},this):this.get("toastQueue").push.apply(this.get("toastQueue"),e)},displayToast:function(e,t){this.$el.addClass("show-toast"),setTimeout(o.bind(function(){var t=new l(e);if(t.isValid()){this.collection.add(t);var i=this.toast[this.toast.length-1].$el,s=setTimeout(o.bind(function(){this.popToast(i)},this),this.get("toastTime"));this.collection.isEmpty()||this.collection.last().set("timeout",s)}},this),this.get("toastDelay")t)},popToast:function(e,t){t?(this.collection.shift(),this.checkCollectionLength()):(e.addClass("fade-out"),setTimeout(o.bind(function(){this.collection.shift(),this.checkCollectionLength()},this),this.get("toastFadeOutDuration")))},checkCollectionLength:function(){this.collection.length||this.$el.removeClass("show-toast")},logToast:function(e,t){n.trigger("toastlog:"+e,{loggingData:{notificationType:t}})}});e.exports=h},1430:function(e,t,i){"use strict";var s=i(3),o=i(226),n=i(1431),a=i(1432),r=i(1433),l=o.extend({template:n,className:"toast",tagName:"li",defaults:{targetPostsInPeepr:["reply","like","reblog","answer"]},initialize:function(e){this.set({fromTumblelogAvatar:this.model.get("from_tumblelog_avatar"),toastNotificationText:this.model.getToastNotificationText()}),this._appendNounAvatar(),this._formatVerb(this.model.get("type"))},_appendNounAvatar:function(){var e,t,i=this.model.get("noun_type");"photo"===i||"photoset"===i?(e=a,t={imgUrl:this.model.get("media_url")}):(e=r,t={nounType:i}),this.nounMarkup=e(t)},_formatVerb:function(e){this.set("actionType",s.kebabCase(e))},peeprHelper:function(){var e={};return this.get("targetPostsInPeepr").indexOf(this.model.get("type"))>-1?(e.tumblelog=this.model.get("target_post_name"),e.postId=+this.model.get("target_post_id")):e.tumblelog=this.model.get("from_tumblelog_name"),JSON.stringify(e)},afterRender:function(){this.$el.attr("data-peepr",this.peeprHelper()).addClass("blog-sub").append(this.nounMarkup)}});e.exports=l},1431:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='
      '+(null==(__t=toastNotificationText)?"":__t)+"";return __p}.toString()).apply(void 0,_values(_imports))},1432:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='';return __p}.toString()).apply(void 0,_values(_imports))},1433:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(imports),"return "+function(obj){obj||(obj={});var __t,__p="",__e=.escape;with(obj)__p+='
      ';return __p}.toString()).apply(void 0,_values(_imports))},1434:function(e,t,i){"use strict";var s=i(3),o=i(185),n=i(1435),a=o.extend({defaults:{from_tumblelog_avatar:"",from_tumblelog_name:"",from_tumblelog_url:"",hash:"",media_url:"",noun_type:"",summary:"",target_post_type:"",target_post_url:"",target_post_id:"",target_post_name:"",timestamp:"",type:"",timeout:null},getToastNotificationText:function(){return n(this)},validate:function(){if(s.isEmpty(n(this)))return"All toasts need a notificationText property"}});e.exports=a},1435:function(e,t,i){"use strict";function s(e){return""+e+""}var o=i(3),n=i(130),a={like:{post:"%1$s liked your text post",photo:"%1$s liked your photo",photoset:"%1$s liked your photoset",quote:"%1$s liked your quote",link:"%1$s liked your link",chat:"%1$s liked your chat",audio:"%1$s liked your audio post",video:"%1$s liked your video",question:"%1$s liked your question"},reblog:{post:"%1$s reblogged your text post",photo:"%1$s reblogged your photo",photoset:"%1$s reblogged your photoset",quote:"%1$s reblogged your quote",link:"%1$s reblogged your link",chat:"%1$s reblogged your chat",audio:"%1$s reblogged your audio post",video:"%1$s reblogged your video",question:"%1$s reblogged your question"},mention:{post:"%1$s mentioned %2$s in a text post",photo:"%1$s mentioned %2$s in a photo",photoset:"%1$s mentioned %2$s in a photoset",quote:"%1$s mentioned %2$s in a quote",link:"%1$s mentioned %2$s in a link",chat:"%1$s mentioned %2$s in a chat",audio:"%1$s mentioned %2$s in an audio post",video:"%1$s mentioned %2$s in a video",question:"%1$s mentioned %2$s in a question"},blog_subscription:{post:"%1$s posted a text post",photo:"%1$s posted a photo",photoset:"%1$s posted a photoset",quote:"%1$s posted a quote",link:"%1$s posted a link",chat:"%1$s posted a chat",audio:"%1$s posted an audio post",video:"%1$s posted a video",question:"%1$s posted a question"},reply:{post:"%1$s replied to your text post",photo:"%1$s replied to your photo",photoset:"%1$s replied to your photoset",quote:"%1$s replied to your quote",link:"%1$s replied to your link",chat:"%1$s replied to your chat",audio:"%1$s replied to your audio post",video:"%1$s replied to your video",question:"%1$s replied to your question"},ask:"%1$s asked %2$s",answer:"%1$s answered your question",ask_answer:"%1$s answered your question",follower:"%1$s started following you",selfReblog:"Reblogged to %1$s",queue:"Added to queue for %1$s",drafts:"Saved as draft for %1$s"},r=function(e){var t,i=e.get("from_tumblelog_name"),r=e.get("type");switch(r){case"tumblrbot":t=e.get("summary");break;case"selfReblog":return s(n(a[r],i));case"answer":case"ask_answer":case"follower":case"ask":t=a[r];break;default:t=o.get(a,r+"."+e.get("noun_type"),"")}return t?("blog_subscription"===r&&e.get("is_reblog")&&(t=t.replace("posted","reblogged")),t="ask"===r?n(t,s(i),o.escape(e.get("summary"))):n(t,s(i))):t};e.exports=r},1436:function(e,t,i){"use strict";var s=i(3),o=i(7),n=function(){};n.extend=o.Model.extend,s.extend(n.prototype,o.Events),e.exports=new n},1437:function(module,exports,webpack_require){var _=webpack_require(3),_imports="undefined"!=typeof ?.templateSettings.imports:{},keys=.keys,values=.values;module.exports=Function(_keys(_imports),"return "+function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='
        ';return __p}.toString()).apply(void 0,_values(_imports))},1438:function(e,t,i){"use strict";var s=i(190),o=i(1434),n=s.extend({model:o});e.exports=n},1439:function(e,t,i){"use strict";var s=i(8),o=i(214),n=i(1440),a=i(1441),r=o.extend({name:"NotificationPoller",initialize:function(){this.model=new a(this.data),this.$tabContainer=s(".tab-bar-container"),this.newPostsNotifier=new n({el:this.$tabContainer.find(".tab_home"),eventName:"unreadPostCount"}),this.inboxNotifier=new n({el:this.$tabContainer.find(".tab_inbox"),eventName:"unreadInboxCount"})}});e.exports=r},1440:function(e,t,i){"use strict";var s=i(3),o=i(1436),n=i(226),a=n.extend({defaults:{eventName:""},initialize:function(e){this.options=s.defaults({},e),this.listenTo(o,"notifications:"+this.get("eventName"),this.updateUnreadCount),this.$containerEl=this.$(".tab_notice"),this.$tabValueEl=this.$containerEl.find(".tab_notice_value")},updateUnreadCount:function(e){if("number"==typeof e){var t=e;if(t>99&&("unreadPostCount"===this.get("eventName")&&this.stopListening(o,"notifications:"+this.get("eventName")),t="99+"),"unreadPostCount"===this.get("eventName"))document.title="("+t+") "+(document.title.indexOf(")")!==-1?document.title.split(")")[1]:document.title);else if("unreadInboxCount"===this.get("eventName")&&!t)return this.$containerEl.removeClass("tab-notice--active"),void this.$tabValueEl.text(t);this.$containerEl.addClass("tab-notice--active"),this.$tabValueEl.text(t)}}});e.exports=a},1441:function(e,t,i){"use strict";var s=i(3),o=i(185),n=i(136),a=i(1436),r=o.extend({url:"/services/poll",defaults:{notifications:!0,unread:!0,inbox:!0,unread_messages:!0,emptyPolls:0,currentSpeed:0,slowDownThreshold:10,pollingSpeeds:[1e4,2e4,3e4,5e4,6e4,8e4,36e5]},initialize:function(e){this.set(s.pick(e,"inbox_unread")),this.initialPoll=!0,this.speedsArr=this.get("pollingSpeeds"),this.options=s.defaults({token:e.token,mention_keys:e.messaging_keys.join(",")},s.pick(this.defaults,"abacus","notifications","unread","inbox","unread_messages","unread_activity")),setTimeout(s.bind(this.fetch,this),this.speedsArr[this.get("currentSpeed")])},changePollSpeed:function(e){if(!(this.get("currentSpeed")===this.speedsArr.length-1&&"slower"===e||!this.get("currentSpeed")&&"faster"===e)){var t="faster"===e?-1:1;this.set("emptyPolls",0),this.set("currentSpeed",this.get("currentSpeed")+t)}},prepData:function(){return s.assign(this.options,{magick:Math.floor(100001
        Math.random()),from:this.get("nextFrom")?this.get("nextFrom"):Math.floor((new Date).getTime()/1e3),notifications_next:this.speedsArr[this.get("currentSpeed")]})},fetch:function(){this.params=this.params||{},this.params.data=this.prepData(),o.prototype.fetch.call(this,this.params)},parse:function(e){this.initialPoll?(this.changePollSpeed("slower"),this.initialPoll=!this.initialPoll):e.notifications.length?this.changePollSpeed("faster"):(this.set("emptyPolls",this.get("emptyPolls")+1),this.get("emptyPolls")>=this.get("slowDownThreshold")&&this.changePollSpeed("slower")),this.set("nextFrom",e.next_from),e.notifications.length&&a.trigger("notifications:updateNotifications",e.notifications),e.unread&&(!this.get("unread_posts")||this.get("unread_posts")<e.unread)&&(this.set("unread_posts",e.unread),a.trigger("notifications:unreadPostCount",e.unread)),e.inbox!==this.get("inbox_unread")&&(this.set("inbox_unread",e.inbox),a.trigger("notifications:unreadInboxCount",e.inbox)),s.has(e,"unread_messages")&&n.trigger("toaster:updateMessagingUnreadCounts",e,this.get("nextFrom")),s.has(e,"unread_activity")&&n.trigger("activity:updateActivityUnreadCounts",e.unread_activity),setTimeout(s.bind(this.fetch,this),this.speedsArr[this.get("currentSpeed")])}});e.exports=r},1442:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(138),a=i(214),r=i(136),l=i(1443),u=a.extend({name:"SidebarAd",selector:"#sidebar-ad",defaults:{topOffset:68,stickOffset:17},initialize:function(){if(this.$container=s(this.container),this.$element=this.$container.find(".sidebar-ad"),s(".site-notification").length){var e=s(".l-header-container");this.set("topOffset",e.offset().top+e.height()+this.get("stickOffset"))}this.scrollMonitor=n.create(this.$container,this.get("topOffset")),this.scrollMonitor.partiallyExitViewport(o.bind(this.stick,this)),this.scrollMonitor.fullyEnterViewport(o.bind(this.unstick,this)),this.scrollMonitor.update(),this.listenTo(r,"recommended-blogs-unit:rendered",o.bind(this.scrollMonitor.recalculateLocation,this.scrollMonitor)),new l(this.$element,function(e){var t=e?"visible":"hidden";r.trigger("ads-interaction:sidebar-ad-"+t)})},stick:function(){this.scrollMonitor.isAboveViewport&&(this.$element.addClass("sidebar-ad--sticky"),this.$element.css({top:this.get("topOffset")}))},unstick:function(){this.$element.removeClass("sidebar-ad--sticky"),this.$element.css({top:""})}});e.exports=u},1443:function(e,t,i){"use strict";function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,i,s){return i&&e(t.prototype,i),s&&e(t,s),t}}(),n=i(3),a=i(8),r=function(){function e(t,i){var o=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2e3;s(this,e),this.$element=a(t),this.callback=i,n.delay(function(){o.checkForElement()},r)}return o(e,[{key:"checkForElement",value:function(){this.callback(this.isElementVisible(this.$element))}},{key:"isElementVisible",value:function(e){return!n.isEmpty(e)&&a("body").has(e).length>0&&e.is(":visible")}}]),e}();e.exports=r},1444:function(e,t,i){"use strict";var s=i(342),o=i(214),n=o.extend({name:"AdblockCookie",initialize:function(){s.set("nts",window.Tumblr.ABP,604800)}});e.exports=n},1445:function(e,t,i){"use strict";var s=i(8),o=i(3),n=i(214),a=i(136),r=n.extend({name:"DashboardLoginCheck",initialize:function(){this.listenTo(a,"logout",this._onEventBusLogout)},run:function(){"true"===this.getLoggedOutFlag()&&s.ajax({url:"/svc/account/status",cache:!1}).done(function(e){o.get(e,"response.login_status",!1)===!1?window.location="/login?redirect_to=%2Fdashboard":this.removeLoggedOutFlag()}.bind(this))},getLoggedOutFlag:function(){try{return localStorage.getItem("loggedOut")}catch(e){return!1}},setLoggedOutFlag:function(){try{localStorage.setItem("loggedOut","true")}catch(e){}},removeLoggedOutFlag:function(){try{localStorage.removeItem("loggedOut")}catch(e){}},_onEventBusLogout:function(){this.setLoggedOutFlag()}});e.exports=r},1446:function(e,t,i){"use strict";var s=i(214),o=i(1447),n=i(136),a=i(8),r=i(3),l=i(180),u=s.extend({name:"DfpAd",SOURCE:"dfp",dfpAds:{},dfpLoadInProgress:!0,initialize:function(){if(l.bool("test_right_rail_dfp")){var e={serve_id:"serve_id",dfp_id:"58070726",dfp_order:"web_dashboard_right_rail",width:300,height:250,gemini_section_code:"gemini_section_code"};this.data?this.data.push(e):this.data=e}this.data&&Array.isArray(this.data)&&(this.loadDFPScript(this.data),this.loadGeminiScript(this.data)),this.listenTo(n,"component:DfpAd",r.bind(this.loadDFPScript,this)),this.listenTo(n,"dfp:noAd",r.bind(this.remove,this))},loadDFPScript:function(e){var t=this;if(window.googletag||!this.dfpLoadInProgress)return void this.inject(e);var i=document.createElement("script");i.async=!0,i.id="googletag";var s="https:"===document.location.protocol;i.src=(s?"https:":"http:")+"//www.googletagservices.com/tag/js/gpt.js";var o=document.getElementsByTagName("head")[0];o.appendChild(i),i.addEventListener("load",function(){t.dfpLoadInProgress=!1,e&&t.inject(e)})},loadGeminiScript:function(e){var t=top===self?window:window.top,i=t.document;if(!t.sectionCode){t.sectionCode=t.sectionCode||[],t.sectionCode.push(e[0].gemini_section_code),t.syndicationErrorHandler=function(e,i){t.geminiFailed=!0};var s=i.createElement("script");s.async=!0,s.src="https://s.yimg.com/av/gemini/ga/gemini-iframe.js",i.body.appendChild(s)}},inject:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach(function(t){var i=t.serve_id,s=t.dfp_id,n=t.dfp_order,r=t.width,l=t.height,u=t.gemini_section_code,p=a("#container-dfp-"+i);a("#dfp-ad-"+i).parent().data("exclude",!0),e.dfpAds[i]=new o(i,s,n,p,u,"video",r,l),e.dfpAds[i].loadDFPAd(function(t){t&&(window.console&&window.console.warn&&console.warn(t.msg),e.remove(i))})})},remove:function(e){this.dfpAds.hasOwnProperty(e)&&(this.dfpAds[e].unload(),delete this.dfpAds[e])}});e.exports=u},1447:function(e,t,i){"use strict";var s=i(214),o=i(3),n=i(8),a=s.extend({name:"DFPAdLoader",source:"tumblrMsg",initialize:function(e,t,i,s,n){var a=(arguments.length>5&&void 0!==arguments[5]?arguments[5]:"video",arguments[6]),r=arguments[7];o.assign(this,{$container:s,id:t,serveId:e,orderName:i,geminiSectionCode:n,width:a,height:r})},loadDFPAd:function(e){var t=this;if(!this.serveId||!this.orderName)return void e({msg:"No DFP id or order name found"});if(!window.googletag)return void e({msg:"Googletag is not available"});var i=window.googletag||{};i.cmd=i.cmd||[];var s=this.$container.attr("id");i.cmd.push(function(){var e=[t.width,t.height];t.width===-1&&t.height===-1&&(e="fluid"),i.defineSlot(t.id+"/"+t.orderName,e,s).addService(i.pubads()),i.pubads().enableSingleRequest(),i.enableServices(),i.pubads().addEventListener("slotRenderEnded",function(e){e&&e.isEmpty&&(t.unload(),t.removeGeminiIfEmpty()),window.postMessage&&window.addEventListener("message",o.bind(t.handleMessage,t))})}),i.cmd.push(function(){i.display(s)})},handleMessage:function(e){if(e&&e.data&&"string"==typeof e.data){var t=void 0;try{t=JSON.parse(e.data)}catch(e){return}if(t[this.source])switch(t[this.source]){case"noAd":if(window.geminiFailed)this.removeGeminiIfEmpty();else{var i=n("#container-dfp-backup-"+this.serveId);i.addClass("gemini-ad-"+this.geminiSectionCode),setTimeout(function(e){e.removeGeminiIfEmpty()},1e3,this)}this.unload()}}},unload:function(){window.removeEventListener("message",o.bind(this.handleMessage,this)),this.$container.css({height:0,padding:0,margin:0})},removeGeminiIfEmpty:function(){var e=n("#container-dfp-backup-"+this.serveId);e.hasClass("gemini-loaded")||e.parent().parent().remove()}});e.exports=a},1448:function(e,t,i){"use strict";var s=i(248),o=function(e){i.e(11,function(t){try{e(i(1449))}catch(e){s(e,"web-extension-cta")}})};e.exports=o},1451:function(e,t,i){"use strict";var s=i(1119),o=s.extend({logKey:"explore_links",logOptions:{init_event:!1},logEnv:{location:document.location.pathname},events:{"explore-links:
        ":"handleEvent"},handleEvent:function(e,t){this.log(e,t)}});e.exports=o},1452:function(e,t,i){"use strict";var s=i(237);s({"Tumblr.Prima.embedHarness":i(935)})},1453:function(e,t){},1454:function(e,t){},1455:function(e,t){},1456:function(e,t){},1457:function(e,t){},1458:function(e,t){},1459:function(e,t){},1460:function(e,t){},1461:function(e,t){},1462:function(e,t){},1463:function(e,t){},1464:function(e,t){},1465:function(e,t){}});