YUI.add("autotag-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:{delete:function(t){return e.ModelDeletors["flickr-photos-deleteAutotags"].run(t,this.appContext)}},attributes:{autotagValue:{validator:function(t){return e.AttributeHelpers.validateString(t)},setter:function(t){return e.AttributeHelpers.coerceString(t)}},score:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)}},isPrivate:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},searchUrl:{derivedBy:["autotagValue"],readOnly:!0,defaultFn:function(e){return"/search/?q="+this.getValue(e,"autotagValue")}}}})}),"@VERSION@",{requires:["flickr-model-registry","flickr-photos-deleteAutotags-deletor"]});YUI.add("photo-autotags-models",(function(t){function e(t){e.superclass.constructor.call(this,t)}t.Models[this.name]=e,t.extend(e,t.FlickrModelRegistry,{name:this.name,remote:{delete:function(e){return t.ModelDeletors["flickr-photos-deleteAutotags"].run(e,this.appContext)}},attributes:{autotags:{isCollection:!0}}})}),"@VERSION@",{requires:["flickr-model-registry","flickr-photos-deleteAutotags-deletor"]});YUI.add("flickr-photos-getInfo-fetcher",(function(e,o){"use strict";e.namespace("ModelFetchers")["flickr-photos-getInfo"]={run:function(t,s){var r,i=this;return s.flipper.isFlipped("enable-scrappy-photo-page")&&(t.scrappy=!0),!0,r=this._processParams(t,s),new e.FlickrPromise({apiResponse:s.callAPI("flickr.photos.getInfo",r,true),photoRegistry:s.getModelRegistry("photo-models"),personRegistry:s.getModelRegistry("person-models"),personRelationshipRegistry:s.getModelRegistry("person-relationship-models"),photoEngagementRegistry:s.getModelRegistry("photo-engagement-models"),photoStatsRegistry:s.getModelRegistry("photo-stats-models"),photoPrivacyRegistry:s.getModelRegistry("photo-privacy-models"),photoNotesRegistry:s.getModelRegistry("photo-notes-models"),noteRegistry:s.getModelRegistry("note-models"),photoGeoRegistry:s.getModelRegistry("photo-geo-models"),photoLocationRegistry:s.getModelRegistry("photo-location-models"),photoHeadMetaRegistry:s.getModelRegistry("photo-head-meta-models"),groupRegistry:s.getModelRegistry("group-models"),contextsRegistry:s.getModelRegistry("photo-contexts-models"),favoriteRegistry:s.getModelRegistry("favorite-models"),galleryRegistry:s.getModelRegistry("gallery-models"),groupsPoolRegistry:s.getModelRegistry("group-pool-models"),setRegistry:s.getModelRegistry("set-models"),photostreamRegistry:s.getModelRegistry("photostream-models")}).then((function(e){return i._processResponse(e,s.flipper,r)}),e.FetcherErrorLogger(o))},_processParams:function(o,t){var s;if(s={datecreate:1,extras:["sizes","icon_urls","ignored","rev_ignored","rev_contacts","venue","datecreate"].join(",")+","+e.APIHelper.request.getRebootPhotoExtras(),photo_id:o.id,get_contexts:1,primary_photo_extras:"url_sq, url_t, url_s, url_m"},o.userId?s.user_id=o.userId:o.pathAlias&&(s.path_alias=o.pathAlias),o.context&&(s.context=o.context,s.num_prev=1,s.num_next=1),o.scrappy){var r,i=!1;t.flipper.isFlipped("enable-responsive-mobile-photo-page")&&t.viewportData?(r=t.viewportData.getWidth(),i=!!((r=parseInt(r))&&r<=700)):i=!1,i?e.APIHelper.request.addStaticMapsParams(s,r):e.APIHelper.request.addStaticMapsParams(s,null),delete s.get_contexts,delete s.primary_photo_extras,delete s.context}return s},_processResponse:function(o,t,s){var r,i,n,p,a,d,h,l,g,c,y=o.apiResponse,m=o.photoRegistry,R=o.personRegistry,u=o.personRelationshipRegistry,v=o.photoEngagementRegistry,f=o.photoStatsRegistry,M=o.photoPrivacyRegistry,w=o.photoNotesRegistry,x=o.noteRegistry,P=o.photoGeoRegistry,I=o.photoLocationRegistry,b=o.photoHeadMetaRegistry,_=o.groupRegistry,A={},F=[];if(!y.photo.sizes)throw new Error("Missing photo sizes from flickr.photos.getInfo call.");i={id:y.photo.id,title:y.photo.title.content,description:y.photo.description.content,sizes:e.APIHelper.response.parsePhotoSize(y.photo.sizes.size,!0),needsInterstitial:y.photo.needsInterstitial,canComment:y.photo.editability.cancomment,canPublicComment:y.photo.publiceditability.cancomment,canAddMeta:y.photo.editability.canaddmeta,safetyLevel:y.photo.safetyLevel,license:y.photo.license,mediaType:y.photo.media,contentType:y.photo.contentType,secret:y.photo.secret,rotation:y.photo.rotation,oWidth:y.photo.oWidth?parseInt(y.photo.oWidth,10):"",oHeight:y.photo.oHeight?parseInt(y.photo.oHeight,10):"",visibilitySource:y.photo.visibilitySource,isVideoPending:y.photo.video?y.photo.video.pending:0,isVideoFailed:y.photo.video?y.photo.video.failed:0,systemModerated:y.photo.system_moderated||0},n={id:y.photo.owner.nsid,username:y.photo.owner.username,realname:y.photo.owner.realname,pathAlias:y.photo.owner.pathAlias,buddyicon:e.APIHelper.response.removeProtocolFromURL(y.photo.owner.iconurls),isAdFree:y.photo.owner.isAdFree,isPro:y.photo.owner.ispro,proBadge:y.photo.owner.proBadge,dateCreated:y.photo.owner.datecreate,location:y.photo.owner.location},y.photo.owner.gift&&(n.isEligibleForGifts=y.photo.owner.gift.giftEligible||!1,n.eligibleGifts=y.photo.owner.gift.eligibleDurations||[],n.newFlow=y.photo.owner.gift.newFlow||!1),p={id:y.photo.owner.nsid,pathAlias:y.photo.owner.pathAlias,isContact:y.photo.contactIscontact,isFamily:y.photo.contactIsfamily||0,isFriend:y.photo.contactIsfriend||0,isIgnored:y.photo.owner.isignored,isIgnoredBy:y.photo.owner.revIgnored,isRevContact:y.photo.owner.revContact,isRevFamily:y.photo.owner.revFamily,isRevFriend:y.photo.owner.revFriend},a={id:y.photo.id,ownerNsid:y.photo.owner.nsid,isFaved:y.photo.isfavorite||!1,canShare:y.photo.usage.canshare,canDownload:y.photo.usage.candownload,canPrint:y.photo.usage.canprint,commentCount:y.photo.comments.content,noteCount:y.photo.notes&&y.photo.notes.note&&y.photo.notes.note.length,faveCount:y.photo.countFaves,viewCount:y.photo.views},d={id:y.photo.id,dateTaken:y.photo.dates.taken,datePosted:y.photo.dates.posted,takenGranularity:y.photo.dates.takengranularity,isDateTakenUnknown:y.photo.datetakenunknown||"1"===y.photo.datetakenunknown||1===y.photo.datetakenunknown},l=e.APIHelper.response.parsePhotoMeta(y.photo),h={id:y.photo.id,isPublic:y.photo.visibility.ispublic,isVisibleByFriends:y.photo.visibility.isfriend,isVisibleByFamily:y.photo.visibility.isfamily,permAddMeta:y.photo.permissions?y.photo.permissions.permaddmeta:0,permComment:y.photo.permissions?y.photo.permissions.permcomment:0,permPrint:y.photo.permissions?y.photo.permissions.permprint:0,isHidden:y.photo.visibility.hidden},y.photo&&y.photo.notes&&y.photo.notes.note&&e.Array(y.photo.notes.note).forEach((function(e){F.push(x.addOrUpdate({id:e.id,author:e.author,authorName:e.authorname,authorRealName:e.authorrealname,authorIsPro:e.authorispro,authorProBadge:e.proBadge,authorIsDeleted:e.authorisdeleted,left:e.x,top:e.y,width:e.w,height:e.h,text:e.content}))})),g=e.ModelFetchers["flickr-photos-getLocation"].mapResponse(y,P),i.owner=R.addOrUpdate(n),i.engagement=v.addOrUpdate(a),u.addOrUpdate(p),c=m.addOrUpdate(i),f.addOrUpdate(d),M.addOrUpdate(h),w.addOrUpdate({id:i.id,notes:F}),b.addOrUpdate(l),I.addOrUpdate(g),y.photo.contexts&&(r=o.contextsRegistry,A.faves=o.favoriteRegistry,A.gallery=o.galleryRegistry,A.pool=o.groupsPoolRegistry,A.set=o.setRegistry,A.stream=o.photostreamRegistry,(function(o){var t=o.photoModel,s=o.contextRegistries,r=o.contextsResponse,i=o.personRegistry,n=o.contextsRegistry,p=o.photoEngagementRegistry,a=o.photoStatsRegistry,d=o.groupRegistry,h=o.apiParams,l=[];e.Object.each(s,(function(o,s){r[s]&&e.Array.each(r[s],(function(s){var r,n,g,c,y,m,R,u,v;e.APIHelper.response.addContextToRegistry(s,o,i,d),l.push(o.proxy(s.id)),h.context&&(n=!!(r=o.getValue(s.id,"photoContextList")).hasMinBoundary&&r.hasMinBoundary(),g=!!r.hasMaxBoundary&&r.hasMaxBoundary(),c=r.getList(),m=s.nextphotos,R=s.prevphotos,u=m?e.APIHelper.response.parsePhotos({photos:m.photo,personModelRegistry:i,photoModelRegistry:t.registry,photoEngagementModelRegistry:p,photoStatsModelRegistry:a}):[],((v=R?e.APIHelper.response.parsePhotos({photos:R.photo,personModelRegistry:i,photoModelRegistry:t.registry,photoEngagementModelRegistry:p,photoStatsModelRegistry:a}):[]).length||u.length)&&(y=e.APIHelper.response.addOrReplaceListByContext({model:t,next:u,prev:v.reverse(),current:c,hasMin:n,hasMax:g,numNext:h.num_next,numPrev:h.num_prev})),o.setValue(s.id,"photoContextList",y))}))})),n.exists(t.id)||(n.add({id:t.id,totalGroups:r.pool?r.pool.length:0,totalSets:r.set?r.set.length:0,totalGalleries:r.gallery?r.gallery.length:0}),n.setValue(t.id,"contexts",l))})({photoModel:c,contextRegistries:A,contextsResponse:y.photo.contexts,personRegistry:R,contextsRegistry:r,photoEngagementRegistry:v,photoStatsRegistry:f,groupRegistry:_,apiParams:s}))}}}),"@VERSION@",{requires:["flickr-promise","api-helper","flickr-photos-getLocation-fetcher"],optional:["photo-models","person-models","person-relationship-models","photo-engagement-models","photo-stats-models","photo-geo-models","photo-location-models","photo-head-meta-models","note-models","photo-notes-models","autotag-models","photo-autotags-models"]});YUI.add("photo-engagement-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.ModelFetchers["flickr-photos-getInfo"].run(t,this.appContext)},update:e.PhotoModelHelper.updateEngagement,delete:function(t){return e.ModelUpdaters["flickr-favorites-remove"].run(t,this.appContext)},addReaction:function(t){return e.ModelUpdaters["flickr-reactions-add"].run(t,this.appContext)},removeReaction:function(t){return e.ModelUpdaters["flickr-reactions-remove"].run(t,this.appContext)}},toggleFave:e.PhotoModelHelper.toggleFave,addAsFave:e.PhotoModelHelper.addAsFave,toggleReaction:function(e,t,r){var o=this.getValue(e,"reactions")[t].count,n=Object.assign({},this.getValue(e,"reactions")),a=Object.assign({},n[t]);return a.didViewerReact=r,a.count=r?o+1:o-1,n[t]=a,this.setValue(e,"reactions",n),this.getValue(e,"reactions")[t]},updateReactionRemote:function(t,r){return e.Promise.resolve({})},attributes:{ownerNsid:e.PhotoModelHelper.attributes.ownerNsid,isFaved:e.PhotoModelHelper.attributes.isFaved,faveCount:e.PhotoModelHelper.attributes.faveCount,commentCount:e.PhotoModelHelper.attributes.commentCount,canFave:e.PhotoModelHelper.attributes.canFave,canPrint:e.PhotoModelHelper.attributes.canPrint,canShare:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},canDownload:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},noteCount:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return(t=e.AttributeHelpers.coerceInteger(t))<0&&(t=0),t},defaultValue:0},viewCount:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return(t=e.AttributeHelpers.coerceInteger(t))<0&&(t=0),t},defaultValue:0},isOwner:{readOnly:!0,derivedBy:["owner"],getter:function(e,t){var r=this.appContext.getViewer();return!!r.signedIn&&this.getValue(t,"ownerNsid")===r.nsid}},reactions:{defaultValue:{like:{id:"like",count:5,didViewerReact:!0,canReact:!0},someOtherReaction:{id:"someOtherReaction",count:3,didViewerReact:!1,canReact:!0}},getter:function(e,t){return e&&e.like&&(e.like.canReact=!0),e}}}})}),"@VERSION@",{requires:["flickr-model-registry","flickr-promise","photo-model-helper","flickr-photos-getInfo-fetcher","flickr-favorites-add-updater","flickr-favorites-remove-updater","attribute-helpers"]});YUI.add("flickr-photos-getFavorites-fetcher",(function(e,o){"use strict";e.namespace("ListFetchers")["flickr-photos-getFavorites"]={run:function(p,r){var t,s=this;return r.flipper.isFlipped("enable-scrappy-photo-page")&&(p.scrappy=!0),t=this._processParams(p,r),e.Promise.all([r.callAPI("flickr.photos.getFavorites",t,!0),r.getModelRegistry("photo-people-who-faved-models"),r.getModelRegistry("person-models"),r.getModelRegistry("person-relationship-models")]).then((function(e){return s._processResponse(e,p,t)}),e.FetcherErrorLogger(o))},_processParams:function(o,p){var r;return r={photo_id:o.id,extras:e.APIHelper.request.getRebootPhotoExtras(),per_page:o.perPage||50,page:o.page||1,hermes:1},o.scrappy&&(r.sort="date_desc"),r},_processResponse:function(o,p,r){var t,s=o[0],a=o[1],n=o[2],l=o[3];return t={id:s.photo.id,total:s.photo.total,people:[]},s.photo.person&&s.photo.person.forEach((function(o){var p=e.APIHelper.response.parsePerson(o);l.addOrUpdate(e.APIHelper.response.parseRelationship(o)),t.people.push(n.addOrUpdate(p))})),t.people={perPage:r.per_page,page:r.page,pageContent:t.people,totalItems:parseInt(t.total||0,10)},a.addOrUpdate(t),t.people.pageContent}}}),"@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)}},addFave:function(e,t){var o=this;return this.appContext.getModel("person-models",t).then((function(t){o.getValue(e,"people").prependToList(t),o.getValue(e,"people").totalItems++,o.setValue(e,"total",o.getValue(e,"people").totalItems)}))},removeFave:function(e,t){this.getValue(e,"people").removeFromList(t),this.getValue(e,"people").totalItems--,this.setValue(e,"total",this.getValue(e,"people").totalItems)},attributes:{total:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return(t=e.AttributeHelpers.coerceInteger(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("photo-model-helper",(function(e,t){var i=require("hermes-core/flog")(t);e.PhotoModelHelper={updateEngagement:function(t,i){var r,n=[];return e.Lang.isObject(i,!0)&&"isFaved"in i&&(r=i.isFaved.newVal?"flickr-favorites-add":"flickr-favorites-remove",n.push(e.ModelUpdaters[r].run({photoId:t},this.appContext))),e.Promise.all(n)},toggleFave:function(t){var i=this.getValue(t,"faveCount"),r=!this.getValue(t,"isFaved"),n="photo-engagement-models",o=i+(r?1:-1),a=this.appContext.getViewer();this.setValues(t,{isFaved:r,faveCount:o}),a&&this.appContext.getModelRegistry("photo-people-who-faved-models").then((function(e){var i=e.exists(t)?e.proxy(t):void 0;i&&(r?i.addFave(a.nsid):i.removeFave(a.nsid))})),this.name!==n?this.appContext.getModelRegistry(n).then((function(e){e.exists(t)&&e.toggleFave(t)})):e.Snowplough&&this.appContext.getModel("photo-models",t).then(function(t){e.Snowplough.sendStructuredEvent({category:"engagement",action:r?"fave":"unfave"},e.Snowplough.getPhotoContextFromModel(t))}.bind(this))},addAsFave:function(e){var t=this.getValue(e,"faveCount"),i=this.getValue(e,"isFaved"),r="photo-engagement-models";return i||this.setValues(e,{isFaved:!0,faveCount:t+1}),this.name!==r&&this.appContext.getModelRegistry(r).then((function(t){t.exists(e)&&t.toggleFave(e)})),!i},getLargestSize:function(e,t){return this.getSizeToFit(e,{width:Number.MAX_VALUE,height:Number.MAX_VALUE},t)},getSizeToFit:function(t,r,n){n=n||{};var o,a,s,u,d=this,l=r.width,h=r.height,c=!!n.cropToFit,g=n.includeSquare,f=n.sizes||this.getValue(t,"sizes"),v=n.excludeSizes||["o"],p=n.includeSizes;if(void 0===n.includeSizes)try{p=Object.keys(f)}catch(e){i.warn("getSizeToFit with invalid sizes",{err:e,sizes:f})}return this._getSizeToFitMemo=this._getSizeToFitMemo||{},o=[t,l,h,c,v.sort().join(""),p.sort().join("")].join("_"),this._getSizeToFitMemo[o]||(e.Object.each(f,(function(e,i){var r,n,o,d,f;e&&-1===v.indexOf(i)&&p.indexOf(i)>-1&&(g||!this.isSizeSquare(i)||this.isPhotoSquare(t))&&(r=parseInt(e.width,10),n=parseInt(e.height,10),(c&&r>=l&&n>=h||!c&&(r>=l||n>=h))&&(o=!0),o&&(a?n<parseInt(a.height,10)&&(a=e):a=e),s?(d=parseInt(s.width,10),f=parseInt(s.height,10),(r>d||n>f)&&(s=e)):s=e),u=a||s}),this),this._getSizeToFitMemo[o]=u,this._getSizeToFitMemoTimer||(this._getSizeToFitMemoTimer=setTimeout((function(){delete d._getSizeToFitMemo,delete d._getSizeToFitMemoTimer}),1e4))),e.clone(this._getSizeToFitMemo[o],!0)},getSizeIfExact:function(e,t){var i,r,n=this.getValue(e,"sizes");return Object.keys(n).some((function(e){return"o"!==e&&(r=n[e],t.height===r.height&&t.width===r.width&&(i=r,!0))})),i},isSizeSquare:function(e){return["sq","q"].indexOf(e)>-1},isPhotoSquare:function(t){var i;return this._isPhotoSquareMemo=this._isPhotoSquareMemo||{},void 0!==this._isPhotoSquareMemo[t]?i=this._isPhotoSquareMemo[t]:(i=!0,e.Object.some(this.getValue(t,"sizes"),(function(e,t){if(e&&e.width&&e.height&&!this.isSizeSquare(t)&&1!==parseInt(e.width,10)/parseInt(e.height,10))return i=!1,!0}),this),this._isPhotoSquareMemo[t]=i),i},getSizeForCanvas:function(e,t,i,r){r=r||1;var n,o,a=this.getSizeToFit(e,{width:t*r,height:i*r});return n=Math.min(i/r,a.height),o=Math.min(t/r,a.width/a.height*n),n=Math.min(n,a.height/a.width*o),{width:Math.round(o),height:Math.round(n),url:a.url,pixelRatio:a.width/o}},attributes:{title:{validator:function(t,i){return e.AttributeHelpers.validateString(t)},setter:function(t){return e.AttributeHelpers.coerceString(t)},defaultValue:""},description:{validator:function(t,i){return e.AttributeHelpers.validateString(t)},setter:function(t){return e.AttributeHelpers.coerceString(t)},defaultValue:""},mediaType:{validator:function(t,i){return e.AttributeHelpers.validateString(t)},setter:function(t){return e.AttributeHelpers.coerceString(t)},defaultValue:"photo"},contentType:{validator:function(t,i){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)},defaultValue:0},license:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)}},isVideo:{readOnly:!0,derivedBy:["mediaType"],getter:function(e,t){return"video"===this.getValue(t,"mediaType")}},isOwner:{readOnly:!0,derivedBy:["owner"],getter:function(e,t){var i=this.getValue(t,"owner"),r=this.appContext.getViewer();return!!r.signedIn&&i.getValue("id")===r.nsid}},sizes:{},descendingSizes:{readOnly:!0,derivedBy:["sizes"],defaultFn:function(e){var t,i,r=[];if(this._descendingSizesMemo=this._descendingSizesMemo||{},this._descendingSizesMemo[e])return this._descendingSizesMemo[e];for(i in t=this.getValue(e,"sizes"))r.push(t[i]),r[r.length-1].key=i;return r.sort((function(e,t){return e.width<t.width?1:e.width===t.width?e.height<t.height?1:e.height===t.height?"o"===e.key?-1:1:-1:-1})),this._descendingSizesMemo[e]=r,r}},ascendingSizes:{readOnly:!0,derivedBy:["descendingSizes"],defaultFn:function(e){return this.getValue(e,"descendingSizes").reverse()}},aspectRatio:{readOnly:!0,derivedBy:["descendingSizes","rotation"],defaultFn:function(e){var t=this.getValue(e,"descendingSizes").find((function(e){return"o"!==e.key}));return t.width/t.height}},needsInterstitial:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},canComment:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!0},canPublicComment:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},url:{readOnly:!0,derivedBy:["owner"],defaultFn:function(e){var t=this.getValue(e,"owner");return t?"/photos/"+t.getValue("pathAlias")+"/"+e:void 0}},rotation:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)}},ownerNsid:{},isFaved:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},faveCount:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return(t=e.AttributeHelpers.coerceInteger(t))<0&&(t=0),t},defaultValue:0},commentCount:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return(t=e.AttributeHelpers.coerceInteger(t))<0&&(t=0),t},defaultValue:0},canFave:{readOnly:!0,derivedBy:["is_owner"],getter:function(e,t){return!this.getValue(t,"isOwner")}},canPrint:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1}}}}),"@VERSION@",{requires:["flickr-favorites-add-updater","flickr-favorites-remove-updater","photo-engagement-models","photo-people-who-faved-models"],optionalRequires:["hermes-core"]});YUI.add("flickr-photos-setPerms-updater",(function(e,r){"use strict";e.namespace("ModelUpdaters")["flickr-photos-setPerms"]={run:function(s,o){var t=this;return s.nsid=o.getViewer().nsid,e.Promise.all([o.callAPI("flickr.photos.setPerms",s),o.getModelRegistry("photostream-models")]).then((function(e){return t._processResponse(e,s)}),e.FetcherErrorLogger(r))},_processResponse:function(e,r){var s=e[0],o=e[1];if(o.attributeSearch({normalizedId:r.nsid},!0).forEach((function(e){o.remove(e)})),r.full_response)return s.photoIdsSent=r.photo_ids,s}}}),"@VERSION@",{requires:["flickr-promise"]});