YUI.add("pjax-base-patched",(function(e,t){var a=e.config.win,i=e.ClassNameManager.getClassName("pjax"),n="navigate";function r(){}r.prototype={initializer:function(){this.publish(n,{defaultFn:this._defNavigateFn}),this.get("html5")&&this._pjaxBindUI()},destructor:function(){this._pjaxEvents&&this._pjaxEvents.detach()},navigate:function(t,i){return t=this._resolveURL(t),!!this._navigate(t,i)||(this._hasSameOrigin(t)?!!this.get("allowFallThrough")&&(a.location=t,!0):(e.error("Security error: The new URL must be of the same origin as the current URL."),!1))},_isLinkSameOrigin:function(t){var a,i=e.getLocation(),n=i.protocol,r=i.hostname,s=parseInt(i.port,10)||null;return t.get("protocol")===n&&t.get("hostname")===r&&(a=parseInt(t.get("port"),10)||null,"http:"===n?(s||(s=80),a||(a=80)):"https:"===n&&(s||(s=443),a||(a=443)),a===s)},_navigate:function(t,i){if(t=this._upgradeURL(t),!this.hasRoute(t))return!1;i=e.merge(i,{url:t});var r,s,o=this._getURL();if(s=t.replace(/(#.*)$/,(function(e,t,a){return r=t,e.substring(a)})),r&&s===o.replace(/#.*$/,"")){if(!this.get("navigateOnHash"))return!1;i.hash=r}return"replace"in i||(i.replace=t===o),this.get("html5")||i.force?this.fire(n,i):a&&(i.replace?a.location.replace(t):a.location=t),!0},_pjaxBindUI:function(){this._pjaxEvents||(this._pjaxEvents=e.one("body").delegate("click",this._onLinkClick,this.get("linkSelector"),this))},_defNavigateFn:function(e){this[e.replace?"replace":"save"](e.url),a&&this.get("scrollToTop")&&setTimeout((function(){a.scroll(0,0)}),1)},_onLinkClick:function(e){var t,a;1!==e.button||e.ctrlKey||e.metaKey||"A"===(t=e.currentTarget).get("tagName").toUpperCase()&&this._isLinkSameOrigin(t)&&(a=t.get("href"))&&this._navigate(a,{originEvent:e})&&e.preventDefault()}},r.ATTRS={linkSelector:{value:"a."+i,writeOnce:"initOnly"},navigateOnHash:{value:!1},scrollToTop:{value:!0},allowFallThrough:{value:!0}},e.PjaxBase=r}),"@VERSION@",{requires:["classnamemanager","node-event-delegate","router"],condition:{name:"pjax-base-patched",trigger:"pjax-base",when:"instead"}});YUI.add("view",function(e,t){function n(){n.superclass.constructor.apply(this,arguments)}e.View=e.extend(n,e.Base,{containerTemplate:"<div/>",events:{},template:"",_allowAdHocAttrs:!0,initializer:function(t){t||(t={}),t.containerTemplate&&(this.containerTemplate=t.containerTemplate),t.template&&(this.template=t.template),this.events=t.events?e.merge(this.events,t.events):this.events,this.after("containerChange",this._afterContainerChange)},destroy:function(e){return e&&(e.remove||e["delete"])&&this.onceAfter("destroy",function(){this._destroyContainer()}),n.superclass.destroy.call(this)},destructor:function(){this.detachEvents(),delete this._container},attachEvents:function(t){var n=this.get("container"),r=e.Object.owns,i,s,o,u;this.detachEvents(),t||(t=this.events);for(u in t){if(!r(t,u))continue;s=t[u];for(o in s){if(!r(s,o))continue;i=s[o],typeof i=="string"&&(i=this[i]);if(!i)continue;this._attachedViewEvents.push(n.delegate(o,i,u,this))}}return this},create:function(t){return t?e.one(t):e.Node.create(this.containerTemplate)},detachEvents:function(){return e.Array.each(this._attachedViewEvents,function(e){e&&e.detach()}),this._attachedViewEvents=[],this},remove:function(){var e=this.get("container");return e&&e.remove(),this},render:function(){return this},_destroyContainer:function(){var e=this.get("container");e&&e.remove(!0)},_getContainer:function(e){return this._container||(e?(this._container=e,this.attachEvents()):(e=this._container=this.create(),this._set("container",e))),e},_afterContainerChange:function(){this.attachEvents(this.events)}},{NAME:"view",ATTRS:{container:{getter:"_getContainer",setter:e.one,writeOnce:!0}},_NON_ATTRS_CFG:["containerTemplate","events","template"]})},"3.16.0",{requires:["base-build","node-event-delegate"]});
YUI.add("app-base",function(e,t){var n=e.Lang,r=e.Object,i=e.PjaxBase,s=e.Router,o=e.View,u=e.ClassNameManager.getClassName,a=e.config.win,f;f=e.Base.create("app",e.Base,[o,s,i],{views:{},initializer:function(t){function i(t,r){n[r]=e.merge(n[r],t)}t||(t={});var n={};r.each(this.views,i),r.each(t.views,i),this.views=n,this._viewInfoMap={},this.after("activeViewChange",e.bind("_afterActiveViewChange",this)),this.get("serverRouting")||this._pjaxBindUI()},createView:function(t,i){var s=this.getViewInfo(t),u=s&&s.type||o,a,f;return a=n.isString(u)?r.getValue(e,u.split(".")):u,f=new a(i),this._viewInfoMap[e.stamp(f,!0)]=s,f},getViewInfo:function(t){return n.isString(t)?this.views[t]:t&&this._viewInfoMap[e.stamp(t,!0)]},render:function(){var t=e.App.CLASS_NAMES,n=this.get("container"),r=this.get("viewContainer"),i=this.get("activeView"),s=i&&i.get("container"),o=n.compareTo(r);return n.addClass(t.app),r.addClass(t.views),i&&!r.contains(s)&&r.appendChild(s),!n.contains(r)&&!o&&n.appendChild(r),this},showView:function(t,r,i,s){var o,u;return i||(i={}),s?i=e.merge(i,{callback:s}):n.isFunction(i)&&(i={callback:i}),n.isString(t)&&(o=this.getViewInfo(t),o&&o.preserve&&o.instance?(t=o.instance,this._viewInfoMap[e.stamp(t,!0)]=o):(t=this.createView(t,r),u=!0)),i.update&&!u&&t.setAttrs(r),"render"in i?i.render&&t.render():u&&t.render(),this._set("activeView",t,{options:i})},_attachView:function(e,t){if(!e)return;var n=this.getViewInfo(e),r=this.get("viewContainer");e.addTarget(this),n&&(n.instance=e),r[t?"prepend":"append"](e.get("container"))},_destroyContainer:function(){var t=e.App.CLASS_NAMES,n=this.get("container"),r=this.get("viewContainer"),i=n.compareTo(r);if(e.one("body").compareTo(n)){this.detachEvents(),n.removeClass(t.app),i?n.removeClass(t.views):r.remove(!0);return}r.remove(!0),i||n.remove(!0)},_detachView:function(t){if(!t)return;var n=this.getViewInfo(t)||{};n.preserve?t.remove():(t.destroy({remove:!0}),delete this._viewInfoMap[e.stamp(t,!0)],t===n.instance&&delete n.instance),t.removeTarget(this)},_getRequest:function(){var e=s.prototype._getRequest.apply(this,arguments);return e.app=this,e},_getViewContainer:function(e){return!e&&!this._viewContainer&&(e=this._viewContainer=this.create(),this._set("viewContainer",e)),e},_initHtml5:function(){return this.get("serverRouting")===!1?!1:s.html5},_isChildView:function(e,t){var n=this.getViewInfo(e),r=this.getViewInfo(t);return n&&r?this.getViewInfo(n.parent)===r:!1},_isParentView:function(e,t){var n=this.getViewInfo(e),r=this.getViewInfo(t);return n&&r?this.getViewInfo(r.parent)===n:!1},_navigate:function(t,n){return this.get("serverRouting")||(n=e.merge({force:!0},n)),i.prototype._navigate.call(this,t,n)},_save:function(t,n){var r;return this.get("serverRouting")&&!this.get("html5")?this._hasSameOrigin(t)?(a&&(r=this._joinURL(t||""),n?a.location.replace(r):a.location=r),this):(e.error("Security error: The new URL must be of the same origin as the current URL."),this):s.prototype._save.apply(this,arguments)},_uiSetActiveView:function(e,t,n){n||(n={});var r=n.callback,i=this._isChildView(e,t),s=!i&&this._isParentView(e,t),o=!!n.prepend||s;if(e===t)return r&&r.call(this,e);this._attachView(e,o),this._detachView(t),r&&r.call(this,e)},_afterActiveViewChange:function(e){this._uiSetActiveView(e.newVal,e.prevVal,e.options)}},{ATTRS:{activeView:{value:null,readOnly:!0},container:{valueFn:function(){return e.one("body")}},html5:{valueFn:"_initHtml5"},linkSelector:{value:"a"},serverRouting:{valueFn:function(){return e.App.serverRouting},writeOnce:"initOnly"},viewContainer:{getter:"_getViewContainer",setter:e.one,writeOnce:!0}},_NON_ATTRS_CFG:["views"]}),e.namespace("App").Base=f,e.App=e.mix(e.Base.create("app",f,[]),e.App,!0),e.App.CLASS_NAMES={app:u("app"),views:u("app","views")}},"3.16.0",{requires:["classnamemanager","pjax-base","router","view"]});
YUI.add("querystring-stringify-simple",function(e,t){var n=e.namespace("QueryString"),r=encodeURIComponent;n.stringify=function(t,n){var i=[],s=n&&n.arrayKey?!0:!1,o,u,a;for(o in t)if(t.hasOwnProperty(o))if(e.Lang.isArray(t[o]))for(u=0,a=t[o].length;u<a;u++)i.push(r(s?o+"[]":o)+"="+r(t[o][u]));else i.push(r(o)+"="+r(t[o]));return i.join("&")}},"3.16.0",{requires:["yui-base"]});
YUI.add("io-base",function(e,t){function o(t){var n=this;n._uid="io:"+s++,n._init(t),e.io._map[n._uid]=n}var n=["start","complete","end","success","failure","progress"],r=["status","statusText","responseText","responseXML"],i=e.config.win,s=0;o.prototype={_id:0,_headers:{"X-Requested-With":"XMLHttpRequest"},_timeout:{},_init:function(t){var r=this,i,s;r.cfg=t||{},e.augment(r,e.EventTarget);for(i=0,s=n.length;i<s;++i)r.publish("io:"+n[i],e.merge({broadcast:1},t)),r.publish("io-trn:"+n[i],t)},_create:function(t,n){var r=this,s={id:e.Lang.isNumber(n)?n:r._id++,uid:r._uid},o=t.xdr?t.xdr.use:null,u=t.form&&t.form.upload?"iframe":null,a;return o==="native"&&(o=e.UA.ie&&!l?"xdr":null,r.setHeader("X-Requested-With")),a=o||u,s=a?e.merge(e.IO.customTransport(a),s):e.merge(e.IO.defaultTransport(),s),s.notify&&(t.notify=function(e,t,n){r.notify(e,t,n)}),a||i&&i.FormData&&t.data instanceof i.FormData&&(s.c.upload.onprogress=function(e){r.progress(s,e,t)},s.c.onload=function(e){r.load(s,e,t)},s.c.onerror=function(e){r.error(s,e,t)},s.upload=!0),s},_destroy:function(t){i&&!t.notify&&!t.xdr&&(u&&!t.upload?t.c.onreadystatechange=null:t.upload?(t.c.upload.onprogress=null,t.c.onload=null,t.c.onerror=null):e.UA.ie&&!t.e&&t.c.abort()),t=t.c=null},_evt:function(t,r,i){var s=this,o,u=i.arguments,a=s.cfg.emitFacade,f="io:"+t,l="io-trn:"+t;this.detach(l),r.e&&(r.c={status:0,statusText:r.e}),o=[a?{id:r.id,data:r.c,cfg:i,arguments:u}:r.id],a||(t===n[0]||t===n[2]?u&&o.push(u):(r.evt?o.push(r.evt):o.push(r.c),u&&o.push(u))),o.unshift(f),s.fire.apply(s,o),i.on&&(o[0]=l,s.once(l,i.on[t],i.context||e),s.fire.apply(s,o))},start:function(e,t){this._evt(n[0],e,t)},complete:function(e,t){this._evt(n[1],e,t)},end:function(e,t){this._evt(n[2],e,t),this._destroy(e)},success:function(e,t){this._evt(n[3],e,t),this.end(e,t)},failure:function(e,t){this._evt(n[4],e,t),this.end(e,t)},progress:function(e,t,r){e.evt=t,this._evt(n[5],e,r)},load:function(e,t,r){e.evt=t.target,this._evt(n[1],e,r)},error:function(e,t,r){e.evt=t,this._evt(n[4],e,r)},_retry:function(e,t,n){return this._destroy(e),n.xdr.use="flash",this.send(t,n,e.id)},_concat:function(e,t){return e+=(e.indexOf("?")===-1?"?":"&")+t,e},setHeader:function(e,t){t?this._headers[e]=t:delete this._headers[e]},_setHeaders:function(t,n){n=e.merge(this._headers,n),e.Object.each(n,function(e,r){e!=="disable"&&t.setRequestHeader(r,n[r])})},_startTimeout:function(e,t){var n=this;n._timeout[e.id]=setTimeout(function(){n._abort(e,"timeout")},t)},_clearTimeout:function(e){clearTimeout(this._timeout[e]),delete this._timeout[e]},_result:function(e,t){var n;try{n=e.c.status}catch(r){n=0}n>=200&&n<300||n===304||n===1223?this.success(e,t):this.failure(e,t)},_rS:function(e,t){var n=this;e.c.readyState===4&&(t.timeout&&n._clearTimeout(e.id),setTimeout(function(){n.complete(e,t),n._result(e,t)},0))},_abort:function(e,t){e&&e.c&&(e.e=t,e.c.abort())},send:function(t,n,i){var s,o,u,a,f,c,h=this,p=t,d={};n=n?e.Object(n):{},s=h._create(n,i),o=n.method?n.method.toUpperCase():"GET",f=n.sync,c=n.data,e.Lang.isObject(c)&&!c.nodeType&&!s.upload&&e.QueryString&&e.QueryString.stringify&&(n.data=c=e.QueryString.stringify(c));if(n.form){if(n.form.upload)return h.upload(s,t,n);c=h._serialize(n.form,c)}c||(c="");if(c)switch(o){case"GET":case"HEAD":case"DELETE":p=h._concat(p,c),c="";break;case"POST":case"PUT":n.headers=e.merge({"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},n.headers)}if(s.xdr)return h.xdr(p,s,n);if(s.notify)return s.c.send(s,t,n);!f&&!s.upload&&(s.c.onreadystatechange=function(){h._rS(s,n)});try{s.c.open(o,p,!f,n.username||null,n.password||null),h._setHeaders(s.c,n.headers||{}),h.start(s,n),n.xdr&&n.xdr.credentials&&l&&(s.c.withCredentials=!0),s.c.send(c);if(f){for(u=0,a=r.length;u<a;++u)d[r[u]]=s.c[r[u]];return d.getAllResponseHeaders=function(){return s.c.getAllResponseHeaders()},d.getResponseHeader=function(e){return s.c.getResponseHeader(e)},h.complete(s,n),h._result(s,n),d}}catch(v){if(s.xdr)return h._retry(s,t,n);h.complete(s,n),h._result(s,n)}return n.timeout&&h._startTimeout(s,n.timeout),{id:s.id,abort:function(){return s.c?h._abort(s,"abort"):!1},isInProgress:function(){return s.c?s.c.readyState%4:!1},io:h}}},e.io=function(t,n){var r=e.io._map["io:0"]||new o;return r.send.apply(r,[t,n])},e.io.header=function(t,n){var r=e.io._map["io:0"]||new o;r.setHeader(t,n)},e.IO=o,e.io._map={};var u=i&&i.XMLHttpRequest,a=i&&i.XDomainRequest,f=i&&i.ActiveXObject,l=u&&"withCredentials"in new XMLHttpRequest;e.mix(e.IO,{_default:"xhr",defaultTransport:function(t){if(!t){var n={c:e.IO.transports[e.IO._default](),notify:e.IO._default==="xhr"?!1:!0};return n}e.IO._default=t},transports:{xhr:function(){return u?new XMLHttpRequest:f?new ActiveXObject("Microsoft.XMLHTTP"):null},xdr:function(){return a?new XDomainRequest:null},iframe:function(){return{}},flash:null,nodejs:null},customTransport:function(t){var n={c:e.IO.transports[t]()};return n[t==="xdr"||t==="flash"?"xdr":"notify"]=!0,n}}),e.mix(e.IO.prototype,{notify:function(e,t,n){var r=this;switch(e){case"timeout":case"abort":case"transport error":t.c={status:0,statusText:e},e="failure";default:r[e].apply(r,[t,n])}}})},"3.16.0",{requires:["event-custom-base","querystring-stringify-simple"]});
YUI.add("pjax-content",function(e,t){function n(){}n.prototype={getContent:function(t){var n={},r=this.get("contentSelector"),i=e.Node.create(t||""),s=this.get("titleSelector"),o;return r&&i?n.node=i.all(r).toFrag():n.node=i,s&&i&&(o=i.one(s),o&&(n.title=o.get("text"))),n},loadContent:function(t,n,r){var i=t.url;this._request&&this._request.abort(),this.get("addPjaxParam")&&(i=i.replace(/([^#]*)(#.*)?$/,function(e,t,n){return t+=(t.indexOf("?")>-1?"&":"?")+"pjax=1",t+(n||"")})),this._request=e.io(i,{arguments:{route:{req:t,res:n,next:r},url:i},context:this,headers:{"X-PJAX":"true"},timeout:this.get("timeout"),on:{complete:this._onPjaxIOComplete,end:this._onPjaxIOEnd}})},_onPjaxIOComplete:function(e,t,n){var r=this.getContent(t.responseText),i=n.route,s=i.req,o=i.res;s.ioURL=n.url,o.content=r,o.ioResponse=t,i.next()},_onPjaxIOEnd:function(){this._request=null}},n.ATTRS={addPjaxParam:{value:!0},contentSelector:{value:null},titleSelector:{value:"title"},timeout:{value:3e4}},e.PjaxContent=n},"3.16.0",{requires:["io-base","node-base","router"]});
YUI.add("app-content",function(e,t){function r(){n.apply(this,arguments)}var n=e.PjaxContent;r.route=["loadContent","_contentRoute"],r.prototype={showContent:function(t,n,r){t=e.one(t),typeof n=="function"&&(n={callback:n},r=null),n=e.merge({render:!1},n);var i=n.view||"",s=typeof i=="string"?i:i.name,o=typeof i!="string"?i.config:{},u=this.getViewInfo(s),a,f,l,c;return delete n.view,t&&t.isFragment()&&t.get("childNodes").size()===1&&(t=t.get("firstChild")),t&&t.get("nodeType")===1?a=t:(l=u&&u.type||e.View,c=typeof l=="string"?e.Object.getValue(e,l.split(".")):l,f=c.prototype.containerTemplate,a=e.Node.create(f),a.append(t)),o=e.merge(o,{container:a}),this.showView(s,o,n,r)},_contentRoute:function(t,n,r){var i=n.content,s=e.config.doc,o;if(!i||!i.node)return r();i.title&&s&&(o=this.onceAfter("activeViewChange",function(){s.title=i.title})),this.showContent(i.node),o&&o.detach(),r()}},r.ATTRS=e.Attribute.protectAttrs(n.ATTRS),e.mix(r,n,!1,null,1),e.App.Content=r,e.Base.mix(e.App,[r])},"3.16.0",{requires:["app-base","pjax-content"]});
YUI.add("timers",function(e,t){function i(e){return s}function s(e){this.capacity=this.snap(e),this.length=0,this.front=0,this.initialize()}function o(e,t,n,r,i){for(var s=0;s<i;++s)n[s+r]=e[s+t]}function u(e){return e>>>=0,e-=1,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e+1}function v(){while(a.length>0){var e=a.shift();try{e.call()}catch(t){if(d)throw l(),t;setTimeout(function(){throw t},0)}}f=!1}function y(e){d&&p.domain&&(e=p.domain.bind(e)),a.push(e),f||(l(),f=!0)}function b(e){var t;return b._asynchronizer(function(){t||e()}),{cancel:function(){t=1}}}var n={},r=e.config.global;"use strict",n.exports=s,s.prototype.push=function(e){var t=this.length;this.capacity<=t&&this.grow(this.snap(this.capacity*this.growFactor));var n=this.front+t&this.capacity-1;this[n]=e,this.length=t+1},s.prototype.shift=function(){var e=this.front,t=this[e];return this[e]=void 0,this.front=e+1&this.capacity-1,this.length--,t},s.prototype.grow=function(e){var t=this.front,n=this.capacity,r=new Array(n),i=this.length;o(this,0,r,0,n),this.capacity=e,this.initialize(),this.front=0;if(t+i<=n)o(r,t,this,0,i);else{var s=i-(t+i&n-1);o(r,t,this,0,s),o(r,0,this,s,i-s)}},s.prototype.initialize=function(){var e=this.capacity;for(var t=0;t<e;++t)this[t]=void 0},s.prototype.snap=function(e){return typeof e!="number"?this.minCapacity:u(Math.min(this.maxCapacity,Math.max(this.minCapacity,e)))},s.prototype.maxCapacity=1<<30|0,s.prototype.minCapacity=16,s.prototype.growFactor=8,"use strict";var s=i("./queue"),a=new s(1024),f=!1,l=void 0,c=typeof setImmediate=="function",h,p=r.process,d=!!p&&{}.toString.call(p)==="[object process]";if(d)l=function(){var e=p.domain;e&&(h=h||(1,i)("domain"),h.active=p.domain=null),f&&c?setImmediate(v):p.nextTick(v),e&&(h.active=p.domain=e)};else if(c)l=function(){setImmediate(v)};else if(typeof MessageChannel!="undefined"){var m=new MessageChannel;m.port1.onmessage=function(){l=g,m.port1.onmessage=v,v()};var g=function(){m.port2.postMessage(0)};l=function(){setTimeout(v,0),g()}}else l=function(){setTimeout(v,0)};n.exports=y,b._asynchronizer=y,b._impl="asap",e.soon=b},"3.16.0",{requires:["yui-base"]});
YUI.add("promise",function(e,t){function i(e){if(!(this instanceof i))return new i(e);var t=new i.Resolver(this);this._resolver=t;try{e.call(this,function(e){t.resolve(e)},function(e){t.reject(e)})}catch(n){t.reject(n)}}function s(e){this._callbacks=[],this._errbacks=[],this.promise=e,this._status="pending",this._result=null}var n=e.Lang,r=[].slice;e.mix(i.prototype,{then:function(e,t){var n=this.constructor,r=this._resolver;return new n(function(n,s){r._addCallbacks(typeof e=="function"?i._wrap(n,s,e):n,typeof t=="function"?i._wrap(n,s,t):s)})},"catch":function(e){return this.then(undefined,e)},getStatus:function(){return this._resolver.getStatus()}}),i._wrap=function(e,t,n){return function(r){var i;try{i=n(r)}catch(s){t(s);return}e(i)}},i.isPromise=function(e){var t;try{t=e.then}catch(n){}return typeof t=="function"},i.resolve=function(e){return i.isPromise(e)&&e.constructor===this?e:new this(function(t){t(e)})},i.reject=function(e){return new this(function(t,n){n(e)})},i.all=function(e){var t=this;return new t(function(r,i){function f(e){return function(t){a[e]=t,s--,s||r(a)}}if(!n.isArray(e)){i(new TypeError("Promise.all expects an array of values or promises"));return}var s=e.length,o=0,u=e.length,a=[];if(u<1)return r(a);for(;o<u;o++)t.resolve(e[o]).then(f(o),i)})},i.race=function(e){var t=this;return new t(function(r,i){if(!n.isArray(e)){i(new TypeError("Promise.race expects an array of values or promises"));return}for(var s=0,o=e.length;s<o;s++)t.resolve(e[s]).then(r,i)})},e.Promise=i,e.mix(s.prototype,{fulfill:function(e){this._status==="pending"&&(this._result=e,this._status="fulfilled"),this._status==="fulfilled"&&(this._notify(this._callbacks,this._result),this._callbacks=[],this._errbacks=null)},reject:function(e){this._status==="pending"&&(this._result=e,this._status="rejected"),this._status==="rejected"&&(this._notify(this._errbacks,this._result),this._callbacks=null,this._errbacks=[])},resolve:function(e){var t=this;i.isPromise(e)?e.then(function(e){t.resolve(e)},function(e){t.reject(e)}):this.fulfill(e)},then:function(e,t){return this.promise.then(e,t)},_addCallbacks:function(e,t){var n=this._callbacks,r=this._errbacks,i=this._status,s=this._result;n&&typeof e=="function"&&n.push(e),r&&typeof t=="function"&&r.push(t),i==="fulfilled"?this.fulfill(s):i==="rejected"&&this.reject(s)},getStatus:function(){return this._status},_notify:function(t,n){t.length&&e.soon(function(){var e,r;for(e=0,r=t.length;e<r;++e)t[e](n)})}},!0),e.Promise.Resolver=s,e.when=function(e,t,n){return e=i.resolve(e),t||n?e.then(t,n):e},e.batch=function(){return i.all(r.call(arguments))}},"3.16.0",{requires:["timers"]});
YUI.add("flickr-promise",(function(r,e){"use strict";var o=require("hermes-core/flog")(e);r.FlickrPromise=function(e){"object"!=typeof e&&o.error("Incorrect use of Y.FlickrPromise. You should only be using Y.FlickrPromise as a wrapper for Y.Promise.all.");var n=Object.keys(e),t=n.map((function(r){return e[r]})),i={};return r.Promise.all(t).then((function(r){for(;r.length;)i[n.shift()]=r.shift();return i}))},r.RetryablePromise=function(e,o,n){return n=n||0,e(n+=1,o=o||1).catch((function(t){if(n<o)return r.RetryablePromise(e,o,n);throw t}))},r.PromiseCatcher=function(r){return r=r||"unnamed module",function(e){throw o.warn("Uncaught Promise exception",{module:r,err:e}),e}},r.FetcherErrorLogger=function(r){return r=r||"unnamed module",function(e){throw e.fatal?o.error("failed getting or processing API response",{module:r,err:e}):o.log("failed getting or processing API response",{module:r,err:e}),e}},r.PromiseChainDestroyer=function(){return new r.Promise((function(){}))}}),"@VERSION@",{requires:["promise"],optionalRequires:["hermes-core"]});YUI.add("list-proxy",(function(t){var e,i="hasMaxBoundary",n="hasMinBoundary";function r(t,e,i){this.registry=t,this.attrName=i,this.attrDef=this.registry.attributes[i],this.id=e,this.isListProxy=!0}function a(t){return e[t]}function s(t){delete e[t]}function o(i,n,r,o){if(!o||!t.Lang.isFunction(o.run))return t.Promise.reject("[list-proxy] `_cacheFetches` fetchFcn.run is not a function");var u=(function(t,e){return t+JSON.stringify(e)})(i,n),h=a(u);return h||((function(t,i){e[t]=i})(u,o.run.call(o,n,r).then((function(t){return s(u),t}),(function(t){throw s(u),t}))),a(u))}function u(t,e,i){var n,r;for(n=e;n<i;n++)if(void 0===(r=t[n])||!r.registry.exists(r.id))return!1;return!0}r.prototype={getPage:function(e){var i=t.merge({page:1,perPage:20},e,this.attrDef.pageFetch);return i.id=this.id,t.ListProxyStatic.fetchListByPage(i,this.registry,this.attrName)},getRange:function(e){var i=t.merge({offset:0,limit:10},e,this.attrDef.rangeFetch);return i.id=this.id,t.ListProxyStatic.fetchListByRange(i,this.registry,this.attrName)},getContext:function(e){var i=t.merge({numPrev:10,numNext:10},e,this.attrDef.contextFetch);return i.id=this.id,i.listItemId=e[i.listItemIdField],t.ListProxyStatic.fetchListByContext(i,this.registry,this.attrName)},getList:function(){return this.registry._data[this.id][this.attrName]||[]},appendToListMulti:function(e){var i=t.clone(this.registry._data[this.id][this.attrName])||[];e.forEach((function(t){i.push(t)})),i.hasMinBoundary=this.hasMinBoundary(),i.hasMaxBoundary=this.hasMaxBoundary(),this.registry.setValue(this.id,this.attrName,i,!1)},appendToList:function(e){var i=t.clone(this.registry._data[this.id][this.attrName])||[];i.push(e),i.hasMinBoundary=this.hasMinBoundary(),i.hasMaxBoundary=this.hasMaxBoundary(),this.registry.setValue(this.id,this.attrName,i,!1)},prependToList:function(t){(this.registry._data[this.id][this.attrName]||[]).unshift(t)},getFromListByID:function(e,i){var n=this.registry._data[this.id][this.attrName]||[],r=!1;return t.Array.some(n,(function(t){t[i||"id"]===e&&(r=t)})),r||!1},removeFromList:function(e,i){var n,r=this.registry._data[this.id][this.attrName]||[],a=0;0!==r.length&&(t.Array.some(r,(function(t){return a++,t[i||"id"]===e})),a===r.length&&r[a-1][i||"id"]!==e||a>0&&((n=r.slice(0,a-1).concat(r.slice(a))).hasMinBoundary=this.hasMinBoundary(),n.hasMaxBoundary=this.hasMaxBoundary(),this.registry.setValue(this.id,this.attrName,n)))},setMinBoundary:function(){this.getList()[n]=!0},hasMinBoundary:function(){return!!this.getList()[n]},setMaxBoundary:function(){this.getList()[i]=!0},hasMaxBoundary:function(){return!!this.getList()[i]},toJSON:function(){var e=[];return t.Array.each(this.getList(),(function(t){e.push(t.toJSON())})),e}},e={},t.ListProxy=r,t.ListProxyStatic={setBoundary:function(t,e){t["min"===e?n:i]=!0},fetchListByContext:function(e,i,n){var r,a,s,u,h,c,d=t.merge({},e),f=i.getValue(d.id,n),g=f.getList(),y=-1,m=f.hasMinBoundary&&f.hasMinBoundary(),x=f.hasMaxBoundary&&f.hasMaxBoundary(),p=i.attributes[n].contextFetch.listFetcher,l=d.numNext,v=d.numPrev;return d.refetchAt=void 0!==d.refetchAt?d.refetchAt:5,g.some((function(t,e){return t.getValue("id")===d.listItemId&&(y=e+1),!t.registry.exists(t.id)}))||1===y&&!m||y===g.length&&!x||-1===y?(d.numPrev=d.numPrev+d.refetchAt,d.numNext=d.numNext+d.refetchAt,o("context",d,i.appContext,p)):(r=y+d.numNext,a=g.length,s=g[0].getValue("id"),u=g[a-1].getValue("id"),h=g.slice(0,1===y?0:y-1).reverse().slice(0,d.numPrev),c=g.slice(y,r),r>a&&y<d.numPrev&&!m&&!x?o("context",d,i.appContext,p):r>a&&!x?(d.photoId=u,d.numPrev=0,d.numNext=r-a,o("context",d,i.appContext,p).then((function(t){return{previous:h,next:c.concat(t.next).slice(0,l)}}))):y<=d.numPrev&&!m?(d.photoId=s,d.numNext=0,d.numPrev=d.numPrev-y+1,o("context",d,i.appContext,p).then((function(t){return{previous:h.concat(t.previous).slice(0,v),next:c}}))):new t.Promise((function(t){t({previous:h,next:c}),y>=g.length-d.numNext&&d.refetchAt>0&&!x&&(d.photoId=u,d.numPrev=0,d.numNext=d.refetchAt,o("context",d,i.appContext,p)),y-1<=d.numPrev&&d.refetchAt>0&&!m&&(d.photoId=s,d.numPrev=d.refetchAt,d.numNext=0,o("context",d,i.appContext,p))})))},fetchListByPage:function(e,i,n){var r,a,s=t.merge({},e),h=i.getValue(s.id,n),c=h.getList();return r=s.perPage*(s.page-1),a=s.perPage*(s.page-1)+s.perPage,!(h.hasMinBoundary&&h.hasMinBoundary()&&c.length>=a||h.hasMaxBoundary&&h.hasMaxBoundary()&&h.hasMinBoundary&&h.hasMinBoundary())||!u(c,r,a)&&i.attributes[n].pageFetch?o("page",s,i.appContext,i.attributes[n].pageFetch.listFetcher):t.Promise.resolve(c.slice(r,a))},fetchListByRange:function(e,i,n){var r,a,s=i.getValue(e.id,n).getList();return r=e.offset,a=e.offset+e.limit,s.length>=a&&u(s,r,a)?t.Promise.resolve(s.slice(r,a)):o("range",e,i.appContext,i.attributes[n].rangeFetch.listFetcher)}}}),"@VERSION@");YUI.add("api-helper",(function(e){var t=["can_addmeta","can_comment","can_download","can_print","can_share","contact","content_type","count_comments","count_faves","count_views","date_taken","date_upload","description","icon_urls_deep","isfavorite","ispro","license","media","needs_interstitial","owner_name","owner_datecreate","path_alias","perm_print","realname","rotation","safety_level","secret_k","secret_h","url_sq","url_q","url_t","url_s","url_n","url_w","url_m","url_z","url_c","url_l","url_h","url_k","url_3k","url_4k","url_f","url_5k","url_6k","url_o","visibility","visibility_source","o_dims","publiceditability","system_moderation"],i=["datecreate","date_activity","eighteenplus","invitation_only","needs_interstitial","non_members_privacy","pool_pending_count","privacy","member_pending_count","icon_urls","date_activity_detail","muted"],r=["url_sq","url_q","url_t","url_s","url_n","url_w","url_m","url_z","url_c","url_l","url_h","url_k","url_3k","url_4k","url_5k","url_6k","url_o","path_alias","owner_name"],n=["can_comment","can_print","count_comments","count_faves","description","isfavorite","license","media","needs_interstitial","owner_name","path_alias","realname","rotation","url_sq","url_q","url_t","url_s","url_n","url_w","url_m","url_z","url_c","url_l"],a=["owner_name","path_alias","realname","sizes","url_sq","url_q","url_t","url_s","url_n","url_w","url_m","url_z","url_c","url_l","url_h","url_k","url_3k","url_4k","url_5k","url_6k","needs_interstitial"],o=["icon_urls","safe_search","galleries_view_layout_pref"];function s(t){return t&&"string"==typeof t?t.replace(/(?:c|farm)\d\.static\.?flickr\.com/,e.config.flickr.xmen.host):t}function l(e){var t,i=/^https?:/;if("string"==typeof e)return s(e.replace(i,""));for(t in e)e[t]=e[t]?e[t].replace(i,""):null,e[t]=s(e[t]);return e}function c(t,i){var r={};return!i&&t.id?e.Object.each(t,(function(i,n){var a,o=/^url_([a-z0-9]+)$/.exec(n);o&&(a=o[1],r[a]={displayUrl:l(t["url_"+a]),width:parseInt(t["width_"+a],10),height:parseInt(t["height_"+a],10)},t["url_"+a+"_cdn"]?(YUI.Env.isServer||(e.config.flickr.cdnUrls=!0),r[a].url=l(t["url_"+a+"_cdn"])):(YUI.Env.isServer||(e.config.flickr.cdnUrls=!1),r[a].url=l(t["url_"+a])))})):t&&t[0]&&t[0].location?e.Object.each(t,(function(e,t){var i=/_[a-z0-9]+_([a-z])\./.exec(e.location);if(i&&e.width>0&&e.width>0&&"o"!==i[1]){var n,a=i[1],o=new RegExp("_("+a+")\\.$");"m"===a?"s":a,r[n="l"===a?"m":a]={displayUrl:l(e.location),width:parseInt(e.width,10),height:parseInt(e.height,10),url:l(e.location.replace(o,"_"+n+".")),key:n}}})):e.Array.each(t,(function(t,i,n){if("video"!==t.media){var a=/sizes\/(\w+)\/?$/.exec(t.url)[1];a&&(r[a]={displayUrl:l(t.source),width:parseInt(t.width,10),height:parseInt(t.height,10)},t.source_cdn?(YUI.Env.isServer||(e.config.flickr.cdnUrls=!0),r[a].url=l(t.source_cdn)):(YUI.Env.isServer||(e.config.flickr.cdnUrls=!1),r[a].url=l(t.source)))}})),r}function d(e,t){var i={id:e.id,title:e.title,description:e.description&&e.description.content||"",sizes:c(e),needsInterstitial:e.needsInterstitial,canComment:e.canComment,canPublicComment:e.publiceditability?e.publiceditability.cancomment:0,canAddMeta:e.canAddMeta||e.canAddmeta,canPrint:e.canPrint||0,safetyLevel:e.safetyLevel,license:e.license,mediaType:e.media,contentType:e.contentType,secret:e.secret,rotation:e.rotation,oWidth:e.oWidth?parseInt(e.oWidth,10):0,oHeight:e.oHeight?parseInt(e.oHeight,10):0,isVideoPending:e.video?e.video.pending:0,isVideoFailed:e.video?e.video.failed:0,systemModerated:e.system_moderated||0};return"processing"===e.mediaStatus?i.isVideoPending=1:"failed"===e.mediaStatus&&(i.isVideoFailed=1),i.owner={pathAlias:e.pathalias||e.pathAlias,username:e.ownername,realname:e.realname,id:t||e.owner,buddyicon:l(e.iconurls),isAdFree:e.isAdFree,isPro:e.ispro,proBadge:e.proBadge,dateCreated:e.ownerDatecreate},i.engagement={id:e.id,ownerNsid:t||e.owner,isFaved:e.isfavorite||!1,canShare:e.canShare,canDownload:e.canDownload,canPrint:e.canPrint,commentCount:e.countComments,faveCount:e.countFaves,viewCount:e.countViews},i.stats={id:e.id,dateTaken:e.datetaken,datePosted:e.dateupload,takenGranularity:e.datetakengranularity,isDateTakenUnknown:e.datetakenunknown||"1"===e.datetakenunknown||1===e.datetakenunknown},["ispublic","isfriend","isfamily","permissions"].every((function(t){return e.hasOwnProperty(t)}))&&(i.privacy={id:e.id,isPublic:e.ispublic,isVisibleByFriends:e.isfriend,isVisibleByFamily:e.isfamily,permAddMeta:e.permissions?e.permissions.permaddmeta:0,permComment:e.permissions?e.permissions.permcomment:0,permPrint:e.permissions?e.permissions.permprint:0}),i}function u(t){var i={id:t.id,pageNumber:t.pageNumber,template:parseInt(t.template,10),countPhotos:t.countPhotos,backgroundColor:t.backgroundColor};return e.Lang.isNumber(i.backgroundColor)&&(i.backgroundColor=""+i.backgroundColor,i.backgroundColor=i.backgroundColor.match(/.{1,3}/g).join(",")),i}function p(t){var i=e.Lang.isObject(t)&&t.primaryPhotoExtras,r={};return e.Lang.isObject(i)&&(e.Object.each(i,(function(t,n){var a,o=/^url_([a-z]+)$/.exec(n);o&&(a=o[1],r[a]={displayUrl:l(t),width:parseInt(i["width_"+a],10),height:parseInt(i["height_"+a],10)},i["url_"+a+"_cdn"]?(YUI.Env.isServer||(e.config.flickr.cdnUrls=!0),r[a].src=l(i["url_"+a+"_cdn"])):(YUI.Env.isServer||(e.config.flickr.cdnUrls=!1),r[a].src=l(i["url_"+a])))})),delete t.primaryPhotoExtras),r}e.APIHelper={request:{getRebootPhotoExtras:function(){return t.join(",")},getRebootGroupExtras:function(){return i.join(",")},getRebootSearchSetsExtras:function(){return r.join(",")},getRebootPhotoLiteExtras:function(){return n.join(",")},getRebootAlbumsListExtras:function(){return a.join(",")},getRebootPeopleExtras:function(){return o.join(",")},addStaticMapsParams:function(e,t){var i;e.extras?e.extras=e.extras+",static_maps":e.extras="static_maps",i=t?t.toString():"245",e.static_map_zoom="3,6,14",e.static_map_width=i,e.static_map_height="100"}},response:{addOrReplaceListByContext:function(t){var i,r,n,a=0,o=t.model,s=t.next,l=t.prev,c=t.hasMin,d=t.hasMax,u=t.current,p=t.numNext,m=t.numPrev,_=o.getValue("id");return u.some((function(e){return a++,e.getValue("id")===_}))?1===a&&0===s.length?i=l.concat(u):a===u.length&&0===l.length?i=u.concat(s):a<l.length&&u.length-a<s.length?i=l.concat([o],s):(i=u,(n=l.slice(0)).some((function(e){return!i.some((function(t){return t.getValue("id")===e.getValue("id")}))}))?i=i.slice(a-1):n=[],(r=s.slice(0)).every((function(e){return i.some((function(t){return t.getValue("id")===e.getValue("id")}))}))?r=[]:i=i.slice(0,a),i=n.concat(i,r)):i=0===s.length&&0===p?l.concat([o],u):0===l.length&&0===m?u.concat([o],s):l.concat([o],s),(d||p>0&&s.length<p)&&e.ListProxyStatic.setBoundary(i,"max"),(c||m>0&&l.length<m)&&e.ListProxyStatic.setBoundary(i,"min"),i},addOrReplaceListByPage:function(t){var i=t.current,r=t.newPages,n=t.perPage,a=t.pageNum,o=t.hasMin,s=t.hasMax,l=t.totalItems,c=[],d=[],u=[];return 0===i.length?(u=r,1===a&&e.ListProxyStatic.setBoundary(u,"min"),void 0!==l&&l<=a*n&&e.ListProxyStatic.setBoundary(u,"max")):(o&&1!==a&&(c=i.slice(0,a*n),d=i.slice(a*n)),r.length<n||l===n*a?d=[]:l&&l>i.length&&s?(c=0===c.length?i.slice(0,-1*(a-1)*n):c,d=i.slice(-1*(a-1)*n)):s&&(d=0===d.length?i:d),u=c.concat(r,d),(o||1===a)&&e.ListProxyStatic.setBoundary(u,"min"),(s||r.length<n||l===n*a)&&e.ListProxyStatic.setBoundary(u,"max")),u},parsePhoto:d,parsePhotoLite:function(t){return t.owner&&t.owner.accountId?{id:t.id,pathAlias:t.owner.accountIdAlias||t.owner.accountId,username:t.owner.accountIdAlias,realname:t.owner.name,nsid:t.owner.accountId,ownerNsid:t.owner.accountId,isFaved:!1,faveCount:t.stats.favesCount,commentCount:t.stats.commentsCount,title:t.title,description:t.description,mediaType:void 0,contentType:void 0,license:void 0,sizes:e.APIHelper.response.parsePhotoSize(t.sizes),needsInterstitial:t.needsInterstitial||void 0,canComment:void 0,oWidth:parseInt(t.sizes[0].width,10),oHeight:parseInt(t.sizes[0].height,10),isPublic:!0,isVisibleByFriends:!1,isVisibleByFamily:!1}:{id:t.id,pathAlias:t.pathalias||t.owner,username:t.ownername,realname:t.realname,nsid:t.owner,ownerNsid:t.owner,isFaved:t.isfavorite||!1,faveCount:t.countFaves,commentCount:t.countComments,title:t.title,description:t.description&&t.description.content||"",mediaType:t.media,contentType:t.contentType,license:t.license,sizes:e.APIHelper.response.parsePhotoSize(t),needsInterstitial:t.needsInterstitial,canComment:t.canComment,oWidth:t.oWidth?parseInt(t.oWidth,10):0,oHeight:t.oHeight?parseInt(t.oHeight,10):0,isPublic:!!t.ispublic,isVisibleByFriends:!!t.isfriend,isVisibleByFamily:!!t.isfamily}},parsePhotos:function(t){var i=[],r=t.photos,n=t.photoModelRegistry,a=t.personModelRegistry,o=t.photoEngagementModelRegistry,s=t.photoStatsModelRegistry,l=t.photoPrivacyModelRegistry,c=t.ownerID,u=t.existingPerson,p={},m={},_={},g={};return r.length&&e.Array.each(r,(function(e){var t=d(e,c),r=t.owner.id;p[r]||(u?p[r]=u:(a.addOrUpdate(t.owner),p[r]=a.proxy(r))),m[e.id]||(o.addOrUpdate(t.engagement),m[e.id]=o.proxy(e.id)),_[e.id]||(s.addOrUpdate(t.stats),_[e.id]=s.proxy(e.id)),l&&t.privacy&&(g[e.id]||(l.addOrUpdate(t.privacy),g[e.id]=l.proxy(e.id)),t.privacy=g[e.id]),t.owner=p[r],t.engagement=m[e.id],t.stats=_[e.id],n.addOrUpdate(t),i.push(n.proxy(e.id))})),i},parsePage:u,parsePages:function(t){var i=[],r=t.pages,n=t.pageModelRegistry;return r.length&&e.Array.each(r,(function(e){var t=u(e);n.addOrUpdate(t),i.push(n.proxy(e.id))})),i},parsePhotoSize:c,parsePerson:function(e){var t={id:e.nsid,isDeleted:e.isDeleted,pathAlias:e.pathAlias,username:e.username&&e.username._content?e.username._content:e.username,realname:e.realname&&e.realname._content?e.realname._content:e.realname,isAdFree:e.isAdFree,isPro:e.ispro,proBadge:e.proBadge,buddyicon:l(e.iconurls),location:e.location&&e.location._content?e.location._content:e.location};return e.datecreate&&(t.dateCreated=e.datecreate&&e.datecreate._content?e.datecreate._content:e.datecreate),e.gift&&(t.isEligibleForGifts=e.gift.giftEligible||!1,t.eligibleGifts=e.gift.eligibleDurations||[],t.newFlow=e.gift.newFlow||!1),t},parseRelationship:function(e){return{id:e.nsid,pathAlias:e.pathAlias,isContact:e.contact,isFriend:e.friend,isFamily:e.family,isIgnored:e.ignored,isIgnoredBy:e.ignoredby,isRevContact:e.revcontact,isRevFriend:e.revfriend,isRevFamily:e.revfamily}},parsePlaces:function(e){var t=[],i=e.places,r=e.placeRegistry;return i.length&&i.forEach((function(e){var i,n,a=e.woeid||e.place_id;i={id:(n=e).woeid||n.place_id,woeId:n.woeid,woeName:n.woe_name,placeId:n.place_id,placeType:n.place_type,placeTypeId:n.place_type_id,placeUrl:n.place_url,latitude:n.latitude,longitude:n.longitude},r.addOrUpdate(i),t.push(r.proxy(a))})),t},parseContact:function(e){return{id:e.nsid||e.user,username:e.username,realname:e.realname,iconfarm:e.iconfarm,iconserver:e.iconserver,pathAlias:e.pathAlias,buddyicon:e.iconUrls||e.iconurls||{}}},removeProtocolFromURL:l,camelCaseProperties:function t(i){return e.each(i,(function(r,n){e.Lang.isObject(r)&&"appContext"!==n&&(r=t(r));var a,o="string"!=typeof(a=n)?a:("_"===a[0]&&(a=a.slice(1)),a.replace(/_([a-zA-Z0-9])/g,(function(e,t,i){return t.toUpperCase()})));i[o]=r})),i},addContextToRegistry:function(t,i,r,n){var a,o;"gallery-models"===i.name&&(t.compoundId=t.id,t.id=t.compoundId.split("-").pop()),t.owner&&(a=e.APIHelper.response.parsePerson(t.owner),t.owner=r.addOrUpdate(a)),"group-pool-models"===i.name&&(t.title=e.Escape.html(t.title),o=n.parseGroupModel(t.id,t.pathAlias,t),t={id:t.id,pathAlias:t.pathAlias,group:n.addOrUpdate(o)}),"set-models"!==i.name&&"gallery-models"!==i.name||(t.primaryPhotoSizes=p(t)),i.addOrUpdate(t)},parsePrimaryPhotoSizes:p,parsePhotoSetMeta:function(e){var t={};return t.title=e.title.content,t.id=e.id,t.photoCount=parseInt(e.photos,10),t.primary=e.primary,t.videoCount=parseInt(e.videos,10),t.totalCount=t.photoCount+t.videoCount,t.primaryPhotoSizes=p({primaryPhotoExtras:e}),t},parsePhotoMeta:function(e){return{id:e.photo_id,title:e.HTMLMETA["og:title"],keywords:e.HTMLMETA.keywords,"og:title":e.HTMLMETA["og:title"],"og:description":e.HTMLMETA["og:description"],"og:type":e.HTMLMETA["og:type"],"og:url":e.HTMLMETA["og:url"],"og:image":e.HTMLMETA["og:image"],"og:image:width":e.HTMLMETA["og:image:width"],"og:image:height":e.HTMLMETA["og:image:height"],"twitter:card":e.HTMLMETA["twitter:card"],"twitter:player":e.HTMLMETA["twitter:player"],"twitter:player:width":e.HTMLMETA["twitter:player:width"],"twitter:player:height":e.HTMLMETA["twitter:player:height"],"twitter:image":e.HTMLMETA["twitter:image"],"twitter:description":e.HTMLMETA["twitter:description"],"twitter:app:url:iphone":e.HTMLMETA["twitter:app:url:iphone"],"twitter:app:url:ipad":e.HTMLMETA["twitter:app:url:ipad"],"twitter:app:url:googleplay":e.HTMLMETA["twitter:app:url:googleplay"],"twitter:creator":e.HTMLMETA["twitter:creator"]}}}}}),"@VERSION@",{requires:["flickr-promise","list-proxy"]});YUI.add("flickr-api",(function(e){"use strict";var r=require("hermes-core/fletrics"),t=require("hermes-core/config"),s=require("hermes-core/flog")("API"),o="/services/rest",i=[96,97,98,99,100,105,106,111,112,114,115,116,117,118,119],n=function(e){return e&&e.message&&e.message.indexOf&&(e.message.indexOf("Photo not found")>-1||e.message.indexOf("not found (invalid ID)")>-1||e.message.indexOf("not found (inactive member)")>-1||e.message.indexOf("Login Failed")>-1)};function a(r,s){this.transport=e.transportFactory(r,s?s.flipper:null),void 0!==s&&(this.appContext=s),this.api_url=t.api.hostname}a.prototype.callMethod=function(t,a,p,c){var d,l,f,h,u=0,m=null,E="";function x(o){var p,d="";o&&o.headers&&(o.headers["x-served-by"]&&(d=o.headers["x-served-by"]),o.headers["x-account-nsid"]&&this.appContext.setPreliminaryViewerNsid(o.headers["x-account-nsid"])),r.increment("hermes.api.calls"+E),m&&m.stop(),YUI.Env.isServer&&o.debug&&e.config.flickr.api.log_urls&&!o.debug.wasBatched&&s.info("url",{method:t,url:o.debug.url});try{if(!(p=o.responseText?JSON.parse(o.responseText):o))throw s.error("returned an empty response",{method:t}),new Error("Empty response")}catch(e){var l="";if(o&&o.responseText&&o.responseText.toLowerCase().indexOf("502 bad gateway")>-1&&(e.flickrApiError="502 in response text"),o&&o.responseText||(e.flickrApiError="empty response"),o&&o.responseText){var f=o.responseText.toLowerCase().indexOf("<body>");l=f>-1?o.responseText.slice(f,100):o.responseText.slice(0,100)}throw s.error("responded with unparseable JSON",{method:t,err:e,servedBy:d,headers:o&&o.headers,response:l}),e.fatal=!0,e}try{(void 0===c.camelCase||c.camelCase)&&(p=e.APIHelper.response.camelCaseProperties(p))}catch(e){throw s.error("failed camelCase parsing",{method:t,err:e,servedBy:d}),e.fatal=!0,e}if("ok"===p.stat)return p;if("fail"===p.stat){if(p.fatal=!0,n(p)&&(p.is404=!0),!p.code)throw s.error('responded with "stat: fail" but no error code',{method:t,response:p,servedBy:d}),p;if(-1!==i.indexOf(p.code))throw s.error('responded with "stat: fail" and fatal error code',{method:t,response:p,servedBy:d,headers:o&&o.headers,config:a}),p;throw s.info('responded with "stat: fail" and non-fatal error code',{method:t,response:p,servedBy:d}),p.fatal=!1,p}throw s.error('responded without a known "stat"',{method:t,response:p,servedBy:d}),p.fatal=!0,p}function w(r){throw r.fatal=!0,503===r.code&&(e.config.win.location="https://www.flickr.com/error/500"),"ECONNRESET"===r.code&&(r.flickrApiError="ECONNRESET"),r.code&&-1!==["ECONNRESET","ECONNREFUSED","ECONNABORTED","EHOSTUNREACH","ENETDOWN","ENETUNREACH","ETIMEDOUT"].indexOf(r.code)&&(r.timeout=!0),r.resp&&0===r.resp.status&&"timeout"===r.resp.statusText&&(r.clientTimeout=!0),n(r)&&(r.is404=!0),s.error("failed in an unexpected way",{method:t,err:r}),r}return a=a||{},c=c||{},this.appContext&&this.appContext.request&&(this.appContext.request.UA.isBot||this.appContext.request.UA.isSharingBot)&&(!0,E=r.getBotString()),m=r.createStopwatch("api.latency"+E),this.appContext&&this.appContext.random_slice&&(a.random_slice=this.appContext.random_slice),!YUI.Env.isServer&&e.config.flickr.random_slice&&(a.random_slice=e.config.flickr.random_slice),this.appContext&&!YUI.Env.isServer&&(l=this.appContext.getViewer(),a.viewerNSID=l.signedIn?l.nsid:""),(!e.config.flickr.cameraroll.suppress_logging||"flickr.cameraroll.getPhotosByOffset"!==t&&"flickr.cameraroll.getMapVersion"!==t)&&s.info("params",{method:t,config:a}),(d={flickr:!0,data:a}).data.method=t,c.timeout&&(d.timeout=c.timeout),f=this.api_url+o,m&&m.start(),(h=function(){return this.transport.makeRequest(f,d,p).then(x.bind(this),w.bind(this)).then(void 0,(function(e){throw e.fatal&&r.increment("hermes.api.failures"+E),e})).then(void 0,(function(e){var t=e.flickrApiError;if(!e.fatal||++u>=2)throw e;switch(e.flickrApiError=e.flickrApiError||"unknown",s.error("fatal api failure retry",{err:e,attempts:u}),t){case"502 in response text":t="502";break;case"ECONNRESET":t="econnreset";break;case"empty response":t="empty";break;default:t="unknown"}return r.increment("hermes.api.retry."+t),h()}))}.bind(this))()},a.prototype.fetchSiteKey=function(){return this.transport.makeSiteKeyRequest(this.api_url+o)},a.prototype.fetchCsrf=function(){return this.transport.makeCsrfRequest(this.api_url+o)},e.namespace("FlickrAPI"),e.FlickrAPI=a}),"@VERSION@",{requires:["promise","oop","api-helper"],optionalRequires:["hermes-core"]});YUI.add("cycle",(function(n,t){var e={exports:{}};!(function(){var n,t={},r=((n=function(){Object.defineProperties(this,{keys:{value:[]},values:{value:[]}})}).prototype.get=function(n){var t=this.keys.indexOf(n);return this.values[t]},n.prototype.has=function(n){return this.keys.indexOf(n)>=0},n.prototype.set=function(n,t){var e=this.keys.indexOf(n);return e>=0?this.values[e]=t:(this.keys.push(n),this.values.push(t)),this},n),i=function(n){return"object"!=typeof n||null===n||"function"==typeof n.toJSON||n instanceof String||n instanceof Number||n instanceof RegExp||n instanceof Date||n instanceof Boolean},o="~",c=function(n){return"string"==typeof n&&0===n.indexOf("~~")},u=function(n){return"string"==typeof n&&0===n.indexOf(o)&&!c(n)},f=function(n){return u(n)||c(n)?o+n:n},s=function(n){return n.slice(1)};t.stringify=function(n,t,e){var a=(function(n){var t=[],e=new r,c=function(n,r){var u=n;return i(n)||(e.has(n)?(e.get(n)instanceof Array&&(t.push(e.get(n)),e.set(n,String(o+(t.length-1)))),u=e.get(n)):(e.set(n,r),u=Object.keys(n).reduce((function(t,e){return t[e]=c(n[e],r.concat(e)),t}),n instanceof Array?[]:{}))),"string"==typeof n&&(u=f(n)),u};return{legend:t,main:c(n,[])}})(n),y=JSON.stringify(a.legend),l=JSON.stringify(a.main,(function(n){return"function"!=typeof n?n:function(t,e){return c(e)?f(n(t,s(e))):u(e)?e:n(t,e)}})(t),e);return void 0!==l?'{"legend":'+y+',"main":'+l+',"version":"cyclical-json@2.1.3"}':l},t.parse=function(n,t){return e=JSON.parse(n,(function(n){return"function"!=typeof n?n:function(t,e){return c(e)?f(n(t,s(e))):u(e)?e:n(t,e)}})(t)),r=function(n,t,o){var f,a=n;return i(n)||Object.keys(n).forEach((function(t){return r(n[t],t,n)})),u(n)&&(a=e.main,f=Number(s(n)),e.legend[f].forEach((function(n){return a=a[n]}))),c(n)&&(a=s(n)),o&&(o[t]=a),a},"object"!=typeof e||null===e||void 0===e.main||void 0===e.legend||!(e.legend instanceof Array)||void 0===e.version||e.version.indexOf("cyclical-json")<0?e:r(e.main);var e,r};try{e.exports=t}catch(n){window.cyclicalJSON=t}})();var r=e.exports;n.decycle=function(n){return JSON.parse(r.stringify(n))},n.retrocycle=function(n){return r.parse(JSON.stringify(n))}}),"@VERSION@");