YUI.add("photo-exif-models",function(e){function r(e){r.superclass.constructor.call(this,e)}e.Models[this.name]=r,e.extend(r,e.FlickrModelRegistry,{name:this.name,remote:{read:function(r){return e.ModelFetchers["flickr-photos-getExif"].run(r,this.appContext).then(function(e){return e},function(){})}},attributes:{camera:{},cameraType:{},cameraURL:{},data:{},exposureProgram:{},exposureTime:{},flash:{},flashFired:{},flashModeOff:{},flashModeOn:{},flashModeAuto:{},fNumber:{},focalLength:{},iso:{},lensModel:{},software:{},meteringMode:{}}})},"@VERSION@",{requires:["flickr-model-registry","flickr-promise","flickr-photos-getExif-fetcher"]});YUI.add("flickr-photos-getExif-fetcher",function(e,a){"use strict";e.namespace("ModelFetchers")["flickr-photos-getExif"]={run:function(o,t){var r,s=this;return r={photo_id:o.id,extras:"camera"},e.Promise.all([t.callAPI("flickr.photos.getExif",r),t.getModelRegistry("photo-exif-models")]).then(function(e){return s._processResponse(e,o)},e.FetcherErrorLogger(a))},_processResponse:function(e,a){var o,t,r,s=e[0],l=e[1];if(s.photo)return o=e[0].photo.exif||[],t=e[0].photo.camera,r={id:a.id,camera:t,cameraType:e[0].photo.camera_type,cameraURL:e[0].photo.camera_url,data:[],flashFired:null,flashModeOff:null,flashModeOn:null,flashModeAuto:null,meteringMode:null},o.forEach(function(e){var a,o,t;e.tag&&e.raw&&("string"==typeof e.tag&&(0===(o=e.tag.search(/([A-Z][a-z])/))?o=1:-1===o&&(o=e.tag.length),t=e.tag.slice(0,o).toLowerCase()+e.tag.slice(o)),r[t]=a=e.raw.content,r.data.push({label:e.label,value:a}))}),[["lensModel","lens"]].forEach(function(e){for(var a=e.shift();e.length&&void 0===r[a];)r[a]=r[e.shift()]}),r.flash&&(r.flash.match(/on|fired/i)&&!r.flash.match(/did not/i)?r.flashFired=!0:r.flashFired=!1,r.flash=r.flash.substr(0,1).toUpperCase()+r.flash.substr(1).toLowerCase(),r.flash.match(/auto/i)?r.flashModeAuto=!0:r.flash.match(/on/i)?r.flashModeOn=!0:r.flash.match(/off|no flash/i)&&(r.flashModeOff=!0)),l.addOrUpdate(r)}}},"@VERSION@",{requires:["flickr-promise","api-helper"],optional:["photo-exif-models"]});