/*
 Packery PACKAGED v2.1.1
 Gapless, draggable grid layouts

 Licensed GPLv3 for open source use
 or Packery Commercial License for commercial use

 http://packery.metafizzy.co
 Copyright 2016 Metafizzy
 imagesLoaded PACKAGED v4.1.1
 JavaScript is all like "You images are done yet or what?"
 MIT License
*/
!function(d,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(c){e(d,c)}):"object"==typeof module&&module.exports?module.exports=e(d,require("jquery")):d.jQueryBridget=e(d,d.jQuery)}(window,function(d,e){function c(g,c,n){function b(f,a,m){var b,h="$()."+g+'("'+a+'")';return f.each(function(f,r){var c=n.data(r,g);if(!c)return void q(g+" not initialized. Cannot call methods, i.e. "+h);var l=c[a];if(!l||"_"==a.charAt(0))return void q(h+" is not a valid method");
c=l.apply(c,m);b=void 0===b?c:b}),void 0!==b?b:f}function f(f,a){f.each(function(f,b){var m=n.data(b,g);m?(m.option(a),m._init()):(m=new c(b,a),n.data(b,g,m))})}(n=n||e||d.jQuery)&&(c.prototype.option||(c.prototype.option=function(f){n.isPlainObject(f)&&(this.options=n.extend(!0,this.options,f))}),n.fn[g]=function(h){if("string"==typeof h){var n=a.call(arguments,1);return b(this,h,n)}return f(this,h),this},k(n))}function k(a){!a||a&&a.bridget||(a.bridget=c)}var a=Array.prototype.slice,g=d.console,
q="undefined"==typeof g?function(){}:function(a){g.error(a)};return k(e||d.jQuery),c});
(function(d,e){"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():d.getSize=e()})(window,function(){function d(a){var b=parseFloat(a);return-1==a.indexOf("%")&&!isNaN(b)&&b}function e(){}function c(a){a=getComputedStyle(a);return a||g("Style returned "+a+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),a}function k(n){if(!p){p=!0;var b=document.createElement("div");
b.style.width="200px";b.style.padding="1px 2px 3px 4px";b.style.borderStyle="solid";b.style.borderWidth="1px 2px 3px 4px";b.style.boxSizing="border-box";var f=document.body||document.documentElement;f.appendChild(b);var h=c(b);k.isBoxSizeOuter=a=200==d(h.width);f.removeChild(b)}if("string"==typeof n&&(n=document.querySelector(n)),n&&"object"==typeof n&&n.nodeType){f=c(n);if("none"==f.display){b={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(f=0;l>f;f++)b[q[f]]=0;return b}b=
{};b.width=n.offsetWidth;b.height=n.offsetHeight;n=b.isBorderBox="border-box"==f.boxSizing;for(h=0;l>h;h++){var g=q[h],m=parseFloat(f[g]);b[g]=isNaN(m)?0:m}h=b.paddingLeft+b.paddingRight;g=b.paddingTop+b.paddingBottom;m=b.marginLeft+b.marginRight;var r=b.marginTop+b.marginBottom,e=b.borderLeftWidth+b.borderRightWidth,t=b.borderTopWidth+b.borderBottomWidth;n=n&&a;var u=d(f.width);!1!==u&&(b.width=u+(n?0:h+e));f=d(f.height);return!1!==f&&(b.height=f+(n?0:g+t)),b.innerWidth=b.width-(h+e),b.innerHeight=
b.height-(g+t),b.outerWidth=b.width+m,b.outerHeight=b.height+r,b}}var a,g="undefined"==typeof console?e:function(a){console.error(a)},q="paddingLeft paddingRight paddingTop paddingBottom marginLeft marginRight marginTop marginBottom borderLeftWidth borderRightWidth borderTopWidth borderBottomWidth".split(" "),l=q.length,p=!1;return k});
(function(d,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():d.EvEmitter=e()})(this,function(){function d(){}var e=d.prototype;return e.on=function(c,d){if(c&&d){var a=this._events=this._events||{};a=a[c]=a[c]||[];return-1==a.indexOf(d)&&a.push(d),this}},e.once=function(c,d){if(c&&d){this.on(c,d);var a=this._onceEvents=this._onceEvents||{};return(a[c]=a[c]||{})[d]=!0,this}},e.off=function(c,d){var a=this._events&&
this._events[c];if(a&&a.length){var g=a.indexOf(d);return-1!=g&&a.splice(g,1),this}},e.emitEvent=function(c,d){var a=this._events&&this._events[c];if(a&&a.length){var g=0,e=a[g];d=d||[];for(var l=this._onceEvents&&this._onceEvents[c];e;){var k=l&&l[e];k&&(this.off(c,e),delete l[e]);e.apply(this,d);g+=k?0:1;e=a[g]}return this}},d});
(function(d,e){"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():d.matchesSelector=e()})(window,function(){var d=function(){var d=Element.prototype;if(d.matches)return"matches";if(d.matchesSelector)return"matchesSelector";for(var c=["webkit","moz","ms","o"],k=0;k<c.length;k++){var a=c[k]+"MatchesSelector";if(d[a])return a}}();return function(e,c){return e[d](c)}});
(function(d,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(c){return e(d,c)}):"object"==typeof module&&module.exports?module.exports=e(d,require("desandro-matches-selector")):d.fizzyUIUtils=e(d,d.matchesSelector)})(window,function(d,e){var c={extend:function(a,g){for(var c in g)a[c]=g[c];return a},modulo:function(a,g){return(a%g+g)%g},makeArray:function(a){var g=[];if(Array.isArray(a))g=a;else if(a&&"number"==typeof a.length)for(var c=
0;c<a.length;c++)g.push(a[c]);else g.push(a);return g},removeFrom:function(a,g){var c=a.indexOf(g);-1!=c&&a.splice(c,1)},getParent:function(a,c){for(;a!=document.body;)if(a=a.parentNode,e(a,c))return a},getQueryElement:function(a){return"string"==typeof a?document.querySelector(a):a},handleEvent:function(a){var c="on"+a.type;this[c]&&this[c](a)},filterFindElements:function(a,g){a=c.makeArray(a);var d=[];return a.forEach(function(a){if(a instanceof HTMLElement){if(!g)return void d.push(a);e(a,g)&&
d.push(a);a=a.querySelectorAll(g);for(var c=0;c<a.length;c++)d.push(a[c])}}),d},debounceMethod:function(a,c,d){var g=a.prototype[c],e=c+"Timeout";a.prototype[c]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){g.apply(f,b);delete f[e]},d||100)}},docReady:function(a){"complete"==document.readyState?a():document.addEventListener("DOMContentLoaded",a)},toDashed:function(a){return a.replace(/(.)([A-Z])/g,function(a,c,d){return c+"-"+d}).toLowerCase()}},
k=d.console;return c.htmlInit=function(a,g){c.docReady(function(){var e=c.toDashed(g),l="data-"+e,p=document.querySelectorAll("["+l+"]");e=document.querySelectorAll(".js-"+e);p=c.makeArray(p).concat(c.makeArray(e));var n=l+"-options",b=d.jQuery;p.forEach(function(f){var h=f.getAttribute(l)||f.getAttribute(n);try{var c=h&&JSON.parse(h)}catch(m){return void(k&&k.error("Error parsing "+l+" on "+f.className+": "+m))}c=new a(f,c);b&&b.data(f,g,c)})})},c});
(function(d,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(d.Outlayer={},d.Outlayer.Item=e(d.EvEmitter,d.getSize))})(window,function(d,e){function c(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}var k=document.documentElement.style,a="string"==typeof k.transition?"transition":"WebkitTransition";k="string"==
typeof k.transform?"transform":"WebkitTransform";var g={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[a],q={transform:k,transition:a,transitionDuration:a+"Duration",transitionProperty:a+"Property",transitionDelay:a+"Delay"},l=c.prototype=Object.create(d.prototype);l.constructor=c;l._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}};this.css({position:"absolute"})};l.handleEvent=function(a){var f="on"+a.type;this[f]&&this[f](a)};l.getSize=function(){this.size=
e(this.element)};l.css=function(a){var f=this.element.style,b;for(b in a)f[q[b]||b]=a[b]};l.getPosition=function(){var a=getComputedStyle(this.element),b=this.layout._getOption("originLeft"),c=this.layout._getOption("originTop"),m=a[b?"left":"right"],n=a[c?"top":"bottom"];a=this.layout.size;m=-1!=m.indexOf("%")?parseFloat(m)/100*a.width:parseInt(m,10);n=-1!=n.indexOf("%")?parseFloat(n)/100*a.height:parseInt(n,10);m=isNaN(m)?0:m;n=isNaN(n)?0:n;m-=b?a.paddingLeft:a.paddingRight;n-=c?a.paddingTop:a.paddingBottom;
this.position.x=m;this.position.y=n};l.layoutPosition=function(){var a=this.layout.size,b={},c=this.layout._getOption("originLeft"),m=this.layout._getOption("originTop"),n=c?"right":"left";b[c?"left":"right"]=this.getXValue(this.position.x+a[c?"paddingLeft":"paddingRight"]);b[n]="";c=m?"bottom":"top";b[m?"top":"bottom"]=this.getYValue(this.position.y+a[m?"paddingTop":"paddingBottom"]);b[c]="";this.css(b);this.emitEvent("layout",[this])};l.getXValue=function(a){var f=this.layout._getOption("horizontal");
return this.layout.options.percentPosition&&!f?a/this.layout.size.width*100+"%":a+"px"};l.getYValue=function(a){var f=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&f?a/this.layout.size.height*100+"%":a+"px"};l._transitionTo=function(a,b){this.getPosition();var f=this.position.x,m=this.position.y,h=parseInt(a,10),c=parseInt(b,10);h=h===this.position.x&&c===this.position.y;if(this.setPosition(a,b),h&&!this.isTransitioning)return void this.layoutPosition();h={};h.transform=
this.getTranslate(a-f,b-m);this.transition({to:h,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})};l.getTranslate=function(a,b){var f=this.layout._getOption("originLeft"),m=this.layout._getOption("originTop");return a=f?a:-a,b=m?b:-b,"translate3d("+a+"px, "+b+"px, 0)"};l.goTo=function(a,b){this.setPosition(a,b);this.layoutPosition()};l.moveTo=l._transitionTo;l.setPosition=function(a,b){this.position.x=parseInt(a,10);this.position.y=parseInt(b,10)};l._nonTransition=function(a){this.css(a.to);
a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)};l.transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn,f;for(f in a.onTransitionEnd)b.onEnd[f]=a.onTransitionEnd[f];for(f in a.to)b.ingProperties[f]=!0,a.isCleaning&&(b.clean[f]=!0);a.from&&this.css(a.from);this.enableTransition(a.to);this.css(a.to);this.isTransitioning=!0};var p="opacity,"+function(a){return a.replace(/([A-Z])/g,
function(a){return"-"+a.toLowerCase()})}(k);l.enableTransition=function(){if(!this.isTransitioning){var a=this.layout.options.transitionDuration;this.css({transitionProperty:p,transitionDuration:"number"==typeof a?a+"ms":a,transitionDelay:this.staggerDelay||0});this.element.addEventListener(g,this,!1)}};l.onwebkitTransitionEnd=function(a){this.ontransitionend(a)};l.onotransitionend=function(a){this.ontransitionend(a)};var n={"-webkit-transform":"transform"};l.ontransitionend=function(a){if(a.target===
this.element){var b=this._transn,f=n[a.propertyName]||a.propertyName;delete b.ingProperties[f];a:{for(m in b.ingProperties){var m=!1;break a}m=!0}if(m&&this.disableTransition(),f in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[f]),f in b.onEnd)b.onEnd[f].call(this),delete b.onEnd[f];this.emitEvent("transitionEnd",[this])}};l.disableTransition=function(){this.removeTransitionStyles();this.element.removeEventListener(g,this,!1);this.isTransitioning=!1};l._removeStyles=function(a){var b=
{},f;for(f in a)b[f]="";this.css(b)};var b={transitionProperty:"",transitionDuration:"",transitionDelay:""};return l.removeTransitionStyles=function(){this.css(b)},l.stagger=function(a){a=isNaN(a)?0:a;this.staggerDelay=a+"ms"},l.removeElem=function(){this.element.parentNode.removeChild(this.element);this.css({display:""});this.emitEvent("remove",[this])},l.remove=function(){return a&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):
void this.removeElem()},l.reveal=function(){delete this.isHidden;this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd;this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},l.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},l.getHideRevealTransitionEndProperty=function(a){a=this.layout.options[a];if(a.opacity)return"opacity";for(var b in a)return b},
l.hide=function(){this.isHidden=!0;this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd;this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},l.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},l.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},c});
(function(d,e){"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,k,a,g){return e(d,c,k,a,g)}):"object"==typeof module&&module.exports?module.exports=e(d,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):d.Outlayer=e(d,d.EvEmitter,d.getSize,d.fizzyUIUtils,d.Outlayer.Item)})(window,function(d,e,c,k,a){function g(a,c){var m=k.getQueryElement(a);if(!m)return void(l&&
l.error("Bad element for "+this.constructor.namespace+": "+(m||a)));this.element=m;p&&(this.$element=p(this.element));this.options=k.extend({},this.constructor.defaults);this.option(c);m=++b;this.element.outlayerGUID=m;f[m]=this;this._create();this._getOption("initLayout")&&this.layout()}function q(a){function b(){a.apply(this,arguments)}return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b}var l=d.console,p=d.jQuery,n=function(){},b=0,f={};g.namespace="outlayer";g.Item=a;g.defaults=
{containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var h=g.prototype;k.extend(h,e.prototype);h.option=function(a){k.extend(this.options,a)};h._getOption=function(a){var b=this.constructor.compatOptions[a];return b&&void 0!==this.options[b]?this.options[b]:this.options[a]};g.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",
layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"};h._create=function(){this.reloadItems();this.stamps=[];this.stamp(this.options.stamp);k.extend(this.element.style,this.options.containerStyle);this._getOption("resize")&&this.bindResize()};h.reloadItems=function(){this.items=this._itemize(this.element.children)};h._itemize=function(a){a=this._filterFindItemElements(a);for(var b=this.constructor.Item,m=[],
f=0;f<a.length;f++){var c=new b(a[f],this);m.push(c)}return m};h._filterFindItemElements=function(a){return k.filterFindElements(a,this.options.itemSelector)};h.getItemElements=function(){return this.items.map(function(a){return a.element})};h.layout=function(){this._resetLayout();this._manageStamps();var a=this._getOption("layoutInstant");this.layoutItems(this.items,void 0!==a?a:!this._isLayoutInited);this._isLayoutInited=!0};h._init=h.layout;h._resetLayout=function(){this.getSize()};h.getSize=function(){this.size=
c(this.element)};h._getMeasurement=function(a,b){var m,f=this.options[a];f?("string"==typeof f?m=this.element.querySelector(f):f instanceof HTMLElement&&(m=f),this[a]=m?c(m)[b]:f):this[a]=0};h.layoutItems=function(a,b){a=this._getItemsForLayout(a);this._layoutItems(a,b);this._postLayout()};h._getItemsForLayout=function(a){return a.filter(function(a){return!a.isIgnored})};h._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){var m=[];a.forEach(function(a){var f=this._getItemLayoutPosition(a);
f.item=a;f.isInstant=b||a.isLayoutInstant;m.push(f)},this);this._processLayoutQueue(m)}};h._getItemLayoutPosition=function(){return{x:0,y:0}};h._processLayoutQueue=function(a){this.updateStagger();a.forEach(function(a,b){this._positionItem(a.item,a.x,a.y,a.isInstant,b)},this)};h.updateStagger=function(){var a=this.options.stagger;if(null===a||void 0===a)a=void(this.stagger=0);else{if("number"!=typeof a){var b=a.match(/(^\d*\.?\d*)(\w*)/);a=b&&b[1];b=b&&b[2];a.length?(a=parseFloat(a),a*=v[b]||1):a=
0}a=(this.stagger=a,this.stagger)}return a};h._positionItem=function(a,b,f,c,n){c?a.goTo(b,f):(a.stagger(n*this.stagger),a.moveTo(b,f))};h._postLayout=function(){this.resizeContainer()};h.resizeContainer=function(){if(this._getOption("resizeContainer")){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}};h._getContainerSize=n;h._setContainerMeasure=function(a,b){if(void 0!==a){var f=this.size;f.isBorderBox&&(a+=b?f.paddingLeft+f.paddingRight+
f.borderLeftWidth+f.borderRightWidth:f.paddingBottom+f.paddingTop+f.borderTopWidth+f.borderBottomWidth);a=Math.max(a,0);this.element.style[b?"width":"height"]=a+"px"}};h._emitCompleteOnItems=function(a,b){function f(){c.dispatchEvent(a+"Complete",null,[b])}function m(){h++;h==n&&f()}var c=this,n=b.length;if(!b||!n)return void f();var h=0;b.forEach(function(b){b.once(a,m)})};h.dispatchEvent=function(a,b,f){var m=b?[b].concat(f):f;if(this.emitEvent(a,m),p)(this.$element=this.$element||p(this.element),
b)?(b=p.Event(b),b.type=a,this.$element.trigger(b,f)):this.$element.trigger(a,f)};h.ignore=function(a){(a=this.getItem(a))&&(a.isIgnored=!0)};h.unignore=function(a){(a=this.getItem(a))&&delete a.isIgnored};h.stamp=function(a){(a=this._find(a))&&(this.stamps=this.stamps.concat(a),a.forEach(this.ignore,this))};h.unstamp=function(a){(a=this._find(a))&&a.forEach(function(a){k.removeFrom(this.stamps,a);this.unignore(a)},this)};h._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),
k.makeArray(a)):void 0};h._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))};h._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}};h._manageStamp=n;h._getElementOffset=function(a){var b=
a.getBoundingClientRect(),f=this._boundingRect;a=c(a);return{left:b.left-f.left-a.marginLeft,top:b.top-f.top-a.marginTop,right:f.right-b.right-a.marginRight,bottom:f.bottom-b.bottom-a.marginBottom}};h.handleEvent=k.handleEvent;h.bindResize=function(){d.addEventListener("resize",this);this.isResizeBound=!0};h.unbindResize=function(){d.removeEventListener("resize",this);this.isResizeBound=!1};h.onresize=function(){this.resize()};k.debounceMethod(g,"onresize",100);h.resize=function(){this.isResizeBound&&
this.needsResizeLayout()&&this.layout()};h.needsResizeLayout=function(){var a=c(this.element);return this.size&&a&&a.innerWidth!==this.size.innerWidth};h.addItems=function(a){a=this._itemize(a);return a.length&&(this.items=this.items.concat(a)),a};h.appended=function(a){a=this.addItems(a);a.length&&(this.layoutItems(a,!0),this.reveal(a))};h.prepended=function(a){a=this._itemize(a);if(a.length){var b=this.items.slice(0);this.items=a.concat(b);this._resetLayout();this._manageStamps();this.layoutItems(a,
!0);this.reveal(a);this.layoutItems(b)}};h.reveal=function(a){if(this._emitCompleteOnItems("reveal",a),a&&a.length){var b=this.updateStagger();a.forEach(function(a,f){a.stagger(f*b);a.reveal()})}};h.hide=function(a){if(this._emitCompleteOnItems("hide",a),a&&a.length){var b=this.updateStagger();a.forEach(function(a,f){a.stagger(f*b);a.hide()})}};h.revealItemElements=function(a){a=this.getItems(a);this.reveal(a)};h.hideItemElements=function(a){a=this.getItems(a);this.hide(a)};h.getItem=function(a){for(var b=
0;b<this.items.length;b++){var f=this.items[b];if(f.element==a)return f}};h.getItems=function(a){a=k.makeArray(a);var b=[];return a.forEach(function(a){(a=this.getItem(a))&&b.push(a)},this),b};h.remove=function(a){a=this.getItems(a);this._emitCompleteOnItems("remove",a);a&&a.length&&a.forEach(function(a){a.remove();k.removeFrom(this.items,a)},this)};h.destroy=function(){var a=this.element.style;a.height="";a.position="";a.width="";this.items.forEach(function(a){a.destroy()});this.unbindResize();delete f[this.element.outlayerGUID];
delete this.element.outlayerGUID;p&&p.removeData(this.element,this.constructor.namespace)};g.data=function(a){return(a=(a=k.getQueryElement(a))&&a.outlayerGUID)&&f[a]};g.create=function(b,f){var c=q(g);return c.defaults=k.extend({},g.defaults),k.extend(c.defaults,f),c.compatOptions=k.extend({},g.compatOptions),c.namespace=b,c.data=g.data,c.Item=q(a),k.htmlInit(c,b),p&&p.bridget&&p.bridget(b,c),c};var v={ms:1,s:1E3};return g.Item=a,g});
(function(d,e){"function"==typeof define&&define.amd?define("packery/js/rect",e):"object"==typeof module&&module.exports?module.exports=e():(d.Packery=d.Packery||{},d.Packery.Rect=e())})(window,function(){function d(c){for(var e in d.defaults)this[e]=d.defaults[e];for(e in c)this[e]=c[e]}d.defaults={x:0,y:0,width:0,height:0};var e=d.prototype;return e.contains=function(c){var d=c.width||0,a=c.height||0;return this.x<=c.x&&this.y<=c.y&&this.x+this.width>=c.x+d&&this.y+this.height>=c.y+a},e.overlaps=
function(c){var d=this.x+this.width,a=this.y+this.height,g=c.y+c.height;return this.x<c.x+c.width&&d>c.x&&this.y<g&&a>c.y},e.getMaximalFreeRects=function(c){if(!this.overlaps(c))return!1;var e,a=[],g=this.x+this.width,q=this.y+this.height,l=c.x+c.width,p=c.y+c.height;return this.y<c.y&&(e=new d({x:this.x,y:this.y,width:this.width,height:c.y-this.y}),a.push(e)),g>l&&(e=new d({x:l,y:this.y,width:g-l,height:this.height}),a.push(e)),q>p&&(e=new d({x:this.x,y:p,width:this.width,height:q-p}),a.push(e)),
this.x<c.x&&(e=new d({x:this.x,y:this.y,width:c.x-this.x,height:this.height}),a.push(e)),a},e.canFit=function(c){return this.width>=c.width&&this.height>=c.height},d});
(function(d,e){if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],e);else if("object"==typeof module&&module.exports)module.exports=e(require("./rect"));else{var c=d.Packery=d.Packery||{};c.Packer=e(c.Rect)}})(window,function(d){function e(a,c,d){this.width=a||0;this.height=c||0;this.sortDirection=d||"downwardLeftToRight";this.reset()}var c=e.prototype;c.reset=function(){this.spaces=[];var a=new d({x:0,y:0,width:this.width,height:this.height});this.spaces.push(a);this.sorter=
k[this.sortDirection]||k.downwardLeftToRight};c.pack=function(a){for(var c=0;c<this.spaces.length;c++){var d=this.spaces[c];if(d.canFit(a)){this.placeInSpace(a,d);break}}};c.columnPack=function(a){for(var c=0;c<this.spaces.length;c++){var d=this.spaces[c];if(d.x<=a.x&&d.x+d.width>=a.x+a.width&&d.height>=a.height-.01){a.y=d.y;this.placed(a);break}}};c.rowPack=function(a){for(var c=0;c<this.spaces.length;c++){var d=this.spaces[c];if(d.y<=a.y&&d.y+d.height>=a.y+a.height&&d.width>=a.width-.01){a.x=d.x;
this.placed(a);break}}};c.placeInSpace=function(a,c){a.x=c.x;a.y=c.y;this.placed(a)};c.placed=function(a){for(var c=[],d=0;d<this.spaces.length;d++){var e=this.spaces[d],k=e.getMaximalFreeRects(a);k?c.push.apply(c,k):c.push(e)}this.spaces=c;this.mergeSortSpaces()};c.mergeSortSpaces=function(){e.mergeRects(this.spaces);this.spaces.sort(this.sorter)};c.addSpace=function(a){this.spaces.push(a);this.mergeSortSpaces()};e.mergeRects=function(a){var c=0,d=a[c];a:for(;d;){for(var e=0,k=a[c+e];k;){if(k==d)e++;
else{if(k.contains(d)){a.splice(c,1);d=a[c];continue a}d.contains(k)?a.splice(c+e,1):e++}k=a[c+e]}c++;d=a[c]}return a};var k={downwardLeftToRight:function(a,c){return a.y-c.y||a.x-c.x},rightwardTopToBottom:function(a,c){return a.x-c.x||a.y-c.y}};return e});
(function(d,e){"function"==typeof define&&define.amd?define("packery/js/item",["outlayer/outlayer","./rect"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("./rect")):d.Packery.Item=e(d.Outlayer,d.Packery.Rect)})(window,function(d,e){var c="string"==typeof document.documentElement.style.transform?"transform":"WebkitTransform",k=function(){d.Item.apply(this,arguments)},a=k.prototype=Object.create(d.Item.prototype),g=a._create;a._create=function(){g.call(this);
this.rect=new e};var q=a.moveTo;return a.moveTo=function(a,c){var d=Math.abs(this.position.x-a),b=Math.abs(this.position.y-c);return this.layout.dragItemCount&&!this.isPlacing&&!this.isTransitioning&&1>d&&1>b?void this.goTo(a,c):void q.apply(this,arguments)},a.enablePlacing=function(){this.removeTransitionStyles();this.isTransitioning&&c&&(this.element.style[c]="none");this.isTransitioning=!1;this.getSize();this.layout._setRectSize(this.element,this.rect);this.isPlacing=!0},a.disablePlacing=function(){this.isPlacing=
!1},a.removeElem=function(){this.element.parentNode.removeChild(this.element);this.layout.packer.addSpace(this.rect);this.emitEvent("remove",[this])},a.showDropPlaceholder=function(){var a=this.dropPlaceholder;a||(a=this.dropPlaceholder=document.createElement("div"),a.className="packery-drop-placeholder",a.style.position="absolute");a.style.width=this.size.width+"px";a.style.height=this.size.height+"px";this.positionDropPlaceholder();this.layout.element.appendChild(a)},a.positionDropPlaceholder=function(){this.dropPlaceholder.style[c]=
"translate("+this.rect.x+"px, "+this.rect.y+"px)"},a.hideDropPlaceholder=function(){var a=this.dropPlaceholder.parentNode;a&&a.removeChild(this.dropPlaceholder)},k});
(function(d,e){"function"==typeof define&&define.amd?define(["get-size/get-size","outlayer/outlayer","packery/js/rect","packery/js/packer","packery/js/item"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):d.Packery=e(d.getSize,d.Outlayer,d.Packery.Rect,d.Packery.Packer,d.Packery.Item)})(window,function(d,e,c,k,a){function g(a,b){return a.position.y-b.position.y||a.position.x-b.position.x}
function q(a,b){return a.position.x-b.position.x||a.position.y-b.position.y}c.prototype.canFit=function(a){return this.width>=a.width-1&&this.height>=a.height-1};var l=e.create("packery");l.Item=a;a=l.prototype;a._create=function(){e.prototype._create.call(this);this.packer=new k;this.shiftPacker=new k;this.isEnabled=!0;this.dragItemCount=0;var a=this;this.handleDraggabilly={dragStart:function(){a.itemDragStart(this.element)},dragMove:function(){a.itemDragMove(this.element,this.position.x,this.position.y)},
dragEnd:function(){a.itemDragEnd(this.element)}};this.handleUIDraggable={start:function(b,f){f&&a.itemDragStart(b.currentTarget)},drag:function(b,f){f&&a.itemDragMove(b.currentTarget,f.position.left,f.position.top)},stop:function(b,f){f&&a.itemDragEnd(b.currentTarget)}}};a._resetLayout=function(){this.getSize();this._getMeasurements();var a,b,f;this._getOption("horizontal")?(a=1/0,b=this.size.innerHeight+this.gutter,f="rightwardTopToBottom"):(a=this.size.innerWidth+this.gutter,b=1/0,f="downwardLeftToRight");
this.packer.width=this.shiftPacker.width=a;this.packer.height=this.shiftPacker.height=b;this.packer.sortDirection=this.shiftPacker.sortDirection=f;this.packer.reset();this.maxX=this.maxY=0};a._getMeasurements=function(){this._getMeasurement("columnWidth","width");this._getMeasurement("rowHeight","height");this._getMeasurement("gutter","width")};a._getItemLayoutPosition=function(a){if(this._setRectSize(a.element,a.rect),this.isShifting||0<this.dragItemCount){var b=this._getPackMethod();this.packer[b](a.rect)}else this.packer.pack(a.rect);
return this._setMaxXY(a.rect),a.rect};a.shiftLayout=function(){this.isShifting=!0;this.layout();delete this.isShifting};a._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"};a._setMaxXY=function(a){this.maxX=Math.max(a.x+a.width,this.maxX);this.maxY=Math.max(a.y+a.height,this.maxY)};a._setRectSize=function(a,b){var f=d(a),c=f.outerWidth;f=f.outerHeight;(c||f)&&(c=this._applyGridGutter(c,this.columnWidth),f=this._applyGridGutter(f,this.rowHeight));b.width=Math.min(c,
this.packer.width);b.height=Math.min(f,this.packer.height)};a._applyGridGutter=function(a,b){if(!b)return a+this.gutter;b+=this.gutter;var c=a%b;return Math[c&&1>c?"round":"ceil"](a/b)*b};a._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}};a._manageStamp=function(a){var b;(b=this.getItem(a))&&b.isPlacing?b=b.rect:(b=this._getElementOffset(a),b=new c({x:this._getOption("originLeft")?b.left:b.right,y:this._getOption("originTop")?
b.top:b.bottom}));this._setRectSize(a,b);this.packer.placed(b);this._setMaxXY(b)};a.sortItemsByPosition=function(){var a=this._getOption("horizontal")?q:g;this.items.sort(a)};a.fit=function(a,b,c){(a=this.getItem(a))&&(this.stamp(a.element),a.enablePlacing(),this.updateShiftTargets(a),b=void 0===b?a.rect.x:b,c=void 0===c?a.rect.y:c,this.shift(a,b,c),this._bindFitEvents(a),a.moveTo(a.rect.x,a.rect.y),this.shiftLayout(),this.unstamp(a.element),this.sortItemsByPosition(),a.disablePlacing())};a._bindFitEvents=
function(a){function b(){d++;2==d&&c.dispatchEvent("fitComplete",null,[a])}var c=this,d=0;a.once("layout",b);this.once("layoutComplete",b)};a.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&(this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout())};a.needsResizeLayout=function(){var a=d(this.element),b=this._getOption("horizontal")?"innerHeight":"innerWidth";return a[b]!=this.size[b]};a.resizeShiftPercentLayout=function(){var a=this._getItemsForLayout(this.items),
b=this._getOption("horizontal"),c=b?"y":"x",e=b?"height":"width",g=b?"rowHeight":"columnWidth";b=b?"innerHeight":"innerWidth";var m=this[g];if(m=m&&m+this.gutter){this._getMeasurements();var k=this[g]+this.gutter;a.forEach(function(a){a.rect[c]=Math.round(a.rect[c]/m)*k})}else{var l=d(this.element)[b]+this.gutter,p=this.packer[e];a.forEach(function(a){a.rect[c]=a.rect[c]/p*l})}this.shiftLayout()};a.itemDragStart=function(a){this.isEnabled&&(this.stamp(a),(a=this.getItem(a))&&(a.enablePlacing(),a.showDropPlaceholder(),
this.dragItemCount++,this.updateShiftTargets(a)))};a.updateShiftTargets=function(a){this.shiftPacker.reset();this._getBoundingRect();var b=this._getOption("originLeft"),f=this._getOption("originTop");this.stamps.forEach(function(a){var d=this.getItem(a);d&&d.isPlacing||(d=this._getElementOffset(a),d=new c({x:b?d.left:d.right,y:f?d.top:d.bottom}),this._setRectSize(a,d),this.shiftPacker.placed(d))},this);var d=this._getOption("horizontal"),e=d?"height":"width";this.shiftTargetKeys=[];this.shiftTargets=
[];var g=this[d?"rowHeight":"columnWidth"];if(g=g&&g+this.gutter){var n=Math.floor((this.shiftPacker[e]+this.gutter)/g);var k=(n-Math.ceil(a.rect[e]/g))*g;for(a=0;n>a;a++)this._addShiftTarget(d?0:a*g,d?a*g:0,k)}else k=this.shiftPacker[e]+this.gutter-a.rect[e],this._addShiftTarget(0,0,k);n=this._getItemsForLayout(this.items);var l=this._getPackMethod();n.forEach(function(a){var b=a.rect;this._setRectSize(a.element,b);this.shiftPacker[l](b);this._addShiftTarget(b.x,b.y,k);a=d?b.x+b.width:b.x;var c=
d?b.y:b.y+b.height;if(this._addShiftTarget(a,c,k),g)for(var f=Math.round(b[e]/g),h=1;f>h;h++)this._addShiftTarget(d?a:b.x+g*h,d?b.y+g*h:c,k)},this)};a._addShiftTarget=function(a,b,c){var f=this._getOption("horizontal")?b:a;0!==f&&f>c||(c=a+","+b,-1!=this.shiftTargetKeys.indexOf(c)||(this.shiftTargetKeys.push(c),this.shiftTargets.push({x:a,y:b})))};a.shift=function(a,b,c){var f,d=1/0;this.shiftTargets.forEach(function(a){var e=b-a.x;var h=c-a.y;e=Math.sqrt(e*e+h*h);d>e&&(f=a,d=e)});a.rect.x=f.x;a.rect.y=
f.y};a.itemDragMove=function(a,b,c){function f(){e.shift(d,b,c);d.positionDropPlaceholder();e.layout()}var d=this.isEnabled&&this.getItem(a);if(d){b-=this.size.paddingLeft;c-=this.size.paddingTop;var e=this;a=new Date;this._itemDragTime&&120>a-this._itemDragTime?(clearTimeout(this.dragTimeout),this.dragTimeout=setTimeout(f,120)):(f(),this._itemDragTime=a)}};a.itemDragEnd=function(a){function b(){d++;2==d&&(c.element.classList.remove("is-positioning-post-drag"),c.hideDropPlaceholder(),e.dispatchEvent("dragItemPositioned",
null,[c]))}var c=this.isEnabled&&this.getItem(a);if(c){clearTimeout(this.dragTimeout);c.element.classList.add("is-positioning-post-drag");var d=0,e=this;c.once("layout",b);this.once("layoutComplete",b);c.moveTo(c.rect.x,c.rect.y);this.layout();this.dragItemCount=Math.max(0,this.dragItemCount-1);this.sortItemsByPosition();c.disablePlacing();this.unstamp(c.element)}};a.bindDraggabillyEvents=function(a){this._bindDraggabillyEvents(a,"on")};a.unbindDraggabillyEvents=function(a){this._bindDraggabillyEvents(a,
"off")};a._bindDraggabillyEvents=function(a,b){var c=this.handleDraggabilly;a[b]("dragStart",c.dragStart);a[b]("dragMove",c.dragMove);a[b]("dragEnd",c.dragEnd)};a.bindUIDraggableEvents=function(a){this._bindUIDraggableEvents(a,"on")};a.unbindUIDraggableEvents=function(a){this._bindUIDraggableEvents(a,"off")};a._bindUIDraggableEvents=function(a,b){var c=this.handleUIDraggable;a[b]("dragstart",c.start)[b]("drag",c.drag)[b]("dragstop",c.stop)};var p=a.destroy;return a.destroy=function(){p.apply(this,
arguments);this.isEnabled=!1},l.Rect=c,l.Packer=k,l});
!function(d,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():d.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function d(){}var e=d.prototype;return e.on=function(c,d){if(c&&d){var a=this._events=this._events||{};a=a[c]=a[c]||[];return-1==a.indexOf(d)&&a.push(d),this}},e.once=function(c,d){if(c&&d){this.on(c,d);var a=this._onceEvents=this._onceEvents||{};return(a[c]=a[c]||{})[d]=!0,this}},e.off=
function(c,d){var a=this._events&&this._events[c];if(a&&a.length){var e=a.indexOf(d);return-1!=e&&a.splice(e,1),this}},e.emitEvent=function(c,d){var a=this._events&&this._events[c];if(a&&a.length){var e=0,k=a[e];d=d||[];for(var l=this._onceEvents&&this._onceEvents[c];k;){var p=l&&l[k];p&&(this.off(c,k),delete l[k]);k.apply(this,d);e+=p?0:1;k=a[e]}return this}},d});
(function(d,e){"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(c){return e(d,c)}):"object"==typeof module&&module.exports?module.exports=e(d,require("ev-emitter")):d.imagesLoaded=e(d,d.EvEmitter)})(window,function(d,e){function c(a,c){for(var b in c)a[b]=c[b];return a}function k(a){var b=[];if(Array.isArray(a))b=a;else if("number"==typeof a.length)for(var c=0;c<a.length;c++)b.push(a[c]);else b.push(a);return b}function a(b,d,e){return this instanceof a?("string"==typeof b&&
(b=document.querySelectorAll(b)),this.elements=k(b),this.options=c({},this.options),"function"==typeof d?e=d:c(this.options,d),e&&this.on("always",e),this.getImages(),l&&(this.jqDeferred=new l.Deferred),void setTimeout(function(){this.check()}.bind(this))):new a(b,d,e)}function g(a){this.img=a}function q(a,c){this.url=a;this.element=c;this.img=new Image}var l=d.jQuery,p=d.console;a.prototype=Object.create(e.prototype);a.prototype.options={};a.prototype.getImages=function(){this.images=[];this.elements.forEach(this.addElementImages,
this)};a.prototype.addElementImages=function(a){"IMG"==a.nodeName&&this.addImage(a);!0===this.options.background&&this.addElementBackgroundImages(a);var b=a.nodeType;if(b&&n[b]){var c=a.querySelectorAll("img");for(b=0;b<c.length;b++)this.addImage(c[b]);if("string"==typeof this.options.background)for(a=a.querySelectorAll(this.options.background),b=0;b<a.length;b++)this.addElementBackgroundImages(a[b])}};var n={1:!0,9:!0,11:!0};return a.prototype.addElementBackgroundImages=function(a){var b=getComputedStyle(a);
if(b)for(var c=/url\((['"])?(.*?)\1\)/gi,d=c.exec(b.backgroundImage);null!==d;)(d=d&&d[2])&&this.addBackground(d,a),d=c.exec(b.backgroundImage)},a.prototype.addImage=function(a){a=new g(a);this.images.push(a)},a.prototype.addBackground=function(a,c){var b=new q(a,c);this.images.push(b)},a.prototype.check=function(){function a(a,b,d){setTimeout(function(){c.progress(a,b,d)})}var c=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(b){b.once("progress",
a);b.check()}):void this.complete()},a.prototype.progress=function(a,c,d){this.progressedCount++;this.hasAnyBroken=this.hasAnyBroken||!a.isLoaded;this.emitEvent("progress",[this,a,c]);this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,a);this.progressedCount==this.images.length&&this.complete();this.options.debug&&p&&p.log("progress: "+d,a,c)},a.prototype.complete=function(){var a=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(a,[this]),this.emitEvent("always",
[this]),this.jqDeferred)this.jqDeferred[this.hasAnyBroken?"reject":"resolve"](this)},g.prototype=Object.create(e.prototype),g.prototype.check=function(){return this.getIsImageComplete()?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},g.prototype.getIsImageComplete=
function(){return this.img.complete&&void 0!==this.img.naturalWidth},g.prototype.confirm=function(a,c){this.isLoaded=a;this.emitEvent("progress",[this,this.img,c])},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.onload=function(){this.confirm(!0,"onload");this.unbindEvents()},g.prototype.onerror=function(){this.confirm(!1,"onerror");this.unbindEvents()},g.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this);this.proxyImage.removeEventListener("error",
this);this.img.removeEventListener("load",this);this.img.removeEventListener("error",this)},q.prototype=Object.create(g.prototype),q.prototype.check=function(){this.img.addEventListener("load",this);this.img.addEventListener("error",this);this.img.src=this.url;this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},q.prototype.unbindEvents=function(){this.img.removeEventListener("load",this);this.img.removeEventListener("error",this)},q.prototype.confirm=
function(a,c){this.isLoaded=a;this.emitEvent("progress",[this,this.element,c])},a.makeJQueryPlugin=function(b){(b=b||d.jQuery)&&(l=b,l.fn.imagesLoaded=function(b,c){return(new a(this,b,c)).jqDeferred.promise(l(this))})},a.makeJQueryPlugin(),a});