YUI.add("photo-comments-models",function(e){function t(e){t.superclass.constructor.call(this,e)}e.Models[this.name]=t,e.extend(t,e.FlickrModelRegistry,{name:this.name,attributes:{comments:{isListProxy:!0,rangeFetch:{listFetcher:e.ListFetchers["flickr-photos-comments-getList"]}}}})},"@VERSION@",{requires:["flickr-model-registry","flickr-photos-comments-getList-fetcher"]});
YUI.add("sub-photo-comments-view",function(e,t){var n=require("lib/flog")(t);e.FlickrView.create(this.name,e.FlickrView,[],{langBundles:this.details.langBundles,initializer:function(e){return this.photoId=e.photoId,this.initiallyShowingMaximum=e.initiallyShowingMaximum?e.initiallyShowingMaximum:20,this.showMoreMaximum=e.showMoreMaximum?e.showMoreMaximum:200,this.isTooltipComments=e.isTooltipComments?!0:!1,this.hideCommentButtonAfterComment=e.hideCommentButtonAfterComment||this.isTooltipComments,this.currentlyShowingCount=0,this.initiallyShowingCount=0,this.isOnMobile=e.isOnMobile||!1,this.textAreaMaxHeight=e.textAreaMaxHeight||420,this.textAreaMinHeight=35,this.noIcons=e.noIcons,this.showCommentButton=e.showCommentButton||!1,this.postingComment=!1,this.signedOutCommenting=this.appContext.flipper.isFlipped("enable-signed-out-commenting"),this.get("container").get("innerHTML")===""&&this.setContainerHTML(""),this},loadState:function(){var t=this,n=[],r;return r=this.getViewDataFromHistory("numberOfCommentsShowing"),typeof r!="undefined"&&(t.initiallyShowingCount=r,t.initiallyShowingCount>t.initiallyShowingMaximum&&(t.initiallyShowingMaximum=r)),n.push(this.appContext.getModelRegistry("comment-models").then(function(e){t.commentModelsRegistry=e})),n.push(this.appContext.getModel("photo-engagement-models",this.photoId).then(function(n){t.photoEngagement=n;var r=t.photoEngagement.getValue("commentCount"),i,s=/#comment{1}/g;YUI.Env.isServer||(i=e.config.win.location.hash),i&&s.test(i)?(t.initiallyShowingCount=r,t.currentlyShowingCount=r):r>=t.initiallyShowingMaximum?(t.initiallyShowingCount=t.initiallyShowingMaximum,t.currentlyShowingCount=t.initiallyShowingMaximum):(t.initiallyShowingCount=r,t.currentlyShowingCount=r)}).then(function(){return t.appContext.getModel("photo-comments-models",t.photoId)}).then(function(e){t.photoComments=e;if(t.photoEngagement.getValue("commentCount")>0)return t.photoComments.getValue("comments").getRange({offset:0,limit:t.initiallyShowingCount,textForPhotoLinks:t.isTooltipComments}).then(function(e){t.set("comments",e)});t.set("comments",[])})),n.push(this.appContext.getModel("photo-models",this.photoId).then(function(e){t.photoModel=e})),this.appContext.getViewer().signedIn&&n.push(t.appContext.getModel("person-models",t.appContext.getViewer().nsid).then(function(e){t.person=e})),e.Promise.all(n)},buildContainer:function(){var t=this.photoModel.getValue("url"),n=this.person?this.person.toJSON():null,r=this.get("comments"),i=this.calculateShowMoreCount(),s=i===1?this.intlMessage({intlName:"photo-page-scrappy.VIEW_PREVIOUS_COMMENT"}):this.intlMessage({intlName:"photo-page-scrappy.VIEW_MORE_PREVIOUS_COMMENTS",count:i}),o,u,a=/#comment{1}/g;YUI.Env.isServer||(u=e.config.win.location.hash),r=r.reverse(),this.isTooltipComments&&(this.ellipsis=this.intlMessage({intlName:"comments.SEE_MORE_LINK",photoUrl:t}));for(o=0;o<r.length;o++)r[o]=r[o].toJSON?r[o].toJSON():r[o],r[o].isSignedIn=this.appContext.getViewer().signedIn,r[o].isLoggedInUsersPhoto=this.isLoggedInUsersPhoto(),r[o].canCommentBeDeleted=this.canCommentBeDeleted(r[o].author.nsid),r[o].commentBelongsToViewer=this.commentBelongsToViewer(r[o].author.nsid),r[o].enabledEditableComments=!0,r[o].canComment=this.photoModel.getValue("canComment"),r[o].isTooltipComment=this.isTooltipComments,r[o].ellipsis=this.ellipsis,r[o].noIcons=this.noIcons,r[o].enabledNewPro=this.appContext.flipper.isFlipped("enable-pro-badge"),r[o].isOnMobile=this.isOnMobile;return this.setContainerWithTemplate("sub-photo-comments-view",{user:n,isOnMobile:this.isOnMobile,comments:r,showMore:this.calculateShowMoreCount()>0?!0:!1,showMoreCount:this.calculateShowMoreCount(),showMoreString:s,canComment:this.signedOutCommenting?this.photoModel.getValue("canComment")||this.photoModel.getValue("canPublicComment"):this.photoModel.getValue("canComment"),tutorialMode:!0,isTooltipComments:this.isTooltipComments,photoUrl:t,showCommentButton:this.showCommentButton}),this.retinafyCommentImages(),u&&a.test(u)&&this.jumpToPermalinkedComment(),this},buildErrorContainer:function(){this.setContainerWithTemplate("sub-photo-comments-view",{loadingError:!0})},activate:function(){var t=this,n=t.get("container"),r=this.appContext.getViewer().prefs.keyboardShortcutsEnabled;return n.one(".comments-more")&&t.registerEventHandler(n.one(".comments-more a").on("click",t.handleMoreCommentsClick.bind(t))),n.one("button.comment")&&t.registerEventHandler(n.one("button.comment").on("click",t.handleCommentButtonClick.bind(t))),n.one(".new-comment-text")&&(r&&this.attachKeyEvent("down:67",function(e){e.preventDefault();try{n.one(".new-comment-text").focus()}catch(t){}}),t.registerEventHandler(n.one(".new-comment-text").on("focus",function(){n.one("button.comment").setStyle("display","block")})),t.registerEventHandler(n.one(".new-comment-text").on("blur",function(){!t.hideCommentButtonAfterComment&&n.one(".new-comment-text").get("value")===""&&n.one("button.comment").setStyle("display","none")}))),e.StorageHelper.getItem("pendingComment-"+this.photoId)&&this.get("container").one(".new-comment-text")&&(n.one(".new-comment-text").set("value",e.StorageHelper.getItem("pendingComment-"+this.photoId)),n.one("button.comment").setStyle("display","block")),e.use("transition",function(e){t.attachEvents({"keydown:comment":t.handleCommentKeyDown.bind(t),".comment-reply click:reply":t.handleReplyClick.bind(t),".comment-delete click:delete":t.handleDeleteClick.bind(t),".comment-edit click:edit":t.handleEditClick.bind(t),".done-editing-comment click:saveEdit":t.handleDoneEditingCommentClick.bind(t)})}),this},postComment:function(t){var r=this,i,s,o,u,a=this.photoEngagement.getValue("commentCount");r.fire("addingNewComment");if(e.Lang.trim(t)===""){this.onError(this.intlMessage({intlName:"photo-page-scrappy.EMPTY_COMMENT_ERROR"})),this.postingComment=!1;return}e.rapidTracker.beacon(this.name,"commentPosted"),e.StorageHelper.remove("pendingComment-"+this.photoId),this.commentModelsRegistry.remoteCreate(
{photoId:this.photoId,commentText:t}).then(function(t){s=t.toJSON(),s.isSignedIn=r.appContext.getViewer().signedIn,s.isLoggedInUsersPhoto=r.isLoggedInUsersPhoto(),s.enabledEditableComments=!0,s.isOnMobile=r.isOnMobile,s.canCommentBeDeleted=!0,s.commentBelongsToViewer=!0,s.canComment=!0,s.enabledNewPro=this.appContext.flipper.isFlipped("enable-pro-badge"),r.get("container").one(".new-comment-text").set("value",""),r.get("container").one(".new-comment-text").setStyle("height","80px"),i=e.Node.create(r.templates("sub-photo-comment")(s)).setStyle("opacity","0.1"),a>0?r.get("container").one(".comments").append(i).one("li:last-child").transition({easing:"ease-in",duration:.5,opacity:"1"}):(r.get("container").one(".comments-holder").prepend("<ul class='comments'></ul>"),r.get("container").one(".comments").append(i).one("li:first-child").transition({easing:"ease-in",duration:.5,opacity:"1"})),r.retinafyCommentImages(),o=r.photoComments.getValue("comments").prependToList(t),u=r.photoEngagement.getValue("commentCount")+1,r.photoEngagement.setValue("commentCount",u),r.currentlyShowingCount++,r.fire("newCommentAdded"),r.fire("subviewViewEvent","newCommentAdded"),r.postingComment=!1,r.get("container")&&r.get("container").one("button.comment")&&r.get("container").one("button.comment").focus()},function(e){e.code===409?r.onError(r.intlMessage({intlName:"photo-page-scrappy.COMMENT_RATE_LIMIT_ERROR"})):e.code===8?r.onError(r.intlMessage({intlName:"photo-page-scrappy.EMPTY_COMMENT_ERROR"})):r.onError(r.intlMessage({intlName:"photo-page-scrappy.COMMENT_POST_ERROR"})),r.postingComment=!1}).then(null,function(e){n.error({err:e})})},handleMoreCommentsClick:function(e){e.preventDefault();var t=this,r=this.get("container"),i="",s=r.one(".comments-more"),o;s.one("a").set("text",this.intlMessage({intlName:"common.LOADING"})),s.addClass("is-loading"),this.appContext.getModel("photo-comments-models",this.photoId).then(function(e){e.getValue("comments").getRange({offset:t.currentlyShowingCount,limit:t.calculateShowMoreCount()}).then(function(e){var n;e=e.reverse();for(n=0;n<e.length;n++)o=e[n].toJSON(),o.isSignedIn=t.appContext.getViewer().signedIn,o.isOnMobile=t.isOnMobile,o.isLoggedInUsersPhoto=t.isLoggedInUsersPhoto(),o.canCommentBeDeleted=t.canCommentBeDeleted(o.author.nsid),o.commentBelongsToViewer=t.commentBelongsToViewer(o.author.nsid),o.enabledEditableComments=!0,o.canComment=t.photoModel.getValue("canComment"),o.enabledNewPro=t.appContext.flipper.isFlipped("enable-pro-badge"),i+=t.templates("sub-photo-comment")(o);r.one(".comments").prepend(i),t.retinafyCommentImages(),t.currentlyShowingCount=t.currentlyShowingCount+e.length,t.calculateShowMoreCount()>0?(t.calculateShowMoreCount()===1?s.one("a").set("text",t.intlMessage({intlName:"photo-page-scrappy.VIEW_PREVIOUS_COMMENT"})):s.one("a").set("text",t.intlMessage({intlName:"photo-page-scrappy.VIEW_MORE_PREVIOUS_COMMENTS",count:t.calculateShowMoreCount()})),s.removeClass("is-loading")):s.remove(),t.setViewDataOnHistory("numberOfCommentsShowing",t.currentlyShowingCount)},function(e){t.onError(t.intlMessage({intlName:"photo-page-scrappy.MORE_COMMENTS_ERROR"}))}).then(null,function(e){n.error({err:e})})})},calculateShowMoreCount:function(){var e=this.photoEngagement.getValue("commentCount");return e>this.currentlyShowingCount+this.showMoreMaximum?this.showMoreMaximum:e<=this.currentlyShowingCount+this.showMoreMaximum?e-this.currentlyShowingCount:0},isLoggedInUsersPhoto:function(){return this.photoModel.getValue("owner").getValue("nsid")===this.appContext.getViewer().nsid},canCommentBeDeleted:function(e){return e===this.appContext.getViewer().nsid||this.isLoggedInUsersPhoto()?!0:!1},commentBelongsToViewer:function(e){return e===this.appContext.getViewer().nsid?!0:!1},jumpToPermalinkedComment:function(){var t=e.config.win.location.hash,n=this.get("container"),r,i=this,s;r=n.one(t),r?(r.scrollIntoView(!0),e.config.win.scrollBy(0,-60),r.addClass("permalinked-comment")):i.fire("viewEvent","getDialogOffset",function(t){s=e.Views.dialog.getNewInstance("dialog-alert",{content:i.intlMessage({intlName:"photo-page-scrappy.COMMENT_PERMALINK_ERROR"}),attrs:{title:i.intlMessage({intlName:"common.OOPS"}),level:"warning",confirmLabel:i.intlMessage({intlName:"common.OK"})},parent:i,offsetLeft:t,dialogClass:"scrappy-dialog"}),s.show()})},retinafyCommentImages:function(){if(!YUI.Env.isServer&&this.appContext.getCookie("density")>1){var t=e.all(".comments li .comment-content a[data-photo-size-m]");t.each(function(e){e.one("img").setAttribute("src",e.getAttribute("data-photo-size-m")),e.removeAttribute("data-photo-size-m")})}},handleCommentKeyDown:function(e){if(e.charCode===9)return!0;var t=this,n=this.get("container").one(".new-comment-text"),r=n.get("value"),i=this.get("container").one(".false-comment-content"),s,o=this.get("container").one("button.comment");if(e.charCode===13&&(e.ctrlKey||e.metaKey)&&!this.postingComment){e.preventDefault();if(!this.appContext.getViewer().signedIn&&this.signedOutCommenting)return this.showSignUpModal();this.postingComment=!0,this.postComment(r),o.focus(),this.hideCommentButtonAfterComment||o.setStyle("display","none");return}e.which===9&&(e.preventDefault(),o.focus()),setTimeout(function(){i.set("value",n.get("value")),s=i._node.scrollHeight<t.textAreaMinHeight?t.textAreaMinHeight:i._node.scrollHeight,s=i._node.scrollHeight>t.textAreaMaxHeight?t.textAreaMaxHeight:s,n.setStyle("height",s+"px"),n.setStyle("minHeight","80px")},10)},handleCommentButtonClick:function(e){var t=this.get("container").one(".new-comment-text"),n=t.get("value");if(!this.postingComment){e.preventDefault();if(!this.appContext.getViewer().signedIn&&this.signedOutCommenting)return this.showSignUpModal();this.postingComment=!0,this.postComment(n),this.hideCommentButtonAfterComment||this.get("container").one("button.comment").setStyle("display","none");return}},handleDoneEditingCommentClick:function(t){t.preventDefault();var n=this,r=t.target.ancestor(".comment"),i,s,o=t.target.getAttribute
("data-id"),u;n.appContext.getModel("comment-models",o).then(function(t){u=r.one("textarea");if(e.Lang.trim(u.get("value"))===""){n.onError(n.intlMessage({intlName:"photo-page-scrappy.EMPTY_COMMENT_ERROR"}));return}n.postingEditedComment=!0,t.setValues({content:u.get("value")}),n.appContext.modelRegistries["comment-models"].remoteUpdate(o).then(function(o){o?s=o.toJSON():s=t.toJSON(),s.isSignedIn=n.appContext.getViewer().signedIn,s.isLoggedInUsersPhoto=n.isLoggedInUsersPhoto(),s.enabledEditableComments=!0,s.canCommentBeDeleted=!0,s.commentBelongsToViewer=!0,s.canComment=n.photoModel.getValue("canComment"),s.isTooltipComment=n.isTooltipComments,s.ellipsis=n.ellipsis,s.isOnMobile=n.isOnMobile,s.enabledNewPro=n.appContext.flipper.isFlipped("enable-pro-badge"),i=e.Node.create(n.templates("sub-photo-comment")(s)),r.replace(i),n.fire("commentEdited"),n.postingEditedComment=!1},function(e){n.postingEditedComment=!1,t.revertValue("content"),n.onError(e.message)})})},handleReplyClick:function(t){t.preventDefault();var n=this.get("container").one("textarea"),r=n.get("value"),i="",s=n.getDOMNode(),o;r.length>0&&(i+=r+" "),i+="["+e.url("/photos/"+t.target.getAttribute("data-pathalias"))+"] ",s.setSelectionRange?(s.focus(),s.setSelectionRange(s.value.length,s.value.length)):s.createTextRange&&(o=s.createTextRange(),o.collapse(!0),o.moveEnd("character",s.value.length),o.moveStart("character",s.value.length),o.select()),n.focus(),n.set("value",i),s.scrollTop=s.scrollHeight},handleEditClick:function(t){t.preventDefault();var n=this,r=t.target.ancestor(".comment"),i=t.target.getAttribute("data-id"),s,o,u,a=this.get("container").one(".false-comment-content"),f;r.addClass("editing");if(r.one("textarea")){r.one("textarea").remove(),r.one(".comment-content").show();return}n.appContext.getModel("comment-models",i).then(function(t){r.one(".comment-content").hide(),r.append("<textarea>"+t.getValue("contentRaw")+"</textarea>"),r.append("<button class='ui-button ui-button-cta done-editing-comment' data-id='"+i+"' data-action='saveEdit'>"+n.intlMessage({intlName:"common.DONE"})+"</button>"),s=r.one("textarea"),a.set("value",s.get("value")),f=a._node.scrollHeight<n.textAreaMinHeight?n.textAreaMinHeight:a._node.scrollHeight,f=a._node.scrollHeight>n.textAreaMaxHeight?n.textAreaMaxHeight:f,s.setStyle("height",f+"px"),s.select(),s.on("keydown",function(l){setTimeout(function(){a.set("value",s.get("value")),f=a._node.scrollHeight<n.textAreaMinHeight?n.textAreaMinHeight:a._node.scrollHeight,f=a._node.scrollHeight>n.textAreaMaxHeight?n.textAreaMaxHeight:f,s.setStyle("height",f+"px")},10);if(l.charCode===13&&(l.ctrlKey||l.metaKey)&&!n.postingEditedComment){l.preventDefault();if(e.Lang.trim(s.get("value"))===""){n.onError(n.intlMessage({intlName:"photo-page-scrappy.EMPTY_COMMENT_ERROR"}));return}n.postingEditedComment=!0,t.setValues({content:s.get("value")}),n.appContext.modelRegistries["comment-models"].remoteUpdate(i).then(function(i){i?u=i.toJSON():u=t.toJSON(),u.isSignedIn=n.appContext.getViewer().signedIn,u.isLoggedInUsersPhoto=n.isLoggedInUsersPhoto(),u.enabledEditableComments=!0,u.canCommentBeDeleted=!0,u.commentBelongsToViewer=!0,u.canComment=n.photoModel.getValue("canComment"),u.isTooltipComment=n.isTooltipComments,u.ellipsis=n.ellipsis,u.isOnMobile=n.isOnMobile,u.enabledNewPro=n.appContext.flipper.isFlipped("enable-pro-badge"),o=e.Node.create(n.templates("sub-photo-comment")(u)),r.replace(o),n.fire("commentEdited"),n.postingEditedComment=!1},function(e){n.postingEditedComment=!1,t.revertValue("content"),n.onError(e.message)})}})})},handleDeleteClick:function(t){t.preventDefault();var r=this,i,s,o=t.target.ancestor(".comment"),u=t.target.getAttribute("data-id"),a;i=new e.Views["confirmation-dialog-view"]({photoID:this.photoId,appContext:this.appContext,title:this.intlMessage({intlName:"photo-page-scrappy.DELETE_COMMENT"}),icon:"ui-icon-modal-warning",content:this.intlMessage({intlName:"photo-page-scrappy.COMMENT_DELETE_CONFIRMATION"}),confirmButtonLabel:this.intlMessage({intlName:"common.DELETE"})}),i.render(),i.activate(),s=i.get("container"),i.registerEventHandler(s.one(".ui-dialog-button-confirm").on("click",function(){r.commentingDialog.close(),r.commentingDialog.destroy(),r.appContext.modelRegistries["comment-models"].remoteDelete(u).then(function(){r.photoComments.getValue("comments").removeFromList(u),a=r.photoEngagement.getValue("commentCount")-1,r.photoEngagement.setValue("commentCount",a),r.currentlyShowingCount--,r.fire("commentDeleted"),o.transition({easing:"ease-out",duration:.5,opacity:"0"},function(){o.remove(),a===0&&r.get("container").one(".comments").remove()})},function(e){r.onError(r.intlMessage({intlName:"photo-page-scrappy.COMMENT_DELETE_ERROR"}))}).then(null,function(e){n.error({err:e})})})),this.fire("subviewViewEvent","getDialogOffset",function(t){r.commentingDialog=e.Views.dialog.getNewInstance("dialog-modal",{content:i.get("container"),appContext:r.appContext,offsetLeft:t,dialogClass:"scrappy-dialog"}),r.commentingDialog.show()})},showSignUpModal:function(){var t=e.config.win.location.href,n=this.intlMessage({intlName:"comments.SIGNUP_MODAL_TITLE"}),r=this.intlMessage({intlName:"comments.SIGNUP_MODAL_MESSAGE"}),i;e.StorageHelper.setItem("pendingComment-"+this.photoId,this.get("container").one(".new-comment-text").get("value")),i=new e.Views.SignUpModal({appContext:this.appContext,signUpHeaderClass:"",signUpTitle:n,signUpMessage:r,beaconPrefix:"comment"}),i.on("signUpClick",function(n){e.SigninHelper._redirectToSignUp("",{postLoginUrl:t})}),i.on("signInClick",function(n){e.SigninHelper._redirectToSignin("",{postLoginUrl:t})}),i.show()},onError:function(t){var n=this;if(this.isTooltipComments)return;this.fire("subviewViewEvent","getDialogOffset",function(r){var i=e.Views.dialog.getNewInstance("dialog-alert",{content:t,attrs:{title:n.intlMessage({intlName:"common.ERROR"}),level:"warning",confirmLabel:n.intlMessage({intlName:"common.OK"})},parent:n,offsetLeft:r,dialogClass:"scrappy-dialog"});i
.show()})}})},"@VERSION@",{requires:["dialog","flickr-view","moment","confirmation-dialog-view","signup-modal-view","sub-photo-comments-css","hermes-template-comments","hermes-template-sub-photo-comment","hermes-template-sub-photo-comments-view","url","signin-helper","storage-helper"],langBundles:["common","comments","photo-page-scrappy","relative-dates"],optional:["photo-comments-models"]});
YUI.add("hermes-lang-comments",function(e,t){e.Intl.add("hermes/comments","en-US",{LOADING:["Loading"],MORE:["more"],ERROR_LOADING_COMMENTS:["Error loading comments"],COULDNT_POST_COMMENT:["We couldn't post your comment"],COULDNT_GET_MORE_COMMENTS:["We couldn't get more comments"],CONFIRM_DELETE:["Confirm Delete"],YES_CONFIRM_DELETE:["Yes, Delete It"],ARE_YOU_SURE_DELETE:["Are you sure you want to delete this comment?"],COULDNT_DELETE_COMMENT:["We couldn't delete your comment"],ERROR:["Error!"],NO_COMMENTS:["No comments"],ADD_A_COMMENT:["Add a comment"],MUST_BE_LOGGED_IN_TO_COMMENT:["You must be logged in to post a comment"],LOADING_COMMENTS:["Loading comments..."],SEE_MORE:["See more"],SEE_MORE_LINK:['... <a href="',"${photoUrl}",'">Read more</a>'],SIGNUP_MODAL_TITLE:["Comment on this photo!"],SIGNUP_MODAL_MESSAGE:["Join Flickr to leave a comment on this photo"],VIEW_COMMENTS:["View Comments"],COMMENTING_DISABLED:["Commenting is disabled for this photo."]})},"@VERSION@",{requires:["intl"]});
YUI.add("hermes-template-sub-photo-faved-by",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){var s,o=t!=null?t:{};return((s=n["if"].call(o,t!=null?t.viewerIsOwner:t,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.program(5,i,0),data:i}))!=null?s:"")+'	<div class="faved-by">\n		<div class="initial-faved-by-display">\n'+((s=(n.ifCond||t&&t.ifCond||n.helperMissing).call(o,t!=null?t.totalPeopleFaved:t,"===",1,{name:"ifCond",hash:{},fn:e.program(7,i,0),inverse:e.program(9,i,0),data:i}))!=null?s:"")+"		</div>\n	</div>\n"},2:function(e,t,n,r,i){var s,o=t!=null?t:{};return'		<i title="'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.SINGULAR_FAVE"},data:i}))+'" class="ui-icon-fave-star'+((s=n["if"].call(o,t!=null?t.isFaved:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")+'" href="#"></i>\n'},3:function(e,t,n,r,i){return" is-faved"},5:function(e,t,n,r,i){var s,o=t!=null?t:{};return'		<a title="'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.SINGULAR_FAVE"},data:i}))+'" class="ui-icon-fave-star'+((s=n["if"].call(o,t!=null?t.isFaved:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")+'" href="#"></a>\n'},7:function(e,t,n,r,i){var s;return"				"+e.escapeExpression((n.intlHTMLMessage||t&&t.intlHTMLMessage||n.helperMissing).call(t!=null?t:{},{name:"intlHTMLMessage",hash:{displayName:(s=(s=t!=null?t.people:t)!=null?s["0"]:s)!=null?s.displayname:s,pathAlias:(s=(s=t!=null?t.people:t)!=null?s["0"]:s)!=null?s.pathAlias:s,intlName:"photo-page-scrappy.SINGLE_FAVER"},data:i}))+"\n"},9:function(e,t,n,r,i){var s;return(s=(n.ifCond||t&&t.ifCond||n.helperMissing).call(t!=null?t:{},t!=null?t.totalPeopleFaved:t,"===",2,{name:"ifCond",hash:{},fn:e.program(10,i,0),inverse:e.program(12,i,0),data:i}))!=null?s:""},10:function(e,t,n,r,i){var s;return"					"+e.escapeExpression((n.intlHTMLMessage||t&&t.intlHTMLMessage||n.helperMissing).call(t!=null?t:{},{name:"intlHTMLMessage",hash:{displayNameTwo:(s=(s=t!=null?t.people:t)!=null?s["1"]:s)!=null?s.displayname:s,pathAliasTwo:(s=(s=t!=null?t.people:t)!=null?s["1"]:s)!=null?s.pathAlias:s,displayNameOne:(s=(s=t!=null?t.people:t)!=null?s["0"]:s)!=null?s.displayname:s,pathAliasOne:(s=(s=t!=null?t.people:t)!=null?s["0"]:s)!=null?s.pathAlias:s,intlName:"photo-page-scrappy.DOUBLE_FAVER"},data:i}))+"\n"},12:function(e,t,n,r,i){var s;return(s=(n.ifCond||t&&t.ifCond||n.helperMissing).call(t!=null?t:{},t!=null?t.totalPeopleFaved:t,">",2,{name:"ifCond",hash:{},fn:e.program(13,i,0),inverse:e.noop,data:i}))!=null?s:""},13:function(e,t,n,r,i){var s;return(s=(n.ifCond||t&&t.ifCond||n.helperMissing).call(t!=null?t:{},t!=null?t.remainingFavedBy:t,"===",1,{name:"ifCond",hash:{},fn:e.program(14,i,0),inverse:e.program(16,i,0),data:i}))!=null?s:""},14:function(e,t,n,r,i){var s;return"							"+e.escapeExpression((n.intlHTMLMessage||t&&t.intlHTMLMessage||n.helperMissing).call(t!=null?t:{},{name:"intlHTMLMessage",hash:{displayNameThree:(s=(s=t!=null?t.people:t)!=null?s["2"]:s)!=null?s.displayname:s,pathAliasThree:(s=(s=t!=null?t.people:t)!=null?s["2"]:s)!=null?s.pathAlias:s,displayNameTwo:(s=(s=t!=null?t.people:t)!=null?s["1"]:s)!=null?s.displayname:s,pathAliasTwo:(s=(s=t!=null?t.people:t)!=null?s["1"]:s)!=null?s.pathAlias:s,displayNameOne:(s=(s=t!=null?t.people:t)!=null?s["0"]:s)!=null?s.displayname:s,pathAliasOne:(s=(s=t!=null?t.people:t)!=null?s["0"]:s)!=null?s.pathAlias:s,intlName:"photo-page-scrappy.TRIPLE_FAVER"},data:i}))+"\n"},16:function(e,t,n,r,i){var s;return"							"+e.escapeExpression((n.intlHTMLMessage||t&&t.intlHTMLMessage||n.helperMissing).call(t!=null?t:{},{name:"intlHTMLMessage",hash:{count:t!=null?t.remainingFavedBy:t,displayNameTwo:(s=(s=t!=null?t.people:t)!=null?s["1"]:s)!=null?s.displayname:s,pathAliasTwo:(s=(s=t!=null?t.people:t)!=null?s["1"]:s)!=null?s.pathAlias:s,displayNameOne:(s=(s=t!=null?t.people:t)!=null?s["0"]:s)!=null?s.displayname:s,pathAliasOne:(s=(s=t!=null?t.people:t)!=null?s["0"]:s)!=null?s.pathAlias:s,intlName:"photo-page-scrappy.MULTI_FAVER"},data:i}))+"\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.totalPeopleFaved:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:""},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/sub-photo-faved-by",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("hermes-template-person",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){var s,o=e.lambda,u=e.escapeExpression;return"data-"+u(o((s=t!=null?t.dataAttr:t)!=null?s.key:s,t))+'="'+u(o((s=t!=null?t.dataAttr:t)!=null?s.value:s,t))+'"'},3:function(e,t,n,r,i){var s;return e.escapeExpression(e.lambda((s=t!=null?t.buddyicon:t)!=null?s["default"]:s,t))},5:function(e,t,n,r,i){var s;return e.escapeExpression((s=(s=n.buddyicon||(t!=null?t.buddyicon:t))!=null?s:n.helperMissing,typeof s=="function"?s.call(t!=null?t:{},{name:"buddyicon",hash:{},data:i}):s))},7:function(e,t,n,r,i){return'	<a class="remove-person hide-text ui-icon-comment-delete" href="#">x</a>\n'},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o,u=t!=null?t:{},a=n.helperMissing,f="function",l=e.escapeExpression;return'<li class="person" '+((s=n["if"].call(u,t!=null?t.dataAttr:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:"")+'>\n	<a class="'+l((o=(o=n.extraClasses||(t!=null?t.extraClasses:t))!=null?o:a,typeof o===f?o.call(u,{name:"extraClasses",hash:{},data:i}):o))+'" href="/photos/'+l((o=(o=n.pathAlias||(t!=null?t.pathAlias:t))!=null?o:a,typeof o===f?o.call(u,{name:"pathAlias",hash:{},data:i}):o))+'/" data-track="'+l((o=(o=n.dataTrackPrefix||(t!=null?t.dataTrackPrefix:t))!=null?o:a,typeof o===f?o.call(u,{name:"dataTrackPrefix",hash:{},data:i}):o))+'PersonIconClick">\n		<span class="person-icon">\n			<span class="circle-icon" data-person-nsid="'+l((o=(o=n.nsid||(t!=null?t.nsid:t))!=null?o:a,typeof o===f?o.call(u,{name:"nsid",hash:{},data:i}):o))+'">\n				<img src="'+((s=n["if"].call(u,(s=t!=null?t.buddyicon:t)!=null?s["default"]:s,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.program(5,i,0),data:i}))!=null?s:"")+'" width="'+l((o=(o=n.size||(t!=null?t.size:t))!=null?o:a,typeof o===f?o.call(u,{name:"size",hash:{},data:i}):o))+'" height="'+l((o=(o=n.size||(t!=null?t.size:t))!=null?o:a,typeof o===f?o.call(u,{name:"size",hash:{},data:i}):o))+'">\n			</span>\n			<span class="person-name">\n				'+l((n.truncate||t&&t.truncate||a).call(u,t!=null?t.displayname:t,20,{name:"truncate",hash:{},data:i}))+"\n			</span>\n		</span>\n	</a>\n"+((s=n["if"].call(u,t!=null?t.showRemove:t,{name:"if",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))!=null?s:"")+"</li>\n"},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/person",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("hermes-template-fave-menu",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){var s,o=t!=null?t:{};return"	<ul>\n"+((s=n.each.call(o,t!=null?t.people:t,{name:"each",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(o,t!=null?t.moreCount:t,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))!=null?s:"")+"	</ul>\n"},2:function(e,t,n,r,i){var s;return(s=e.invokePartial(r.person,t,{name:"person",data:i,indent:"			",helpers:n,partials:r,decorators:e.decorators}))!=null?s:""},4:function(e,t,n,r,i){var s;return"			<li class='faves-more'><a href='#'>"+e.escapeExpression((s=(s=n.moreCount||(t!=null?t.moreCount:t))!=null?s:n.helperMissing,typeof s=="function"?s.call(t!=null?t:{},{name:"moreCount",hash:{},data:i}):s))+" more</a></li>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.people:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:""},usePartial:!0,useData:!0}),r={};e.Array.each(["person"],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/fave-menu",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base","hermes-template-person"]});
YUI.add("flickr-photos-getFavorites-fetcher",function(e,t){"use strict";function n(t){var n;return n={photo_id:t.id,extras:e.APIHelper.request.getRebootPhotoExtras(),per_page:t.perPage||50,page:t.page||1,hermes:1},t.scrappy&&(n.sort="date_asc"),n}function r(t,n,r){var i=t[0],s=t[1],o=t[2],u;return u={id:i.photo.id,total:i.photo.total,people:[]},i.photo.person&&i.photo.person.forEach(function(t){var n=e.APIHelper.response.parsePerson(t);u.people.push(o.addOrUpdate(n))}),u.people={perPage:r.per_page,page:r.page,pageContent:u.people,totalItems:parseInt(u.total||0,10)},s.addOrUpdate(u),u.people.pageContent}function i(n,r){var i=this,s;return r.flipper.isFlipped("enable-scrappy-photo-page")&&(n.scrappy=!0),s=this._processParams(n),e.Promise.all([r.callAPI("flickr.photos.getFavorites",s,!0),r.getModelRegistry("photo-people-who-faved-models"),r.getModelRegistry("person-models")]).then(function(e){return i._processResponse(e,n,s)},e.FetcherErrorLogger(t))}e.namespace("ListFetchers")["flickr-photos-getFavorites"]={run:i,_processParams:n,_processResponse:r}},"@VERSION@",{requires:["flickr-promise","api-helper"],optional:["photo-people-who-faved-models","person-models"]});
YUI.add("photo-people-who-faved-models",function(e){function t(e){t.superclass.constructor.call(this,e)}e.Models[this.name]=t,e.extend(t,e.FlickrModelRegistry,{name:this.name,remote:{read:function(t){return e.ListFetchers["flickr-photos-getFavorites"].run(t,this.appContext)}},attributes:{total:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return t=e.AttributeHelpers.coerceInteger(t),t<0&&(t=0),t},defaultValue:0},people:{isCollection:!0,pageFetch:{listFetcher:e.ListFetchers["flickr-photos-getFavorites"]}}}})},"@VERSION@",{requires:["flickr-model-registry","flickr-photos-getFavorites-fetcher"]});
YUI.add("sub-photo-fave-view",function(e){var t=50,n=30,r=750,i="whoFaved";e.FlickrView.create(this.name,e.FlickrView,[],{langBundles:this.details.langBundles,initializer:function(e){return this.photoId=e.photoId,this.get("container").get("innerHTML")===""&&this.setContainerHTML(""),this},loadState:function(){var t=this,n=this.appContext.getViewer(),r=[];return r.push(this.appContext.getModel("photo-models",this.photoId).then(function(e){t.set("photo",e)})),r.push(this.appContext.getModel("photo-engagement-models",this.photoId).then(function(e){t.set("photo-engagement",e)})),r.push(this.appContext.getModel("photo-people-who-faved-models",this.photoId).then(function(e){t.set("photo-people-who-faved-model",e)})),n.signedIn&&t.appContext.getModel("person-models",n.nsid).then(function(e){t.set("viewer-person-model",e)}),e.Promise.all(r)},buildContainer:function(){var e=this.get("photo-people-who-faved-model"),n=e.toJSON().total,r;return n===0?(this.setContainerHTML(""),this.get("container").removeClass("faves-present")):(r=e.getValue("people").toJSON(),r.forEach(function(e){e.pathAlias+="/favorites"}),this.setContainerWithTemplate("sub-photo-faved-by",{people:r,totalPeopleFaved:n,remainingFavedBy:n-2,isFaved:this.get("photo-engagement").getValue("isFaved"),viewerIsOwner:this.get("photo").getValue("owner").getValue("isMe")}),this.get("container").addClass("faves-present"),YUI.Env.isServer||(this.processingFave||this.buildWhoFavedTooltip(),this.get("container").show(),this.get("photo-people-who-faved-model").getValue("total")>t&&this.setUpFaveTooltipPagination())),this},activate:function(){var t=this,n=this.get("container");return this.registerEventHandler(n.delegate("click",this.faveCountClicked,"a.remaining-faved-by",t)),n.one(".faved-by")||n.setStyle("display","none"),n.one("a.ui-icon-fave-star")&&this.registerEventHandler(n.delegate("click",this.handleFaveClick,"a.ui-icon-fave-star",this)),this.registerEventHandler(this.get("photo-engagement").on("valuesChanged",function(n){if(typeof n["faveCount"]=="undefined")return;t.get("photo-engagement").getValue("isFaved")?t.get("photo-engagement").getValue("faveCount")<=t.get("photo-people-who-faved-model").getValue("people").getList().length+1&&t.get("photo-people-who-faved-model").getValue("people").appendToList(t.get("viewer-person-model")):t.get("photo-people-who-faved-model").getValue("people").removeFromList(t.appContext.getViewer().nsid),t.get("photo-people-who-faved-model").setValue("total",t.get("photo-engagement").getValue("faveCount")),t.get("photo-engagement").remoteUpdate().then(function(){t.processingFave=!1,t.buildContainer()},function(n){t.processingFave=!1,n.code!==3&&(t.get("photo-people-who-faved-model").revertValue("people"),t.get("photo-people-who-faved-model").revertValue("total"),t.get("photo-engagement").registry.toggleFave(t.photoId),t.buildContainer(),t.fire("subviewViewEvent","getDialogOffset",function(n){var r=e.Views.dialog.getInstance("dialog-alert",{content:t.intlMessage({intlName:"fave-view.COULDNT_FAVE"}),attrs:{title:t.intlMessage({intlName:"common.ERROR"}),level:"warning",confirmLabel:t.intlMessage({intlName:"common.OK"})},appContext:t.appContext,offsetLeft:n,dialogClass:"scrappy-dialog"});r.show()}))})})),this},faveCountClicked:function(t,n){t.preventDefault(),this.favedTooltip&&this.get("photo-engagement").getValue("faveCount")&&(this.favedTooltip.toggle(),e.rapidTracker.beacon(this.name,"faveCountActionBarButtonClick")),this.positionTooltip()},positionTooltip:function(){var e,t,n=this.get("container").one("a.remaining-faved-by").getDOMNode();t=n.getBoundingClientRect(),e=this.get("container").one("a.remaining-faved-by").getXY(),t.left-t.width+48<0?this.get("container").one(".dialog-tooltip").setStyle("left",t.left):this.get("container").one(".dialog-tooltip").setStyle("left",t.left-t.width+48),this.get("container").one(".dialog-tooltip").setStyle("top",e[1]+30)},favedTooltipScroll:function(s){var o,u,a,f,l=this;o=this.favedTooltipWrapper.getDOMNode().scrollTop;if(o>this.pageVals.bottomOfCurrentFavePage-r)return u=this.favedTooltipWrapper.one(".faves-more"),u.set("text",this.intlMessage({intlName:"common.LOADING"})),f=this.get("photo-people-who-faved-model").getValue("people").getPage({page:++this.pageVals.currentFavePage,perPage:t}).then(function(r){var s="",o;u.remove(),r.forEach(function(e){e=e.toJSON(),e.size=n,e.pathAlias+="/favorites",e.dataTrackPrefix=i,s+=l.templates("person")(e)}),a=l.favedTooltipWrapper.one("ul"),a.append(s),l.pageVals.currentFavePage<l.pageVals.numFavePages&&(l.pageVals.bottomOfCurrentFavePage+=l.pageVals.lineHeight*r.length,l.favedTooltipScrollWatcher=e.config.win.requestAnimationFrame(l.favedTooltipScroll.bind(l)),o=l.get("photo-people-who-faved-model").getValue("total")-l.pageVals.currentFavePage*t,u.set("text",o+" more"),a.append(u))}),f;this.pageVals.currentFavePage<this.pageVals.numFavePages&&(this.favedTooltipScrollWatcher=window.requestAnimationFrame(this.favedTooltipScroll.bind(this)))},buildWhoFavedTooltip:function(){var r=this.get("container"),s=this.get("photo-people-who-faved-model"),o,u,a,f;return u=s.getValue("people").toJSON(),u.forEach(function(e){e.size=n,e.pathAlias+="/favorites",e.dataTrackPrefix=i}),u.splice(0,2),a=Math.ceil(s.getValue("people").getList().length/t),f=Math.max(0,s.getValue("total")-a*t),o=this.templates("fave-menu")({people:u,moreCount:f}),this.favedTooltip=e.Views.dialog.getNewInstance("dialog-tooltip",{content:o,anchorTo:r,parent:this,positioning:!1,rootEl:r}),this.favedTooltip.render(),this.favedTooltip.get("container").removeAttribute("data-action"),this.favedTooltip},setUpFaveTooltipPagination:function(){var e=this.get("container"),n,r=this.get("photo-people-who-faved-model"),i=this;this.pageVals={numFavePages:0,currentFavePage:0,lineHeight:0,bottomOfCurrentFavePage:0},this.pageVals.numFavePages=Math.ceil(r.getValue("total")/t);if(this.pageVals.numFavePages<=1)return;this.pageVals.currentFavePage=Math.ceil(r.getValue("people").getList().length/
t),this.pageVals.currentFavePage=Math.max(1,this.pageVals.currentFavePage),this.favedTooltipWrapper=e.one(".ui-dialog-wrapper"),e.one(".dialog-tooltip").setStyle("visibility","hidden"),e.one(".dialog-tooltip").removeClass("ui-util-removed"),n=this.favedTooltipWrapper.one("li").get("clientHeight"),this.pageVals.lineHeight=this.favedTooltipWrapper.one("li:nth-child(2)").get("clientHeight"),this.pageVals.bottomOfCurrentFavePage=n+(t-1)*this.pageVals.lineHeight-this.favedTooltipWrapper.get("clientHeight"),this.pageVals.bottomOfCurrentFavePage+=(this.pageVals.currentFavePage-1)*t*this.pageVals.lineHeight,e.one(".dialog-tooltip").setStyle("visibility","visible"),e.one(".dialog-tooltip").addClass("ui-util-removed"),this.registerEventHandler(this.favedTooltip.on("show",function(e){i.favedTooltipScrollWatcher=window.requestAnimationFrame(i.favedTooltipScroll.bind(i)),i.favedTooltip.on(["dismiss","hide","destroy"],function(e){i.favedTooltipScrollWatcher&&(window.cancelAnimationFrame(i.favedTooltipScrollWatcher),delete i.favedTooltipScrollWatcher),i.favedTooltip.detach("dismiss"),i.favedTooltip.detach("hide"),i.favedTooltip.detach("destroy")})}))},handleFaveClick:function(t){t.preventDefault();if(this.processingFave)return;this.appContext.getViewer().signedIn?(this.processingFave=!0,this.get("photo-engagement").registry.toggleFave(this.photoId),this.buildContainer(),e.rapidTracker.beacon(this.name,"faveStarFaveListClick")):this.signedOutFaveAttemptDialog()},signedOutFaveAttemptDialog:function(){var t=this,n;n=new e.Views.FluidModal({appContext:this.appContext,title:this.intlMessage({intlName:"fave-view.SIGN_IN_BEFORE_FAVE_TITLE"}),htmlMessage:this.intlMessage({intlName:"fave-view.SIGN_IN_BEFORE_FAVE_MESSAGE"}),actionButtonLabel:this.intlMessage({intlName:"fave-view.SIGN_IN_AND_FAVE"}),cancelButtonLabel:this.intlMessage({intlName:"common.CANCEL"})}),n.on("actionClick",function(){e.SigninHelper.addPendingFave({id:t.photoId})}),n.show()}})},"@VERSION@",{requires:["flickr-view","hermes-template-sub-photo-faved-by","dialog","signin-helper","hermes-template-fave-menu","hermes-template-person","animation-manager"],optional:["photo-engagement-models","photo-people-who-faved-models","person-models"],langBundles:["common","photo-page-scrappy","fave-view"]});
YUI.add("sub-photo-left-view",function(e){e.FlickrView.create(this.name,e.FlickrView,[],{initializer:function(e){return this.nsid=e.nsid,this.photoId=e.photoId,this.backToURL=e.backToURL,this.get("container").get("innerHTML")===""&&this.setContainerHTML(""),this},subviewConfig:{"sub-photo-title-desc-view":{requiredToShowOnClient:!0,requiredToShowOnServer:!0},"attribution-view":{requiredToShowOnClient:!1,requiredToShowOnServer:!0,additionalViewClasses:["clear-float","photo-attribution"]},"sub-photo-comments-view":{requiredToShowOnClient:!1,requiredToShowOnServer:!1},"sub-photo-fave-view":{requiredToShowOnClient:!1,requiredToShowOnServer:!1}},loadState:function(){return e.Promise.resolve()},buildContainer:function(){return this.setContainerWithTemplate("sub-photo-left"),this},buildErrorContainer:function(){},activate:function(){return this}})},"@VERSION@",{requires:["flickr-view","hermes-template-sub-photo-left","sub-photo-left-css","url-helper"],optional:["attribution-view","sub-photo-title-desc-view","photo-license-view","sub-photo-comments-view","sub-photo-fave-view"]});
YUI.add("hermes-template-sub-photo-right",function(e,t){var n=e.Template.Handlebars.revive({compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s=t!=null?t:{},o=n.helperMissing,u=e.escapeExpression;return'<div class="sub-photo-right-row1">\n    '+u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["sub-photo-right-stats-view"]:t,{name:"outlet",hash:{},data:i}))+"\n    "+u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["sub-photo-date-view"]:t,{name:"outlet",hash:{},data:i}))+"\n    "+u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["photo-license-view"]:t,{name:"outlet",hash:{},data:i}))+'\n    <div style="clear: both;"></div>\n</div>\n\n'+u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["photo-charm-exif-scrappy-view"]:t,{name:"outlet",hash:{},data:i}))+"\n"+u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["sub-photo-contexts-view"]:t,{name:"outlet",hash:{},data:i}))+"\n"+u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["sub-photo-tags-view"]:t,{name:"outlet",hash:{},data:i}))+"\n"+u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["sub-photo-additional-info-view"]:t,{name:"outlet",hash:{},data:i}))},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/sub-photo-right",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("exif-camera-map",function(e){"use strict";e.ExifCameraMap={cameraTypesMap:{"Digital SLR":{fileName:"CanonEOSRebelXT"},"Point and Shoot":{fileName:"CanonPowerShotSD100"},Cameraphone:{fileName:"SamsungGalaxySII"},"Video Camera":{fileName:"SonyCyberShotDSCF828"},"Digital Back":{fileName:"generic"},"Digital Rangefinder":{fileName:"generic"},"Film Camera":{fileName:"Lomo"},"Mirrorless Camera":{fileName:"PanasonicLumixGF1"}},cameraMap:{iPhone:{pattern:/iphone/i,fileName:"iPhone5s"},canonEOS5D:{pattern:/Canon EOS(\-1D| 5D)/i,fileName:"CanonEOSMarkII"},canonEOS10D:{pattern:/canon EOS 10D/i,fileName:"CanonEOS10D"},canonEOS60D:{pattern:/canon EOS 60D/i,fileName:"CanonEOS60D"},canonEOSDigitalRebel:{pattern:/Canon EOS (REBEL T3i|600D|Kiss X5)/i,fileName:"CanonEOSRebelXT"},canonPowerShotA510:{pattern:/Canon PowerShot A510/i,fileName:"CanonPowerShotA510"},canonPowerShotSD100:{pattern:/Canon PowerShot SD100/i,fileName:"CanonPowerShotSD100"},canonPowerShotSD750:{pattern:/Canon PowerShot SD750/i,fileName:"CanonPowerShotSD750"},canonPowershotG9:{pattern:/Canon Powershot G9/i,fileName:"CanonPowershotG9"},canonPowershotN:{pattern:/Canon Powershot N/i,fileName:"CanonPowershotN"},htcEvo4G:{pattern:/HTC EVO 4G/i,fileName:"HTCEVO4G"},htcOne:{pattern:/HTC One/i,fileName:"HTCOne"},htcGeneric:{pattern:/htc/i,fileName:"HTCOne"},goPro:{pattern:/gopro/i,fileName:"GoProHero3"},kodakEasyShareZ740Zoom:{pattern:/kodak EasyShare Z740 Zoom/i,fileName:"KodakEasyShareZ740Zoom"},leica:{pattern:/Leica|Zeiss/i,fileName:"Leica"},lomo:{pattern:/Lomo/i,fileName:"Lomo"},lytro:{pattern:/Lytro/i,fileName:"Lytro"},motorolaX:{pattern:/Motorola X/i,fileName:"MotorolaX"},nexus5:{pattern:/Nexus 5|LGE Nexus 4/i,fileName:"Nexus5"},nikonCoolPix4600:{pattern:/Nikon CoolPix/i,fileName:"NikonCoolPix4600"},nikonDF:{pattern:/Nikon DF/i,fileName:"NikonDF"},nikonD100:{pattern:/Nikon D/i,fileName:"NikonD100"},olympusEVOLTE500:{pattern:/Olympus EVOLTE 500/i,fileName:"OlympusEVOLTE500"},panasonicDMCFZ18:{pattern:/Panasonic DMC\-FZ18/i,fileName:"PanasonicDMC-FZ18"},panasonicLumixGF1:{pattern:/Panasonic DMC-GF1/i,fileName:"PanasonicLumixGF1"},pentaxK100D:{pattern:/Pentax K100D/i,fileName:"PentaxK100D"},polaroid:{pattern:/Polaroid/i,fileName:"Polaroid"},samsungGalaxySII:{pattern:/SamsungGalaxySII$/i,fileName:"SamsungGalaxySII"},samsungGalaxySIII:{pattern:/SamsungGalaxySIII$/i,fileName:"SamsungGalaxySII"},sonyA7:{pattern:/Sony A7|ILCE-7/i,fileName:"SonyA7"},sonyAlphaDSLRA100:{pattern:/Sony Alpha DSLR\-A100/i,fileName:"SonyAlphaDSLR-A100"},sonyCyberShotDSCW80:{pattern:/Sony CyberShot DSC\-W80/i,fileName:"SonyCyber-ShotDSC-W80"},sonyCyberShotDSCF828:{pattern:/Sony CyberShot DSCF828|Sony DSC-F828/i,fileName:"SonyCyberShotDSCF828"},sonyEricsonK750i:{pattern:/Sony Ericson K750i/i,fileName:"SonyEricsonK750i"},sonyEricsonK800i:{pattern:/Sony Ericson K800i|K800i/i,fileName:"SonyEricsonK800i"},sonyNEX5:{pattern:/Sony NEX\-[56]/i,fileName:"SonyNEX-5"},sonyRX:{pattern:/SonyRX|Sony DSC-RX100/i,fileName:"SonyRX"}},lensTypeCSS:{large:"lens-lrg",medium:"lens-med",small:"lens-small",phone:"lens-phone"},identifyLens:function(e,t){var n=null;return t&&t.match(/cameraphone/i)&&(n=this.lensTypeCSS.phone),!n&&e&&(e.match(/(55\-250)|(70\-200)|(300|400|500|600|800)/)?n=this.lensTypeCSS.large:e.match(/(\-(55|70|85|105|135|200))|(135)/)&&(n=this.lensTypeCSS.medium)),!n&&(t||e)&&(n=this.lensTypeCSS.small),{className:n}},identifyCamera:function(t,n){var r,i;return t?(r=this.cameraMap,e.Object.some(r,function(e){if(e.pattern.test(t))return i=e,!0}),i||!i&&this.cameraTypesMap&&n&&this.cameraTypesMap[n]&&(i=this.cameraTypesMap[n]),i||(i={fileName:"generic"}),i):i},getCameraImageURL:function(t,n,r){var i,s,o,u;return o=null,i=this.identifyCamera(t,n),i&&i.fileName&&(u=e.config.flickr.urls&&e.config.flickr.urls.assetRoot?e.config.flickr.urls.assetRoot||"":"",o=u+"/images/scrappy-camera-icons/"+i.fileName+(r&&r.getCookie("density")>1?"@2x.png":".png"),s={url:o}),s}}},"@VERSION@");
YUI.add("hermes-template-photo-charm-exif-scrappy",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){var s,o=t!=null?t:{};return'				<!-- camera only -->\n				<li class="c-charm-item-camera'+((s=n["if"].call(o,(s=t!=null?t.cameraData:t)!=null?s.url:s,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))!=null?s:"")+' divided-bottom">\n					<div class="exif-row">\n						<div class="exif-item">\n'+((s=n["if"].call(o,t!=null?t.cameraData:t,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.program(7,i,0),data:i}))!=null?s:"")+'						</div>\n\n						<div class="exif-item c-charm-item-lens full-width">\n							<div class="exif-camera-name">\n'+((s=n["if"].call(o,(s=t!=null?t.exif:t)!=null?s.cameraURL:s,{name:"if",hash:{},fn:e.program(9,i,0),inverse:e.program(11,i,0),data:i}))!=null?s:"")+'							</div>\n							<div class="exif-row">\n								<div class="exif-item full-width">\n									<div class="lens-string">'+e.escapeExpression(e.lambda((s=t!=null?t.exif:t)!=null?s.lensModel:s,t))+"</div>\n								</div>\n							</div>\n					   </div>\n					</div>\n				</li>\n"},2:function(e,t,n,r,i){return" identified-camera"},4:function(e,t,n,r,i){var s;return'							<span class="ui-illustration-camera" title="'+e.escapeExpression(e.lambda((s=t!=null?t.exif:t)!=null?s.camera:s,t))+'" '+((s=n.unless.call(t!=null?t:{},t!=null?t.isMobileExif:t,{name:"unless",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))!=null?s:"")+"></span>\n"},5:function(e,t,n,r,i){var s;return'style="background-image:url('+e.escapeExpression((s=(s=n.cameraData||(t!=null?t.cameraData:t))!=null?s:n.helperMissing,typeof s=="function"?s.call(t!=null?t:{},{name:"cameraData",hash:{},data:i}):s))+')"'},7:function(e,t,n,r,i){return'							<i class="ui-icon-camera"></i>\n'},9:function(e,t,n,r,i){var s,o=e.lambda,u=e.escapeExpression;return"									<a href="+u(o((s=t!=null?t.exif:t)!=null?s.cameraURL:s,t))+">\n										"+u(o((s=t!=null?t.exif:t)!=null?s.camera:s,t))+"\n									</a>\n"},11:function(e,t,n,r,i){var s;return"									"+e.escapeExpression(e.lambda((s=t!=null?t.exif:t)!=null?s.camera:s,t))+"\n"},13:function(e,t,n,r,i){var s;return'					<li class="c-charm-item-aperture two-up">\n'+((s=n["if"].call(t!=null?t:{},t!=null?t.isMobileExif:t,{name:"if",hash:{},fn:e.program(14,i,0),inverse:e.program(16,i,0),data:i}))!=null?s:"")+"						<span>\u0192/"+e.escapeExpression(e.lambda((s=t!=null?t.exif:t)!=null?s.fNumber:s,t))+"</span>\n					</li>\n"},14:function(e,t,n,r,i){return'							<svg class="icon icon-aperture"><use xlink:href="#icon-aperture"></use></svg>\n'},16:function(e,t,n,r,i){return'							<i title="'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.APERTURE"},data:i}))+'" class="ui-icon-tiny-aperture"></i>\n'},18:function(e,t,n,r,i){var s;return'					<li class="c-charm-item-focal-length two-up">\n'+((s=n["if"].call(t!=null?t:{},t!=null?t.isMobileExif:t,{name:"if",hash:{},fn:e.program(19,i,0),inverse:e.program(21,i,0),data:i}))!=null?s:"")+"						<span>"+e.escapeExpression(e.lambda((s=t!=null?t.exif:t)!=null?s.focalLength:s,t))+"</span>\n					</li>\n"},19:function(e,t,n,r,i){return'							<svg class="icon icon-focal_length"><use xlink:href="#icon-focal_length"></use></svg>\n'},21:function(e,t,n,r,i){return'							<i title="'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.FOCAL_LENGTH"},data:i}))+'" class="ui-icon-tiny-focal-length"></i>\n'},23:function(e,t,n,r,i){var s;return'					<li class="c-charm-item-exposure-time two-up">\n'+((s=n["if"].call(t!=null?t:{},t!=null?t.isMobileExif:t,{name:"if",hash:{},fn:e.program(24,i,0),inverse:e.program(26,i,0),data:i}))!=null?s:"")+"						<span>"+e.escapeExpression(e.lambda((s=t!=null?t.exif:t)!=null?s.exposureTime:s,t))+"</span>\n					</li>\n"},24:function(e,t,n,r,i){return'							<svg class="icon icon-shutter_speed"><use xlink:href="#icon-shutter_speed"></use></svg>\n'},26:function(e,t,n,r,i){return'							<i title="'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.EXPOSURE_TIME"},data:i}))+'" class="ui-icon-tiny-exposure-time"></i>\n'},28:function(e,t,n,r,i){var s;return'					<li class="c-charm-item-iso two-up">\n'+((s=n["if"].call(t!=null?t:{},t!=null?t.isMobileExif:t,{name:"if",hash:{},fn:e.program(29,i,0),inverse:e.program(31,i,0),data:i}))!=null?s:"")+"						<span>"+e.escapeExpression(e.lambda((s=t!=null?t.exif:t)!=null?s.iso:s,t))+"</span>\n					</li>\n"},29:function(e,t,n,r,i){return'							<svg class="icon icon-ISO"><use xlink:href="#icon-ISO"></use></svg>\n'},31:function(e,t,n,r,i){return'							<i title="ISO" class="ui-icon-tiny-iso"></i>\n'},33:function(e,t,n,r,i){var s,o,u=t!=null?t:{},a=n.helperMissing;return'\n					<li class="c-charm-item-flash two-up">\n\n'+((s=n["if"].call(u,(s=t!=null?t.exif:t)!=null?s.flashModeAuto:s,{name:"if",hash:{},fn:e.program(34,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n"+((s=n["if"].call(u,(s=t!=null?t.exif:t)!=null?s.flashModeOn:s,{name:"if",hash:{},fn:e.program(45,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n"+((s=n["if"].call(u,(s=t!=null?t.exif:t)!=null?s.flashModeOff:s,{name:"if",hash:{},fn:e.program(54,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n"+((s=(n.ifCond||t&&t.ifCond||a).call(u,(s=t!=null?t.exif:t)!=null?s.flash:s,"===","Fired",{name:"ifCond",hash:{},fn:e.program(59,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n						<span>"+e.escapeExpression((o=(o=n.flashString||(t!=null?t.flashString:t))!=null?o:a,typeof o=="function"?o.call(u,{name:"flashString",hash:{},data:i}):o))+"</span>\n\n					</li>\n\n"},34:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},(s=t!=null?t.exif:t)!=null?s.flashFired:s,{name:"if",hash:{},fn:e.program(35,i,0),inverse:e.program(40,i,0),data:i}))!=null?s:""},35:function(e,t,n,r,i){var s;return(
s=n["if"].call(t!=null?t:{},t!=null?t.isMobileExif:t,{name:"if",hash:{},fn:e.program(36,i,0),inverse:e.program(38,i,0),data:i}))!=null?s:""},36:function(e,t,n,r,i){return'									<svg class="icon icon-flash_auto"><use xlink:href="#icon-flash_auto"></use></svg>\n'},38:function(e,t,n,r,i){return'									<i title="'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.FLASH_AUTO_FIRED"},data:i}))+'" class="ui-icon-tiny-flash-auto"></i>\n'},40:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.isMobileExif:t,{name:"if",hash:{},fn:e.program(41,i,0),inverse:e.program(43,i,0),data:i}))!=null?s:""},41:function(e,t,n,r,i){return'									<svg class="icon icon-flash_off"><use xlink:href="#icon-flash_off"></use></svg>\n'},43:function(e,t,n,r,i){return'									<i title="'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.FLASH_AUTO_NO_FIRE"},data:i}))+'" class="ui-icon-tiny-flash-auto"></i>\n'},45:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},(s=t!=null?t.exif:t)!=null?s.flashFired:s,{name:"if",hash:{},fn:e.program(46,i,0),inverse:e.program(51,i,0),data:i}))!=null?s:""},46:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.isMobileExif:t,{name:"if",hash:{},fn:e.program(47,i,0),inverse:e.program(49,i,0),data:i}))!=null?s:""},47:function(e,t,n,r,i){return'									<svg class="icon icon-flash_on"><use xlink:href="#icon-flash_on"></use></svg>\n'},49:function(e,t,n,r,i){return'									<i title="'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.FLASH_ON_FIRED"},data:i}))+'" class="ui-icon-tiny-flash-on"></i>\n'},51:function(e,t,n,r,i){var s;return'								<!-- yes, apparently flash can be "on" but not actually fire, per EXIF. -->\n'+((s=n["if"].call(t!=null?t:{},t!=null?t.isMobileExif:t,{name:"if",hash:{},fn:e.program(41,i,0),inverse:e.program(52,i,0),data:i}))!=null?s:"")},52:function(e,t,n,r,i){return'									<i title="'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.FLASH_ON_NO_FIRE"},data:i}))+'" class="ui-icon-tiny-flash-on"></i>\n'},54:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.isMobileExif:t,{name:"if",hash:{},fn:e.program(55,i,0),inverse:e.program(57,i,0),data:i}))!=null?s:""},55:function(e,t,n,r,i){return'								<svg class="icon icon-flash_off"><use xlink:href="#icon-flash_off"></use></svg>\n'},57:function(e,t,n,r,i){return'								<i title="'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.FLASH_OFF"},data:i}))+'" class="ui-icon-tiny-flash-off"></i>\n'},59:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.isMobileExif:t,{name:"if",hash:{},fn:e.program(60,i,0),inverse:e.program(62,i,0),data:i}))!=null?s:""},60:function(e,t,n,r,i){return'								<svg class="icon icon-flash_on"><use xlink:href="#icon-flash_on"></use></svg>\n'},62:function(e,t,n,r,i){return'								<i title="'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.FLASH_ON_FIRED"},data:i}))+'" class="ui-icon-tiny-flash-on"></i>\n'},64:function(e,t,n,r,i,s,o){var u,a=t!=null?t:{};return"\n"+((u=n["if"].call(a,t!=null?t.exifInfoIsPresent:t,{name:"if",hash:{},fn:e.program(65,i,0,s,o),inverse:e.noop,data:i}))!=null?u:"")+"\n					<!-- Extended Exif -->\n\n"+((u=n.unless.call(a,t!=null?t.exifInfoIsPresent:t,{name:"unless",hash:{},fn:e.program(76,i,0,s,o),inverse:e.noop,data:i}))!=null?u:"")+"\n"},65:function(e,t,n,r,i,s,o){var u;return(u=n["if"].call(t!=null?t:{},t!=null?t.exif:t,{name:"if",hash:{},fn:e.program(66,i,0,s,o),inverse:e.noop,data:i}))!=null?u:""},66:function(e,t,n,r,i,s,o){var u,a=t!=null?t:{};return'							<li class="extended-exif two-up">\n'+((u=n["if"].call(a,t!=null?t.showExpanded:t,{name:"if",hash:{},fn:e.program(67,i,0,s,o),inverse:e.program(69,i,0,s,o),data:i}))!=null?u:"")+"							</li>\n"+((u=n.each.call(a,t!=null?t.extendedExif:t,{name:"each",hash:{},fn:e.program(71,i,0,s,o),inverse:e.noop,data:i}))!=null?u:"")},67:function(e,t,n,r,i){var s=t!=null?t:{},o=n.helperMissing,u=e.escapeExpression;return'									<i title="'+u((n.intlMessage||t&&t.intlMessage||o).call(s,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.HIDE_EXIF"},data:i}))+'" class="ui-icon-tiny-exif"></i>\n									<a href="#" class="show-extended-exif hide-moreExif">'+u((n.intlMessage||t&&t.intlMessage||o).call(s,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.HIDE_EXIF"},data:i}))+" </a>\n"},69:function(e,t,n,r,i){var s=t!=null?t:{},o=n.helperMissing,u=e.escapeExpression;return'									<i title="'+u((n.intlMessage||t&&t.intlMessage||o).call(s,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.SHOW_EXIF"},data:i}))+'" class="ui-icon-tiny-exif"></i>\n									<a href="#" class="show-extended-exif">'+u((n.intlMessage||t&&t.intlMessage||o).call(s,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.SHOW_EXIF"},data:i}))+" </a>\n"},71:function(e,t,n,r,i,s,o){var u,a,f=t!=null?t:{},l=n.helperMissing,c="function",h=e.escapeExpression;return((u=n["if"].call(f,o[1]!=null?o[1].showExpanded:o[1],{name:"if",hash:{},fn:e.program(72,i,0,s,o),inverse:e.program(74,i,0,s,o),data:i}))!=null?u:"")+'									<span class="exif-name">'+h((a=(a=n.label||(t!=null?t.label:t))!=null?a:l,typeof a===c?a.call(f,{name:"label",hash:{},data:i}):a))+' - </span>\n									<span class="exif-value">'+h((a=(a=n.value||(t!=null?t.value:t))!=null?a:l,typeof a===c?a.call(f,{name:"value",hash:{},data:i}):a))+"</span>\n								</li>\n"},72:function(e,t,n,r,i){return'									<li class="extended-exif-item">\n'},74:function(
e,t,n,r,i){return'									<li class="extended-exif-item" style="display: none;">\n'},76:function(e,t,n,r,i,s,o){var u;return(u=n["if"].call(t!=null?t:{},(u=(u=t!=null?t.exif:t)!=null?u.data:u)!=null?u.length:u,{name:"if",hash:{},fn:e.program(77,i,0,s,o),inverse:e.noop,data:i}))!=null?u:""},77:function(e,t,n,r,i,s,o){var u,a=t!=null?t:{},f=n.helperMissing,l=e.escapeExpression;return'							<li class="extended-exif">\n									<i title="'+l((n.intlMessage||t&&t.intlMessage||f).call(a,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.SHOW_EXIF"},data:i}))+'" class="ui-icon-tiny-exif"></i>\n									<a href="#" class="show-extended-exif">'+l((n.intlMessage||t&&t.intlMessage||f).call(a,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.SHOW_EXIF"},data:i}))+"</a>\n							</li>\n"+((u=n.each.call(a,t!=null?t.extendedExif:t,{name:"each",hash:{},fn:e.program(78,i,0,s,o),inverse:e.noop,data:i}))!=null?u:"")},78:function(e,t,n,r,i,s,o){var u,a,f=t!=null?t:{},l=n.helperMissing,c="function",h=e.escapeExpression;return((u=n["if"].call(f,o[1]!=null?o[1].showExpanded:o[1],{name:"if",hash:{},fn:e.program(72,i,0,s,o),inverse:e.program(74,i,0,s,o),data:i}))!=null?u:"")+'										<span class="exif-name">'+h((a=(a=n.label||(t!=null?t.label:t))!=null?a:l,typeof a===c?a.call(f,{name:"label",hash:{},data:i}):a))+' - </span>\n										<span class="exif-value">'+h((a=(a=n.value||(t!=null?t.value:t))!=null?a:l,typeof a===c?a.call(f,{name:"value",hash:{},data:i}):a))+"</span>\n									</li>\n"},80:function(e,t,n,r,i){var s;return'		<div class="exif-column-2">\n			<li class="c-charm-date">\n				<!-- On mobile we want to include the date taken -->\n				<svg class="icon icon-date"><use xlink:href="#icon-date"></use></svg>\n\n'+((s=n["if"].call(t!=null?t:{},t!=null?t.isDateTakenUnknown:t,{name:"if",hash:{},fn:e.program(81,i,0),inverse:e.program(86,i,0),data:i}))!=null?s:"")+"			</li>\n		</div>\n"},81:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing;return'					<span class="date-taken-label" title="'+((s=(n.friendlyDateScrappySubphoto||t&&t.friendlyDateScrappySubphoto||u).call(o,t!=null?t.datePosted:t,false,false,{name:"friendlyDateScrappySubphoto",hash:{},fn:e.program(82,i,0),inverse:e.noop,data:i}))!=null?s:"")+'">\n'+((s=(n.friendlyDateScrappySubphoto||t&&t.friendlyDateScrappySubphoto||u).call(o,t!=null?t.datePosted:t,false,false,{name:"friendlyDateScrappySubphoto",hash:{},fn:e.program(84,i,0),inverse:e.noop,data:i}))!=null?s:"")+"					</span>\n"},82:function(e,t,n,r,i){return e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlDate:t!=null?t.intlDate:t,intlName:t!=null?t.intlName:t},data:i}))},84:function(e,t,n,r,i){return"							"+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlDate:t!=null?t.intlDate:t,intlName:t!=null?t.intlName:t},data:i}))+"\n"},86:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing;return'					<span class="date-taken-label" title="'+((s=(n.friendlyDateScrappySubphoto||t&&t.friendlyDateScrappySubphoto||u).call(o,t!=null?t.datePosted:t,false,false,{name:"friendlyDateScrappySubphoto",hash:{},fn:e.program(82,i,0),inverse:e.noop,data:i}))!=null?s:"")+'">\n'+((s=(n.friendlyDateScrappySubphoto||t&&t.friendlyDateScrappySubphoto||u).call(o,t!=null?t.dateTaken:t,t!=null?t.takenGranularity:t,true,{name:"friendlyDateScrappySubphoto",hash:{},fn:e.program(84,i,0),inverse:e.noop,data:i}))!=null?s:"")+"					</span>\n"},88:function(e,t,n,r,i){var s,o=t!=null?t:{};return'				<li class="c-charm-item-location">\n\n'+((s=n.unless.call(o,t!=null?t.isMobileExif:t,{name:"unless",hash:{},fn:e.program(89,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n"+((s=n["if"].call(o,t!=null?t.showEditLocation:t,{name:"if",hash:{},fn:e.program(93,i,0),inverse:e.program(95,i,0),data:i}))!=null?s:"")+"\n"+((s=n["if"].call(o,t!=null?t.isMobileExif:t,{name:"if",hash:{},fn:e.program(97,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n"+((s=n["if"].call(o,t!=null?t.isFoursquare:t,{name:"if",hash:{},fn:e.program(99,i,0),inverse:e.program(102,i,0),data:i}))!=null?s:"")+"\n"+((s=n["if"].call(o,t!=null?t.isMobileExif:t,{name:"if",hash:{},fn:e.program(111,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n				</div>\n				</li>\n"},89:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},(s=t!=null?t.location:t)!=null?s.staticMaps:s,{name:"if",hash:{},fn:e.program(90,i,0),inverse:e.noop,data:i}))!=null?s:""},90:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom3:s,{name:"if",hash:{},fn:e.program(91,i,0),inverse:e.noop,data:i}))!=null?s:""},91:function(e,t,n,r,i){var s,o,u=e.escapeExpression,a=e.lambda;return'							<div class="map-container">\n								<a class="static-maps" href='+u((o=(o=n.linkToMap||(t!=null?t.linkToMap:t))!=null?o:n.helperMissing,typeof o=="function"?o.call(t!=null?t:{},{name:"linkToMap",hash:{},data:i}):o))+'>\n									<span class="static-map-attribution"></span>\n									<span class="bullseye"></span>\n									<span class="zoom zoom3" style="background-image: url('+u(a((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom3:s)!=null?s.src:s,t))+");background-image:-webkit-image-set(url("+u(a((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom3:s)!=null?s.src:s,t))+") 1x, url("+u(a((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom3:s)!=null?s.retinaSrc:s,t))+') 2x);"></span>\n									<span class="zoom zoom6" style="background-image: url('+u(a((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom6:s)!=null?s.src:s,t))+");background-image:-webkit-image-set(url("+u(a((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom6:s)!=null?s.src:s,t))+") 1x, url("+u(a((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom6:s)!=null?s.retinaSrc:s,t))+') 2x);"></span>\n									<span class="zoom zoom14" style="background-image: url('+
u(a((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom14:s)!=null?s.src:s,t))+");background-image:-webkit-image-set(url("+u(a((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom14:s)!=null?s.src:s,t))+") 1x, url("+u(a((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom14:s)!=null?s.retinaSrc:s,t))+') 2x);"></span>\n								</a>\n							</div>\n'},93:function(e,t,n,r,i){return'			   		<div class="location-data-container editable">\n'},95:function(e,t,n,r,i){return'			   		<div class="location-data-container">\n'},97:function(e,t,n,r,i){return'					<div class="location-icon">\n						<svg class="icon icon-location"><use xlink:href="#icon-location"></use></svg>\n					</div>\n'},99:function(e,t,n,r,i){var s,o,u=t!=null?t:{},a=n.helperMissing,f="function",l=e.escapeExpression;return'\n					<a class="foursquare-on-flickr-search location-name-link" href="/search/?foursquare_venueid='+l((o=(o=n.fourSquarePlaceId||(t!=null?t.fourSquarePlaceId:t))!=null?o:a,typeof o===f?o.call(u,{name:"fourSquarePlaceId",hash:{},data:i}):o))+'">\n						'+l((o=(o=n.locationText||(t!=null?t.locationText:t))!=null?o:a,typeof o===f?o.call(u,{name:"locationText",hash:{},data:i}):o))+"\n					</a>\n					"+((s=n["if"].call(u,t!=null?t.showEditLocation:t,{name:"if",hash:{},fn:e.program(100,i,0),inverse:e.noop,data:i}))!=null?s:"")+'\n					<a class="foursquare-venue" href="https://foursquare.com/venue/'+l((o=(o=n.fourSquarePlaceId||(t!=null?t.fourSquarePlaceId:t))!=null?o:a,typeof o===f?o.call(u,{name:"fourSquarePlaceId",hash:{},data:i}):o))+'" target="_newtab">\n						'+l((n.intlMessage||t&&t.intlMessage||a).call(u,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.POWERED_BY"},data:i}))+'<i title="Location" class="location ui-icon-tiny-foursquare"></i> '+l((n.intlMessage||t&&t.intlMessage||a).call(u,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.FOURSQUARE"},data:i}))+"\n					</a>\n\n"},100:function(e,t,n,r,i){return'<a href="#" class="edit-location" data-action="editLocation"></a>'},102:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.mostSpecificWoeId:t,{name:"if",hash:{},fn:e.program(103,i,0),inverse:e.program(108,i,0),data:i}))!=null?s:""},103:function(e,t,n,r,i){var s,o=t!=null?t:{};return((s=n["if"].call(o,t!=null?t.isMobileExif:t,{name:"if",hash:{},fn:e.program(104,i,0),inverse:e.program(106,i,0),data:i}))!=null?s:"")+"\n						"+((s=n["if"].call(o,t!=null?t.showEditLocation:t,{name:"if",hash:{},fn:e.program(100,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n"},104:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a="function",f=e.escapeExpression;return'							<a class="location-name-link" data-woe-id="'+f((s=(s=n.mostSpecificWoeId||(t!=null?t.mostSpecificWoeId:t))!=null?s:u,typeof s===a?s.call(o,{name:"mostSpecificWoeId",hash:{},data:i}):s))+'" href="/search/?woe_id='+f((s=(s=n.mostSpecificWoeId||(t!=null?t.mostSpecificWoeId:t))!=null?s:u,typeof s===a?s.call(o,{name:"mostSpecificWoeId",hash:{},data:i}):s))+'">\n				   				'+f((s=(s=n.locationText||(t!=null?t.locationText:t))!=null?s:u,typeof s===a?s.call(o,{name:"locationText",hash:{},data:i}):s))+"\n							</a>\n"},106:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a="function",f=e.escapeExpression;return'							<a class="location-name-link" href="/search/?woe_id='+f((s=(s=n.mostSpecificWoeId||(t!=null?t.mostSpecificWoeId:t))!=null?s:u,typeof s===a?s.call(o,{name:"mostSpecificWoeId",hash:{},data:i}):s))+'">\n				   				'+f((s=(s=n.locationText||(t!=null?t.locationText:t))!=null?s:u,typeof s===a?s.call(o,{name:"locationText",hash:{},data:i}):s))+"\n							</a>\n"},108:function(e,t,n,r,i){var s,o,u=t!=null?t:{};return"						"+e.escapeExpression((o=(o=n.locationText||(t!=null?t.locationText:t))!=null?o:n.helperMissing,typeof o=="function"?o.call(u,{name:"locationText",hash:{},data:i}):o))+"\n						"+((s=n["if"].call(u,t!=null?t.showEditLocation:t,{name:"if",hash:{},fn:e.program(109,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n"},109:function(e,t,n,r,i){return'<a href="#" class="location-name-link edit-location" data-action="editLocation"></a>'},111:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},(s=t!=null?t.location:t)!=null?s.staticMaps:s,{name:"if",hash:{},fn:e.program(112,i,0),inverse:e.noop,data:i}))!=null?s:""},112:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom3:s,{name:"if",hash:{},fn:e.program(113,i,0),inverse:e.noop,data:i}))!=null?s:""},113:function(e,t,n,r,i){var s,o=e.lambda,u=e.escapeExpression;return'							<div class="map-container">\n								<span class="static-maps">\n									<span class="bullseye"></span>\n									<span class="zoom zoom3" style="background-image: url('+u(o((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom3:s)!=null?s.src:s,t))+");background-image:-webkit-image-set(url("+u(o((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom3:s)!=null?s.src:s,t))+") 1x, url("+u(o((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom3:s)!=null?s.retinaSrc:s,t))+') 2x);"></span>\n									<span class="zoom zoom6" style="background-image: url('+u(o((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom6:s)!=null?s.src:s,t))+");background-image:-webkit-image-set(url("+u(o((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom6:s)!=null?s.src:s,t))+") 1x, url("+u(o((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom6:s)!=null?s.retinaSrc:s,t))+') 2x);"></span>\n									<span class="zoom zoom14" style="background-image: url('+u(o((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom14:s)!=null?s.src:s,t))+");background-image:-webkit-image-set(url("+u(o((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom14:s)!=null?s.src:s,t))+") 1x, url("+u(o((s=(s=(s=t!=null?t.location:t)!=null?s.staticMaps:s)!=null?s.zoom14:s)!=null?s.retinaSrc:s,t))+') 2x);"></span>\n								</span>\n							</div>\n'
},115:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.showEditLocation:t,{name:"if",hash:{},fn:e.program(116,i,0),inverse:e.noop,data:i}))!=null?s:""},116:function(e,t,n,r,i){return'					<li class="c-charm-item-location">\n			<span class="empty">\n				<span class="empty-map"></span>\n\n				<a href="#" class="add-location">'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.ADD_PHOTO_TO_MAP"},data:i}))+"</a>\n\n			</span>\n					</li>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i,s,o){var u,a=t!=null?t:{};return'<div class="ui-menu c-charm-list exif-charm-list">\n	<ul>\n		<div class="exif-column-1">\n			<!-- camera -->\n'+((u=n["if"].call(a,(u=t!=null?t.exif:t)!=null?u.camera:u,{name:"if",hash:{},fn:e.program(1,i,0,s,o),inverse:e.noop,data:i}))!=null?u:"")+"\n				<!-- exifs -->\n\n"+((u=n["if"].call(a,(u=t!=null?t.exif:t)!=null?u.fNumber:u,{name:"if",hash:{},fn:e.program(13,i,0,s,o),inverse:e.noop,data:i}))!=null?u:"")+"\n"+((u=n["if"].call(a,(u=t!=null?t.exif:t)!=null?u.focalLength:u,{name:"if",hash:{},fn:e.program(18,i,0,s,o),inverse:e.noop,data:i}))!=null?u:"")+"\n"+((u=n["if"].call(a,(u=t!=null?t.exif:t)!=null?u.exposureTime:u,{name:"if",hash:{},fn:e.program(23,i,0,s,o),inverse:e.noop,data:i}))!=null?u:"")+"\n"+((u=n["if"].call(a,(u=t!=null?t.exif:t)!=null?u.iso:u,{name:"if",hash:{},fn:e.program(28,i,0,s,o),inverse:e.noop,data:i}))!=null?u:"")+"\n"+((u=n["if"].call(a,(u=t!=null?t.exif:t)!=null?u.flash:u,{name:"if",hash:{},fn:e.program(33,i,0,s,o),inverse:e.noop,data:i}))!=null?u:"")+"\n"+((u=n.unless.call(a,t!=null?t.isMobileExif:t,{name:"unless",hash:{},fn:e.program(64,i,0,s,o),inverse:e.noop,data:i}))!=null?u:"")+"		</div>\n\n"+((u=n["if"].call(a,t!=null?t.isMobileExif:t,{name:"if",hash:{},fn:e.program(80,i,0,s,o),inverse:e.noop,data:i}))!=null?u:"")+'\n	<div class="exif-column-2">\n		<!-- Location Data -->\n'+((u=n["if"].call(a,(u=t!=null?t.location:t)!=null?u.text:u,{name:"if",hash:{},fn:e.program(88,i,0,s,o),inverse:e.program(115,i,0,s,o),data:i}))!=null?u:"")+'	</div>\n	<div style="clear: both;"></div>\n	</ul>\n\n</div>\n'},useData:!0,useDepths:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/photo-charm-exif-scrappy",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("photo-charm-exif-scrappy-view",function(e,t){var n=require("lib/flog")(t);e.FlickrView.create(this.name,e.FlickrView,[],{langBundles:this.details.langBundles,initializer:function(e){return this.photoId=e.photoId,this.nsid=e.nsid,this.isMobileExif=e.isMobileExif||!1,this.get("container").get("innerHTML")===""&&this.setContainerHTML(""),this},loadState:function(){var t=this,r=[];return r.push(t.appContext.getModel("person-relationship-models",t.nsid).then(function(e){t.set("ownerRelationship",e)})),this.appContext.getViewer().signedIn&&r.push(t.appContext.getModel("person-models",t.appContext.getViewer().nsid).then(function(e){t.set("person",e)})),r.push((new e.FlickrPromise({location:t.appContext.getModel("photo-location-models",t.photoId),photo:t.appContext.getModel("photo-models",t.photoId),relationship:t.appContext.getModel("person-relationship-models",t.nsid),stats:t.appContext.getModel("photo-stats-models",t.photoId)})).then(function(e){t.set("location",e.location),t.set("photo",e.photo),t.set("relationship",e.relationship),t.set("stats",e.stats)})),r.push(t.appContext.getModel("photo-exif-models",t.photoId).then(function(n){var r=n.toJSON();t.set("exif",n),t.set("extendedExif",t.getExtendedExif()),t.set("cameraData",e.ExifCameraMap.getCameraImageURL(r.camera,r.cameraType,t.appContext))},function(e){n.warn("Exif failed to load for this photo",{err:e})})),e.Promise.all(r)},buildContainer:function(){var t,n=this.get("photo"),r=this.get("relationship")?this.get("relationship").getValue("isMe"):!1,i=this.get("exif")?this.get("exif").toJSON():null,s=!1,o=!1,u,a=this.get("location")?this.get("location").getValue("mostSpecificWoeId"):null,f=!1,l,c="",h=!1,p="",d="",v=this.get("stats");return typeof this.getViewDataFromHistory("showExpanded")!="undefined"&&this.getViewDataFromHistory("showExpanded")===!0&&(h=!0),i&&(i.metering||i.exposureProgram||i.flash||i.iso||i.exposureTime||i.focalLength||i.fNumber)&&(s=!0),this.get("location")&&(this.get("location").getValue("levels").venue?(this.get("location").getValue("levels").venue.source==="foursquare"?o=!0:o=!1,u=this.get("location").getValue("levels").venue.venueId,l=e.url("/map/?fLat="+this.get("location").getValue("levels").venue.venueLat+"&fLon="+this.get("location").getValue("levels").venue.venueLong+"&zl=13&everyone_nearby=1")):this.get("location").getValue("latitude")&&(l=e.url("/map/?fLat="+this.get("location").getValue("latitude")+"&fLon="+this.get("location").getValue("longitude")+"&zl=13&everyone_nearby=1")),this.get("location").getValue("text")&&(p=this.get("location").getValue("text").replace(/<\/?[^>]+>/g,""))),r&&!this.isMobileExif&&(f=!0),this.get("cameraData")&&(c=this.get("cameraData").url),i&&(this.isMobileExif?i.flashFired||i.flash==="Fired"?d=this.intlMessage({intlName:"photo-page-scrappy.FLASH_SIMPLE_ON"}):d=this.intlMessage({intlName:"photo-page-scrappy.FLASH_SIMPLE_OFF"}):(i.flashModeAuto&&(i.flashFired?d=this.intlMessage({intlName:"photo-page-scrappy.FLASH_AUTO_FIRED"}):d=this.intlMessage({intlName:"photo-page-scrappy.FLASH_AUTO_NO_FIRE"})),i.flashModeOn&&(i.flashFired?d=this.intlMessage({intlName:"photo-page-scrappy.FLASH_ON_FIRED"}):d=this.intlMessage({intlName:"photo-page-scrappy.FLASH_ON_NO_FIRE"})),i.flashModeOff&&(d=this.intlMessage({intlName:"photo-page-scrappy.FLASH_OFF"})),i.flash==="Fired"&&(d=this.intlMessage({intlName:"photo-page-scrappy.FLASH_ON_FIRED"})))),t={exif:i,cameraData:c,location:this.get("location")?this.get("location").toJSON():{},locationText:p,isFoursquare:o,fourSquarePlaceId:u,isOwner:r,isVideo:n?n.getValue("isVideo"):!1,exifInfoIsPresent:s,mostSpecificWoeId:a,stats:this.get("stats")?this.get("stats").toJSON():{},showEditLocation:f,linkToMap:l,showExpanded:h,extendedExif:this.get("extendedExif"),flashString:d,isMobileExif:this.isMobileExif,dateTaken:v.getDateObj("dateTaken"),datePosted:v.getDateObj("datePosted"),takenGranularity:v.getValue("takenGranularity"),isDateTakenUnknown:v.getValue("isDateTakenUnknown")},this.setContainerWithTemplate("photo-charm-exif-scrappy",t),this},activate:function(){var t=this,n=this.get("stats"),r=this.get("container");return n&&this.registerEventHandler(n.on("valuesChanged",function(e){(e.dateTaken||e.datePosted||e.isCirca||e.isSometime||e.takenGranularity)&&t.buildContainer()})),this.registerEventHandler(this.get("container").on("click",this.handleContainerClick.bind(this))),r.one(".exif-column-1").get("children").size()===0&&r.one(".exif-column-2").get("children").size()===0&&(r.setStyle("display","none"),e.one(".sub-photo-right-row1").setStyle("borderBottom","none")),this.isMobileExif&&this.registerEventHandler(this.get("container").delegate("click",function(n){if(n.target){var r=n.target.getAttribute("data-woe-id");r&&(n.halt(),e.use("mobile-actions-helper",function(e){e.MobileActionsHelper.redirectToAppOrStore({os:t.appContext.getUA().os,isWebview:t.appContext.getUA().isWebview,pageURL:"/search/?woe_id="+r,beacon:{name:"mpp_location_click",section:"exif-view"},viewName:t.name})}))}},".location-name-link")),this},getExtendedExif:function(){var t=this.get("exif")?this.get("exif").toJSON():{},n=e.clone(t.data),r=[];return n.forEach(function(e){if(e.value!==null){if(e.label==="Resolution Unit"||e.label==="Aperture"||e.label==="Exposure"||e.label==="Lens"||e.label==="Camera URL"||e.label==="Focal Length"||e.label==="ISOSetting"||e.label==="Flash"||e.label==="Exposure Program"||e.label==="Model")return;if(e.label==="X-Resolution"||e.label==="Y-Resolution")e.value=e.value+" dpi";e.label==="Exposure Bias"&&(e.value=e.value+" EV"),r.push({label:e.label,value:e.value})}}),r},showMoreExif:function(){var e=this.get("container");e.one(".show-extended-exif").setHTML(this.intlMessage({intlName:"photo-page-scrappy.HIDE_EXIF"})),e.one(".show-extended-exif").addClass("hide-moreExif"),e.all(".extended-exif-item").show(),this.setViewDataOnHistory("showExpanded",!0)},hideMoreExif:function(){var e=this.get("container");e.one(".show-extended-exif").setHTML(this.intlMessage(
{intlName:"photo-page-scrappy.SHOW_EXIF"})),e.one(".show-extended-exif").removeClass("hide-moreExif"),e.all(".extended-exif-item").hide(),this.setViewDataOnHistory("showExpanded",!1)},handleLocationClick:function(){if(this.appContext.flipper.isFlipped("geotag-on-photo-page"))e.use(["fluid-modal-view","photo-geotag-modal-view"],function(){var t=new e.Views.FluidModal({appContext:this.appContext,dismissOnOverlayClick:!1,dismissOnActionClick:!0,showCancelButton:!0,showCancelX:!1,title:"",actionButtonLabel:this.intlMessage({intlName:"photo-page-scrappy.SAVE_LOCATION"}),width:640,height:340,fullWindow:!0,subview:new e.Views["photo-geotag-modal-view"]({appContext:this.appContext,photoId:this.get("photo").getValue("id"),locationId:this.get("location").getValue("id")})}),n=this,r=n.get("container").one(".map-container")||n.get("container").one(".empty-map");t.show(),this.registerEventHandler(t.on("actionClick",function(e){var t=this.templates("flickr-balls")({});r.append(t),n.appContext.getModelRegistry("photo-location-models").then(function(e){return e.remove(n.photoId),n.appContext.getModel("photo-location-models",n.photoId)}).then(function(e){n.set("location",e),n.buildContainer()}).catch(function(e){r.remove(t)})}))}.bind(this));else{var t=this.get("photo"),n=this,r=t.getValue("id"),i,s,o="/photos/organize/?batch_geotag=1&ids="+r+"&from_geo_ids="+r;i=new e.Views["confirmation-dialog-view"]({photoID:this.photoId,appContext:this.appContext,title:this.intlMessage({intlName:"photo-page-scrappy.EDIT_LOCATION"}),icon:"ui-icon-modal-warning",organizrLink:o,content:this.intlMessage({intlName:"photo-page-scrappy.EDIT_LOCATION_ORGANIZR"})}),i.render(),i.activate(),s=i.get("container"),i.registerEventHandler(s.one(".ui-dialog-button-confirm").on("click",function(){n.addLocationDialog.close(),n.addLocationDialog.destroy(),e.config.win.location=o})),i.registerEventHandler(s.one(".ui-dialog-button-close").on("click",function(){n.addLocationDialog.close(),n.addLocationDialog.destroy()})),this.fire("subviewViewEvent","getDialogOffset",function(t){n.addLocationDialog=e.Views.dialog.getNewInstance("dialog-modal",{content:i.get("container"),appContext:n.appContext,offsetLeft:t,dialogClass:"scrappy-dialog"}),n.addLocationDialog.show()})}},handleError:function(e){return function(e){}},showDateEditor:function(){var t,n=this;t=new e.Views["date-modify-dialog-view"]({photoID:this.photoId,dateTaken:this.get("stats").getDateObj("dateTaken"),datePosted:this.get("stats").getDateObj("datePosted"),earliestPosted:this.get("person").getValue("dateCreated")}),t.appContext=this.appContext,t.buildContainer(),t.on("subviewViewEvent",function(e){e&&e.details&&e.details.length===2&&n.fire("subviewViewEvent",e.details[0],e.details[1])}),this.fire("subviewViewEvent","getDialogOffset",function(r){n.editDateDialog=e.Views.dialog.getNewInstance("dialog-modal",{content:t.get("container"),appContext:n.appContext,offsetLeft:r,dialogClass:"scrappy-dialog"}),n.editDateDialog.show(),t.activate()})},handleContainerClick:function(e){e.target.ancestor(".show-extended-exif",!0)?(e.preventDefault(),e.target.hasClass("hide-moreExif")?this.hideMoreExif():this.showMoreExif()):e.target.ancestor(".edit-date-taken",!0)?(e.preventDefault(),this.showDateEditor()):e.target.ancestor(".c-charm-item-location .add-location, .c-charm-item-location .edit-location",!0)&&(e.preventDefault(),this.handleLocationClick())}})},"@VERSION@",{requires:["flickr-view","flickr-promise","dialog","dropdown","exif-camera-map","hermes-template-photo-charm-exif-scrappy","hermes-template-flickr-balls","fluid-balls-css","photo-charm-exif-scrappy-view-css","url"],optional:["photo-stats-models"],langBundles:["common","photo-page-scrappy"]});
YUI.add("hermes-template-sub-photo-right-stats",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){return" small-text"},3:function(e,t,n,r,i){return" super-small-text"},5:function(e,t,n,r,i){return'		<span class="view-count-label">-</span>\n'},7:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},(s=t!=null?t.engagement:t)!=null?s.viewCount:s,{name:"if",hash:{},fn:e.program(8,i,0),inverse:e.program(10,i,0),data:i}))!=null?s:""},8:function(e,t,n,r,i){var s;return'			<span class="view-count-label">\n				'+e.escapeExpression((n.friendlyNumber||t&&t.friendlyNumber||n.helperMissing).call(t!=null?t:{},(s=t!=null?t.engagement:t)!=null?s.viewCount:s,{name:"friendlyNumber",hash:{},data:i}))+"</span>\n"},10:function(e,t,n,r,i){var s;return'			<span class="view-count-label">\n'+((s=n["if"].call(t!=null?t:{},t!=null?t.isMobileStats:t,{name:"if",hash:{},fn:e.program(11,i,0),inverse:e.noop,data:i}))!=null?s:"")+"			0</span>\n"},11:function(e,t,n,r,i){return'					<svg class="icon icon-view"><use xlink:href="#icon-view"></use></svg>\n'},13:function(e,t,n,r,i){return e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.SINGULAR_VIEW"},data:i}))},15:function(e,t,n,r,i){return e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.PLURAL_VIEW"},data:i}))},17:function(e,t,n,r,i){return'		<span class="fave-count-label">-</span>\n'},19:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},(s=t!=null?t.engagement:t)!=null?s.faveCount:s,{name:"if",hash:{},fn:e.program(20,i,0),inverse:e.program(22,i,0),data:i}))!=null?s:""},20:function(e,t,n,r,i){var s;return'			<span class="fave-count-label">\n				'+e.escapeExpression((n.friendlyNumber||t&&t.friendlyNumber||n.helperMissing).call(t!=null?t:{},(s=t!=null?t.engagement:t)!=null?s.faveCount:s,{name:"friendlyNumber",hash:{},data:i}))+"\n			</span>\n"},22:function(e,t,n,r,i){return'			<span class="fave-count-label">\n				0\n			</span>\n'},24:function(e,t,n,r,i){return e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.SINGULAR_FAVE"},data:i}))},26:function(e,t,n,r,i){return e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.PLURAL_FAVE"},data:i}))},28:function(e,t,n,r,i){return'		<span class="comment-count-label">-</span>\n'},30:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},(s=t!=null?t.engagement:t)!=null?s.commentCount:s,{name:"if",hash:{},fn:e.program(31,i,0),inverse:e.program(33,i,0),data:i}))!=null?s:""},31:function(e,t,n,r,i){var s;return'			<span class="comment-count-label">\n			'+e.escapeExpression((n.friendlyNumber||t&&t.friendlyNumber||n.helperMissing).call(t!=null?t:{},(s=t!=null?t.engagement:t)!=null?s.commentCount:s,{name:"friendlyNumber",hash:{},data:i}))+"</span>\n"},33:function(e,t,n,r,i){return'			<span class="comment-count-label">\n			0</span>\n'},35:function(e,t,n,r,i){return e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.SINGULAR_COMMENT"},data:i}))},37:function(e,t,n,r,i){return e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.PLURAL_COMMENT"},data:i}))},39:function(e,t,n,r,i){return'	<div class="show-more-stats">'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.SHOW_MORE_STATS"},data:i}))+"</div>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o,u,a=t!=null?t:{},f=n.helperMissing,l='<div class="view-count'+((s=n["if"].call(a,t!=null?t.smallText:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(a,t!=null?t.superSmallText:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")+'">\n'+((s=n["if"].call(a,t!=null?t.loadingView:t,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.program(7,i,0),data:i}))!=null?s:"")+'	<span class="stats-label">'+((s=(n.ifCond||t&&t.ifCond||f).call(a,(s=t!=null?t.engagement:t)!=null?s.viewCount:s,"===",1,{name:"ifCond",hash:{},fn:e.program(13,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=(n.ifCond||t&&t.ifCond||f).call(a,(s=t!=null?t.engagement:t)!=null?s.viewCount:s,"!==",1,{name:"ifCond",hash:{},fn:e.program(15,i,0),inverse:e.noop,data:i}))!=null?s:"")+'</span>\n</div>\n\n<div class="fave-count'+((s=n["if"].call(a,t!=null?t.smallText:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(a,t!=null?t.superSmallText:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")+'">\n'+((s=n["if"].call(a,t!=null?t.loadingView:t,{name:"if",hash:{},fn:e.program(17,i,0),inverse:e.program(19,i,0),data:i}))!=null?s:"")+'	<span class="stats-label">'+((s=(n.ifCond||t&&t.ifCond||f).call(a,(s=t!=null?t.engagement:t)!=null?s.faveCount:s,"===",1,{name:"ifCond",hash:{},fn:e.program(24,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=(n.ifCond||t&&t.ifCond||f).call(a,(s=t!=null?t.engagement:t)!=null?s.faveCount:s,"!==",1,{name:"ifCond",hash:{},fn:e.program(26,i,0),inverse:e.noop,data:i}))!=null?s:"")+'</span>\n</div>\n\n<div class="comment-count'+((s=n["if"].call(a,t!=null?t.smallText:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(a,t!=null?t.superSmallText:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")+'">\n'+((s=n["if"].call(a,t!=null?t.loadingView:t,{name:"if",hash:{},fn:e.program(28,i,0),inverse:e.program(30,i,0),data:i}))!=null?s:"")+'	<span class="stats-label">'+((s=(n.ifCond||t&&t.ifCond||f).call(a,(s=t!=null?t.engagement:t)!=null?s.commentCount
:s,"===",1,{name:"ifCond",hash:{},fn:e.program(35,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=(n.ifCond||t&&t.ifCond||f).call(a,(s=t!=null?t.engagement:t)!=null?s.commentCount:s,"!==",1,{name:"ifCond",hash:{},fn:e.program(37,i,0),inverse:e.noop,data:i}))!=null?s:"")+"</span>\n</div>\n\n";return s=(o=(o=n.showMoreStatsLink||(t!=null?t.showMoreStatsLink:t))!=null?o:f,u={name:"showMoreStatsLink",hash:{},fn:e.program(39,i,0),inverse:e.noop,data:i},typeof o=="function"?o.call(a,u):o),n.showMoreStatsLink||(s=n.blockHelperMissing.call(t,s,u)),s!=null&&(l+=s),l},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/sub-photo-right-stats",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("sub-photo-right-stats-view",function(e,t){var n=require("lib/flog")(t);e.FlickrView.create(this.name,e.FlickrView,[],{langBundles:this.details.langBundles,initializer:function(t){return this.photoId=t.photoId,this.isOwner=t.isOwner,this.nsid=t.nsid,this.statsHelper=new e.StatsHelper,this.get("container").get("innerHTML")===""&&this.setContainerWithTemplate("sub-photo-right-stats",{stats:{},loadingView:!0}),this},loadState:function(){var t=this,r={};return r.photoEngagement=this.appContext.getModel("photo-engagement-models",this.photoId),this.isOwner&&(r.personModel=this.appContext.getModel("person-models",this.nsid)),(new e.FlickrPromise(r)).then(function(i){t.set("photo-engagement",i.photoEngagement);if(i.personModel){var s,o,u,a;return t.isPro=i.personModel.getValue("isPro"),t.isPro?(s=e.moment().format("X"),o=new e.TimezoneHelper(t.appContext,s,"00:00"),t.dateString||(t.dateString=o.toFormat("YYYY-MM-DD"),t.prettyDateString=o.toFormat("MMM D, YYYY"),t.realtimeDateString=t.dateString),u={date:t.dateString,photoId:t.photoId},a={id:t.statsHelper.getIdFromParams(u)},r.dailyViewsModel=t.appContext.getModel("stats-photo-daily-views-models",a,u),(new e.FlickrPromise(r)).then(function(e){t.dailyViewsModel=e.dailyViewsModel},function(e){n.error("Error loadState",{err:e})})):e.Promise.resolve()}},function(e){n.error("Error loadState",{err:e})})},buildContainer:function(){var e=this.get("photo-engagement"),t,n,r=!1;if(e.getValue("viewCount")>=1e6||e.getValue("faveCount")>=1e5||e.getValue("commentCount")>=1e5)n=!0;else if(e.getValue("viewCount")>=1e5||e.getValue("faveCount")>=1e4||e.getValue("commentCount")>=1e4)t=!0;return this.isOwner&&this.appContext.flipper.isFlipped("rebootify-stats")&&this.isPro&&this.dailyViewsModel&&this.dailyViewsModel.getValue("totals").views>0&&(r=!0),this.setContainerWithTemplate("sub-photo-right-stats",{engagement:e.toJSON(),smallText:t,superSmallText:n,showMoreStatsLink:r}),this},activate:function(){var e=this;return this.registerEventHandler(this.get("photo-engagement").on("valuesChanged",function(t){(t.commentCount||t.faveCount)&&e.buildContainer()})),this.isOwner&&this.appContext.flipper.isFlipped("rebootify-stats")&&this.isPro&&this.dailyViewsModel&&this.dailyViewsModel.getValue("totals").views>0&&this.registerEventHandler(this.get("container").one(".show-more-stats").on("click",this.handleShowMoreStatsClick,this)),this},handleShowMoreStatsClick:function(t){t.halt();var n=this,r,i=this.photoId;r=new e.Views.FluidModal({appContext:this.appContext,dismissOnOverlayClick:!0,dismissOnActionClick:!1,showBodyLines:!0,showCancelButton:!1,showFooter:!1,showCancelX:!0,title:n.intlMessage({intlName:"stats.PHOTO_STATS"}),subview:new e.Views["stats-photo-view"]({appContext:n.appContext,photoId:i,isOwner:n.isOwner,nsid:n.appContext.getViewer().nsid}),width:Math.round(Math.max(1280,e.config.win.innerWidth)*.7),minWidth:800,height:540,fullWindow:!1,classList:"stats-photo-modal",hideModalOverlay:!1}),r.show()}})},"@VERSION@",{requires:["flickr-view","flickrui-css","hermes-template-sub-photo-right-stats","photo-sidebar-actions-css","fluid-modal-view","stats-photo-view","stats-helper"],optional:["photo-engagement-models"],langBundles:["common","photo-page-scrappy","stats"]});
YUI.add("hermes-template-sub-photo-contexts",function(e,t){var n=e.Template.Handlebars.revive({compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s=t!=null?t:{},o=n.helperMissing,u=e.escapeExpression;return u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["sub-photo-groups-view"]:t,{name:"outlet",hash:{},data:i}))+"\n"+u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["sub-photo-albums-view"]:t,{name:"outlet",hash:{},data:i}))+"\n"+u((n.outlet||t&&t.outlet||o).call(s,t!=null?t["sub-photo-galleries-view"]:t,{name:"outlet",hash:{},data:i}))+"\n"},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/sub-photo-contexts",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("hermes-template-sub-photo-contexts-item",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},(s=t!=null?t.group:t)!=null?s.bestIconURL:s,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.program(4,i,0),data:i}))!=null?s:""},2:function(e,t,n,r,i){var s,o,u=e.escapeExpression;return'			<a href="'+u((o=(o=n.url||(t!=null?t.url:t))!=null?o:n.helperMissing,typeof o=="function"?o.call(t!=null?t:{},{name:"url",hash:{},data:i}):o))+"\" class='thumbnail' style='background-image: url(\""+u(e.lambda((s=t!=null?t.group:t)!=null?s.bestIconURL:s,t))+"\");'></a>\n"},4:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.primaryPhotoSizes:t,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.program(7,i,0),data:i}))!=null?s:""},5:function(e,t,n,r,i){var s,o,u=e.escapeExpression;return'				<a href="'+u((o=(o=n.url||(t!=null?t.url:t))!=null?o:n.helperMissing,typeof o=="function"?o.call(t!=null?t:{},{name:"url",hash:{},data:i}):o))+"\" class='thumbnail' style='background-image: url(\""+u(e.lambda((s=(s=t!=null?t.primaryPhotoSizes:t)!=null?s.sq:s)!=null?s.src:s,t))+"\");'></a>\n"},7:function(e,t,n,r,i){var s;return'				<a href="'+e.escapeExpression((s=(s=n.url||(t!=null?t.url:t))!=null?s:n.helperMissing,typeof s=="function"?s.call(t!=null?t:{},{name:"url",hash:{},data:i}):s))+"\" class='thumbnail' style='background-image: url(\"https://s.yimg.com/pw/images/buddyicon11_s.png\");'></a>\n"},9:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.bestIconURL:t,{name:"if",hash:{},fn:e.program(10,i,0),inverse:e.program(4,i,0),data:i}))!=null?s:""},10:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a="function",f=e.escapeExpression;return'			<a href="'+f((s=(s=n.url||(t!=null?t.url:t))!=null?s:u,typeof s===a?s.call(o,{name:"url",hash:{},data:i}):s))+"\" class='thumbnail' style='background-image: url(\""+f((s=(s=n.bestIconURL||(t!=null?t.bestIconURL:t))!=null?s:u,typeof s===a?s.call(o,{name:"bestIconURL",hash:{},data:i}):s))+"\");'></a>\n"},12:function(e,t,n,r,i){var s,o,u=t!=null?t:{},a=n.helperMissing,f=e.escapeExpression;return"		<span class='title'><a href=\""+f((o=(o=n.url||(t!=null?t.url:t))!=null?o:a,typeof o=="function"?o.call(u,{name:"url",hash:{},data:i}):o))+'">'+((s=n["if"].call(u,t!=null?t.truncateTitle:t,{name:"if",hash:{},fn:e.program(13,i,0),inverse:e.noop,data:i}))!=null?s:"")+f((n.renderTrustedMarkup||t&&t.renderTrustedMarkup||a).call(u,t!=null?t.title:t,{name:"renderTrustedMarkup",hash:{},data:i}))+((s=n["if"].call(u,t!=null?t.truncateTitle:t,{name:"if",hash:{},fn:e.program(15,i,0),inverse:e.noop,data:i}))!=null?s:"")+"</a></span>\n"},13:function(e,t,n,r,i){return'<span class="truncate">'},15:function(e,t,n,r,i){return"</span>"},17:function(e,t,n,r,i){var s,o,u=t!=null?t:{},a=n.helperMissing,f="function",l=e.escapeExpression;return"		<span class='title'><a href=\""+l((o=(o=n.url||(t!=null?t.url:t))!=null?o:a,typeof o===f?o.call(u,{name:"url",hash:{},data:i}):o))+'">'+((s=n["if"].call(u,t!=null?t.truncateTitle:t,{name:"if",hash:{},fn:e.program(13,i,0),inverse:e.noop,data:i}))!=null?s:"")+l((o=(o=n.title||(t!=null?t.title:t))!=null?o:a,typeof o===f?o.call(u,{name:"title",hash:{},data:i}):o))+((s=n["if"].call(u,t!=null?t.truncateTitle:t,{name:"if",hash:{},fn:e.program(15,i,0),inverse:e.noop,data:i}))!=null?s:"")+"</a></span>\n"},19:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.isInvitation:t,{name:"if",hash:{},fn:e.program(20,i,0),inverse:e.program(25,i,0),data:i}))!=null?s:""},20:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.invitedByViewer:t,{name:"if",hash:{},fn:e.program(21,i,0),inverse:e.program(23,i,0),data:i}))!=null?s:""},21:function(e,t,n,r,i){var s=t!=null?t:{},o=n.helperMissing,u=e.escapeExpression;return'					<a href="#" class="cancel-invite"><span class="pending-text">'+u((n.intlMessage||t&&t.intlMessage||o).call(s,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.INVITE_PENDING"},data:i}))+'</span><span class="cancel-text">'+u((n.intlMessage||t&&t.intlMessage||o).call(s,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.CANCEL_INVITE"},data:i}))+"</span></a>\n"},23:function(e,t,n,r,i){return'					<button href="#" class="ui-button ui-button-cta accept-invite">'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.ACCEPT_INVITE"},data:i}))+"</button>\n"},25:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing;return((s=(n.ifCond||t&&t.ifCond||u).call(o,t!=null?t.poolCount:t,"===",0,{name:"ifCond",hash:{},fn:e.program(26,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=(n.ifCond||t&&t.ifCond||u).call(o,t!=null?t.poolCount:t,"===",1,{name:"ifCond",hash:{},fn:e.program(28,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=(n.ifCond||t&&t.ifCond||u).call(o,t!=null?t.poolCount:t,">",1,{name:"ifCond",hash:{},fn:e.program(30,i,0),inverse:e.noop,data:i}))!=null?s:"")},26:function(e,t,n,r,i){return"\n"},28:function(e,t,n,r,i){return"					"+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.ONE_ITEM"},data:i}))+"\n"},30:function(e,t,n,r,i){return"					"+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{count:t!=null?t.friendlyPoolCount:t,intlName:"photo-page-scrappy.N_ITEMS"},data:i}))+"\n"},32:function(e,t,n,r,i){var s;return"			"+e.escapeExpression((s=(s=n.photoCountDisplay||(t!=null?t.photoCountDisplay:t))!=null?s:n.helperMissing,typeof s=="function"?s.call(t!=null?t:{},{name:"photoCountDisplay",hash:{},data:i}):s))+"\n"},34:function(e,t,n,r,i){return'		<a href="#" class="remove"></a>\n'},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o,u=t!=null?t:{};return'<li data-context-id="'+e.escapeExpression((o=(o=n.id||(t!=null?t.id:t))!=null?o:n.helperMissing,typeof o=="function"?o.call(
u,{name:"id",hash:{},data:i}):o))+'">\n'+((s=n["if"].call(u,t!=null?t.isGroup:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(9,i,0),data:i}))!=null?s:"")+((s=n["if"].call(u,t!=null?t.isGroup:t,{name:"if",hash:{},fn:e.program(12,i,0),inverse:e.program(17,i,0),data:i}))!=null?s:"")+"	<span class='counts'>\n"+((s=n["if"].call(u,t!=null?t.isGroup:t,{name:"if",hash:{},fn:e.program(19,i,0),inverse:e.program(32,i,0),data:i}))!=null?s:"")+"	</span>\n"+((s=n["if"].call(u,t!=null?t.canRemove:t,{name:"if",hash:{},fn:e.program(34,i,0),inverse:e.noop,data:i}))!=null?s:"")+"</li>"},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/sub-photo-contexts-item",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("hermes-template-sub-photo-contexts-title-groups",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){return"		"+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.PHOTO_IN_ONE_GROUP"},data:i}))+"\n"},3:function(e,t,n,r,i){return"		"+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{count:t!=null?t.totalGroups:t,intlName:"photo-page-scrappy.PHOTO_IN_MANY_GROUPS"},data:i}))+"\n"},5:function(e,t,n,r,i){return"		"+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.PHOTO_IN_NO_GROUPS"},data:i}))+"\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing;return'<h5 class="total">\n'+((s=(n.ifCond||t&&t.ifCond||u).call(o,t!=null?t.totalGroups:t,"===",1,{name:"ifCond",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=(n.ifCond||t&&t.ifCond||u).call(o,t!=null?t.totalGroups:t,">",1,{name:"ifCond",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=(n.ifCond||t&&t.ifCond||u).call(o,t!=null?t.totalGroups:t,"===",0,{name:"ifCond",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))!=null?s:"")+"</h5>"},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/sub-photo-contexts-title-groups",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("hermes-template-sub-photo-contexts-groups",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.canAddOrInvite:t,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))!=null?s:""},2:function(e,t,n,r,i){var s,o=t!=null?t:{};return'		<div class="sub-photo-context sub-photo-context-groups empty">\n			<p>'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.PHOTO_NOT_IN_GROUPS"},data:i}))+"</p>\n"+((s=n["if"].call(o,t!=null?t.canAdd:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(o,t!=null?t.canInvite:t,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))!=null?s:"")+"		</div>\n"},3:function(e,t,n,r,i){return"				<p><a href='#' class='add-to'>"+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.ADD_TO_GROUP"},data:i}))+"</a></p>\n"},5:function(e,t,n,r,i){return"				<p><a href='#' class='add-to'>"+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.INVITE_TO_GROUP"},data:i}))+"</a></p>\n"},7:function(e,t,n,r,i){var s,o=t!=null?t:{};return((s=n["if"].call(o,t!=null?t.viewerIsOwner:t,{name:"if",hash:{},fn:e.program(8,i,0),inverse:e.noop,data:i}))!=null?s:"")+'	<div class="sub-photo-context sub-photo-context-groups">\n'+((s=e.invokePartial(r["sub-photo-contexts-title-groups"],t,{name:"sub-photo-contexts-title-groups",data:i,indent:"		",helpers:n,partials:r,decorators:e.decorators}))!=null?s:"")+((s=n["if"].call(o,t!=null?t.canAdd:t,{name:"if",hash:{},fn:e.program(14,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(o,t!=null?t.canInvite:t,{name:"if",hash:{},fn:e.program(16,i,0),inverse:e.noop,data:i}))!=null?s:"")+'		<ul class="context-list">\n'+((s=n.each.call(o,t!=null?t.contexts:t,{name:"each",hash:{},fn:e.program(18,i,0),inverse:e.noop,data:i}))!=null?s:"")+"		</ul>\n"+((s=n["if"].call(o,t!=null?t.showMore:t,{name:"if",hash:{},fn:e.program(20,i,0),inverse:e.noop,data:i}))!=null?s:"")+"	</div>\n"},8:function(e,t,n,r,i){var s;return(s=(n.ifCond||t&&t.ifCond||n.helperMissing).call(t!=null?t:{},t!=null?t.totalInvitations:t,">",0,{name:"ifCond",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))!=null?s:""},9:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing;return'			<div class="invitation-notice">\n'+((s=(n.ifCond||t&&t.ifCond||u).call(o,t!=null?t.totalInvitations:t,"===",1,{name:"ifCond",hash:{},fn:e.program(10,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=(n.ifCond||t&&t.ifCond||u).call(o,t!=null?t.totalInvitations:t,">",1,{name:"ifCond",hash:{},fn:e.program(12,i,0),inverse:e.noop,data:i}))!=null?s:"")+"			</div>\n"},10:function(e,t,n,r,i){return"					"+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.ONE_GROUP_INVITATION"},data:i}))+"\n"},12:function(e,t,n,r,i){return"					"+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{count:t!=null?t.totalInvitationsFriendly:t,intlName:"photo-page-scrappy.N_GROUP_INVITATIONS"},data:i}))+"\n"},14:function(e,t,n,r,i){return"			<a href='#' class='add-to'>"+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.ADD_TO_GROUP"},data:i}))+"</a>\n"},16:function(e,t,n,r,i){return"			<a href='#' class='add-to'>"+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.INVITE_TO_GROUP"},data:i}))+"</a>\n"},18:function(e,t,n,r,i){var s;return(s=e.invokePartial(r["sub-photo-contexts-item"],t,{name:"sub-photo-contexts-item",data:i,indent:"				",helpers:n,partials:r,decorators:e.decorators}))!=null?s:""},20:function(e,t,n,r,i){return'			<div class="view-all-contexts-of-type"><a href="#">'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.VIEW_MORE_GROUPS"},data:i}))+"</a></div>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.empty:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(7,i,0),data:i}))!=null?s:""},usePartial:!0,useData:!0}),r={};e.Array.each(["sub-photo-contexts-title-groups","sub-photo-contexts-item"],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/sub-photo-contexts-groups",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base","hermes-template-sub-photo-contexts-title-groups","hermes-template-sub-photo-contexts-item"]});
YUI.add("hermes-template-album-selection",function(e,t){var n=e.Template.Handlebars.revive({compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a="function",f=e.escapeExpression;return'<div class="album-selection">\n	<h2 class="album-selection-heading">'+f((s=(s=n.titleSelect||(t!=null?t.titleSelect:t))!=null?s:u,typeof s===a?s.call(o,{name:"titleSelect",hash:{},data:i}):s))+'</h2>\n	<button class="ui-dialog-button ui-dialog-button-neutral ui-dialog-button-close hide-text"><span>&nbsp;</span></button>\n	<input type="text" placeholder="'+f((s=(s=n.placeholderSearch||(t!=null?t.placeholderSearch:t))!=null?s:u,typeof s===a?s.call(o,{name:"placeholderSearch",hash:{},data:i}):s))+"\" class='album-selection-search' />\n	<ol class='album-selection-list loading'>\n		<li>"+f((s=(s=n.loadingText||(t!=null?t.loadingText:t))!=null?s:u,typeof s===a?s.call(o,{name:"loadingText",hash:{},data:i}):s))+'</li>\n	</ol>\n	<div class="album-selection-buttons">\n		<button class="ui-dialog-button ui-dialog-button-neutral ui-dialog-button-done album-selection-done"><span>'+f((s=(s=n.buttonTextComplete||(t!=null?t.buttonTextComplete:t))!=null?s:u,typeof s===a?s.call(o,{name:"buttonTextComplete",hash:{},data:i}):s))+"</span></button>\n	</div>\n</div>"},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/album-selection",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});