//>>built
define("dojox/data/FlickrStore","dojo/_base/lang dojo/_base/declare dojo/_base/array dojo/data/util/simpleFetch dojo/io/script dojo/_base/connect dojo/date/stamp dojo/AdapterRegistry".split(" "),function(g,d,m,f,n,h,k,l){d=d("dojox.data.FlickrStore",null,{constructor:function(a){a&&a.label&&(this.label=a.label);a&&"urlPreventCache"in a&&(this.urlPreventCache=a.urlPreventCache?!0:!1)},_storeRef:"_S",label:"title",urlPreventCache:!0,_assertIsItem:function(a){if(!this.isItem(a))throw Error("dojox.data.FlickrStore: a function was passed an item argument that was not an item");
},_assertIsAttribute:function(a){if("string"!==typeof a)throw Error("dojox.data.FlickrStore: a function was passed an attribute argument that was not an attribute name string");},getFeatures:function(){return{"dojo.data.api.Read":!0}},getValue:function(a,b,c){return(a=this.getValues(a,b))&&0<a.length?a[0]:c},getAttributes:function(a){return"title description author datePublished dateTaken imageUrl imageUrlSmall imageUrlMedium tags link".split(" ")},hasAttribute:function(a,b){var c=this.getValue(a,
b);return c||""===c||!1===c?!0:!1},isItemLoaded:function(a){return this.isItem(a)},loadItem:function(a){},getLabel:function(a){return this.getValue(a,this.label)},getLabelAttributes:function(a){return[this.label]},containsValue:function(a,b,c){a=this.getValues(a,b);for(b=0;b<a.length;b++)if(a[b]===c)return!0;return!1},getValues:function(a,b){this._assertIsItem(a);this._assertIsAttribute(b);var c=g.hitch(this,"_unescapeHtml"),e=g.hitch(k,"fromISOString");switch(b){case "title":return[c(a.title)];case "author":return[c(a.author)];
case "datePublished":return[e(a.published)];case "dateTaken":return[e(a.date_taken)];case "imageUrlSmall":return[a.media.m.replace(/_m\./,"_s.")];case "imageUrl":return[a.media.m.replace(/_m\./,".")];case "imageUrlMedium":return[a.media.m];case "link":return[a.link];case "tags":return a.tags.split(" ");case "description":return[c(a.description)];default:return[]}},isItem:function(a){return a&&a[this._storeRef]===this?!0:!1},close:function(a){},_fetchItems:function(a,b,c){var e=a.query=a.query||{},
d={format:"json",tagmode:"any"};m.forEach(["tags","tagmode","lang","id","ids"],function(a){e[a]&&(d[a]=e[a])});d.id=e.id||e.userid||e.groupid;e.userids&&(d.ids=e.userids);var f=null,k={url:dojox.data.FlickrStore.urlRegistry.match(a),preventCache:this.urlPreventCache,content:d},l=g.hitch(this,function(c){f&&h.disconnect(f);b(this._processFlickrData(c),a)}),f=h.connect("jsonFlickrFeed",l);n.get(k).addErrback(function(b){h.disconnect(f);c(b,a)})},_processFlickrData:function(a){var b=[];if(a.items)for(var b=
a.items,c=0;c<a.items.length;c++)a.items[c][this._storeRef]=this;return b},_unescapeHtml:function(a){return a.replace(/&amp;/gm,"\x26").replace(/&lt;/gm,"\x3c").replace(/&gt;/gm,"\x3e").replace(/&quot;/gm,'"').replace(/&#39;/gm,"'")}});g.extend(d,f);f=d.urlRegistry=new l(!0);f.register("group pool",function(a){return!!a.query.groupid},"https://api.flickr.com/services/feeds/groups_pool.gne");f.register("default",function(a){return!0},"https://api.flickr.com/services/feeds/photos_public.gne");if(!p)var p=
function(a){};return d});