angular.module("gettext",[]),angular.module("gettext").constant("gettext",function(e){return e}),angular.module("gettext").factory("gettextCatalog",["gettextPlurals","gettextFallbackLanguage","$http","$cacheFactory","$interpolate","$rootScope",function(e,t,n,i,o,a){function r(){a.$broadcast("gettextLanguageChanged")}var s,l="$$noContext",c='<span id="test" title="test" class="tested">test</span>',u=angular.element("<span>"+c+"</span>").html()!==c,d=function(e){return s.debug&&s.currentLanguage!==s.baseLanguage?s.debugPrefix+e:e},m=function(e){return s.showTranslatedMarkers?s.translatedMarkerPrefix+e+s.translatedMarkerSuffix:e};return s={debug:!1,debugPrefix:"[MISSING]: ",showTranslatedMarkers:!1,translatedMarkerPrefix:"[",translatedMarkerSuffix:"]",strings:{},baseLanguage:"en",currentLanguage:"en",cache:i("strings"),setCurrentLanguage:function(e){this.currentLanguage=e,r()},getCurrentLanguage:function(){return this.currentLanguage},setStrings:function(e,t){this.strings[e]||(this.strings[e]={});for(var n in t){var i=t[n];if(u&&(n=angular.element("<span>"+n+"</span>").html()),angular.isString(i)||angular.isArray(i)){var o={};o[l]=i,i=o}for(var a in i){var s=i[a];i[a]=angular.isArray(s)?s:[s]}this.strings[e][n]=i}r()},getStringFormFor:function(t,n,i,o){if(!t)return null;var a=this.strings[t]||{},r=a[n]||{},s=r[o||l]||[];return s[e(t,i)]},getString:function(e,n,i){var a=t(this.currentLanguage);return e=this.getStringFormFor(this.currentLanguage,e,1,i)||this.getStringFormFor(a,e,1,i)||d(e),e=n?o(e)(n):e,m(e)},getPlural:function(e,n,i,a,r){var s=t(this.currentLanguage);return n=this.getStringFormFor(this.currentLanguage,n,e,r)||this.getStringFormFor(s,n,e,r)||d(1===e?n:i),a&&(a.$count=e,n=o(n)(a)),m(n)},loadRemote:function(e){return n({method:"GET",url:e,cache:s.cache}).then(function(e){var t=e.data;for(var n in t)s.setStrings(n,t[n]);return e})}}}]),angular.module("gettext").directive("translate",["gettextCatalog","$parse","$animate","$compile","$window",function(e,t,n,i,o){function a(e,t,n){if(!e)throw new Error("You should add a "+t+" attribute whenever you add a "+n+" attribute.")}var r=function(){return String.prototype.trim?function(e){return"string"==typeof e?e.trim():e}:function(e){return"string"==typeof e?e.replace(/^\s*/,"").replace(/\s*$/,""):e}}(),s=parseInt((/msie (\d+)/.exec(angular.lowercase(o.navigator.userAgent))||[])[1],10);return{restrict:"AE",terminal:!0,compile:function(o,l){a(!l.translatePlural||l.translateN,"translate-n","translate-plural"),a(!l.translateN||l.translatePlural,"translate-plural","translate-n");var c=r(o.html()),u=l.translatePlural,d=l.translateContext;return s<=8&&"<!--IE fix-->"===c.slice(-13)&&(c=c.slice(0,-13)),l.$set("translate",void 0),{post:function(o,a,s){function l(){var t;u?(o=p||(p=o.$new()),o.$count=m(o),t=e.getPlural(o.$count,c,u,null,d)):t=e.getString(c,null,d);var s=a.contents();if(0!==s.length){if(t===r(s.html()))return void(h&&i(s)(o));var l=angular.element("<span>"+t+"</span>");i(l.contents())(o);var f=l.contents();n.enter(f,a),n.leave(s)}}var m=t(s.translateN),p=null,h=!0;s.translateN&&o.$watch(s.translateN,l),o.$on("gettextLanguageChanged",l),l(),h=!1}}}}}]),angular.module("gettext").factory("gettextFallbackLanguage",function(){var e={},t=/([^_]+)_[^_]+$/;return function(n){if(e[n])return e[n];var i=t.exec(n);return i?(e[n]=i[1],i[1]):null}}),angular.module("gettext").filter("translate",["gettextCatalog",function(e){function t(t,n){return e.getString(t,null,n)}return t.$stateful=!0,t}]),angular.module("gettext").factory("gettextPlurals",function(){return function(e,t){switch(e){case"ay":case"bo":case"cgg":case"dz":case"fa":case"id":case"ja":case"jbo":case"ka":case"kk":case"km":case"ko":case"ky":case"lo":case"ms":case"my":case"sah":case"su":case"th":case"tt":case"ug":case"vi":case"wo":case"zh":return 0;case"is":return t%10!=1||t%100==11?1:0;case"jv":return 0!=t?1:0;case"mk":return 1==t||t%10==1?0:1;case"ach":case"ak":case"am":case"arn":case"br":case"fil":case"fr":case"gun":case"ln":case"mfe":case"mg":case"mi":case"oc":case"pt_BR":case"tg":case"ti":case"tr":case"uz":case"wa":case"zh":return t>1?1:0;case"lv":return t%10==1&&t%100!=11?0:0!=t?1:2;case"lt":return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2;case"be":case"bs":case"hr":case"ru":case"sr":case"uk":return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2;case"mnk":return 0==t?0:1==t?1:2;case"ro":return 1==t?0:0==t||t%100>0&&t%100<20?1:2;case"pl":return 1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2;case"cs":case"sk":return 1==t?0:t>=2&&t<=4?1:2;case"sl":return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0;case"mt":return 1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3;case"gd":return 1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3;case"cy":return 1==t?0:2==t?1:8!=t&&11!=t?2:3;case"kw":return 1==t?0:2==t?1:3==t?2:3;case"ga":return 1==t?0:2==t?1:t<7?2:t<11?3:4;case"ar":return 0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5;default:return 1!=t?1:0}}}),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[translate]{visibility:hidden !important;}</style>'),!function(e){function t(){return e("body").height()>e(window).height()}var n=function(t,n){this.settings=n,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this["yield"]={every:2,flushed:0},this.border=n.border>=0?n.border:n.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:e('<div class="spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t};n.prototype.getSuffix=function(e,t){var n,i;for(n=e>t?e:t,i=0;i<this.suffixRanges.length;i++)if(n<=this.suffixRanges[i])return this.settings.sizeRangeSuffixes[this.suffixRanges[i]];return this.settings.sizeRangeSuffixes[this.suffixRanges[i-1]]},n.prototype.removeSuffix=function(e,t){return e.substring(0,e.length-t.length)},n.prototype.endsWith=function(e,t){return-1!==e.indexOf(t,e.length-t.length)},n.prototype.getUsedSuffix=function(e){for(var t in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(t)){if(0===this.settings.sizeRangeSuffixes[t].length)continue;if(this.endsWith(e,this.settings.sizeRangeSuffixes[t]))return this.settings.sizeRangeSuffixes[t]}return""},n.prototype.newSrc=function(e,t,n,i){var o;if(this.settings.thumbnailPath)o=this.settings.thumbnailPath(e,t,n,i);else{var a=e.match(this.settings.extension),r=null!==a?a[0]:"";o=e.replace(this.settings.extension,""),o=this.removeSuffix(o,this.getUsedSuffix(o)),o+=this.getSuffix(t,n)+r}return o},n.prototype.showImg=function(e,t){this.settings.cssAnimation?(e.addClass("entry-visible"),t&&t()):(e.stop().fadeTo(this.settings.imagesAnimationDuration,1,t),e.find("> img, > a > img").stop().fadeTo(this.settings.imagesAnimationDuration,1,t))},n.prototype.extractImgSrcFromImage=function(e){var t="undefined"!=typeof e.data("safe-src")?e.data("safe-src"):e.attr("src");return e.data("jg.originalSrc",t),t},n.prototype.imgFromEntry=function(e){var t=e.find("> img");return 0===t.length&&(t=e.find("> a > img")),0===t.length?null:t},n.prototype.captionFromEntry=function(e){var t=e.find("> .caption");return 0===t.length?null:t},n.prototype.displayEntry=function(t,n,i,o,a,r){t.width(o),t.height(r),t.css("top",i),t.css("left",n);var s=this.imgFromEntry(t);if(null!==s){s.css("width",o),s.css("height",a),s.css("margin-left",-o/2),s.css("margin-top",-a/2);var l=s.attr("src"),c=this.newSrc(l,o,a,s[0]);s.one("error",function(){s.attr("src",s.data("jg.originalSrc"))});var u=function(){l!==c&&s.attr("src",c)};"skipped"===t.data("jg.loaded")?this.onImageEvent(l,e.proxy(function(){this.showImg(t,u),t.data("jg.loaded",!0)},this)):this.showImg(t,u)}else this.showImg(t);this.displayEntryCaption(t)},n.prototype.displayEntryCaption=function(t){var n=this.imgFromEntry(t);if(null!==n&&this.settings.captions){var i=this.captionFromEntry(t);if(null===i){var o=n.attr("alt");this.isValidCaption(o)||(o=t.attr("title")),this.isValidCaption(o)&&(i=e('<div class="caption">'+o+"</div>"),t.append(i),t.data("jg.createdCaption",!0))}null!==i&&(this.settings.cssAnimation||i.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))}else this.removeCaptionEventsHandlers(t)},n.prototype.isValidCaption=function(e){return"undefined"!=typeof e&&e.length>0},n.prototype.onEntryMouseEnterForCaption=function(t){var n=this.captionFromEntry(e(t.currentTarget));this.settings.cssAnimation?n.addClass("caption-visible").removeClass("caption-hidden"):n.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},n.prototype.onEntryMouseLeaveForCaption=function(t){var n=this.captionFromEntry(e(t.currentTarget));this.settings.cssAnimation?n.removeClass("caption-visible").removeClass("caption-hidden"):n.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},n.prototype.addCaptionEventsHandlers=function(t){var n=t.data("jg.captionMouseEvents");"undefined"==typeof n&&(n={mouseenter:e.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:e.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,n.mouseenter),t.on("mouseleave",void 0,void 0,n.mouseleave),t.data("jg.captionMouseEvents",n))},n.prototype.removeCaptionEventsHandlers=function(e){var t=e.data("jg.captionMouseEvents");"undefined"!=typeof t&&(e.off("mouseenter",void 0,t.mouseenter),e.off("mouseleave",void 0,t.mouseleave),e.removeData("jg.captionMouseEvents"))},n.prototype.prepareBuildingRow=function(e){var t,n,i,o,a,r=!0,s=0,l=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,c=l/this.buildingRow.aspectRatio,u=this.settings.rowHeight,d=this.buildingRow.width/l>this.settings.justifyThreshold;if(e&&"hide"===this.settings.lastRow&&!d){for(t=0;t<this.buildingRow.entriesBuff.length;t++)n=this.buildingRow.entriesBuff[t],this.settings.cssAnimation?n.removeClass("entry-visible"):(n.stop().fadeTo(0,.1),n.find("> img, > a > img").fadeTo(0,0));return-1}for(e&&!d&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(r=!1,this.rows>0&&(u=(this.offY-this.border-this.settings.margins*this.rows)/this.rows,r=u*this.buildingRow.aspectRatio/l>this.settings.justifyThreshold)),t=0;t<this.buildingRow.entriesBuff.length;t++)n=this.buildingRow.entriesBuff[t],i=n.data("jg.width")/n.data("jg.height"),r?(o=t===this.buildingRow.entriesBuff.length-1?l:c*i,a=c):(o=u*i,a=u),l-=Math.round(o),n.data("jg.jwidth",Math.round(o)),n.data("jg.jheight",Math.ceil(a)),(0===t||s>a)&&(s=a);return this.buildingRow.height=s,r},n.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},n.prototype.flushRow=function(e){var t,n,i,o=this.settings,a=this.border;if(n=this.prepareBuildingRow(e),e&&"hide"===o.lastRow&&-1===n)return void this.clearBuildingRow();if(this.maxRowHeight&&(this.maxRowHeight.isPercentage&&this.maxRowHeight.value*o.rowHeight<this.buildingRow.height?this.buildingRow.height=this.maxRowHeight.value*o.rowHeight:this.maxRowHeight.value>=o.rowHeight&&this.maxRowHeight.value<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight.value)),"center"===o.lastRow||"right"===o.lastRow){var r=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*o.margins;for(i=0;i<this.buildingRow.entriesBuff.length;i++)t=this.buildingRow.entriesBuff[i],r-=t.data("jg.jwidth");"center"===o.lastRow?a+=r/2:"right"===o.lastRow&&(a+=r)}for(i=0;i<this.buildingRow.entriesBuff.length;i++)t=this.buildingRow.entriesBuff[i],this.displayEntry(t,a,this.offY,t.data("jg.jwidth"),t.data("jg.jheight"),this.buildingRow.height),a+=t.data("jg.jwidth")+o.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.$gallery.height(this.galleryHeightToSet+this.getSpinnerHeight()),(!e||this.buildingRow.height<=o.rowHeight&&n)&&(this.offY+=this.buildingRow.height+o.margins,this.rows+=1,this.clearBuildingRow(),this.$gallery.trigger("jg.rowflush"))};var i=!1;n.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(e.proxy(function(){var e=parseFloat(this.$gallery.width());t()===i?Math.abs(e-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=e,this.rewind(),this.startImgAnalyzer(!0)):(i=t(),this.galleryWidth=e)},this),this.settings.refreshTime)},n.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},n.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},n.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.$gallery.height(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},n.prototype.startLoadingSpinnerAnimation=function(){var e=this.spinner,t=e.$el.find("span");clearInterval(e.intervalId),this.$gallery.append(e.$el),this.$gallery.height(this.offY+this.buildingRow.height+this.getSpinnerHeight()),e.intervalId=setInterval(function(){e.phase<t.length?t.eq(e.phase).fadeTo(e.timeSlot,1):t.eq(e.phase-t.length).fadeTo(e.timeSlot,0),e.phase=(e.phase+1)%(2*t.length)},e.timeSlot)},n.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},n.prototype.updateEntries=function(t){var n;return t&&null!=this.lastFetchedEntry?n=e(this.lastFetchedEntry).nextAll(this.settings.selector).toArray():(this.entries=[],n=this.$gallery.children(this.settings.selector).toArray()),n.length>0&&(e.isFunction(this.settings.sort)?n=this.sortArray(n):this.settings.randomize&&(n=this.shuffleArray(n)),this.lastFetchedEntry=n[n.length-1],this.settings.filter?n=this.filterArray(n):this.resetFilters(n)),this.entries=this.entries.concat(n),!0},n.prototype.insertToGallery=function(t){var n=this;e.each(t,function(){e(this).appendTo(n.$gallery)})},n.prototype.shuffleArray=function(e){var t,n,i;for(t=e.length-1;t>0;t--)n=Math.floor(Math.random()*(t+1)),i=e[t],e[t]=e[n],e[n]=i;return this.insertToGallery(e),e},n.prototype.sortArray=function(e){return e.sort(this.settings.sort),this.insertToGallery(e),e},n.prototype.resetFilters=function(t){for(var n=0;n<t.length;n++)e(t[n]).removeClass("jg-filtered")},n.prototype.filterArray=function(t){var n=this.settings;if("string"===e.type(n.filter))return t.filter(function(t){var i=e(t);return i.is(n.filter)?(i.removeClass("jg-filtered"),!0):(i.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(e.isFunction(n.filter)){for(var i=t.filter(n.filter),o=0;o<t.length;o++)-1==i.indexOf(t[o])?e(t[o]).addClass("jg-filtered").removeClass("jg-visible"):e(t[o]).removeClass("jg-filtered");return i}},n.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),e.each(this.entries,e.proxy(function(t,n){var i=e(n);i.css("width",""),i.css("height",""),i.css("top",""),i.css("left",""),i.data("jg.loaded",void 0),i.removeClass("jg-entry");var o=this.imgFromEntry(i);o.css("width",""),o.css("height",""),o.css("margin-left",""),o.css("margin-top",""),o.attr("src",o.data("jg.originalSrc")),o.data("jg.originalSrc",void 0),this.removeCaptionEventsHandlers(i);var a=this.captionFromEntry(i);i.data("jg.createdCaption")?(i.data("jg.createdCaption",void 0),null!==a&&a.remove()):null!==a&&a.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0)},n.prototype.analyzeImages=function(t){for(var n=this.lastAnalyzedIndex+1;n<this.entries.length;n++){var i=e(this.entries[n]);if(i.data("jg.loaded")===!0||"skipped"===i.data("jg.loaded")){var o=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,a=i.data("jg.width")/i.data("jg.height");if(o/(this.buildingRow.aspectRatio+a)<this.settings.rowHeight&&(this.flushRow(!1),++this["yield"].flushed>=this["yield"].every))return void this.startImgAnalyzer(t);this.buildingRow.entriesBuff.push(i),this.buildingRow.aspectRatio+=a,this.buildingRow.width+=a*this.settings.rowHeight,this.lastAnalyzedIndex=n}else if("error"!==i.data("jg.loaded"))return}this.buildingRow.entriesBuff.length>0&&this.flushRow(!0),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.$gallery.trigger(t?"jg.resize":"jg.complete"),this.$gallery.height(this.galleryHeightToSet)},n.prototype.stopImgAnalyzerStarter=function(){this["yield"].flushed=0,null!==this.imgAnalyzerTimeout&&clearTimeout(this.imgAnalyzerTimeout)},n.prototype.startImgAnalyzer=function(e){var t=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){t.analyzeImages(e)},.001)},n.prototype.onImageEvent=function(t,n,i){if(n||i){var o=new Image,a=e(o);n&&a.one("load",function(){a.off("load error"),n(o)}),i&&a.one("error",function(){a.off("load error"),i(o)}),o.src=t}},n.prototype.init=function(){var t=!1,n=!1,i=this;e.each(this.entries,function(o,a){var r=e(a),s=i.imgFromEntry(r);if(r.addClass("jg-entry"),r.data("jg.loaded")!==!0&&"skipped"!==r.data("jg.loaded"))if(null!==i.settings.rel&&r.attr("rel",i.settings.rel),null!==i.settings.target&&r.attr("target",i.settings.target),null!==s){var l=i.extractImgSrcFromImage(s);if(s.attr("src",l),i.settings.waitThumbnailsLoad===!1){var c=parseFloat(s.attr("width")),u=parseFloat(s.attr("height"));if(!isNaN(c)&&!isNaN(u))return r.data("jg.width",c),r.data("jg.height",u),r.data("jg.loaded","skipped"),n=!0,i.startImgAnalyzer(!1),!0}r.data("jg.loaded",!1),t=!0,i.isSpinnerActive()||i.startLoadingSpinnerAnimation(),i.onImageEvent(l,function(e){r.data("jg.width",e.width),r.data("jg.height",e.height),r.data("jg.loaded",!0),i.startImgAnalyzer(!1)},function(){r.data("jg.loaded","error"),i.startImgAnalyzer(!1)})}else r.data("jg.loaded",!0),r.data("jg.width",r.width()|parseFloat(r.css("width"))|1),r.data("jg.height",r.height()|parseFloat(r.css("height"))|1)}),t||n||this.startImgAnalyzer(!1),this.checkWidth()},n.prototype.checkOrConvertNumber=function(t,n){if("string"===e.type(t[n])&&(t[n]=parseFloat(t[n])),"number"!==e.type(t[n]))throw n+" must be a number";if(isNaN(t[n]))throw"invalid number for "+n},n.prototype.checkSizeRangesSuffixes=function(){if("object"!==e.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t=[];for(var n in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(n)&&t.push(n);for(var i={0:""},o=0;o<t.length;o++)if("string"===e.type(t[o]))try{var a=parseInt(t[o].replace(/^[a-z]+/,""),10);i[a]=this.settings.sizeRangeSuffixes[t[o]]}catch(r){throw"sizeRangeSuffixes keys must contains correct numbers ("+r+")"}else i[t[o]]=this.settings.sizeRangeSuffixes[t[o]];this.settings.sizeRangeSuffixes=i},n.prototype.retrieveMaxRowHeight=function(){var t={};if("string"===e.type(this.settings.maxRowHeight))this.settings.maxRowHeight.match(/^[0-9]+%$/)?(t.value=parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100,t.isPercentage=!1):(t.value=parseFloat(this.settings.maxRowHeight),t.isPercentage=!0);else{if("number"!==e.type(this.settings.maxRowHeight)){if(this.settings.maxRowHeight===!1||null===this.settings.maxRowHeight||"undefined"==typeof this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}t.value=this.settings.maxRowHeight,t.isPercentage=!1}if(isNaN(t.value))throw"invalid number for maxRowHeight";return t.isPercentage&&t.value<100&&(t.value=100),t},n.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||this.settings.justifyThreshold>1)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==e.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==e.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||this.settings.captionSettings.visibleOpacity>1)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||this.settings.captionSettings.nonVisibleOpacity>1)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==e.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==e.type(this.settings.selector))throw"selector must be a string";if(this.settings.sort!==!1&&!e.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(this.settings.filter!==!1&&!e.isFunction(this.settings.filter)&&"string"!==e.type(this.settings.filter))throw"filter must be false, a string or a filter function"},n.prototype.retrieveSuffixRanges=function(){var e=[];for(var t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&e.push(parseInt(t,10));return e.sort(function(e,t){return e>t?1:t>e?-1:0}),e},n.prototype.updateSettings=function(t){this.settings=e.extend({},this.settings,t),this.checkSettings(),this.border=this.settings.border>=0?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},e.fn.justifiedGallery=function(t){return this.each(function(i,o){var a=e(o);a.addClass("justified-gallery");var r=a.data("jg.controller");if("undefined"==typeof r){if("undefined"!=typeof t&&null!==t&&"object"!==e.type(t)){if("destroy"===t)return;throw"The argument must be an object"}r=new n(a,e.extend({},e.fn.justifiedGallery.defaults,t)),a.data("jg.controller",r)}else if("norewind"===t);else{if("destroy"===t)return void r.destroy();r.updateSettings(t),r.rewind()}r.updateEntries("norewind"===t)&&r.init()})},e.fn.justifiedGallery.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,sort:!1,filter:!1,selector:"a, div:not(.spinner)"}}(jQuery),!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipe=t()}(this,function(){"use strict";var e=function(e,t,n,i){var o={features:null,bind:function(e,t,n,i){var o=(i?"remove":"add")+"EventListener";t=t.split(" ");for(var a=0;a<t.length;a++)t[a]&&e[o](t[a],n,!1)},isArray:function(e){return e instanceof Array},createEl:function(e,t){var n=document.createElement(t||"div");return e&&(n.className=e),n},getScrollY:function(){var e=window.pageYOffset;return void 0!==e?e:document.documentElement.scrollTop},unbind:function(e,t,n){o.bind(e,t,n,!0)},removeClass:function(e,t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,t){o.hasClass(e,t)||(e.className+=(e.className?" ":"")+t)},hasClass:function(e,t){return e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},getChildByClass:function(e,t){for(var n=e.firstChild;n;){if(o.hasClass(n,t))return n;n=n.nextSibling}},arraySearch:function(e,t,n){for(var i=e.length;i--;)if(e[i][n]===t)return i;return-1},extend:function(e,t,n){for(var i in t)if(t.hasOwnProperty(i)){if(n&&e.hasOwnProperty(i))continue;e[i]=t[i]}},easing:{sine:{out:function(e){return Math.sin(e*(Math.PI/2))},inOut:function(e){return-(Math.cos(Math.PI*e)-1)/2}},cubic:{out:function(e){return--e*e*e+1}}},detectFeatures:function(){if(o.features)return o.features;var e=o.createEl(),t=e.style,n="",i={};if(i.oldIE=document.all&&!document.addEventListener,i.touch="ontouchstart"in window,window.requestAnimationFrame&&(i.raf=window.requestAnimationFrame,i.caf=window.cancelAnimationFrame),i.pointerEvent=navigator.pointerEnabled||navigator.msPointerEnabled,!i.pointerEvent){var a=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var r=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);r&&r.length>0&&(r=parseInt(r[1],10),r>=1&&8>r&&(i.isOldIOSPhone=!0))}var s=a.match(/Android\s([0-9\.]*)/),l=s?s[1]:0;l=parseFloat(l),l>=1&&(4.4>l&&(i.isOldAndroid=!0),i.androidVersion=l),i.isMobileOpera=/opera mini|opera mobi/i.test(a)}for(var c,u,d=["transform","perspective","animationName"],m=["","webkit","Moz","ms","O"],p=0;4>p;p++){n=m[p];for(var h=0;3>h;h++)c=d[h],u=n+(n?c.charAt(0).toUpperCase()+c.slice(1):c),!i[c]&&u in t&&(i[c]=u);n&&!i.raf&&(n=n.toLowerCase(),i.raf=window[n+"RequestAnimationFrame"],i.raf&&(i.caf=window[n+"CancelAnimationFrame"]||window[n+"CancelRequestAnimationFrame"]))}if(!i.raf){var f=0;i.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-f)),i=window.setTimeout(function(){e(t+n)},n);return f=t+n,i},i.caf=function(e){clearTimeout(e)}}return i.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,o.features=i,i}};o.detectFeatures(),o.features.oldIE&&(o.bind=function(e,t,n,i){t=t.split(" ");for(var o,a=(i?"detach":"attach")+"Event",r=function(){n.handleEvent.call(n)},s=0;s<t.length;s++)if(o=t[s])if("object"==typeof n&&n.handleEvent){if(i){if(!n["oldIE"+o])return!1}else n["oldIE"+o]=r;e[a]("on"+o,n["oldIE"+o])}else e[a]("on"+o,n)});var a=this,r=25,s=3,l={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(e){return"A"===e.tagName},getDoubleTapZoom:function(e,t){return e?1:t.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};o.extend(l,i);var c,u,d,m,p,h,f,g,v,w,y,b,x,_,C,S,I,k,T,E,A,R,D,O,M,F,P,L,N,z,j,Z,U,H,B,$,K,G,W,Y,V,q,X,J,Q,ee,te,ne,ie,oe,ae,re,se,le,ce,ue,de=function(){return{x:0,y:0}},me=de(),pe=de(),he=de(),fe={},ge=0,ve={},we=de(),ye=0,be=!0,xe=[],_e={},Ce=!1,Se=function(e,t){o.extend(a,t.publicMethods),xe.push(e)},Ie=function(e){var t=Qt();return e>t-1?e-t:0>e?t+e:e},ke={},Te=function(e,t){return ke[e]||(ke[e]=[]),ke[e].push(t)},Ee=function(e){var t=ke[e];if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var i=0;i<t.length;i++)t[i].apply(a,n)}},Ae=function(){return(new Date).getTime()},Re=function(e){le=e,a.bg.style.opacity=e*l.bgOpacity},De=function(e,t,n,i,o){(!Ce||o&&o!==a.currItem)&&(i/=o?o.fitRatio:a.currItem.fitRatio),e[R]=b+t+"px, "+n+"px"+x+" scale("+i+")"},Oe=function(e){ie&&(e&&(w>a.currItem.fitRatio?Ce||(mn(a.currItem,!1,!0),Ce=!0):Ce&&(mn(a.currItem),Ce=!1)),De(ie,he.x,he.y,w))},Me=function(e){e.container&&De(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},Fe=function(e,t){t[R]=b+e+"px, 0px"+x},Pe=function(e,t){if(!l.loop&&t){var n=m+(we.x*ge-e)/we.x,i=Math.round(e-wt.x);(0>n&&i>0||n>=Qt()-1&&0>i)&&(e=wt.x+i*l.mainScrollEndFriction)}wt.x=e,Fe(e,p)},Le=function(e,t){var n=yt[e]-ve[e];return pe[e]+me[e]+n-n*(t/y)},Ne=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},ze=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},je=null,Ze=function(){je&&(o.unbind(document,"mousemove",Ze),o.addClass(e,"pswp--has_mouse"),l.mouseUsed=!0,Ee("mouseUsed")),je=setTimeout(function(){je=null},100)},Ue=function(){o.bind(document,"keydown",a),j.transform&&o.bind(a.scrollWrap,"click",a),l.mouseUsed||o.bind(document,"mousemove",Ze),o.bind(window,"resize scroll",a),Ee("bindEvents")},He=function(){o.unbind(window,"resize",a),o.unbind(window,"scroll",v.scroll),o.unbind(document,"keydown",a),o.unbind(document,"mousemove",Ze),j.transform&&o.unbind(a.scrollWrap,"click",a),G&&o.unbind(window,f,a),Ee("unbindEvents")},Be=function(e,t){var n=ln(a.currItem,fe,e);return t&&(ne=n),n},$e=function(e){return e||(e=a.currItem),e.initialZoomLevel},Ke=function(e){return e||(e=a.currItem),e.w>0?l.maxSpreadZoom:1},Ge=function(e,t,n,i){return i===a.currItem.initialZoomLevel?(n[e]=a.currItem.initialPosition[e],!0):(n[e]=Le(e,i),n[e]>t.min[e]?(n[e]=t.min[e],!0):n[e]<t.max[e]&&(n[e]=t.max[e],!0))},We=function(){if(R){var t=j.perspective&&!O;return b="translate"+(t?"3d(":"("),void(x=j.perspective?", 0px)":")")}R="left",o.addClass(e,"pswp--ie"),Fe=function(e,t){t.left=e+"px"},Me=function(e){var t=e.fitRatio>1?1:e.fitRatio,n=e.container.style,i=t*e.w,o=t*e.h;n.width=i+"px",n.height=o+"px",n.left=e.initialPosition.x+"px",n.top=e.initialPosition.y+"px"},Oe=function(){if(ie){var e=ie,t=a.currItem,n=t.fitRatio>1?1:t.fitRatio,i=n*t.w,o=n*t.h;e.width=i+"px",e.height=o+"px",e.left=he.x+"px",e.top=he.y+"px"}}},Ye=function(e){var t="";l.escKey&&27===e.keyCode?t="close":l.arrowKeys&&(37===e.keyCode?t="prev":39===e.keyCode&&(t="next")),t&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(e.preventDefault?e.preventDefault():e.returnValue=!1,a[t]()))},Ve=function(e){e&&(V||Y||oe||$)&&(e.preventDefault(),e.stopPropagation())},qe=function(){a.setScrollOffset(0,o.getScrollY())},Xe={},Je=0,Qe=function(e){Xe[e]&&(Xe[e].raf&&F(Xe[e].raf),Je--,delete Xe[e])},et=function(e){Xe[e]&&Qe(e),Xe[e]||(Je++,Xe[e]={})},tt=function(){for(var e in Xe)Xe.hasOwnProperty(e)&&Qe(e)},nt=function(e,t,n,i,o,a,r){var s,l=Ae();et(e);var c=function(){if(Xe[e]){if(s=Ae()-l,s>=i)return Qe(e),a(n),void(r&&r());a((n-t)*o(s/i)+t),Xe[e].raf=M(c)}};c()},it={shout:Ee,listen:Te,viewportSize:fe,options:l,isMainScrollAnimating:function(){return oe},getZoomLevel:function(){return w},getCurrentIndex:function(){return m},isDragging:function(){return G},isZooming:function(){return Q},setScrollOffset:function(e,t){ve.x=e,z=ve.y=t,Ee("updateScrollOffset",ve)},applyZoomPan:function(e,t,n,i){he.x=t,he.y=n,w=e,Oe(i)},init:function(){if(!c&&!u){var n;a.framework=o,a.template=e,a.bg=o.getChildByClass(e,"pswp__bg"),P=e.className,c=!0,j=o.detectFeatures(),M=j.raf,F=j.caf,R=j.transform,N=j.oldIE,a.scrollWrap=o.getChildByClass(e,"pswp__scroll-wrap"),a.container=o.getChildByClass(a.scrollWrap,"pswp__container"),p=a.container.style,a.itemHolders=S=[{el:a.container.children[0],wrap:0,index:-1},{el:a.container.children[1],wrap:0,index:-1},{el:a.container.children[2],wrap:0,index:-1}],S[0].el.style.display=S[2].el.style.display="none",We(),v={resize:a.updateSize,scroll:qe,keydown:Ye,click:Ve};var i=j.isOldIOSPhone||j.isOldAndroid||j.isMobileOpera;for(j.animationName&&j.transform&&!i||(l.showAnimationDuration=l.hideAnimationDuration=0),n=0;n<xe.length;n++)a["init"+xe[n]]();if(t){var r=a.ui=new t(a,o);r.init()}Ee("firstUpdate"),m=m||l.index||0,(isNaN(m)||0>m||m>=Qt())&&(m=0),a.currItem=Jt(m),(j.isOldIOSPhone||j.isOldAndroid)&&(be=!1),e.setAttribute("aria-hidden","false"),l.modal&&(be?e.style.position="fixed":(e.style.position="absolute",e.style.top=o.getScrollY()+"px")),void 0===z&&(Ee("initialLayout"),z=L=o.getScrollY());var d="pswp--open ";for(l.mainClass&&(d+=l.mainClass+" "),l.showHideOpacity&&(d+="pswp--animate_opacity "),d+=O?"pswp--touch":"pswp--notouch",d+=j.animationName?" pswp--css_animation":"",
d+=j.svg?" pswp--svg":"",o.addClass(e,d),a.updateSize(),h=-1,ye=null,n=0;s>n;n++)Fe((n+h)*we.x,S[n].el.style);N||o.bind(a.scrollWrap,g,a),Te("initialZoomInEnd",function(){a.setContent(S[0],m-1),a.setContent(S[2],m+1),S[0].el.style.display=S[2].el.style.display="block",l.focus&&e.focus(),Ue()}),a.setContent(S[1],m),a.updateCurrItem(),Ee("afterInit"),be||(_=setInterval(function(){Je||G||Q||w!==a.currItem.initialZoomLevel||a.updateSize()},1e3)),o.addClass(e,"pswp--visible")}},close:function(){c&&(c=!1,u=!0,Ee("close"),He(),tn(a.currItem,null,!0,a.destroy))},destroy:function(){Ee("destroy"),Yt&&clearTimeout(Yt),e.setAttribute("aria-hidden","true"),e.className=P,_&&clearInterval(_),o.unbind(a.scrollWrap,g,a),o.unbind(window,"scroll",a),St(),tt(),ke=null},panTo:function(e,t,n){n||(e>ne.min.x?e=ne.min.x:e<ne.max.x&&(e=ne.max.x),t>ne.min.y?t=ne.min.y:t<ne.max.y&&(t=ne.max.y)),he.x=e,he.y=t,Oe()},handleEvent:function(e){e=e||window.event,v[e.type]&&v[e.type](e)},goTo:function(e){e=Ie(e);var t=e-m;ye=t,m=e,a.currItem=Jt(m),ge-=t,Pe(we.x*ge),tt(),oe=!1,a.updateCurrItem()},next:function(){a.goTo(m+1)},prev:function(){a.goTo(m-1)},updateCurrZoomItem:function(e){if(e&&Ee("beforeChange",0),S[1].el.children.length){var t=S[1].el.children[0];ie=o.hasClass(t,"pswp__zoom-wrap")?t.style:null}else ie=null;ne=a.currItem.bounds,y=w=a.currItem.initialZoomLevel,he.x=ne.center.x,he.y=ne.center.y,e&&Ee("afterChange")},invalidateCurrItems:function(){C=!0;for(var e=0;s>e;e++)S[e].item&&(S[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==ye){var t,n=Math.abs(ye);if(!(e&&2>n)){a.currItem=Jt(m),Ce=!1,Ee("beforeChange",ye),n>=s&&(h+=ye+(ye>0?-s:s),n=s);for(var i=0;n>i;i++)ye>0?(t=S.shift(),S[s-1]=t,h++,Fe((h+2)*we.x,t.el.style),a.setContent(t,m-n+i+1+1)):(t=S.pop(),S.unshift(t),h--,Fe(h*we.x,t.el.style),a.setContent(t,m+n-i-1-1));if(ie&&1===Math.abs(ye)){var o=Jt(I);o.initialZoomLevel!==w&&(ln(o,fe),mn(o),Me(o))}ye=0,a.updateCurrZoomItem(),I=m,Ee("afterChange")}}},updateSize:function(t){if(!be&&l.modal){var n=o.getScrollY();if(z!==n&&(e.style.top=n+"px",z=n),!t&&_e.x===window.innerWidth&&_e.y===window.innerHeight)return;_e.x=window.innerWidth,_e.y=window.innerHeight,e.style.height=_e.y+"px"}if(fe.x=a.scrollWrap.clientWidth,fe.y=a.scrollWrap.clientHeight,qe(),we.x=fe.x+Math.round(fe.x*l.spacing),we.y=fe.y,Pe(we.x*ge),Ee("beforeResize"),void 0!==h){for(var i,r,c,u=0;s>u;u++)i=S[u],Fe((u+h)*we.x,i.el.style),c=m+u-1,l.loop&&Qt()>2&&(c=Ie(c)),r=Jt(c),r&&(C||r.needsUpdate||!r.bounds)?(a.cleanSlide(r),a.setContent(i,c),1===u&&(a.currItem=r,a.updateCurrZoomItem(!0)),r.needsUpdate=!1):-1===i.index&&c>=0&&a.setContent(i,c),r&&r.container&&(ln(r,fe),mn(r),Me(r));C=!1}y=w=a.currItem.initialZoomLevel,ne=a.currItem.bounds,ne&&(he.x=ne.center.x,he.y=ne.center.y,Oe(!0)),Ee("resize")},zoomTo:function(e,t,n,i,a){t&&(y=w,yt.x=Math.abs(t.x)-he.x,yt.y=Math.abs(t.y)-he.y,Ne(pe,he));var r=Be(e,!1),s={};Ge("x",r,s,e),Ge("y",r,s,e);var l=w,c={x:he.x,y:he.y};ze(s);var u=function(t){1===t?(w=e,he.x=s.x,he.y=s.y):(w=(e-l)*t+l,he.x=(s.x-c.x)*t+c.x,he.y=(s.y-c.y)*t+c.y),a&&a(t),Oe(1===t)};n?nt("customZoomTo",0,1,n,i||o.easing.sine.inOut,u):u(1)}},ot=30,at=10,rt={},st={},lt={},ct={},ut={},dt=[],mt={},pt=[],ht={},ft=0,gt=de(),vt=0,wt=de(),yt=de(),bt=de(),xt=function(e,t){return e.x===t.x&&e.y===t.y},_t=function(e,t){return Math.abs(e.x-t.x)<r&&Math.abs(e.y-t.y)<r},Ct=function(e,t){return ht.x=Math.abs(e.x-t.x),ht.y=Math.abs(e.y-t.y),Math.sqrt(ht.x*ht.x+ht.y*ht.y)},St=function(){q&&(F(q),q=null)},It=function(){G&&(q=M(It),Ut())},kt=function(){return!("fit"===l.scaleMode&&w===a.currItem.initialZoomLevel)},Tt=function(e,t){return!(!e||e===document)&&(!(e.getAttribute("class")&&e.getAttribute("class").indexOf("pswp__scroll-wrap")>-1)&&(t(e)?e:Tt(e.parentNode,t)))},Et={},At=function(e,t){return Et.prevent=!Tt(e.target,l.isClickableElement),Ee("preventDragEvent",e,t,Et),Et.prevent},Rt=function(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t},Dt=function(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)},Ot=function(e,t,n){if(e-U>50){var i=pt.length>2?pt.shift():{};i.x=t,i.y=n,pt.push(i),U=e}},Mt=function(){var e=he.y-a.currItem.initialPosition.y;return 1-Math.abs(e/(fe.y/2))},Ft={},Pt={},Lt=[],Nt=function(e){for(;Lt.length>0;)Lt.pop();return D?(ue=0,dt.forEach(function(e){0===ue?Lt[0]=e:1===ue&&(Lt[1]=e),ue++})):e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&(Lt[0]=Rt(e.touches[0],Ft),e.touches.length>1&&(Lt[1]=Rt(e.touches[1],Pt))):(Ft.x=e.pageX,Ft.y=e.pageY,Ft.id="",Lt[0]=Ft),Lt},zt=function(e,t){var n,i,o,r,s=0,c=he[e]+t[e],u=t[e]>0,d=wt.x+t.x,m=wt.x-mt.x;return n=c>ne.min[e]||c<ne.max[e]?l.panEndFriction:1,c=he[e]+t[e]*n,!l.allowPanToNext&&w!==a.currItem.initialZoomLevel||(ie?"h"!==ae||"x"!==e||Y||(u?(c>ne.min[e]&&(n=l.panEndFriction,s=ne.min[e]-c,i=ne.min[e]-pe[e]),(0>=i||0>m)&&Qt()>1?(r=d,0>m&&d>mt.x&&(r=mt.x)):ne.min.x!==ne.max.x&&(o=c)):(c<ne.max[e]&&(n=l.panEndFriction,s=c-ne.max[e],i=pe[e]-ne.max[e]),(0>=i||m>0)&&Qt()>1?(r=d,m>0&&d<mt.x&&(r=mt.x)):ne.min.x!==ne.max.x&&(o=c))):r=d,"x"!==e)?void(oe||X||w>a.currItem.fitRatio&&(he[e]+=t[e]*n)):(void 0!==r&&(Pe(r,!0),X=r!==mt.x),ne.min.x!==ne.max.x&&(void 0!==o?he.x=o:X||(he.x+=t.x*n)),void 0!==r)},jt=function(e){if(!("mousedown"===e.type&&e.button>0)){if(Xt)return void e.preventDefault();if(!K||"mousedown"!==e.type){if(At(e,!0)&&e.preventDefault(),Ee("pointerDown"),D){var t=o.arraySearch(dt,e.pointerId,"id");0>t&&(t=dt.length),dt[t]={x:e.pageX,y:e.pageY,id:e.pointerId}}var n=Nt(e),i=n.length;J=null,tt(),G&&1!==i||(G=re=!0,o.bind(window,f,a),B=ce=se=$=X=V=W=Y=!1,ae=null,Ee("firstTouchStart",n),Ne(pe,he),me.x=me.y=0,Ne(ct,n[0]),Ne(ut,ct),mt.x=we.x*ge,pt=[{x:ct.x,y:ct.y}],U=Z=Ae(),Be(w,!0),St(),It()),!Q&&i>1&&!oe&&!X&&(y=w,Y=!1,Q=W=!0,me.y=me.x=0,Ne(pe,he),Ne(rt,n[0]),Ne(st,n[1]),Dt(rt,st,bt),yt.x=Math.abs(bt.x)-he.x,yt.y=Math.abs(bt.y)-he.y,ee=te=Ct(rt,st))}}},Zt=function(e){if(e.preventDefault(),D){var t=o.arraySearch(dt,e.pointerId,"id");if(t>-1){var n=dt[t];n.x=e.pageX,n.y=e.pageY}}if(G){var i=Nt(e);if(ae||V||Q)J=i;else if(wt.x!==we.x*ge)ae="h";else{var a=Math.abs(i[0].x-ct.x)-Math.abs(i[0].y-ct.y);Math.abs(a)>=at&&(ae=a>0?"h":"v",J=i)}}},Ut=function(){if(J){var e=J.length;if(0!==e)if(Ne(rt,J[0]),lt.x=rt.x-ct.x,lt.y=rt.y-ct.y,Q&&e>1){if(ct.x=rt.x,ct.y=rt.y,!lt.x&&!lt.y&&xt(J[1],st))return;Ne(st,J[1]),Y||(Y=!0,Ee("zoomGestureStarted"));var t=Ct(rt,st),n=Gt(t);n>a.currItem.initialZoomLevel+a.currItem.initialZoomLevel/15&&(ce=!0);var i=1,o=$e(),r=Ke();if(o>n)if(l.pinchToClose&&!ce&&y<=a.currItem.initialZoomLevel){var s=o-n,c=1-s/(o/1.2);Re(c),Ee("onPinchClose",c),se=!0}else i=(o-n)/o,i>1&&(i=1),n=o-i*(o/3);else n>r&&(i=(n-r)/(6*o),i>1&&(i=1),n=r+i*o);0>i&&(i=0),ee=t,Dt(rt,st,gt),me.x+=gt.x-bt.x,me.y+=gt.y-bt.y,Ne(bt,gt),he.x=Le("x",n),he.y=Le("y",n),B=n>w,w=n,Oe()}else{if(!ae)return;if(re&&(re=!1,Math.abs(lt.x)>=at&&(lt.x-=J[0].x-ut.x),Math.abs(lt.y)>=at&&(lt.y-=J[0].y-ut.y)),ct.x=rt.x,ct.y=rt.y,0===lt.x&&0===lt.y)return;if("v"===ae&&l.closeOnVerticalDrag&&!kt()){me.y+=lt.y,he.y+=lt.y;var u=Mt();return $=!0,Ee("onVerticalDrag",u),Re(u),void Oe()}Ot(Ae(),rt.x,rt.y),V=!0,ne=a.currItem.bounds;var d=zt("x",lt);d||(zt("y",lt),ze(he),Oe())}}},Ht=function(e){if(j.isOldAndroid){if(K&&"mouseup"===e.type)return;e.type.indexOf("touch")>-1&&(clearTimeout(K),K=setTimeout(function(){K=0},600))}Ee("pointerUp"),At(e,!1)&&e.preventDefault();var t;if(D){var n=o.arraySearch(dt,e.pointerId,"id");if(n>-1)if(t=dt.splice(n,1)[0],navigator.pointerEnabled)t.type=e.pointerType||"mouse";else{var i={4:"mouse",2:"touch",3:"pen"};t.type=i[e.pointerType],t.type||(t.type=e.pointerType||"mouse")}}var r,s=Nt(e),c=s.length;if("mouseup"===e.type&&(c=0),2===c)return J=null,!0;1===c&&Ne(ut,s[0]),0!==c||ae||oe||(t||("mouseup"===e.type?t={x:e.pageX,y:e.pageY,type:"mouse"}:e.changedTouches&&e.changedTouches[0]&&(t={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"})),Ee("touchRelease",e,t));var u=-1;if(0===c&&(G=!1,o.unbind(window,f,a),St(),Q?u=0:-1!==vt&&(u=Ae()-vt)),vt=1===c?Ae():-1,r=-1!==u&&150>u?"zoom":"swipe",Q&&2>c&&(Q=!1,1===c&&(r="zoomPointerUp"),Ee("zoomGestureEnded")),J=null,V||Y||oe||$)if(tt(),H||(H=Bt()),H.calculateSwipeSpeed("x"),$){var d=Mt();if(d<l.verticalDragRange)a.close();else{var m=he.y,p=le;nt("verticalDrag",0,1,300,o.easing.cubic.out,function(e){he.y=(a.currItem.initialPosition.y-m)*e+m,Re((1-p)*e+p),Oe()}),Ee("onVerticalDrag",1)}}else{if((X||oe)&&0===c){var h=Kt(r,H);if(h)return;r="zoomPointerUp"}if(!oe)return"swipe"!==r?void Wt():void(!X&&w>a.currItem.fitRatio&&$t(H))}},Bt=function(){var e,t,n={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(i){pt.length>1?(e=Ae()-U+50,t=pt[pt.length-2][i]):(e=Ae()-Z,t=ut[i]),n.lastFlickOffset[i]=ct[i]-t,n.lastFlickDist[i]=Math.abs(n.lastFlickOffset[i]),n.lastFlickDist[i]>20?n.lastFlickSpeed[i]=n.lastFlickOffset[i]/e:n.lastFlickSpeed[i]=0,Math.abs(n.lastFlickSpeed[i])<.1&&(n.lastFlickSpeed[i]=0),n.slowDownRatio[i]=.95,n.slowDownRatioReverse[i]=1-n.slowDownRatio[i],n.speedDecelerationRatio[i]=1},calculateOverBoundsAnimOffset:function(e,t){n.backAnimStarted[e]||(he[e]>ne.min[e]?n.backAnimDestination[e]=ne.min[e]:he[e]<ne.max[e]&&(n.backAnimDestination[e]=ne.max[e]),void 0!==n.backAnimDestination[e]&&(n.slowDownRatio[e]=.7,n.slowDownRatioReverse[e]=1-n.slowDownRatio[e],n.speedDecelerationRatioAbs[e]<.05&&(n.lastFlickSpeed[e]=0,n.backAnimStarted[e]=!0,nt("bounceZoomPan"+e,he[e],n.backAnimDestination[e],t||300,o.easing.sine.out,function(t){he[e]=t,Oe()}))))},calculateAnimOffset:function(e){n.backAnimStarted[e]||(n.speedDecelerationRatio[e]=n.speedDecelerationRatio[e]*(n.slowDownRatio[e]+n.slowDownRatioReverse[e]-n.slowDownRatioReverse[e]*n.timeDiff/10),n.speedDecelerationRatioAbs[e]=Math.abs(n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]),n.distanceOffset[e]=n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]*n.timeDiff,he[e]+=n.distanceOffset[e])},panAnimLoop:function(){return Xe.zoomPan&&(Xe.zoomPan.raf=M(n.panAnimLoop),n.now=Ae(),n.timeDiff=n.now-n.lastNow,n.lastNow=n.now,n.calculateAnimOffset("x"),n.calculateAnimOffset("y"),Oe(),n.calculateOverBoundsAnimOffset("x"),n.calculateOverBoundsAnimOffset("y"),n.speedDecelerationRatioAbs.x<.05&&n.speedDecelerationRatioAbs.y<.05)?(he.x=Math.round(he.x),he.y=Math.round(he.y),Oe(),void Qe("zoomPan")):void 0}};return n},$t=function(e){return e.calculateSwipeSpeed("y"),ne=a.currItem.bounds,e.backAnimDestination={},e.backAnimStarted={},Math.abs(e.lastFlickSpeed.x)<=.05&&Math.abs(e.lastFlickSpeed.y)<=.05?(e.speedDecelerationRatioAbs.x=e.speedDecelerationRatioAbs.y=0,e.calculateOverBoundsAnimOffset("x"),e.calculateOverBoundsAnimOffset("y"),!0):(et("zoomPan"),e.lastNow=Ae(),void e.panAnimLoop())},Kt=function(e,t){var n;oe||(ft=m);var i;if("swipe"===e){var r=ct.x-ut.x,s=t.lastFlickDist.x<10;r>ot&&(s||t.lastFlickOffset.x>20)?i=-1:-ot>r&&(s||t.lastFlickOffset.x<-20)&&(i=1)}var c;i&&(m+=i,0>m?(m=l.loop?Qt()-1:0,c=!0):m>=Qt()&&(m=l.loop?0:Qt()-1,c=!0),(!c||l.loop)&&(ye+=i,ge-=i,n=!0));var u,d=we.x*ge,p=Math.abs(d-wt.x);return n||d>wt.x==t.lastFlickSpeed.x>0?(u=Math.abs(t.lastFlickSpeed.x)>0?p/Math.abs(t.lastFlickSpeed.x):333,u=Math.min(u,400),u=Math.max(u,250)):u=333,ft===m&&(n=!1),oe=!0,Ee("mainScrollAnimStart"),nt("mainScroll",wt.x,d,u,o.easing.cubic.out,Pe,function(){tt(),oe=!1,ft=-1,(n||ft!==m)&&a.updateCurrItem(),Ee("mainScrollAnimComplete")}),n&&a.updateCurrItem(!0),n},Gt=function(e){return 1/te*e*y},Wt=function(){var e=w,t=$e(),n=Ke();t>w?e=t:w>n&&(e=n);var i,r=1,s=le;return se&&!B&&!ce&&t>w?(a.close(),!0):(se&&(i=function(e){Re((r-s)*e+s)}),a.zoomTo(e,0,200,o.easing.cubic.out,i),!0)};Se("Gestures",{publicMethods:{initGestures:function(){var e=function(e,t,n,i,o){k=e+t,T=e+n,E=e+i,A=o?e+o:""};D=j.pointerEvent,D&&j.touch&&(j.touch=!1),D?navigator.pointerEnabled?e("pointer","down","move","up","cancel"):e("MSPointer","Down","Move","Up","Cancel"):j.touch?(e("touch","start","move","end","cancel"),O=!0):e("mouse","down","move","up"),f=T+" "+E+" "+A,g=k,D&&!O&&(O=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1),a.likelyTouchDevice=O,v[k]=jt,v[T]=Zt,v[E]=Ht,A&&(v[A]=v[E]),j.touch&&(g+=" mousedown",f+=" mousemove mouseup",v.mousedown=v[k],v.mousemove=v[T],v.mouseup=v[E]),O||(l.allowPanToNext=!1)}}});var Yt,Vt,qt,Xt,Jt,Qt,en,tn=function(t,n,i,r){Yt&&clearTimeout(Yt),Xt=!0,qt=!0;var s;t.initialLayout?(s=t.initialLayout,t.initialLayout=null):s=l.getThumbBoundsFn&&l.getThumbBoundsFn(m);var c=i?l.hideAnimationDuration:l.showAnimationDuration,u=function(){Qe("initialZoom"),i?(a.template.removeAttribute("style"),a.bg.removeAttribute("style")):(Re(1),n&&(n.style.display="block"),o.addClass(e,"pswp--animated-in"),Ee("initialZoom"+(i?"OutEnd":"InEnd"))),r&&r(),Xt=!1};if(!c||!s||void 0===s.x)return Ee("initialZoom"+(i?"Out":"In")),w=t.initialZoomLevel,Ne(he,t.initialPosition),Oe(),e.style.opacity=i?0:1,Re(1),void(c?setTimeout(function(){u()},c):u());var p=function(){var n=d,r=!a.currItem.src||a.currItem.loadError||l.showHideOpacity;t.miniImg&&(t.miniImg.style.webkitBackfaceVisibility="hidden"),i||(w=s.w/t.w,he.x=s.x,he.y=s.y-L,a[r?"template":"bg"].style.opacity=.001,Oe()),et("initialZoom"),i&&!n&&o.removeClass(e,"pswp--animated-in"),r&&(i?o[(n?"remove":"add")+"Class"](e,"pswp--animate_opacity"):setTimeout(function(){o.addClass(e,"pswp--animate_opacity")},30)),Yt=setTimeout(function(){if(Ee("initialZoom"+(i?"Out":"In")),i){var a=s.w/t.w,l={x:he.x,y:he.y},d=w,m=le,p=function(t){1===t?(w=a,he.x=s.x,he.y=s.y-z):(w=(a-d)*t+d,he.x=(s.x-l.x)*t+l.x,he.y=(s.y-z-l.y)*t+l.y),Oe(),r?e.style.opacity=1-t:Re(m-t*m)};n?nt("initialZoom",0,1,c,o.easing.cubic.out,p,u):(p(1),Yt=setTimeout(u,c+20))}else w=t.initialZoomLevel,Ne(he,t.initialPosition),Oe(),Re(1),r?e.style.opacity=1:Re(1),Yt=setTimeout(u,c+20)},i?25:90)};p()},nn={},on=[],an={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Vt.length}},rn=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},sn=function(e,t,n){var i=e.bounds;i.center.x=Math.round((nn.x-t)/2),i.center.y=Math.round((nn.y-n)/2)+e.vGap.top,i.max.x=t>nn.x?Math.round(nn.x-t):i.center.x,i.max.y=n>nn.y?Math.round(nn.y-n)+e.vGap.top:i.center.y,i.min.x=t>nn.x?0:i.center.x,i.min.y=n>nn.y?e.vGap.top:i.center.y},ln=function(e,t,n){if(e.src&&!e.loadError){var i=!n;if(i&&(e.vGap||(e.vGap={top:0,bottom:0}),Ee("parseVerticalMargin",e)),nn.x=t.x,nn.y=t.y-e.vGap.top-e.vGap.bottom,i){var o=nn.x/e.w,a=nn.y/e.h;e.fitRatio=a>o?o:a;var r=l.scaleMode;"orig"===r?n=1:"fit"===r&&(n=e.fitRatio),n>1&&(n=1),e.initialZoomLevel=n,e.bounds||(e.bounds=rn())}if(!n)return;return sn(e,e.w*n,e.h*n),i&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds}return e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=rn(),e.initialPosition=e.bounds.center,e.bounds},cn=function(e,t,n,i,o,r){t.loadError||i&&(t.imageAppended=!0,mn(t,i,t===a.currItem&&Ce),n.appendChild(i),r&&setTimeout(function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)},500))},un=function(e){e.loading=!0,e.loaded=!1;var t=e.img=o.createEl("pswp__img","img"),n=function(){e.loading=!1,e.loaded=!0,e.loadComplete?e.loadComplete(e):e.img=null,t.onload=t.onerror=null,t=null};return t.onload=n,t.onerror=function(){e.loadError=!0,n()},t.src=e.src,t},dn=function(e,t){return e.src&&e.loadError&&e.container?(t&&(e.container.innerHTML=""),e.container.innerHTML=l.errorMsg.replace("%url%",e.src),!0):void 0},mn=function(e,t,n){if(e.src){t||(t=e.container.lastChild);var i=n?e.w:Math.round(e.w*e.fitRatio),o=n?e.h:Math.round(e.h*e.fitRatio);e.placeholder&&!e.loaded&&(e.placeholder.style.width=i+"px",e.placeholder.style.height=o+"px"),t.style.width=i+"px",t.style.height=o+"px"}},pn=function(){if(on.length){for(var e,t=0;t<on.length;t++)e=on[t],e.holder.index===e.index&&cn(e.index,e.item,e.baseDiv,e.img,!1,e.clearPlaceholder);on=[]}};Se("Controller",{publicMethods:{lazyLoadItem:function(e){e=Ie(e);var t=Jt(e);t&&(!t.loaded&&!t.loading||C)&&(Ee("gettingData",e,t),t.src&&un(t))},initController:function(){o.extend(l,an,!0),a.items=Vt=n,Jt=a.getItemAt,Qt=l.getNumItemsFn,en=l.loop,Qt()<3&&(l.loop=!1),Te("beforeChange",function(e){var t,n=l.preload,i=null===e||e>=0,o=Math.min(n[0],Qt()),r=Math.min(n[1],Qt());for(t=1;(i?r:o)>=t;t++)a.lazyLoadItem(m+t);for(t=1;(i?o:r)>=t;t++)a.lazyLoadItem(m-t)}),Te("initialLayout",function(){a.currItem.initialLayout=l.getThumbBoundsFn&&l.getThumbBoundsFn(m)}),Te("mainScrollAnimComplete",pn),Te("initialZoomInEnd",pn),Te("destroy",function(){for(var e,t=0;t<Vt.length;t++)e=Vt[t],e.container&&(e.container=null),e.placeholder&&(e.placeholder=null),e.img&&(e.img=null),e.preloader&&(e.preloader=null),e.loadError&&(e.loaded=e.loadError=!1);on=null})},getItemAt:function(e){return e>=0&&void 0!==Vt[e]&&Vt[e]},allowProgressiveImg:function(){return l.forceProgressiveLoading||!O||l.mouseUsed||screen.width>1200},setContent:function(e,t){l.loop&&(t=Ie(t));var n=a.getItemAt(e.index);n&&(n.container=null);var i,r=a.getItemAt(t);if(!r)return void(e.el.innerHTML="");Ee("gettingData",t,r),e.index=t,e.item=r;var s=r.container=o.createEl("pswp__zoom-wrap");if(!r.src&&r.html&&(r.html.tagName?s.appendChild(r.html):s.innerHTML=r.html),dn(r),ln(r,fe),!r.src||r.loadError||r.loaded)r.src&&!r.loadError&&(i=o.createEl("pswp__img","img"),i.style.opacity=1,i.src=r.src,mn(r,i),cn(t,r,s,i,!0));else{if(r.loadComplete=function(n){if(c){if(e&&e.index===t){if(dn(n,!0))return n.loadComplete=n.img=null,ln(n,fe),Me(n),void(e.index===m&&a.updateCurrZoomItem());n.imageAppended?!Xt&&n.placeholder&&(n.placeholder.style.display="none",n.placeholder=null):j.transform&&(oe||Xt)?on.push({item:n,baseDiv:s,img:n.img,index:t,holder:e,clearPlaceholder:!0}):cn(t,n,s,n.img,oe||Xt,!0)}n.loadComplete=null,n.img=null,Ee("imageLoadComplete",t,n)}},o.features.transform){var u="pswp__img pswp__img--placeholder";u+=r.msrc?"":" pswp__img--placeholder--blank";var d=o.createEl(u,r.msrc?"img":"");r.msrc&&(d.src=r.msrc),mn(r,d),s.appendChild(d),r.placeholder=d}r.loading||un(r),a.allowProgressiveImg()&&(!qt&&j.transform?on.push({item:r,baseDiv:s,img:r.img,index:t,holder:e}):cn(t,r,s,r.img,!0,!0))}qt||t!==m?Me(r):(ie=s.style,tn(r,i||r.img)),e.el.innerHTML="",e.el.appendChild(s)},cleanSlide:function(e){e.img&&(e.img.onload=e.img.onerror=null),e.loaded=e.loading=e.img=e.imageAppended=!1}}});var hn,fn={},gn=function(e,t,n){var i=document.createEvent("CustomEvent"),o={origEvent:e,target:e.target,releasePoint:t,pointerType:n||"touch"};i.initCustomEvent("pswpTap",!0,!0,o),e.target.dispatchEvent(i)};Se("Tap",{publicMethods:{initTap:function(){Te("firstTouchStart",a.onTapStart),Te("touchRelease",a.onTapRelease),Te("destroy",function(){fn={},hn=null})},onTapStart:function(e){e.length>1&&(clearTimeout(hn),hn=null)},onTapRelease:function(e,t){if(t&&!V&&!W&&!Je){var n=t;if(hn&&(clearTimeout(hn),hn=null,_t(n,fn)))return void Ee("doubleTap",n);if("mouse"===t.type)return void gn(e,t,"mouse");var i=e.target.tagName.toUpperCase();if("BUTTON"===i||o.hasClass(e.target,"pswp__single-tap"))return void gn(e,t);Ne(fn,n),hn=setTimeout(function(){gn(e,t),hn=null},300)}}}});var vn;Se("DesktopZoom",{publicMethods:{initDesktopZoom:function(){N||(O?Te("mouseUsed",function(){a.setupDesktopZoom()}):a.setupDesktopZoom(!0))},setupDesktopZoom:function(t){vn={};var n="wheel mousewheel DOMMouseScroll";Te("bindEvents",function(){o.bind(e,n,a.handleMouseWheel)}),Te("unbindEvents",function(){vn&&o.unbind(e,n,a.handleMouseWheel)}),a.mouseZoomedIn=!1;var i,r=function(){a.mouseZoomedIn&&(o.removeClass(e,"pswp--zoomed-in"),a.mouseZoomedIn=!1),1>w?o.addClass(e,"pswp--zoom-allowed"):o.removeClass(e,"pswp--zoom-allowed"),s()},s=function(){i&&(o.removeClass(e,"pswp--dragging"),i=!1)};Te("resize",r),Te("afterChange",r),Te("pointerDown",function(){a.mouseZoomedIn&&(i=!0,o.addClass(e,"pswp--dragging"))}),Te("pointerUp",s),t||r()},handleMouseWheel:function(e){if(w<=a.currItem.fitRatio)return l.modal&&(!l.closeOnScroll||Je||G?e.preventDefault():R&&Math.abs(e.deltaY)>2&&(d=!0,a.close())),!0;if(e.stopPropagation(),vn.x=0,"deltaX"in e)1===e.deltaMode?(vn.x=18*e.deltaX,vn.y=18*e.deltaY):(vn.x=e.deltaX,vn.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(vn.x=-.16*e.wheelDeltaX),e.wheelDeltaY?vn.y=-.16*e.wheelDeltaY:vn.y=-.16*e.wheelDelta;else{if(!("detail"in e))return;vn.y=e.detail}Be(w,!0);var t=he.x-vn.x,n=he.y-vn.y;(l.modal||t<=ne.min.x&&t>=ne.max.x&&n<=ne.min.y&&n>=ne.max.y)&&e.preventDefault(),a.panTo(t,n)},toggleDesktopZoom:function(t){t=t||{x:fe.x/2+ve.x,y:fe.y/2+ve.y};var n=l.getDoubleTapZoom(!0,a.currItem),i=w===n;a.mouseZoomedIn=!i,a.zoomTo(i?a.currItem.initialZoomLevel:n,t,333),o[(i?"remove":"add")+"Class"](e,"pswp--zoomed-in")}}});var wn,yn,bn,xn,_n,Cn,Sn,In,kn,Tn,En,An,Rn={history:!0,galleryUID:1},Dn=function(){return En.hash.substring(1)},On=function(){wn&&clearTimeout(wn),bn&&clearTimeout(bn)},Mn=function(){var e=Dn(),t={};if(e.length<5)return t;var n,i=e.split("&");for(n=0;n<i.length;n++)if(i[n]){var o=i[n].split("=");o.length<2||(t[o[0]]=o[1])}if(l.galleryPIDs){var a=t.pid;for(t.pid=0,n=0;n<Vt.length;n++)if(Vt[n].pid===a){t.pid=n;break}}else t.pid=parseInt(t.pid,10)-1;return t.pid<0&&(t.pid=0),t},Fn=function(){if(bn&&clearTimeout(bn),Je||G)return void(bn=setTimeout(Fn,500));xn?clearTimeout(yn):xn=!0;var e=m+1,t=Jt(m);t.hasOwnProperty("pid")&&(e=t.pid);var n=Sn+"&gid="+l.galleryUID+"&pid="+e;In||-1===En.hash.indexOf(n)&&(Tn=!0);var i=En.href.split("#")[0]+"#"+n;An?"#"+n!==window.location.hash&&history[In?"replaceState":"pushState"]("",document.title,i):In?En.replace(i):En.hash=n,In=!0,yn=setTimeout(function(){xn=!1},60)};Se("History",{publicMethods:{initHistory:function(){if(o.extend(l,Rn,!0),l.history){En=window.location,Tn=!1,kn=!1,In=!1,Sn=Dn(),An="pushState"in history,Sn.indexOf("gid=")>-1&&(Sn=Sn.split("&gid=")[0],Sn=Sn.split("?gid=")[0]),Te("afterChange",a.updateURL),Te("unbindEvents",function(){o.unbind(window,"hashchange",a.onHashChange)});var e=function(){Cn=!0,kn||(Tn?history.back():Sn?En.hash=Sn:An?history.pushState("",document.title,En.pathname+En.search):En.hash=""),On()};Te("unbindEvents",function(){d&&e()}),Te("destroy",function(){Cn||e()}),Te("firstUpdate",function(){m=Mn().pid});var t=Sn.indexOf("pid=");t>-1&&(Sn=Sn.substring(0,t),"&"===Sn.slice(-1)&&(Sn=Sn.slice(0,-1))),setTimeout(function(){c&&o.bind(window,"hashchange",a.onHashChange)},40)}},onHashChange:function(){return Dn()===Sn?(kn=!0,void a.close()):void(xn||(_n=!0,a.goTo(Mn().pid),_n=!1))},updateURL:function(){On(),_n||(In?wn=setTimeout(Fn,800):Fn())}}}),o.extend(a,it)};return e}),!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipeUI_Default=t()}(this,function(){"use strict";var e=function(e,t){var n,i,o,a,r,s,l,c,u,d,m,p,h,f,g,v,w,y,b,x=this,_=!1,C=!0,S=!0,I={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(e,t){return e.title?(t.children[0].innerHTML=e.title,!0):(t.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return e.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return e.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},k=function(e){if(v)return!0;e=e||window.event,g.timeToIdle&&g.mouseUsed&&!u&&L();for(var n,i,o=e.target||e.srcElement,a=o.getAttribute("class")||"",r=0;r<$.length;r++)n=$[r],n.onTap&&a.indexOf("pswp__"+n.name)>-1&&(n.onTap(),i=!0);if(i){e.stopPropagation&&e.stopPropagation(),v=!0;var s=t.features.isOldAndroid?600:30;w=setTimeout(function(){v=!1},s)}},T=function(){return!e.likelyTouchDevice||g.mouseUsed||screen.width>g.fitControlsWidth},E=function(e,n,i){t[(i?"add":"remove")+"Class"](e,"pswp__"+n)},A=function(){var e=1===g.getNumItemsFn();e!==f&&(E(i,"ui--one-slide",e),f=e)},R=function(){E(l,"share-modal--hidden",S)},D=function(){return S=!S,S?(t.removeClass(l,"pswp__share-modal--fade-in"),setTimeout(function(){S&&R()},300)):(R(),setTimeout(function(){S||t.addClass(l,"pswp__share-modal--fade-in")},30)),S||M(),!1},O=function(t){t=t||window.event;var n=t.target||t.srcElement;return e.shout("shareLinkClick",t,n),!!n.href&&(!!n.hasAttribute("download")||(window.open(n.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),S||D(),!1))},M=function(){for(var e,t,n,i,o,a="",r=0;r<g.shareButtons.length;r++)e=g.shareButtons[r],n=g.getImageURLForShare(e),i=g.getPageURLForShare(e),o=g.getTextForShare(e),t=e.url.replace("{{url}}",encodeURIComponent(i)).replace("{{image_url}}",encodeURIComponent(n)).replace("{{raw_image_url}}",n).replace("{{text}}",encodeURIComponent(o)),a+='<a href="'+t+'" target="_blank" class="pswp__share--'+e.id+'"'+(e.download?"download":"")+">"+e.label+"</a>",g.parseShareButtonOut&&(a=g.parseShareButtonOut(e,a));l.children[0].innerHTML=a,l.children[0].onclick=O},F=function(e){for(var n=0;n<g.closeElClasses.length;n++)if(t.hasClass(e,"pswp__"+g.closeElClasses[n]))return!0},P=0,L=function(){clearTimeout(b),P=0,u&&x.setIdle(!1)},N=function(e){e=e?e:window.event;var t=e.relatedTarget||e.toElement;t&&"HTML"!==t.nodeName||(clearTimeout(b),b=setTimeout(function(){x.setIdle(!0)},g.timeToIdleOutside))},z=function(){g.fullscreenEl&&!t.features.isOldAndroid&&(n||(n=x.getFullscreenAPI()),n?(t.bind(document,n.eventK,x.updateFullscreen),x.updateFullscreen(),t.addClass(e.template,"pswp--supports-fs")):t.removeClass(e.template,"pswp--supports-fs"))},j=function(){g.preloaderEl&&(Z(!0),d("beforeChange",function(){clearTimeout(h),h=setTimeout(function(){e.currItem&&e.currItem.loading?(!e.allowProgressiveImg()||e.currItem.img&&!e.currItem.img.naturalWidth)&&Z(!1):Z(!0)},g.loadingIndicatorDelay)}),d("imageLoadComplete",function(t,n){e.currItem===n&&Z(!0)}))},Z=function(e){p!==e&&(E(m,"preloader--active",!e),p=e)},U=function(e){var n=e.vGap;if(T()){var r=g.barsSize;if(g.captionEl&&"auto"===r.bottom)if(a||(a=t.createEl("pswp__caption pswp__caption--fake"),a.appendChild(t.createEl("pswp__caption__center")),i.insertBefore(a,o),t.addClass(i,"pswp__ui--fit")),g.addCaptionHTMLFn(e,a,!0)){var s=a.clientHeight;n.bottom=parseInt(s,10)||44}else n.bottom=r.top;else n.bottom="auto"===r.bottom?0:r.bottom;n.top=r.top}else n.top=n.bottom=0},H=function(){g.timeToIdle&&d("mouseUsed",function(){t.bind(document,"mousemove",L),t.bind(document,"mouseout",N),y=setInterval(function(){P++,2===P&&x.setIdle(!0)},g.timeToIdle/2)})},B=function(){d("onVerticalDrag",function(e){C&&.95>e?x.hideControls():!C&&e>=.95&&x.showControls()});var e;d("onPinchClose",function(t){C&&.9>t?(x.hideControls(),e=!0):e&&!C&&t>.9&&x.showControls()}),d("zoomGestureEnded",function(){e=!1,e&&!C&&x.showControls()})},$=[{name:"caption",option:"captionEl",onInit:function(e){o=e}},{name:"share-modal",option:"shareEl",onInit:function(e){l=e},onTap:function(){D()}},{name:"button--share",option:"shareEl",onInit:function(e){s=e},onTap:function(){D()}},{name:"button--zoom",option:"zoomEl",onTap:e.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(e){r=e}},{name:"button--close",option:"closeEl",onTap:e.close},{name:"button--arrow--left",option:"arrowEl",onTap:e.prev},{name:"button--arrow--right",option:"arrowEl",onTap:e.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){n.isFullscreen()?n.exit():n.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(e){m=e}}],K=function(){var e,n,o,a=function(i){if(i)for(var a=i.length,r=0;a>r;r++){e=i[r],n=e.className;for(var s=0;s<$.length;s++)o=$[s],n.indexOf("pswp__"+o.name)>-1&&(g[o.option]?(t.removeClass(e,"pswp__element--disabled"),o.onInit&&o.onInit(e)):t.addClass(e,"pswp__element--disabled"))}};a(i.children);var r=t.getChildByClass(i,"pswp__top-bar");r&&a(r.children)};x.init=function(){t.extend(e.options,I,!0),g=e.options,i=t.getChildByClass(e.scrollWrap,"pswp__ui"),d=e.listen,B(),d("beforeChange",x.update),d("doubleTap",function(t){var n=e.currItem.initialZoomLevel;e.getZoomLevel()!==n?e.zoomTo(n,t,333):e.zoomTo(g.getDoubleTapZoom(!1,e.currItem),t,333)}),d("preventDragEvent",function(e,t,n){var i=e.target||e.srcElement;i&&i.getAttribute("class")&&e.type.indexOf("mouse")>-1&&(i.getAttribute("class").indexOf("__caption")>0||/(SMALL|STRONG|EM)/i.test(i.tagName))&&(n.prevent=!1)}),d("bindEvents",function(){t.bind(i,"pswpTap click",k),t.bind(e.scrollWrap,"pswpTap",x.onGlobalTap),e.likelyTouchDevice||t.bind(e.scrollWrap,"mouseover",x.onMouseOver)}),d("unbindEvents",function(){S||D(),y&&clearInterval(y),t.unbind(document,"mouseout",N),t.unbind(document,"mousemove",L),t.unbind(i,"pswpTap click",k),t.unbind(e.scrollWrap,"pswpTap",x.onGlobalTap),t.unbind(e.scrollWrap,"mouseover",x.onMouseOver),n&&(t.unbind(document,n.eventK,x.updateFullscreen),n.isFullscreen()&&(g.hideAnimationDuration=0,n.exit()),n=null)}),d("destroy",function(){g.captionEl&&(a&&i.removeChild(a),t.removeClass(o,"pswp__caption--empty")),l&&(l.children[0].onclick=null),t.removeClass(i,"pswp__ui--over-close"),t.addClass(i,"pswp__ui--hidden"),x.setIdle(!1)}),g.showAnimationDuration||t.removeClass(i,"pswp__ui--hidden"),d("initialZoomIn",function(){g.showAnimationDuration&&t.removeClass(i,"pswp__ui--hidden")}),d("initialZoomOut",function(){t.addClass(i,"pswp__ui--hidden")}),d("parseVerticalMargin",U),K(),g.shareEl&&s&&l&&(S=!0),A(),H(),z(),j()},x.setIdle=function(e){u=e,E(i,"ui--idle",e)},x.update=function(){C&&e.currItem?(x.updateIndexIndicator(),g.captionEl&&(g.addCaptionHTMLFn(e.currItem,o),E(o,"caption--empty",!e.currItem.title)),_=!0):_=!1,S||D(),A()},x.updateFullscreen=function(i){i&&setTimeout(function(){e.setScrollOffset(0,t.getScrollY())},50),t[(n.isFullscreen()?"add":"remove")+"Class"](e.template,"pswp--fs")},x.updateIndexIndicator=function(){g.counterEl&&(r.innerHTML=e.getCurrentIndex()+1+g.indexIndicatorSep+g.getNumItemsFn())},x.onGlobalTap=function(n){n=n||window.event;var i=n.target||n.srcElement;if(!v)if(n.detail&&"mouse"===n.detail.pointerType){if(F(i))return void e.close();t.hasClass(i,"pswp__img")&&(1===e.getZoomLevel()&&e.getZoomLevel()<=e.currItem.fitRatio?g.clickToCloseNonZoomable&&e.close():e.toggleDesktopZoom(n.detail.releasePoint))}else if(g.tapToToggleControls&&(C?x.hideControls():x.showControls()),g.tapToClose&&(t.hasClass(i,"pswp__img")||F(i)))return void e.close()},x.onMouseOver=function(e){e=e||window.event;var t=e.target||e.srcElement;E(i,"ui--over-close",F(t))},x.hideControls=function(){t.addClass(i,"pswp__ui--hidden"),C=!1},x.showControls=function(){C=!0,_||x.update(),t.removeClass(i,"pswp__ui--hidden")},x.supportsFullscreen=function(){var e=document;return!!(e.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.msExitFullscreen)},x.getFullscreenAPI=function(){var t,n=document.documentElement,i="fullscreenchange";return n.requestFullscreen?t={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:i}:n.mozRequestFullScreen?t={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+i}:n.webkitRequestFullscreen?t={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",
elementK:"webkitFullscreenElement",eventK:"webkit"+i}:n.msRequestFullscreen&&(t={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),t&&(t.enter=function(){return c=g.closeOnScroll,g.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK?e.template[this.enterK]():void e.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},t.exit=function(){return g.closeOnScroll=c,document[this.exitK]()},t.isFullscreen=function(){return document[this.elementK]}),t}};return e}),!function e(t,n,i){function o(r,s){if(!n[r]){if(!t[r]){var l="function"==typeof require&&require;if(!s&&l)return l(r,!0);if(a)return a(r,!0);var c=new Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[r]={exports:{}};t[r][0].call(u.exports,function(e){var n=t[r][1][e];return o(n?n:e)},u,u.exports,e,t,n,i)}return n[r].exports}for(var a="function"==typeof require&&require,r=0;r<i.length;r++)o(i[r]);return o}({1:[function(e,t,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(e,o){"function"==typeof define&&define.amd?define(o):"object"===("undefined"==typeof n?"undefined":i(n))?t.exports=o():e.PhotoSwipeUI_Default=o()}(void 0,function(){var e=function(e,t){var n,i,o,a,r,s,l,c,u,d,m,p,h,f,g,v,w,y,b,x=this,_=!1,C=!0,S=!0,I={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(e,t){return e.title?(t.children[0].innerHTML=e.title,!0):(t.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return e.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return e.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},k=function(e){if(v)return!0;e=e||window.event,g.timeToIdle&&g.mouseUsed&&!u&&L();for(var n,i,o=e.target||e.srcElement,a=o.getAttribute("class")||"",r=0;r<$.length;r++)n=$[r],n.onTap&&a.indexOf("pswp__"+n.name)>-1&&(n.onTap(),i=!0);if(i){e.stopPropagation&&e.stopPropagation(),v=!0;var s=t.features.isOldAndroid?600:30;w=setTimeout(function(){v=!1},s)}},T=function(){return!e.likelyTouchDevice||g.mouseUsed||screen.width>g.fitControlsWidth},E=function(e,n,i){t[(i?"add":"remove")+"Class"](e,"pswp__"+n)},A=function(){var e=1===g.getNumItemsFn();e!==f&&(E(i,"ui--one-slide",e),f=e)},R=function(){E(l,"share-modal--hidden",S)},D=function(){return S=!S,S?(t.removeClass(l,"pswp__share-modal--fade-in"),setTimeout(function(){S&&R()},300)):(R(),setTimeout(function(){S||t.addClass(l,"pswp__share-modal--fade-in")},30)),S||M(),!1},O=function(t){t=t||window.event;var n=t.target||t.srcElement;return e.shout("shareLinkClick",t,n),!(!n.href||!n.hasAttribute("download")&&(window.open(n.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),S||D(),1))},M=function(){for(var e,t,n,i,o,a="",r=0;r<g.shareButtons.length;r++)e=g.shareButtons[r],n=g.getImageURLForShare(e),i=g.getPageURLForShare(e),o=g.getTextForShare(e),t=e.url.replace("{{url}}",encodeURIComponent(i)).replace("{{image_url}}",encodeURIComponent(n)).replace("{{raw_image_url}}",n).replace("{{text}}",encodeURIComponent(o)),a+='<a href="'+t+'" target="_blank" class="pswp__share--'+e.id+'"'+(e.download?"download":"")+">"+e.label+"</a>",g.parseShareButtonOut&&(a=g.parseShareButtonOut(e,a));l.children[0].innerHTML=a,l.children[0].onclick=O},F=function(e){for(var n=0;n<g.closeElClasses.length;n++)if(t.hasClass(e,"pswp__"+g.closeElClasses[n]))return!0},P=0,L=function(){clearTimeout(b),P=0,u&&x.setIdle(!1)},N=function(e){e=e?e:window.event;var t=e.relatedTarget||e.toElement;t&&"HTML"!==t.nodeName||(clearTimeout(b),b=setTimeout(function(){x.setIdle(!0)},g.timeToIdleOutside))},z=function(){g.fullscreenEl&&!t.features.isOldAndroid&&(n||(n=x.getFullscreenAPI()),n?(t.bind(document,n.eventK,x.updateFullscreen),x.updateFullscreen(),t.addClass(e.template,"pswp--supports-fs")):t.removeClass(e.template,"pswp--supports-fs"))},j=function(){g.preloaderEl&&(Z(!0),d("beforeChange",function(){clearTimeout(h),h=setTimeout(function(){e.currItem&&e.currItem.loading?(!e.allowProgressiveImg()||e.currItem.img&&!e.currItem.img.naturalWidth)&&Z(!1):Z(!0)},g.loadingIndicatorDelay)}),d("imageLoadComplete",function(t,n){e.currItem===n&&Z(!0)}))},Z=function(e){p!==e&&(E(m,"preloader--active",!e),p=e)},U=function(e){var n=e.vGap;if(T()){var r=g.barsSize;if(g.captionEl&&"auto"===r.bottom)if(a||(a=t.createEl("pswp__caption pswp__caption--fake"),a.appendChild(t.createEl("pswp__caption__center")),i.insertBefore(a,o),t.addClass(i,"pswp__ui--fit")),g.addCaptionHTMLFn(e,a,!0)){var s=a.clientHeight;n.bottom=parseInt(s,10)||44}else n.bottom=r.top;else n.bottom="auto"===r.bottom?0:r.bottom;n.top=r.top}else n.top=n.bottom=0},H=function(){g.timeToIdle&&d("mouseUsed",function(){t.bind(document,"mousemove",L),t.bind(document,"mouseout",N),y=setInterval(function(){P++,2===P&&x.setIdle(!0)},g.timeToIdle/2)})},B=function(){d("onVerticalDrag",function(e){C&&e<.95?x.hideControls():!C&&e>=.95&&x.showControls()});var e;d("onPinchClose",function(t){C&&t<.9?(x.hideControls(),e=!0):e&&!C&&t>.9&&x.showControls()}),d("zoomGestureEnded",function(){e=!1,e&&!C&&x.showControls()})},$=[{name:"caption",option:"captionEl",onInit:function(e){o=e}},{name:"share-modal",option:"shareEl",onInit:function(e){l=e},onTap:function(){D()}},{name:"button--share",option:"shareEl",onInit:function(e){s=e},onTap:function(){D()}},{name:"button--zoom",option:"zoomEl",onTap:e.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(e){r=e}},{name:"button--close",option:"closeEl",onTap:e.close},{name:"button--arrow--left",option:"arrowEl",onTap:e.prev},{name:"button--arrow--right",option:"arrowEl",onTap:e.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){n.isFullscreen()?n.exit():n.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(e){m=e}}],K=function(){var e,n,o,a=function(i){if(i)for(var a=i.length,r=0;r<a;r++){e=i[r],n=e.className;for(var s=0;s<$.length;s++)o=$[s],n.indexOf("pswp__"+o.name)>-1&&(g[o.option]?(t.removeClass(e,"pswp__element--disabled"),o.onInit&&o.onInit(e)):t.addClass(e,"pswp__element--disabled"))}};a(i.children);var r=t.getChildByClass(i,"pswp__top-bar");r&&a(r.children)};x.init=function(){t.extend(e.options,I,!0),g=e.options,i=t.getChildByClass(e.scrollWrap,"pswp__ui"),d=e.listen,B(),d("beforeChange",x.update),d("doubleTap",function(t){var n=e.currItem.initialZoomLevel;e.getZoomLevel()!==n?e.zoomTo(n,t,333):e.zoomTo(g.getDoubleTapZoom(!1,e.currItem),t,333)}),d("preventDragEvent",function(e,t,n){var i=e.target||e.srcElement;i&&i.getAttribute("class")&&e.type.indexOf("mouse")>-1&&(i.getAttribute("class").indexOf("__caption")>0||/(SMALL|STRONG|EM)/i.test(i.tagName))&&(n.prevent=!1)}),d("bindEvents",function(){t.bind(i,"pswpTap click",k),t.bind(e.scrollWrap,"pswpTap",x.onGlobalTap),e.likelyTouchDevice||t.bind(e.scrollWrap,"mouseover",x.onMouseOver)}),d("unbindEvents",function(){S||D(),y&&clearInterval(y),t.unbind(document,"mouseout",N),t.unbind(document,"mousemove",L),t.unbind(i,"pswpTap click",k),t.unbind(e.scrollWrap,"pswpTap",x.onGlobalTap),t.unbind(e.scrollWrap,"mouseover",x.onMouseOver),n&&(t.unbind(document,n.eventK,x.updateFullscreen),n.isFullscreen()&&(g.hideAnimationDuration=0,n.exit()),n=null)}),d("destroy",function(){g.captionEl&&(a&&i.removeChild(a),t.removeClass(o,"pswp__caption--empty")),l&&(l.children[0].onclick=null),t.removeClass(i,"pswp__ui--over-close"),t.addClass(i,"pswp__ui--hidden"),x.setIdle(!1)}),g.showAnimationDuration||t.removeClass(i,"pswp__ui--hidden"),d("initialZoomIn",function(){g.showAnimationDuration&&t.removeClass(i,"pswp__ui--hidden")}),d("initialZoomOut",function(){t.addClass(i,"pswp__ui--hidden")}),d("parseVerticalMargin",U),K(),g.shareEl&&s&&l&&(S=!0),A(),H(),z(),j()},x.setIdle=function(e){u=e,E(i,"ui--idle",e)},x.update=function(){C&&e.currItem?(x.updateIndexIndicator(),g.captionEl&&(g.addCaptionHTMLFn(e.currItem,o),E(o,"caption--empty",!e.currItem.title)),_=!0):_=!1,S||D(),A()},x.updateFullscreen=function(i){i&&setTimeout(function(){e.setScrollOffset(0,t.getScrollY())},50),t[(n.isFullscreen()?"add":"remove")+"Class"](e.template,"pswp--fs")},x.updateIndexIndicator=function(){g.counterEl&&(r.innerHTML=e.getCurrentIndex()+1+g.indexIndicatorSep+g.getNumItemsFn())},x.onGlobalTap=function(n){n=n||window.event;var i=n.target||n.srcElement;if(!v)if(n.detail&&"mouse"===n.detail.pointerType){if(F(i))return void e.close();t.hasClass(i,"pswp__img")&&(1===e.getZoomLevel()&&e.getZoomLevel()<=e.currItem.fitRatio?g.clickToCloseNonZoomable&&e.close():e.toggleDesktopZoom(n.detail.releasePoint))}else if(g.tapToToggleControls&&(C?x.hideControls():x.showControls()),g.tapToClose&&(t.hasClass(i,"pswp__img")||F(i)))return void e.close()},x.onMouseOver=function(e){e=e||window.event;var t=e.target||e.srcElement;E(i,"ui--over-close",F(t))},x.hideControls=function(){t.addClass(i,"pswp__ui--hidden"),C=!1},x.showControls=function(){C=!0,_||x.update(),t.removeClass(i,"pswp__ui--hidden")},x.supportsFullscreen=function(){var e=document;return!!(e.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.msExitFullscreen)},x.getFullscreenAPI=function(){var t,n=document.documentElement,i="fullscreenchange";return n.requestFullscreen?t={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:i}:n.mozRequestFullScreen?t={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+i}:n.webkitRequestFullscreen?t={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+i}:n.msRequestFullscreen&&(t={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),t&&(t.enter=function(){return c=g.closeOnScroll,g.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK?e.template[this.enterK]():void e.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},t.exit=function(){return g.closeOnScroll=c,document[this.exitK]()},t.isFullscreen=function(){return document[this.elementK]}),t}};return e})},{}],2:[function(e,t,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(e,o){"function"==typeof define&&define.amd?define(o):"object"===("undefined"==typeof n?"undefined":i(n))?t.exports=o():e.PhotoSwipe=o()}(void 0,function(){var e=function(e,t,n,o){var a={features:null,bind:function(e,t,n,i){var o=(i?"remove":"add")+"EventListener";t=t.split(" ");for(var a=0;a<t.length;a++)t[a]&&e[o](t[a],n,!1)},isArray:function(e){return e instanceof Array},createEl:function(e,t){var n=document.createElement(t||"div");return e&&(n.className=e),n},getScrollY:function(){var e=window.pageYOffset;return void 0!==e?e:document.documentElement.scrollTop},unbind:function(e,t,n){a.bind(e,t,n,!0)},removeClass:function(e,t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,t){a.hasClass(e,t)||(e.className+=(e.className?" ":"")+t)},hasClass:function(e,t){return e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},getChildByClass:function(e,t){for(var n=e.firstChild;n;){if(a.hasClass(n,t))return n;n=n.nextSibling}},arraySearch:function(e,t,n){for(var i=e.length;i--;)if(e[i][n]===t)return i;return-1},extend:function(e,t,n){for(var i in t)if(t.hasOwnProperty(i)){if(n&&e.hasOwnProperty(i))continue;e[i]=t[i]}},easing:{sine:{out:function(e){return Math.sin(e*(Math.PI/2))},inOut:function(e){return-(Math.cos(Math.PI*e)-1)/2}},cubic:{out:function(e){return--e*e*e+1}}},detectFeatures:function(){if(a.features)return a.features;var e=a.createEl(),t=e.style,n="",i={};if(i.oldIE=document.all&&!document.addEventListener,i.touch="ontouchstart"in window,window.requestAnimationFrame&&(i.raf=window.requestAnimationFrame,i.caf=window.cancelAnimationFrame),i.pointerEvent=navigator.pointerEnabled||navigator.msPointerEnabled,!i.pointerEvent){var o=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var r=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);r&&r.length>0&&(r=parseInt(r[1],10),r>=1&&r<8&&(i.isOldIOSPhone=!0))}var s=o.match(/Android\s([0-9\.]*)/),l=s?s[1]:0;l=parseFloat(l),l>=1&&(l<4.4&&(i.isOldAndroid=!0),i.androidVersion=l),i.isMobileOpera=/opera mini|opera mobi/i.test(o)}for(var c,u,d=["transform","perspective","animationName"],m=["","webkit","Moz","ms","O"],p=0;p<4;p++){n=m[p];for(var h=0;h<3;h++)c=d[h],u=n+(n?c.charAt(0).toUpperCase()+c.slice(1):c),!i[c]&&u in t&&(i[c]=u);n&&!i.raf&&(n=n.toLowerCase(),i.raf=window[n+"RequestAnimationFrame"],i.raf&&(i.caf=window[n+"CancelAnimationFrame"]||window[n+"CancelRequestAnimationFrame"]))}if(!i.raf){var f=0;i.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-f)),i=window.setTimeout(function(){e(t+n)},n);return f=t+n,i},i.caf=function(e){clearTimeout(e)}}return i.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,a.features=i,i}};a.detectFeatures(),a.features.oldIE&&(a.bind=function(e,t,n,o){t=t.split(" ");for(var a,r=(o?"detach":"attach")+"Event",s=function(){n.handleEvent.call(n)},l=0;l<t.length;l++)if(a=t[l])if("object"===("undefined"==typeof n?"undefined":i(n))&&n.handleEvent){if(o){if(!n["oldIE"+a])return!1}else n["oldIE"+a]=s;e[r]("on"+a,n["oldIE"+a])}else e[r]("on"+a,n)});var r=this,s=25,l=3,c={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(e){return"A"===e.tagName},getDoubleTapZoom:function(e,t){return e?1:t.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};a.extend(c,o);var u,d,m,p,h,f,g,v,w,y,b,x,_,C,S,I,k,T,E,A,R,D,O,M,F,P,L,N,z,j,Z,U,H,B,$,K,G,W,Y,V,q,X,J,Q,ee,te,ne,ie,oe,ae,re,se,le,ce,ue,de,me=function(){return{x:0,y:0}},pe=me(),he=me(),fe=me(),ge={},ve=0,we={},ye=me(),be=0,xe=!0,_e=[],Ce={},Se=!1,Ie=function(e,t){a.extend(r,t.publicMethods),_e.push(e)},ke=function(e){var t=en();return e>t-1?e-t:e<0?t+e:e},Te={},Ee=function(e,t){return Te[e]||(Te[e]=[]),Te[e].push(t)},Ae=function(e){var t=Te[e];if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var i=0;i<t.length;i++)t[i].apply(r,n)}},Re=function(){return(new Date).getTime()},De=function(e){ce=e,r.bg.style.opacity=e*c.bgOpacity},Oe=function(e,t,n,i,o){(!Se||o&&o!==r.currItem)&&(i/=o?o.fitRatio:r.currItem.fitRatio),e[D]=x+t+"px, "+n+"px"+_+" scale("+i+")"},Me=function(e){oe&&(e&&(y>r.currItem.fitRatio?Se||(pn(r.currItem,!1,!0),Se=!0):Se&&(pn(r.currItem),Se=!1)),Oe(oe,fe.x,fe.y,y))},Fe=function(e){e.container&&Oe(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},Pe=function(e,t){t[D]=x+e+"px, 0px"+_},Le=function(e,t){if(!c.loop&&t){var n=p+(ye.x*ve-e)/ye.x,i=Math.round(e-yt.x);(n<0&&i>0||n>=en()-1&&i<0)&&(e=yt.x+i*c.mainScrollEndFriction)}yt.x=e,Pe(e,h)},Ne=function(e,t){var n=bt[e]-we[e];return he[e]+pe[e]+n-n*(t/b)},ze=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},je=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},Ze=null,Ue=function Ln(){Ze&&(a.unbind(document,"mousemove",Ln),a.addClass(e,"pswp--has_mouse"),c.mouseUsed=!0,Ae("mouseUsed")),Ze=setTimeout(function(){Ze=null},100)},He=function(){a.bind(document,"keydown",r),Z.transform&&a.bind(r.scrollWrap,"click",r),c.mouseUsed||a.bind(document,"mousemove",Ue),a.bind(window,"resize scroll",r),Ae("bindEvents")},Be=function(){a.unbind(window,"resize",r),a.unbind(window,"scroll",w.scroll),a.unbind(document,"keydown",r),a.unbind(document,"mousemove",Ue),Z.transform&&a.unbind(r.scrollWrap,"click",r),W&&a.unbind(window,g,r),Ae("unbindEvents")},$e=function(e,t){var n=cn(r.currItem,ge,e);return t&&(ie=n),n},Ke=function(e){return e||(e=r.currItem),e.initialZoomLevel},Ge=function(e){return e||(e=r.currItem),e.w>0?c.maxSpreadZoom:1},We=function(e,t,n,i){return i===r.currItem.initialZoomLevel?(n[e]=r.currItem.initialPosition[e],!0):(n[e]=Ne(e,i),n[e]>t.min[e]?(n[e]=t.min[e],!0):n[e]<t.max[e]&&(n[e]=t.max[e],!0))},Ye=function(){if(D){var t=Z.perspective&&!M;return x="translate"+(t?"3d(":"("),void(_=Z.perspective?", 0px)":")")}D="left",a.addClass(e,"pswp--ie"),Pe=function(e,t){t.left=e+"px"},Fe=function(e){var t=e.fitRatio>1?1:e.fitRatio,n=e.container.style,i=t*e.w,o=t*e.h;n.width=i+"px",n.height=o+"px",n.left=e.initialPosition.x+"px",n.top=e.initialPosition.y+"px"},Me=function(){if(oe){var e=oe,t=r.currItem,n=t.fitRatio>1?1:t.fitRatio,i=n*t.w,o=n*t.h;e.width=i+"px",e.height=o+"px",e.left=fe.x+"px",e.top=fe.y+"px"}}},Ve=function(e){var t="";c.escKey&&27===e.keyCode?t="close":c.arrowKeys&&(37===e.keyCode?t="prev":39===e.keyCode&&(t="next")),t&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(e.preventDefault?e.preventDefault():e.returnValue=!1,r[t]()))},qe=function(e){e&&(q||V||ae||K)&&(e.preventDefault(),e.stopPropagation())},Xe=function(){r.setScrollOffset(0,a.getScrollY())},Je={},Qe=0,et=function(e){Je[e]&&(Je[e].raf&&P(Je[e].raf),Qe--,delete Je[e])},tt=function(e){Je[e]&&et(e),Je[e]||(Qe++,Je[e]={})},nt=function(){for(var e in Je)Je.hasOwnProperty(e)&&et(e)},it=function(e,t,n,i,o,a,r){var s,l=Re();tt(e);var c=function u(){if(Je[e]){if(s=Re()-l,s>=i)return et(e),a(n),void(r&&r());a((n-t)*o(s/i)+t),Je[e].raf=F(u)}};c()},ot={shout:Ae,listen:Ee,viewportSize:ge,options:c,isMainScrollAnimating:function(){return ae},getZoomLevel:function(){return y},getCurrentIndex:function(){return p},isDragging:function(){return W},isZooming:function(){return ee},setScrollOffset:function(e,t){we.x=e,j=we.y=t,Ae("updateScrollOffset",we)},applyZoomPan:function(e,t,n,i){fe.x=t,fe.y=n,y=e,Me(i)},init:function(){if(!u&&!d){var n;r.framework=a,r.template=e,r.bg=a.getChildByClass(e,"pswp__bg"),L=e.className,u=!0,Z=a.detectFeatures(),F=Z.raf,P=Z.caf,D=Z.transform,z=Z.oldIE,r.scrollWrap=a.getChildByClass(e,"pswp__scroll-wrap"),r.container=a.getChildByClass(r.scrollWrap,"pswp__container"),h=r.container.style,r.itemHolders=I=[{el:r.container.children[0],wrap:0,index:-1},{el:r.container.children[1],wrap:0,index:-1},{el:r.container.children[2],wrap:0,index:-1}],I[0].el.style.display=I[2].el.style.display="none",Ye(),w={resize:r.updateSize,scroll:Xe,keydown:Ve,click:qe};var i=Z.isOldIOSPhone||Z.isOldAndroid||Z.isMobileOpera;for(Z.animationName&&Z.transform&&!i||(c.showAnimationDuration=c.hideAnimationDuration=0),n=0;n<_e.length;n++)r["init"+_e[n]]();if(t){var o=r.ui=new t(r,a);o.init()}Ae("firstUpdate"),p=p||c.index||0,(isNaN(p)||p<0||p>=en())&&(p=0),r.currItem=Qt(p),(Z.isOldIOSPhone||Z.isOldAndroid)&&(xe=!1),e.setAttribute("aria-hidden","false"),c.modal&&(xe?e.style.position="fixed":(e.style.position="absolute",e.style.top=a.getScrollY()+"px")),void 0===j&&(Ae("initialLayout"),j=N=a.getScrollY());var s="pswp--open ";for(c.mainClass&&(s+=c.mainClass+" "),c.showHideOpacity&&(s+="pswp--animate_opacity "),s+=M?"pswp--touch":"pswp--notouch",s+=Z.animationName?" pswp--css_animation":"",s+=Z.svg?" pswp--svg":"",a.addClass(e,s),r.updateSize(),f=-1,be=null,n=0;n<l;n++)Pe((n+f)*ye.x,I[n].el.style);z||a.bind(r.scrollWrap,v,r),Ee("initialZoomInEnd",function(){r.setContent(I[0],p-1),r.setContent(I[2],p+1),I[0].el.style.display=I[2].el.style.display="block",c.focus&&e.focus(),He()}),r.setContent(I[1],p),r.updateCurrItem(),Ae("afterInit"),xe||(C=setInterval(function(){Qe||W||ee||y!==r.currItem.initialZoomLevel||r.updateSize()},1e3)),a.addClass(e,"pswp--visible")}},close:function(){u&&(u=!1,d=!0,Ae("close"),Be(),nn(r.currItem,null,!0,r.destroy))},destroy:function(){Ae("destroy"),Vt&&clearTimeout(Vt),e.setAttribute("aria-hidden","true"),e.className=L,C&&clearInterval(C),a.unbind(r.scrollWrap,v,r),a.unbind(window,"scroll",r),It(),nt(),Te=null},panTo:function(e,t,n){n||(e>ie.min.x?e=ie.min.x:e<ie.max.x&&(e=ie.max.x),t>ie.min.y?t=ie.min.y:t<ie.max.y&&(t=ie.max.y)),fe.x=e,fe.y=t,Me()},handleEvent:function(e){e=e||window.event,w[e.type]&&w[e.type](e)},goTo:function(e){e=ke(e);var t=e-p;be=t,p=e,r.currItem=Qt(p),ve-=t,Le(ye.x*ve),nt(),ae=!1,r.updateCurrItem()},next:function(){r.goTo(p+1)},prev:function(){r.goTo(p-1)},updateCurrZoomItem:function(e){if(e&&Ae("beforeChange",0),I[1].el.children.length){var t=I[1].el.children[0];oe=a.hasClass(t,"pswp__zoom-wrap")?t.style:null}else oe=null;ie=r.currItem.bounds,b=y=r.currItem.initialZoomLevel,fe.x=ie.center.x,fe.y=ie.center.y,e&&Ae("afterChange")},invalidateCurrItems:function(){S=!0;for(var e=0;e<l;e++)I[e].item&&(I[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==be){var t,n=Math.abs(be);if(!(e&&n<2)){r.currItem=Qt(p),Se=!1,Ae("beforeChange",be),n>=l&&(f+=be+(be>0?-l:l),n=l);for(var i=0;i<n;i++)be>0?(t=I.shift(),I[l-1]=t,f++,Pe((f+2)*ye.x,t.el.style),r.setContent(t,p-n+i+1+1)):(t=I.pop(),I.unshift(t),f--,Pe(f*ye.x,t.el.style),r.setContent(t,p+n-i-1-1));if(oe&&1===Math.abs(be)){var o=Qt(k);o.initialZoomLevel!==y&&(cn(o,ge),pn(o),Fe(o))}be=0,r.updateCurrZoomItem(),k=p,Ae("afterChange")}}},updateSize:function(t){if(!xe&&c.modal){var n=a.getScrollY();if(j!==n&&(e.style.top=n+"px",j=n),!t&&Ce.x===window.innerWidth&&Ce.y===window.innerHeight)return;Ce.x=window.innerWidth,Ce.y=window.innerHeight,e.style.height=Ce.y+"px"}if(ge.x=r.scrollWrap.clientWidth,ge.y=r.scrollWrap.clientHeight,Xe(),ye.x=ge.x+Math.round(ge.x*c.spacing),ye.y=ge.y,Le(ye.x*ve),Ae("beforeResize"),void 0!==f){for(var i,o,s,u=0;u<l;u++)i=I[u],Pe((u+f)*ye.x,i.el.style),s=p+u-1,c.loop&&en()>2&&(s=ke(s)),o=Qt(s),o&&(S||o.needsUpdate||!o.bounds)?(r.cleanSlide(o),r.setContent(i,s),1===u&&(r.currItem=o,r.updateCurrZoomItem(!0)),o.needsUpdate=!1):i.index===-1&&s>=0&&r.setContent(i,s),o&&o.container&&(cn(o,ge),pn(o),Fe(o));S=!1}b=y=r.currItem.initialZoomLevel,ie=r.currItem.bounds,ie&&(fe.x=ie.center.x,fe.y=ie.center.y,Me(!0)),Ae("resize")},zoomTo:function(e,t,n,i,o){t&&(b=y,bt.x=Math.abs(t.x)-fe.x,bt.y=Math.abs(t.y)-fe.y,ze(he,fe));var r=$e(e,!1),s={};We("x",r,s,e),We("y",r,s,e);var l=y,c={x:fe.x,y:fe.y};je(s);var u=function(t){1===t?(y=e,fe.x=s.x,fe.y=s.y):(y=(e-l)*t+l,fe.x=(s.x-c.x)*t+c.x,fe.y=(s.y-c.y)*t+c.y),o&&o(t),Me(1===t)};n?it("customZoomTo",0,1,n,i||a.easing.sine.inOut,u):u(1)}},at=30,rt=10,st={},lt={},ct={},ut={},dt={},mt=[],pt={},ht=[],ft={},gt=0,vt=me(),wt=0,yt=me(),bt=me(),xt=me(),_t=function(e,t){return e.x===t.x&&e.y===t.y},Ct=function(e,t){return Math.abs(e.x-t.x)<s&&Math.abs(e.y-t.y)<s},St=function(e,t){return ft.x=Math.abs(e.x-t.x),ft.y=Math.abs(e.y-t.y),Math.sqrt(ft.x*ft.x+ft.y*ft.y)},It=function(){X&&(P(X),X=null)},kt=function Nn(){W&&(X=F(Nn),Ht())},Tt=function(){return!("fit"===c.scaleMode&&y===r.currItem.initialZoomLevel)},Et=function zn(e,t){return!(!e||e===document)&&!(e.getAttribute("class")&&e.getAttribute("class").indexOf("pswp__scroll-wrap")>-1)&&(t(e)?e:zn(e.parentNode,t))},At={},Rt=function(e,t){return At.prevent=!Et(e.target,c.isClickableElement),Ae("preventDragEvent",e,t,At),At.prevent},Dt=function(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t},Ot=function(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)},Mt=function(e,t,n){if(e-H>50){var i=ht.length>2?ht.shift():{};i.x=t,i.y=n,ht.push(i),H=e}},Ft=function(){var e=fe.y-r.currItem.initialPosition.y;return 1-Math.abs(e/(ge.y/2))},Pt={},Lt={},Nt=[],zt=function(e){for(;Nt.length>0;)Nt.pop();return O?(de=0,mt.forEach(function(e){0===de?Nt[0]=e:1===de&&(Nt[1]=e),de++})):e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&(Nt[0]=Dt(e.touches[0],Pt),e.touches.length>1&&(Nt[1]=Dt(e.touches[1],Lt))):(Pt.x=e.pageX,Pt.y=e.pageY,Pt.id="",Nt[0]=Pt),Nt},jt=function(e,t){var n,i,o,a,s=0,l=fe[e]+t[e],u=t[e]>0,d=yt.x+t.x,m=yt.x-pt.x;return n=l>ie.min[e]||l<ie.max[e]?c.panEndFriction:1,l=fe[e]+t[e]*n,!c.allowPanToNext&&y!==r.currItem.initialZoomLevel||(oe?"h"!==re||"x"!==e||V||(u?(l>ie.min[e]&&(n=c.panEndFriction,s=ie.min[e]-l,i=ie.min[e]-he[e]),(i<=0||m<0)&&en()>1?(a=d,m<0&&d>pt.x&&(a=pt.x)):ie.min.x!==ie.max.x&&(o=l)):(l<ie.max[e]&&(n=c.panEndFriction,s=l-ie.max[e],i=he[e]-ie.max[e]),(i<=0||m>0)&&en()>1?(a=d,m>0&&d<pt.x&&(a=pt.x)):ie.min.x!==ie.max.x&&(o=l))):a=d,"x"!==e)?void(ae||J||y>r.currItem.fitRatio&&(fe[e]+=t[e]*n)):(void 0!==a&&(Le(a,!0),J=a!==pt.x),ie.min.x!==ie.max.x&&(void 0!==o?fe.x=o:J||(fe.x+=t.x*n)),void 0!==a)},Zt=function(e){if(!("mousedown"===e.type&&e.button>0)){if(Jt)return void e.preventDefault();if(!G||"mousedown"!==e.type){if(Rt(e,!0)&&e.preventDefault(),Ae("pointerDown"),O){var t=a.arraySearch(mt,e.pointerId,"id");t<0&&(t=mt.length),mt[t]={x:e.pageX,y:e.pageY,id:e.pointerId}}var n=zt(e),i=n.length;Q=null,nt(),W&&1!==i||(W=se=!0,a.bind(window,g,r),$=ue=le=K=J=q=Y=V=!1,re=null,Ae("firstTouchStart",n),ze(he,fe),pe.x=pe.y=0,ze(ut,n[0]),ze(dt,ut),pt.x=ye.x*ve,ht=[{x:ut.x,y:ut.y}],H=U=Re(),$e(y,!0),It(),kt()),!ee&&i>1&&!ae&&!J&&(b=y,V=!1,ee=Y=!0,pe.y=pe.x=0,ze(he,fe),ze(st,n[0]),ze(lt,n[1]),Ot(st,lt,xt),bt.x=Math.abs(xt.x)-fe.x,bt.y=Math.abs(xt.y)-fe.y,te=ne=St(st,lt))}}},Ut=function(e){if(e.preventDefault(),O){var t=a.arraySearch(mt,e.pointerId,"id");if(t>-1){var n=mt[t];n.x=e.pageX,n.y=e.pageY}}if(W){var i=zt(e);if(re||q||ee)Q=i;else if(yt.x!==ye.x*ve)re="h";else{var o=Math.abs(i[0].x-ut.x)-Math.abs(i[0].y-ut.y);Math.abs(o)>=rt&&(re=o>0?"h":"v",Q=i)}}},Ht=function(){if(Q){var e=Q.length;if(0!==e)if(ze(st,Q[0]),ct.x=st.x-ut.x,ct.y=st.y-ut.y,ee&&e>1){if(ut.x=st.x,ut.y=st.y,!ct.x&&!ct.y&&_t(Q[1],lt))return;ze(lt,Q[1]),V||(V=!0,Ae("zoomGestureStarted"));var t=St(st,lt),n=Wt(t);n>r.currItem.initialZoomLevel+r.currItem.initialZoomLevel/15&&(ue=!0);var i=1,o=Ke(),a=Ge();if(n<o)if(c.pinchToClose&&!ue&&b<=r.currItem.initialZoomLevel){var s=o-n,l=1-s/(o/1.2);De(l),Ae("onPinchClose",l),le=!0}else i=(o-n)/o,i>1&&(i=1),n=o-i*(o/3);else n>a&&(i=(n-a)/(6*o),i>1&&(i=1),n=a+i*o);i<0&&(i=0),te=t,Ot(st,lt,vt),pe.x+=vt.x-xt.x,pe.y+=vt.y-xt.y,ze(xt,vt),fe.x=Ne("x",n),fe.y=Ne("y",n),$=n>y,y=n,Me()}else{if(!re)return;if(se&&(se=!1,Math.abs(ct.x)>=rt&&(ct.x-=Q[0].x-dt.x),Math.abs(ct.y)>=rt&&(ct.y-=Q[0].y-dt.y)),ut.x=st.x,ut.y=st.y,0===ct.x&&0===ct.y)return;if("v"===re&&c.closeOnVerticalDrag&&!Tt()){pe.y+=ct.y,fe.y+=ct.y;var u=Ft();return K=!0,Ae("onVerticalDrag",u),De(u),void Me()}Mt(Re(),st.x,st.y),q=!0,ie=r.currItem.bounds;var d=jt("x",ct);d||(jt("y",ct),je(fe),Me())}}},Bt=function(e){if(Z.isOldAndroid){if(G&&"mouseup"===e.type)return;e.type.indexOf("touch")>-1&&(clearTimeout(G),G=setTimeout(function(){G=0},600))}Ae("pointerUp"),Rt(e,!1)&&e.preventDefault();var t;if(O){var n=a.arraySearch(mt,e.pointerId,"id");if(n>-1)if(t=mt.splice(n,1)[0],navigator.pointerEnabled)t.type=e.pointerType||"mouse";else{var i={4:"mouse",2:"touch",3:"pen"};t.type=i[e.pointerType],t.type||(t.type=e.pointerType||"mouse")}}var o,s=zt(e),l=s.length;if("mouseup"===e.type&&(l=0),2===l)return Q=null,!0;1===l&&ze(dt,s[0]),0!==l||re||ae||(t||("mouseup"===e.type?t={x:e.pageX,y:e.pageY,type:"mouse"}:e.changedTouches&&e.changedTouches[0]&&(t={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"})),Ae("touchRelease",e,t));var u=-1;if(0===l&&(W=!1,a.unbind(window,g,r),It(),ee?u=0:wt!==-1&&(u=Re()-wt)),wt=1===l?Re():-1,o=u!==-1&&u<150?"zoom":"swipe",ee&&l<2&&(ee=!1,1===l&&(o="zoomPointerUp"),Ae("zoomGestureEnded")),Q=null,q||V||ae||K)if(nt(),B||(B=$t()),B.calculateSwipeSpeed("x"),K){var d=Ft();if(d<c.verticalDragRange)r.close();else{var m=fe.y,p=ce;it("verticalDrag",0,1,300,a.easing.cubic.out,function(e){fe.y=(r.currItem.initialPosition.y-m)*e+m,De((1-p)*e+p),Me()}),Ae("onVerticalDrag",1)}}else{if((J||ae)&&0===l){var h=Gt(o,B);if(h)return;o="zoomPointerUp"}if(!ae)return"swipe"!==o?void Yt():void(!J&&y>r.currItem.fitRatio&&Kt(B))}},$t=function(){var e,t,n={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(i){ht.length>1?(e=Re()-H+50,t=ht[ht.length-2][i]):(e=Re()-U,t=dt[i]),n.lastFlickOffset[i]=ut[i]-t,n.lastFlickDist[i]=Math.abs(n.lastFlickOffset[i]),n.lastFlickDist[i]>20?n.lastFlickSpeed[i]=n.lastFlickOffset[i]/e:n.lastFlickSpeed[i]=0,Math.abs(n.lastFlickSpeed[i])<.1&&(n.lastFlickSpeed[i]=0),n.slowDownRatio[i]=.95,n.slowDownRatioReverse[i]=1-n.slowDownRatio[i],n.speedDecelerationRatio[i]=1},calculateOverBoundsAnimOffset:function(e,t){n.backAnimStarted[e]||(fe[e]>ie.min[e]?n.backAnimDestination[e]=ie.min[e]:fe[e]<ie.max[e]&&(n.backAnimDestination[e]=ie.max[e]),void 0!==n.backAnimDestination[e]&&(n.slowDownRatio[e]=.7,n.slowDownRatioReverse[e]=1-n.slowDownRatio[e],n.speedDecelerationRatioAbs[e]<.05&&(n.lastFlickSpeed[e]=0,n.backAnimStarted[e]=!0,it("bounceZoomPan"+e,fe[e],n.backAnimDestination[e],t||300,a.easing.sine.out,function(t){fe[e]=t,Me()}))))},calculateAnimOffset:function(e){n.backAnimStarted[e]||(n.speedDecelerationRatio[e]=n.speedDecelerationRatio[e]*(n.slowDownRatio[e]+n.slowDownRatioReverse[e]-n.slowDownRatioReverse[e]*n.timeDiff/10),n.speedDecelerationRatioAbs[e]=Math.abs(n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]),n.distanceOffset[e]=n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]*n.timeDiff,fe[e]+=n.distanceOffset[e])},panAnimLoop:function(){if(Je.zoomPan&&(Je.zoomPan.raf=F(n.panAnimLoop),n.now=Re(),n.timeDiff=n.now-n.lastNow,n.lastNow=n.now,n.calculateAnimOffset("x"),n.calculateAnimOffset("y"),Me(),n.calculateOverBoundsAnimOffset("x"),n.calculateOverBoundsAnimOffset("y"),n.speedDecelerationRatioAbs.x<.05&&n.speedDecelerationRatioAbs.y<.05))return fe.x=Math.round(fe.x),fe.y=Math.round(fe.y),Me(),void et("zoomPan")}};return n},Kt=function(e){return e.calculateSwipeSpeed("y"),ie=r.currItem.bounds,e.backAnimDestination={},e.backAnimStarted={},Math.abs(e.lastFlickSpeed.x)<=.05&&Math.abs(e.lastFlickSpeed.y)<=.05?(e.speedDecelerationRatioAbs.x=e.speedDecelerationRatioAbs.y=0,e.calculateOverBoundsAnimOffset("x"),e.calculateOverBoundsAnimOffset("y"),!0):(tt("zoomPan"),e.lastNow=Re(),void e.panAnimLoop())},Gt=function(e,t){var n;ae||(gt=p);var i;if("swipe"===e){var o=ut.x-dt.x,s=t.lastFlickDist.x<10;o>at&&(s||t.lastFlickOffset.x>20)?i=-1:o<-at&&(s||t.lastFlickOffset.x<-20)&&(i=1)}var l;i&&(p+=i,p<0?(p=c.loop?en()-1:0,l=!0):p>=en()&&(p=c.loop?0:en()-1,l=!0),l&&!c.loop||(be+=i,ve-=i,n=!0));var u,d=ye.x*ve,m=Math.abs(d-yt.x);return n||d>yt.x==t.lastFlickSpeed.x>0?(u=Math.abs(t.lastFlickSpeed.x)>0?m/Math.abs(t.lastFlickSpeed.x):333,u=Math.min(u,400),u=Math.max(u,250)):u=333,gt===p&&(n=!1),ae=!0,Ae("mainScrollAnimStart"),it("mainScroll",yt.x,d,u,a.easing.cubic.out,Le,function(){nt(),ae=!1,gt=-1,(n||gt!==p)&&r.updateCurrItem(),Ae("mainScrollAnimComplete")}),n&&r.updateCurrItem(!0),n},Wt=function(e){return 1/ne*e*b},Yt=function(){var e=y,t=Ke(),n=Ge();y<t?e=t:y>n&&(e=n);var i,o=1,s=ce;return le&&!$&&!ue&&y<t?(r.close(),!0):(le&&(i=function(e){De((o-s)*e+s)}),r.zoomTo(e,0,200,a.easing.cubic.out,i),!0)};Ie("Gestures",{publicMethods:{initGestures:function(){var e=function(e,t,n,i,o){T=e+t,E=e+n,A=e+i,R=o?e+o:""};O=Z.pointerEvent,O&&Z.touch&&(Z.touch=!1),O?navigator.pointerEnabled?e("pointer","down","move","up","cancel"):e("MSPointer","Down","Move","Up","Cancel"):Z.touch?(e("touch","start","move","end","cancel"),
M=!0):e("mouse","down","move","up"),g=E+" "+A+" "+R,v=T,O&&!M&&(M=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1),r.likelyTouchDevice=M,w[T]=Zt,w[E]=Ut,w[A]=Bt,R&&(w[R]=w[A]),Z.touch&&(v+=" mousedown",g+=" mousemove mouseup",w.mousedown=w[T],w.mousemove=w[E],w.mouseup=w[A]),M||(c.allowPanToNext=!1)}}});var Vt,qt,Xt,Jt,Qt,en,tn,nn=function(t,n,i,o){Vt&&clearTimeout(Vt),Jt=!0,Xt=!0;var s;t.initialLayout?(s=t.initialLayout,t.initialLayout=null):s=c.getThumbBoundsFn&&c.getThumbBoundsFn(p);var l=i?c.hideAnimationDuration:c.showAnimationDuration,u=function(){et("initialZoom"),i?(r.template.removeAttribute("style"),r.bg.removeAttribute("style")):(De(1),n&&(n.style.display="block"),a.addClass(e,"pswp--animated-in"),Ae("initialZoom"+(i?"OutEnd":"InEnd"))),o&&o(),Jt=!1};if(!l||!s||void 0===s.x)return Ae("initialZoom"+(i?"Out":"In")),y=t.initialZoomLevel,ze(fe,t.initialPosition),Me(),e.style.opacity=i?0:1,De(1),void(l?setTimeout(function(){u()},l):u());var d=function(){var n=m,o=!r.currItem.src||r.currItem.loadError||c.showHideOpacity;t.miniImg&&(t.miniImg.style.webkitBackfaceVisibility="hidden"),i||(y=s.w/t.w,fe.x=s.x,fe.y=s.y-N,r[o?"template":"bg"].style.opacity=.001,Me()),tt("initialZoom"),i&&!n&&a.removeClass(e,"pswp--animated-in"),o&&(i?a[(n?"remove":"add")+"Class"](e,"pswp--animate_opacity"):setTimeout(function(){a.addClass(e,"pswp--animate_opacity")},30)),Vt=setTimeout(function(){if(Ae("initialZoom"+(i?"Out":"In")),i){var r=s.w/t.w,c={x:fe.x,y:fe.y},d=y,m=ce,p=function(t){1===t?(y=r,fe.x=s.x,fe.y=s.y-j):(y=(r-d)*t+d,fe.x=(s.x-c.x)*t+c.x,fe.y=(s.y-j-c.y)*t+c.y),Me(),o?e.style.opacity=1-t:De(m-t*m)};n?it("initialZoom",0,1,l,a.easing.cubic.out,p,u):(p(1),Vt=setTimeout(u,l+20))}else y=t.initialZoomLevel,ze(fe,t.initialPosition),Me(),De(1),o?e.style.opacity=1:De(1),Vt=setTimeout(u,l+20)},i?25:90)};d()},on={},an=[],rn={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return qt.length}},sn=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},ln=function(e,t,n){var i=e.bounds;i.center.x=Math.round((on.x-t)/2),i.center.y=Math.round((on.y-n)/2)+e.vGap.top,i.max.x=t>on.x?Math.round(on.x-t):i.center.x,i.max.y=n>on.y?Math.round(on.y-n)+e.vGap.top:i.center.y,i.min.x=t>on.x?0:i.center.x,i.min.y=n>on.y?e.vGap.top:i.center.y},cn=function(e,t,n){if(e.src&&!e.loadError){var i=!n;if(i&&(e.vGap||(e.vGap={top:0,bottom:0}),Ae("parseVerticalMargin",e)),on.x=t.x,on.y=t.y-e.vGap.top-e.vGap.bottom,i){var o=on.x/e.w,a=on.y/e.h;e.fitRatio=o<a?o:a;var r=c.scaleMode;"orig"===r?n=1:"fit"===r&&(n=e.fitRatio),n>1&&(n=1),e.initialZoomLevel=n,e.bounds||(e.bounds=sn())}if(!n)return;return ln(e,e.w*n,e.h*n),i&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds}return e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=sn(),e.initialPosition=e.bounds.center,e.bounds},un=function(e,t,n,i,o,a){t.loadError||i&&(t.imageAppended=!0,pn(t,i,t===r.currItem&&Se),n.appendChild(i),a&&setTimeout(function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)},500))},dn=function(e){e.loading=!0,e.loaded=!1;var t=e.img=a.createEl("pswp__img","img"),n=function(){e.loading=!1,e.loaded=!0,e.loadComplete?e.loadComplete(e):e.img=null,t.onload=t.onerror=null,t=null};return t.onload=n,t.onerror=function(){e.loadError=!0,n()},t.src=e.src,t},mn=function(e,t){if(e.src&&e.loadError&&e.container)return t&&(e.container.innerHTML=""),e.container.innerHTML=c.errorMsg.replace("%url%",e.src),!0},pn=function(e,t,n){if(e.src){t||(t=e.container.lastChild);var i=n?e.w:Math.round(e.w*e.fitRatio),o=n?e.h:Math.round(e.h*e.fitRatio);e.placeholder&&!e.loaded&&(e.placeholder.style.width=i+"px",e.placeholder.style.height=o+"px"),t.style.width=i+"px",t.style.height=o+"px"}},hn=function(){if(an.length){for(var e,t=0;t<an.length;t++)e=an[t],e.holder.index===e.index&&un(e.index,e.item,e.baseDiv,e.img,!1,e.clearPlaceholder);an=[]}};Ie("Controller",{publicMethods:{lazyLoadItem:function(e){e=ke(e);var t=Qt(e);t&&(!t.loaded&&!t.loading||S)&&(Ae("gettingData",e,t),t.src&&dn(t))},initController:function(){a.extend(c,rn,!0),r.items=qt=n,Qt=r.getItemAt,en=c.getNumItemsFn,tn=c.loop,en()<3&&(c.loop=!1),Ee("beforeChange",function(e){var t,n=c.preload,i=null===e||e>=0,o=Math.min(n[0],en()),a=Math.min(n[1],en());for(t=1;t<=(i?a:o);t++)r.lazyLoadItem(p+t);for(t=1;t<=(i?o:a);t++)r.lazyLoadItem(p-t)}),Ee("initialLayout",function(){r.currItem.initialLayout=c.getThumbBoundsFn&&c.getThumbBoundsFn(p)}),Ee("mainScrollAnimComplete",hn),Ee("initialZoomInEnd",hn),Ee("destroy",function(){for(var e,t=0;t<qt.length;t++)e=qt[t],e.container&&(e.container=null),e.placeholder&&(e.placeholder=null),e.img&&(e.img=null),e.preloader&&(e.preloader=null),e.loadError&&(e.loaded=e.loadError=!1);an=null})},getItemAt:function(e){return e>=0&&void 0!==qt[e]&&qt[e]},allowProgressiveImg:function(){return c.forceProgressiveLoading||!M||c.mouseUsed||screen.width>1200},setContent:function(e,t){c.loop&&(t=ke(t));var n=r.getItemAt(e.index);n&&(n.container=null);var i,o=r.getItemAt(t);if(!o)return void(e.el.innerHTML="");Ae("gettingData",t,o),e.index=t,e.item=o;var s=o.container=a.createEl("pswp__zoom-wrap");if(!o.src&&o.html&&(o.html.tagName?s.appendChild(o.html):s.innerHTML=o.html),mn(o),cn(o,ge),!o.src||o.loadError||o.loaded)o.src&&!o.loadError&&(i=a.createEl("pswp__img","img"),i.style.opacity=1,i.src=o.src,pn(o,i),un(t,o,s,i,!0));else{if(o.loadComplete=function(n){if(u){if(e&&e.index===t){if(mn(n,!0))return n.loadComplete=n.img=null,cn(n,ge),Fe(n),void(e.index===p&&r.updateCurrZoomItem());n.imageAppended?!Jt&&n.placeholder&&(n.placeholder.style.display="none",n.placeholder=null):Z.transform&&(ae||Jt)?an.push({item:n,baseDiv:s,img:n.img,index:t,holder:e,clearPlaceholder:!0}):un(t,n,s,n.img,ae||Jt,!0)}n.loadComplete=null,n.img=null,Ae("imageLoadComplete",t,n)}},a.features.transform){var l="pswp__img pswp__img--placeholder";l+=o.msrc?"":" pswp__img--placeholder--blank";var d=a.createEl(l,o.msrc?"img":"");o.msrc&&(d.src=o.msrc),pn(o,d),s.appendChild(d),o.placeholder=d}o.loading||dn(o),r.allowProgressiveImg()&&(!Xt&&Z.transform?an.push({item:o,baseDiv:s,img:o.img,index:t,holder:e}):un(t,o,s,o.img,!0,!0))}Xt||t!==p?Fe(o):(oe=s.style,nn(o,i||o.img)),e.el.innerHTML="",e.el.appendChild(s)},cleanSlide:function(e){e.img&&(e.img.onload=e.img.onerror=null),e.loaded=e.loading=e.img=e.imageAppended=!1}}});var fn,gn={},vn=function(e,t,n){var i=document.createEvent("CustomEvent"),o={origEvent:e,target:e.target,releasePoint:t,pointerType:n||"touch"};i.initCustomEvent("pswpTap",!0,!0,o),e.target.dispatchEvent(i)};Ie("Tap",{publicMethods:{initTap:function(){Ee("firstTouchStart",r.onTapStart),Ee("touchRelease",r.onTapRelease),Ee("destroy",function(){gn={},fn=null})},onTapStart:function(e){e.length>1&&(clearTimeout(fn),fn=null)},onTapRelease:function(e,t){if(t&&!q&&!Y&&!Qe){var n=t;if(fn&&(clearTimeout(fn),fn=null,Ct(n,gn)))return void Ae("doubleTap",n);if("mouse"===t.type)return void vn(e,t,"mouse");var i=e.target.tagName.toUpperCase();if("BUTTON"===i||a.hasClass(e.target,"pswp__single-tap"))return void vn(e,t);ze(gn,n),fn=setTimeout(function(){vn(e,t),fn=null},300)}}}});var wn;Ie("DesktopZoom",{publicMethods:{initDesktopZoom:function(){z||(M?Ee("mouseUsed",function(){r.setupDesktopZoom()}):r.setupDesktopZoom(!0))},setupDesktopZoom:function(t){wn={};var n="wheel mousewheel DOMMouseScroll";Ee("bindEvents",function(){a.bind(e,n,r.handleMouseWheel)}),Ee("unbindEvents",function(){wn&&a.unbind(e,n,r.handleMouseWheel)}),r.mouseZoomedIn=!1;var i,o=function(){r.mouseZoomedIn&&(a.removeClass(e,"pswp--zoomed-in"),r.mouseZoomedIn=!1),y<1?a.addClass(e,"pswp--zoom-allowed"):a.removeClass(e,"pswp--zoom-allowed"),s()},s=function(){i&&(a.removeClass(e,"pswp--dragging"),i=!1)};Ee("resize",o),Ee("afterChange",o),Ee("pointerDown",function(){r.mouseZoomedIn&&(i=!0,a.addClass(e,"pswp--dragging"))}),Ee("pointerUp",s),t||o()},handleMouseWheel:function(e){if(y<=r.currItem.fitRatio)return c.modal&&(!c.closeOnScroll||Qe||W?e.preventDefault():D&&Math.abs(e.deltaY)>2&&(m=!0,r.close())),!0;if(e.stopPropagation(),wn.x=0,"deltaX"in e)1===e.deltaMode?(wn.x=18*e.deltaX,wn.y=18*e.deltaY):(wn.x=e.deltaX,wn.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(wn.x=-.16*e.wheelDeltaX),e.wheelDeltaY?wn.y=-.16*e.wheelDeltaY:wn.y=-.16*e.wheelDelta;else{if(!("detail"in e))return;wn.y=e.detail}$e(y,!0);var t=fe.x-wn.x,n=fe.y-wn.y;(c.modal||t<=ie.min.x&&t>=ie.max.x&&n<=ie.min.y&&n>=ie.max.y)&&e.preventDefault(),r.panTo(t,n)},toggleDesktopZoom:function(t){t=t||{x:ge.x/2+we.x,y:ge.y/2+we.y};var n=c.getDoubleTapZoom(!0,r.currItem),i=y===n;r.mouseZoomedIn=!i,r.zoomTo(i?r.currItem.initialZoomLevel:n,t,333),a[(i?"remove":"add")+"Class"](e,"pswp--zoomed-in")}}});var yn,bn,xn,_n,Cn,Sn,In,kn,Tn,En,An,Rn,Dn={history:!0,galleryUID:1},On=function(){return An.hash.substring(1)},Mn=function(){yn&&clearTimeout(yn),xn&&clearTimeout(xn)},Fn=function(){var e=On(),t={};if(e.length<5)return t;var n,i=e.split("&");for(n=0;n<i.length;n++)if(i[n]){var o=i[n].split("=");o.length<2||(t[o[0]]=o[1])}if(c.galleryPIDs){var a=t.pid;for(t.pid=0,n=0;n<qt.length;n++)if(qt[n].pid===a){t.pid=n;break}}else t.pid=parseInt(t.pid,10)-1;return t.pid<0&&(t.pid=0),t},Pn=function jn(){if(xn&&clearTimeout(xn),Qe||W)return void(xn=setTimeout(jn,500));_n?clearTimeout(bn):_n=!0;var e=p+1,t=Qt(p);t.hasOwnProperty("pid")&&(e=t.pid);var n=In+"&gid="+c.galleryUID+"&pid="+e;kn||An.hash.indexOf(n)===-1&&(En=!0);var i=An.href.split("#")[0]+"#"+n;Rn?"#"+n!==window.location.hash&&history[kn?"replaceState":"pushState"]("",document.title,i):kn?An.replace(i):An.hash=n,kn=!0,bn=setTimeout(function(){_n=!1},60)};Ie("History",{publicMethods:{initHistory:function(){if(a.extend(c,Dn,!0),c.history){An=window.location,En=!1,Tn=!1,kn=!1,In=On(),Rn="pushState"in history,In.indexOf("gid=")>-1&&(In=In.split("&gid=")[0],In=In.split("?gid=")[0]),Ee("afterChange",r.updateURL),Ee("unbindEvents",function(){a.unbind(window,"hashchange",r.onHashChange)});var e=function(){Sn=!0,Tn||(En?history.back():In?An.hash=In:Rn?history.pushState("",document.title,An.pathname+An.search):An.hash=""),Mn()};Ee("unbindEvents",function(){m&&e()}),Ee("destroy",function(){Sn||e()}),Ee("firstUpdate",function(){p=Fn().pid});var t=In.indexOf("pid=");t>-1&&(In=In.substring(0,t),"&"===In.slice(-1)&&(In=In.slice(0,-1))),setTimeout(function(){u&&a.bind(window,"hashchange",r.onHashChange)},40)}},onHashChange:function(){return On()===In?(Tn=!0,void r.close()):void(_n||(Cn=!0,r.goTo(Fn().pid),Cn=!1))},updateURL:function(){Mn(),Cn||(kn?yn=setTimeout(Pn,800):Pn())}}}),a.extend(r,ot)};return e})},{}],3:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function o(e){function t(t){var n=m(t).slideSelector;return t.find(n).map(function(t){var n=e(this).data("index",t),i=this.tagName.toUpperCase();return"A"===i?this.hash?n=e(this.hash):(n=n.find("img").eq(0),n.data("original-src",this.href)):"IMG"!==i&&(n=n.find("img")),n[0]})}function n(e){return function(t){var n=e.eq(t),i=n.offset(),o=n[0].width;return{x:i.left,y:i.top,w:o}}}function i(t,n){var i=e.Deferred(),o=n.data("original-src-"+t);return o?i.resolve(o):e("<img>").on("load",function(){i.resolve(this[t])}).attr("src",n.attr("src")),i.promise()}function o(e){return i("height",e)}function r(e){return i("width",e)}function l(t){var n=decodeURI(t.data("original-src")||t.attr("src")),i=n.match(/(\d+)[*×x](\d+)/);if(null!==i){var s=function(){var t=e.Deferred();return setTimeout(function(){t.resolve(Number(i[1]),Number(i[2]))},0),{v:t.promise()}}();if("object"===("undefined"==typeof s?"undefined":a(s)))return s.v}return e.when(r(t),o(t))}function u(){var t=e(this),n=t.data("original-src")||t.attr("src"),i=e.Deferred();return"IMG"!==this.tagName?i.resolve({html:this.innerHTML}):l(t).done(function(e,o){i.resolve({w:e,h:o,src:n,msrc:t.attr("src"),title:t.attr("alt")})}),i.promise()}function d(t){var n=t.map(u).get(),i=e.Deferred();return e.when.apply(e,n).done(function(){var e=Array.prototype.slice.call(arguments);i.resolve(e)}),i.promise()}function m(e){return e.data("photoswipeOptions")}function p(e){e.data("pswp-uid")||e.data("pswp-uid",x++)}function h(t,i,o,a){var r=e.extend(m(i).globalOptions,{index:t,getThumbBoundsFn:n(o),galleryUID:i.data("pswp-uid")}),l=new s["default"](b[0],c["default"],a,r);e.each(m(i).events,function(e,t){l.listen(e,t)}),l.init()}function f(){var e=window.location.hash.substring(1),t={};if(e.length<5)return t;for(var n=e.split("&"),i=0;i<n.length;i++)if(n[i]){var o=n[i].split("=");o.length<2||(t[o[0]]=parseInt(o[1],10))}return t}function g(e){var n=f();n.pid&&n.gid&&!function(){var i=e[n.gid-1],o=n.pid-1,a=t(i),r=d(a);r.done(function(e){h(o,i,a,e)})}()}function v(t,n,i){t.on("click.photoswipe",m(t).slideSelector,function(o){o.preventDefault(),h(e(this).data("index"),t,n,i)})}function w(e){e.off("click.photoswipe")}function y(e){var n=t(e),i=d(n);i.done(function(t){w(e),v(e,n,t)})}var b=e('<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true"><div class="pswp__bg"></div><div class="pswp__scroll-wrap"><div class="pswp__container"><div class="pswp__item"></div><div class="pswp__item"></div><div class="pswp__item"></div></div><div class="pswp__ui pswp__ui--hidden"><div class="pswp__top-bar"><div class="pswp__counter"></div><button class="pswp__button pswp__button--close"></button> <button class="pswp__button pswp__button--share"></button> <button class="pswp__button pswp__button--fs"></button> <button class="pswp__button pswp__button--zoom"></button><div class="pswp__preloader"><div class="pswp__preloader__icn"><div class="pswp__preloader__cut"><div class="pswp__preloader__donut"></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class="pswp__share-tooltip"></div></div><button class="pswp__button pswp__button--arrow--left"></button> <button class="pswp__button pswp__button--arrow--right"></button><div class="pswp__caption"><div class="pswp__caption__center"></div></div></div></div></div>').appendTo("body"),x=1;e.fn.photoSwipe=function(){var n=arguments.length<=0||void 0===arguments[0]?"img":arguments[0],i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],a={bgOpacity:.973,showHideOpacity:!0},r=e.extend(a,i),s=[],l="update"===n;return this.each(function(){if(l)return void y(e(this));var i=e(this).data("photoswipeOptions",{slideSelector:n,globalOptions:r,events:o}),a=t(i),c=d(a);p(i),s.push(i),c.done(function(e){v(i,a,e)})}),l||g(s),this},e.fn.photoSwipe.PhotoSwipe=s["default"]}Object.defineProperty(n,"__esModule",{value:!0}),n.PhotoSwipe=n["default"]=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},r=e("/Applications/MAMP/htdocs/jquery.photoswipe/node_modules/photoswipe/dist/photoswipe.js"),s=i(r),l=e("/Applications/MAMP/htdocs/jquery.photoswipe/node_modules/photoswipe/dist/photoswipe-ui-default.js"),c=i(l);o(jQuery),n["default"]=o,n.PhotoSwipe=s["default"]},{"/Applications/MAMP/htdocs/jquery.photoswipe/node_modules/photoswipe/dist/photoswipe-ui-default.js":1,"/Applications/MAMP/htdocs/jquery.photoswipe/node_modules/photoswipe/dist/photoswipe.js":2}]},{},[3]),function(e){"use strict";e.module("liveblog-embed").run(function(){window.LB.templates={"views/author.html":"/themes_assets/classic/views/author.html","views/comments.html":"/themes_assets/classic/views/comments.html","views/dropdown.html":"/themes_assets/classic/views/dropdown.html","views/gallery.html":"/themes_assets/classic/views/gallery.html","views/generic-embed.html":"/themes_assets/classic/views/generic-embed.html","views/item.html":"/themes_assets/classic/views/item.html","views/posts.html":"/themes_assets/classic/views/posts.html","views/embeds/twitter.html":"/themes_assets/classic/views/embeds/twitter.html","views/embeds/facebook.html":"/themes_assets/classic/views/embeds/facebook.html","views/embeds/instagram.html":"/themes_assets/classic/views/embeds/instagram.html","views/embeds/generic.html":"/themes_assets/classic/views/embeds/generic.html","views/embeds/consent-placeholder.html":"/themes_assets/classic/views/embeds/consent-placeholder.html"}})}(angular),function(e){"use strict";function t(t,n,i,o,a,r,s,l,c,u,d){function m(){return k.pagesManager.retrieveUpdate().then(function(e){k.newPosts=k.newPosts.concat(k.pagesManager.processUpdates(e,!C)),k.newStickyPosts=k.newStickyPosts.concat(k.stickyPagesManager.processUpdates(e,!S))})}function p(t){e.forEach(t.collection.advertisements,function(t){d.get({advertisementId:t.advertisement_id},function(t){var n=_.find(o.output.collection.advertisements,function(e){return e.advertisement_id===t._id});e.extend(n,t)})})}function h(){o.output&&o.output._id&&(o.output.collection&&o.output.collection.advertisements&&o.output.collection.advertisements.length&&!o.output.collection.advertisements[0]._id&&p(o.output),u.get({id:o.output._id},function(e){o.output.collection&&e.collection&&o.output.collection._etag!==e.collection._etag&&p(e),!o.output.collection&&e.collection&&p(e),o.output._etag!==e._etag&&(o.output=e,v())}))}function f(){i.get({},function(n){"closed"===n.blog_status&&(t.cancel(k.interval.posts),t.cancel(k.interval.blog)),e.extend(k.blog,n)}),h()}function g(e){e["background-image"]&&(e["background-image"]="url("+e["background-image"]+")")}function v(){o.output&&o.output.style&&(g(o.output.style),$("body").css(o.output.style))}var w=o.settings.postsPerPage,y=100,b=o.settings.permalinkDelimiter||"?",x=o.settings.postOrder,C=o.settings.loadNewPostsManually,S=!o.settings.livestream&&o.settings.loadNewPostsManually,I=1e4,k=this,T=new n(w,x,(!1)),E=new s(T,b),A=new n(y,x,(!0)),R=new s(A,b);k.enhance=function(e){if(e.length){if(o.output&&o.output.collection&&o.output.collection.advertisements&&o.output.collection.advertisements.length){var t=o.output.settings||{frequency:4,order:-1},n=o.output.collection.advertisements;if(1===t.order)for(var i,a=0;a<e.length;a+=t.frequency+1)i=a/(t.frequency+1)%n.length,e.splice(a,0,n[i]);else for(var i,a=e.length;a>0;a-=t.frequency)i=Math.floor(a/t.frequency)%n.length,e.splice(a,0,n[i])}return e}},h(),v();var D=[];if(window.LB.settings.showTagsDropdown){var O=[];window.LB.output&&(O=window.LB.output.tags,O.length>1&&(D=O)),0===D.length&&1!==O.length&&(D=window.LB.global_tags)}e.extend(k,{templateDir:o.assets_root,blog:l(o.blog),output:o.output,loading:!0,finished:!1,highlightsOnly:!1,settings:o.settings,newPosts:[],newStickyPosts:[],sortOptions:[{name:c("Editorial"),order:"editorial"},{name:c("Newest first"),order:"newest_first"},{name:c("Oldest first"),order:"oldest_first"}],tagsFilterOptions:D?D.map(function(e){return{name:e}}):[],orderBy:function(e){window.location.hash&&(window.location.hash=window.location.hash.replace(/&gid=[^&]+/g,"").replace(/&pid=[^&]+/g,"")),k.loading=!0,k.finished=!1,k.pagesManager.changeOrder(e).then(function(e){k.loading=!1,k.finished=e._meta.total<=e._meta.max_results*e._meta.page})},filterBy:function(e){window.location.hash&&(window.location.hash=window.location.hash.replace(/&gid=[^&]+/g,"").replace(/&pid=[^&]+/g,"")),k.loading=!0,k.finished=!1,k.pagesManager.filterPosts(e).then(function(e){k.loading=!1,k.finished=e._meta.total<=e._meta.max_results*e._meta.page})},fetchNewPage:function(){return k.loading=!0,k.pagesManager.fetchNewPage().then(function(e){k.loading=!1,k.finished=e._meta.total<=e._meta.max_results*e._meta.page})},permalinkScroll:function(){k.loading=!0,k.permalink.loadPost().then(function(e){a(e),k.loading=!1},function(){k.loading=!1})},isAllowedToLoadMore:function(){return!k.loading&&!k.finished},applyUpdates:function(){T.applyUpdates(k.newPosts,!0),k.newPosts=[],A.applyUpdates(k.newStickyPosts,!0),k.newStickyPosts=[]},toggleHighlighsOnly:function(){k.highlightsOnly=!k.highlightsOnly,k.loading=!0,k.finished=!1,o.settings.livestream||A.changeHighlight(k.highlightsOnly),T.changeHighlight(k.highlightsOnly).then(function(e){k.loading=!1,k.finished=e._meta.total<=e._meta.max_results*e._meta.page}),k.highlightsOnly&&(A.hideSticky=!1)},pagesManager:T,permalink:E,stickyPagesManager:A,stickyPermalink:R}),k.stickyPagesManager.fetchNewPage(),k.fetchNewPage().then(function(){function e(e){"loadMore"===e.data&&n()}k.permalinkScroll(),"open"===k.blog.blog_status&&(k.interval={posts:t(m,I),blog:t(f,3*I)});var n=_.debounce(k.fetchNewPage,1e3);window.addEventListener("message",e,!1)})}function n(){var e=this,t=_.filter(e.items,function(e){return"image"===e.item_type});e.images=_.each(t,function(e){var t=e.meta.credit,n=e.meta.caption;n=n?'"'+n+'"':n;var i=t?n+" by "+t:n;e.meta.full_caption=i})}function i(t){var n=this;n.showGallery=function(t){var i=0;return e.forEach(t.items,function(e){"image"===e.item_type&&i++}),i>1&&n.timeline.settings.showGallery},n.isAd=function(e){if(e.mainItem&&e.mainItem.item_type)return e.mainItem.item_type.indexOf("Advertisement")!==-1||e.mainItem.item_type.indexOf("Advertisment")!==-1},n.allPosts=function(){return n.enhance?n.enhance(n.posts()):n.posts()}}t.$inject=["$interval","PagesManager","blogs","config","$anchorScroll","$timeout","Permalink","transformBlog","gettext","outputs","advertisements"],i.$inject=["config"],e.module("theme",["liveblog-embed","ngAnimate","infinite-scroll","gettext"]).constant("assets_simplified_path",!0).run(["gettextCatalog","config",function(e,t){e.setCurrentLanguage(t.settings.language);var n={no:"nn"},i=t.settings.language;n[i]&&(i=n[i]),moment.locale(i)}]).run(["$rootScope",function(t){e.element(document).on("click",function(n){t.$broadcast("documentClicked",e.element(n.target))})}]).controller("TimelineCtrl",t).controller("PostsCtrl",i).controller("GalleryCtrl",n).directive("lbItem",["asset",function(e){return{restrict:"AE",scope:{ident:"=",item:"=",timeline:"=",gallery:"=",hideInfo:"@"},templateUrl:e.templateUrl("views/item.html")}}]).directive("lbAuthor",["asset",function(e){return{restrict:"AE",scope:{item:"=",post:"=",timeline:"="},templateUrl:e.templateUrl("views/author.html")}}]).directive("lbPosts",["asset",function(e){return{restrict:"E",scope:!0,bindToController:{posts:"=",enhance:"=",timeline:"=",hideInfo:"@"},controller:i,controllerAs:"ctrl",templateUrl:e.templateUrl("views/posts.html")}}]).directive("lbGallery",["asset",function(t){return{restrict:"AE",scope:{items:"="},bindToController:!0,controller:n,controllerAs:"gallery",templateUrl:t.templateUrl("views/gallery.html"),link:function(t,n,i,o){var a="img",r={showHideOpacity:!0,getThumbBoundsFn:!1,shareButtons:[]},s={margins:3};t.$watch(i.items,function(t){setTimeout(function(){var t=e.element(n).find(".gallery");$(t[0]).justifiedGallery(s).on("jg.complete",function(){$(this).photoSwipe(a,r)}),$(t[0]).on("click",".caption",function(e){e.preventDefault(),$(this).parent().find("img").click()})},100)})}}}]),e.module("infinite-scroll").value("THROTTLE_MILLISECONDS",1e3)}(angular),angular.module("gettext").run(["gettextCatalog",function(e){e.setStrings("cs",{Activate:"Aktivovat",Advertisement:"Reklama",Cancel:"Zrušit",Comment:"Váš příspěvek","Comment *":"Text *","Comment should be maximum 300 characters in length.":"Maximální délka textu je 300 znaků.",Editorial:"Redakční","Load more posts":"Načíst další",Loading:"Načítám","Name *":"Jméno *","Name should be maximum 30 characters in length.":"Maximální délka jména je 30 znaků.","Newest first":"Nejnovější","No posts for now.":"Žádné příspěvky.","Oldest first":"Nejstarší","One pinned post":["Jeden připnutý příspěvek","{{$count}} připnuté příspěvky","{{$count}} připnutých příspěvků"],"Please fill in your Comment.":"Napište váš text.","Please fill in your Name.":"Napište své jméno.","Post a comment":"Otázka / komentář","See one new update":["Zobraz 1 nový příspěvek","Zobraz {{$count}} nové příspěvky","Zobraz {{$count}} nových příspěvků"],Send:"Odeslat","Show all posts":"Zobrazit všechny","Show highlighted post only":"Zobraz jen zvýrazněné příspěvky","Sort by:":"Řazení:","Updated {{post.content_updated_date | prettifyIsoDate}}":"Aktualizace {{post.content_updated_date | prettifyIsoDate}}","Your comment was sent for approval.":"Váš text byl úspěšně odeslán. Čeká na schválení.","{{ item.meta.caption }} credit: {{ item.meta.credit }}":"{{ item.meta.caption }} autor: {{ item.meta.credit }}"}),e.setStrings("de",{Activate:"Aktivieren",Advertisement:"Werbung",Cancel:"Abbrechen",Comment:"Kommentar","Comment *":"Kommentar *","Comment should be maximum 300 characters in length.":"Kommentar darf maximal 300 Zeichen lang sein.",Editorial:"Redaktionell","Load more posts":"Mehr Einträge laden",Loading:"Lade","Name *":"Name","Name should be maximum 30 characters in length.":"Name darf maximal 30 Zeichen lang sein.","Newest first":"Neueste zuerst","No posts for now.":"Kein Beitrag vorhanden.","Oldest first":"Älteste zuerst","One pinned post":["Angehefteter Eintrag","{{$count}} Angeheftete Einträge"],"Please fill in your Comment.":"Bitte Kommentar hier eintragen.","Please fill in your Name.":"Bitte Namen hier eintragen.","Post a comment":"Kommentar posten","See one new update":["Neuen Beitrag anzeigen","Neue Beiträge anzeigen"],Send:"Abschicken","Share this post on Email":"Diesen Beitrag per E-Mail teilen","Share this post on Facebook":"Teile diesen Beitrag auf Facebook","Share this post on Google+":"Teile diesen Beitrag auf Google+","Share this post on Linkedin":"Teile diesen Beitrag auf Linkedin","Share this post on Twitter":"Teile diesen Beitrag auf Twitter","Show all posts":"Alle Beiträge anzeigen","Show highlighted post only":"Anzeigen hervorgehoben Beitrag ist nur","Social Share":"Soziales Teilen","Sort by:":"Ordnen nach:","Updated {{post.content_updated_date | prettifyIsoDate}}":"Aktualisiert am {{post.content_updated_date | prettifyIsoDate}}","Your comment was sent for approval.":"Ihr Kommentar wartet auf Freischaltung.","{{ item.meta.caption }} credit: {{ item.meta.credit }}":"{{ item.meta.caption }} Bild: {{ item.meta.credit }}"}),e.setStrings("fi",{Activate:"Aktivoida",Advertisement:"Mainos",Cancel:"Peruuta",Comment:"Kommentoi","Comment *":"Kommentti *","Comment should be maximum 300 characters in length.":"Kommentin enimmäispituus on 300 merkkiä.",Editorial:"Toimituksellinen","Load more posts":"Lataa lisää julkaisuja",Loading:"Lataa","Name *":"Nimi *","Name should be maximum 30 characters in length.":"Nimen enimmäispituus on 30 merkkiä.","Newest first":"Uusimmat ensin","No posts for now.":"Ei uusia julkaisuja.","Oldest first":"Vanhimmat ensin","One pinned post":["Yksi kiinnitetty julkaisu","{{$count}} kiinnitettyä julkaisua"],"Please fill in your Comment.":"Lisää kommenttisi.","Please fill in your Name.":"Lisää nimesi.","Post a comment":"Lähetä kommentti","See one new update":["Lataa yksi uusi julkaisu","Lataa {{$count}} uutta julkaisua"],Send:"Lähetä","Show all posts":"Näytä kaikki julkaisut","Show highlighted post only":"Näytä vain korostettu julkaisu","Sort by:":"Järjestä:","Updated {{post.content_updated_date | prettifyIsoDate}}":"Päivitetty {{post.content_updated_date | prettifyIsoDate}}","Your comment was sent for approval.":"Kommenttisi lähetettiin hyväksyttäväksi.","{{ item.meta.caption }} credit: {{ item.meta.credit }}":"{{ item.meta.caption }} © {{ item.meta.credit }}"}),e.setStrings("fr",{Activate:"Activer",Advertisement:"Publicité",Cancel:"Annuler",Comment:"Commentaire","Comment *":"Commentaire *","Comment should be maximum 300 characters in length.":"Un commentaire ne peut excéder 300 signes.",Editorial:"Éditorial","Load more posts":"Afficher plus de messages",Loading:"Chargement","Name *":"Nom *","Name should be maximum 30 characters in length.":"Le nom ne peut excéder 30 signes.","Newest first":"Le plus récent d'abord","No posts for now.":"Aucun message pour le moment.","Oldest first":"Plus ancien en premier","One pinned post":["Voir le nouveau message","Voir {{$count}} nouveaux messages"],"Please fill in your Comment.":"Votre commentaire.","Please fill in your Name.":"Votre nom.","Post a comment":"Envoyer un commentaire","See one new update":["Voir le nouveau message","Voir {{$count}} nouveaux messages"],Send:"Envoyer","Share this post on Email":"Partagez ce message par e-mail","Share this post on Facebook":"Partagez ce message par Facebook","Share this post on Google+":"Partagez ce message par Google+","Share this post on Linkedin":"Partagez ce message par Linkedin","Share this post on Twitter":"Partagez ce message par Twitter","Show all posts":"Afficher tous les messages","Show highlighted post only":"Afficher uniquement les messages en surbrillance","Social Share":"Partage Social","Sort by:":"Trier par:","Updated {{post.content_updated_date | prettifyIsoDate}}":"Mise à jour {{post.content_updated_date | prettifyIsoDate}}","Your comment was sent for approval.":"Votre commentaire a été envoyé et est en attente de validation.","{{ item.meta.caption }} credit: {{ item.meta.credit }}":"{{ item.meta.caption }} crédit: {{ item.meta.credit }}"}),e.setStrings("nl",{Activate:"Activeren",Advertisement:"Advertentie",Cancel:"Annuleren",Comment:"Reactie","Comment *":"Tekst *","Comment should be maximum 300 characters in length.":"Uw reactie van maximaal 300 tekens.",Editorial:"Redactioneel","Load more posts":"Meer",Loading:"Laden","Name *":"Naam *","Name should be maximum 30 characters in length.":"Uw naam kan maximaal 30 tekens lang zijn.","Newest first":"Toon nieuwste eerst","No posts for now.":"Nog geen berichten beschikbaar.","Oldest first":"Toon oudste eerst","One pinned post":["Bekijk nieuw bericht","Bekijk {{$count}} nieuwe berichten"],"Please fill in your Comment.":"Uw reactie.","Please fill in your Name.":"Vul hier uw naam in.","Post a comment":"Schrijf een reactie","See one new update":["Bekijk nieuw bericht","Bekijk {{$count}} nieuwe berichten"],Send:"Verzenden","Share this post on Email":"Deel dit bericht op e-mail","Share this post on Facebook":"Deel dit bericht op Facebook","Share this post on Google+":"Deel dit bericht op Google+","Share this post on Linkedin":"Deel dit bericht op LinkedIn","Share this post on Twitter":"Deel dit bericht op Twitter","Show all posts":"Toon alle berichten","Show highlighted post only":"Alleen gemarkeerde post weergeven","Social Share":"Sociaal aandeel","Sort by:":"Sorteer:","Updated {{post.content_updated_date | prettifyIsoDate}}":"Bijgewerkt {{post.content_updated_date | prettifyIsoDate}}","Your comment was sent for approval.":"Uw reactie is ontvangen ter beoordeling.","{{ item.meta.caption }} credit: {{ item.meta.credit }}":"{{ item.meta.caption }} credits: {{ item.meta.credit }}"}),e.setStrings("no",{Activate:"Aktiver",Advertisement:"Annonse",Cancel:"Avbryt",Comment:"Kommentar","Comment *":"Kommentar*","Comment should be maximum 300 characters in length.":"Kommentarer kan være inntil 300 tegn.",Editorial:"Redaksjonelt","Load more posts":"Henter flere poster",Loading:"Henter","Name *":"Navn*","Name should be maximum 30 characters in length.":"Navn kan ikke ha mer enn 30 tegn.","Newest first":"Nyeste først","No posts for now.":"Ingen poster for øyeblikket.","Oldest first":"Eldste først","One pinned post":["Én post festet til toppen","{{$count}} poster festet til toppen"],"Please fill in your Comment.":"Skriv inn din kommentar.","Please fill in your Name.":"Skriv inn navn.","Post a comment":"Post en kommentar","See one new update":["Se én ny oppdatering","Se {{$count}} nye oppdateringer"],Send:"Send","Show all posts":"Vis alle poster","Show highlighted post only":"Vis bare høydepunkter","Sort by:":"Sortér etter:","Updated {{post.content_updated_date | prettifyIsoDate}}":"Oppdatert {{post.content_updated_date | prettifyIsoDate}}","Your comment was sent for approval.":"Din kommentar er sendt til godkjenning.","{{ item.meta.caption }} credit: {{ item.meta.credit }}":"{{ item.meta.caption }} credit: {{ item.meta.credit }}"
}),e.setStrings("ro",{Activate:"Activati",Advertisement:"Reclamă",Cancel:"Anulează",Comment:"Comentează","Comment *":"Comentariu *","Comment should be maximum 300 characters in length.":"Comentariu nu poate fi mai lung de 300 de caractere.",Editorial:"Editorial","Load more posts":"Încarcă mai multe posturi",Loading:"Se încarcă","Name *":"Numele *","Name should be maximum 30 characters in length.":"Numele nu poate fi mai lung de 30 de caractere.","Newest first":"Cele mai noi","No posts for now.":"Deocamdata nu sunt articole.","Oldest first":"Cele mai vechi","One pinned post":["Vezi un articol nou","Vezi {{$count}} articole noi","Vezi {{$count}} de articole noi"],"Please fill in your Comment.":"Completează comentariu.","Please fill in your Name.":"Completează numele.","Post a comment":"Scrie un comentariu","See one new update":["Vezi un articol nou","Vezi {{$count}} articole noi","Vezi {{$count}} de articole noi"],Send:"Trimite","Sort by:":"Ordonează după:","Your comment was sent for approval.":"Comentariul tău a fost trimis spre aprobare."}),e.setStrings("sr",{Activate:"Aktivirati",Advertisement:"Reklama",Cancel:"Otkaži",Comment:"Komentar","Comment *":"Komentar *","Comment should be maximum 300 characters in length.":"Komentar je ograničen na 300 karaktera.",Editorial:"Izbor urednika","Load more posts":"Učitaj još postova",Loading:"Učitavanje","Name *":"Ime *","Name should be maximum 30 characters in length.":"Ime je ograničeno na 30 karaktera.","Newest first":"Od najnovijeg","No posts for now.":"Za sada nema postova.","Oldest first":"Od najstarijeg","One pinned post":["Pogledajte istaknut post","Pogledajte {{$count}} istaknuta posta","Pogledajte {{$count}} istaknutih postova"],"Please fill in your Comment.":"Molimo unesite vaš komentar.","Please fill in your Name.":"Molimo unesite vaše ime.","Post a comment":"Postavite komentar","See one new update":["Pogledajte novi post","Pogledajte {{$count}} nova posta","Pogledajte {{$count}} novih postova"],Send:"Pošalji","Share this post on Email":"Podelite ovaj post na Email","Share this post on Facebook":"Podelite ovaj post na Facebook","Share this post on Google+":"Podelite ovaj post na Google+","Share this post on Linkedin":"Podelite ovaj post na Linkedin","Share this post on Twitter":"Podelite ovaj post na Twitter","Show all posts":"Prikaži sve postove","Show highlighted post only":"Prikaži najvažnije postove","Social Share":"Društveni udeo","Sort by:":"Sortiraj:","Updated {{post.content_updated_date | prettifyIsoDate}}":"Ažurirano {{post.content_updated_date | prettifyIsoDate}}","Your comment was sent for approval.":"Vaš komentar je poslat na odobrenje.","{{ item.meta.caption }} credit: {{ item.meta.credit }}":"{{ item.meta.caption }} autor: {{ item.meta.credit }}"}),e.setStrings("sr_CY",{Activate:"Активирати",Advertisement:"Реклама",Cancel:"Откажи",Comment:"Коментар","Comment *":"Коментар *","Comment should be maximum 300 characters in length.":"Коментар је ограничен на 300 карактера.",Editorial:"Избор уредника","Load more posts":"Учитај још постова",Loading:"Учитавање","Name *":"Име *","Name should be maximum 30 characters in length.":"Име је ограничено на 30 карактера.","Newest first":"Од најновијег","No posts for now.":"За сада нема постова.","Oldest first":"Од најстаријег","One pinned post":["Погледајте истакнут пост","Погледајте {{$count}} истакнута поста","Погледајте {{$count}} истакнутих постова"],"Please fill in your Comment.":"Молимо унесите ваш коментар.","Please fill in your Name.":"Молимо унесите ваше име.","Post a comment":"Поставите коментар","See one new update":["Погледајте нови пост","Погледајте {{$count}} нова поста","Погледајте {{$count}} нових постова"],Send:"Пошаљи","Show all posts":"Прикажи све постове","Show highlighted post only":"Прикажи најважније постове","Sort by:":"Сортирај:","Updated {{post.content_updated_date | prettifyIsoDate}}":"Ажурирано {{post.content_updated_date | prettifyIsoDate}}","Your comment was sent for approval.":"Ваш коментар је послат на одобрење.","{{ item.meta.caption }} credit: {{ item.meta.credit }}":"{{ item.meta.caption }} аутор: {{ item.meta.credit }}"})}]),angular.module("theme").run(["$templateCache",function(e){e.put("views/author.html",'<div class="lb-author" ng-if="timeline.settings.showAuthor"><div ng-if="timeline.settings.showAuthor && timeline.settings.showAuthorAvatar" ng-class="{\'lb-author__avatar\': (item.item_type !== \'comment\'),\n                       \'lb-author__comment\': (item.item_type === \'comment\')}"><img ng-if="item.item_type !== \'comment\'" ng-src="{{ item.original_creator.picture_url }}" ng-srcset="{{ item.original_creator.picture_srcset }}" sizes="(min-width: 1600px) 200px, 60px"></div><div class="lb-author__date" ng-bind="item.displayDate | prettifyIsoDate"></div><div ng-if="!post.syndication_in || timeline.settings.showSyndicatedAuthor"><div ng-if="!timeline.settings.authorNameLinksToEmail && item.item_type !== \'comment\'" class="lb-author__name" ng-bind="item.original_creator[timeline.settings.authorNameFormat]"></div><div class="lb-author__name" ng-if="item.item_type === \'comment\'" ng-bind="item.original_creator[timeline.settings.authorNameFormat]"></div><div ng-if="timeline.settings.authorNameLinksToEmail && item.item_type !== \'comment\'" class="lb-author__name"><a href="mailto:{{post.mainItem.original_creator.email}}" ng-bind="post.original_creator[timeline.settings.authorNameFormat]"></a></div></div><div ng-if="post.syndication_in.producer_blog_title && !timeline.settings.showSyndicatedAuthor" class="lb-producer" ng-class="{\'lb-producer__author\': timeline.settings.showSyndicatedAuthor}" ng-bind="post.syndication_in.producer_blog_title"></div></div>'),e.put("views/comments.html",'<div class="modal modal-comment border-bottom ng-cloak" ng-show="modal"><div class="modal-dialog"><div ng-show="notify" class="notify"><div class="content"><div class="comment-sent modal-header"><h3 translate>Your comment was sent for approval.</h3></div></div></div><div ng-show="form"><form name="comment" novalidate ng-submit="send();"><div class="content"><div class="modal-header"><h2 translate>Post a comment</h2></div><div class="modal-body"><fieldset><div class="field"><label for="commenter" translate>Name *</label><input name="commenter" ng-model="commenter"><div role="alert"><span class="error" ng-show="commenter.length < 3" translate>Please fill in your Name.</span> <span class="error" ng-show="commenter.length >30" translate>Name should be maximum 30 characters in length.</span></div></div><div class="field"><label for="content" translate>Comment *</label><textarea name="content" ng-model="content"></textarea><div role="alert"><span class="error" ng-show="content.length < 3" translate>Please fill in your Comment.</span> <span class="error" ng-show="content.length > 300" translate>Comment should be maximum 300 characters in length.</span></div></div></fieldset></div><div class="modal-footer"><button class="btn" ng-click="comment=false"><span translate>Cancel</span></button> <button type="submit" class="btn btn-primary"><span translate>Send</span></button></div></div></form></div></div></div>'),e.put("views/dropdown.html",'<div class="dropdown-container" ng-class="{ \'show\': listVisible }"><div class="dropdown-display" ng-click="show();" ng-class="{ \'clicked\': listVisible }"><span ng-if="!isPlaceholder && type == \'single_select\'">{{display | translate}}</span> <span class="placeholder" ng-if="isPlaceholder || type == \'multiple_select\'">{{placeholder}}</span> <i class="icon-chevron-down"></i></div><div class="dropdown-list" ng-if="type == \'single_select\'"><div><div ng-repeat="item in list" ng-click="select(item)" ng-class="{ \'selected\': isSelected(item) }"><span>{{item.name | translate}}</span> <i class="icon-checkmark icon--white"></i></div></div></div><div class="dropdown-list" ng-if="type == \'multiple_select\'"><div><div ng-repeat="item in list" ng-click="check(item)" ng-class="{ \'selected\': isChecked(item) }"><span>{{item.name | translate}}</span> <i class="icon-checkmark icon--white"></i></div></div></div></div>'),e.put("views/gallery.html",'<div class="lb-gallery"><div class="justified-gallery gallery"><a class="picture" href="#" ng-repeat="item in gallery.images track by item._id"><img ng-src="{{ item.picture_url }}" ng-srcset="{{ item.picture_srcset }}" alt="{{ item.meta.full_caption }}" data-original-src="{{ item.meta.media.renditions.baseImage.href }}" data-original-src-height="{{ item.meta.media.renditions.baseImage.height }}" data-original-src-width="{{ item.meta.media.renditions.baseImage.width }}"></a></div></div>'),e.put("views/generic-embed.html",'<div ng-if="item.meta.html" class="item--embed" lb-bind-html html-content="{{item.meta.html | fixEmbed}}"></div><article ng-if="item.meta.title || item.meta.description || item.meta.credit\n        || (!item.meta.html && item.meta.thumbnail_url)" class="item--embed item--embed__wrapper"><a ng-href="{{ item.meta.url }}" ng-if="!item.meta.html && item.meta.thumbnail_url" target="_blank" ng-class="{ \'item--embed__illustration\': item.meta.description, \'item--embed__only-illustration\': !item.meta.description}"><img ng-src="{{ item.meta.thumbnail_url }}"></a><div class="item--embed__info" ng-if="item.meta.title || item.meta.description || item.meta.credit"><div class="item--embed__title" ng-if="item.meta.title"><a ng-href="{{ item.meta.url }}" target="_blank" ng-bind="item.meta.title"></a></div><div class="item--embed__description" ng-if="item.meta.description" ng-bind="item.meta.description"></div><div class="item--embed__credit" ng-if="item.meta.credit" ng-bind="item.meta.credit"></div></div></article>'),e.put("views/item.html",'<div ng-switch="item.group_type" ng-class="[\'lb-item-{{ item.item_type | varname }}\']"><div ng-switch-when="freetype"><article lb-bind-html html-content="{{ item.text }}"></article></div><div ng-switch-default><div ng-switch="item.item_type" ng-class="{\'lb-item\': ident}"><div ng-switch-when="embed|video" ng-switch-when-separator="|"><lb-gdpr-embed-consent item="item" timeline="timeline"></div><div ng-switch-when="image" ng-if="!gallery"><figure><img ng-src="{{ item.picture_url }}" ng-srcset="{{ item.picture_srcset }}" alt="{{ item.meta.caption }}" sizes="80vw"><figcaption translate ng-if="item.meta.credit">{{ item.meta.caption }} credit: {{ item.meta.credit }}</figcaption><figcaption ng-if="!item.meta.credit">{{ item.meta.caption }}</figcaption></figure></div><div ng-switch-when="quote"><blockquote><p ng-if="item.meta.quote">{{ item.meta.quote }}</p><h4 ng-if="item.meta.credit">{{ item.meta.credit }}</h4></blockquote></div><article ng-switch-default lb-bind-html html-content="{{ item.text | outboundAnchors | fixMarkup }}"></article></div></div></div>'),e.put("views/posts.html",'<article ng-repeat="post in ctrl.allPosts() track by (post.advertisement_id ? $index: post._id)" class="lb-post list-group-item ng-cloak" ng-class="[\'lb-mainitem-{{ post.mainItem.item_type | varname }}\', {\'show-author-avatar\':\n                        ctrl.timeline.settings.showAuthor &&\n                        ctrl.timeline.settings.showAuthorAvatar &&\n                        !ctrl.isAd(post) &&\n                        !ctrl.hideInfo,\n                    \'lb-post-permalink-selected\': post._id === timeline.permalink._id}]"><span ng-if="!ctrl.isAd(post) && !ctrl.hideInfo"><lb-author item="post.mainItem" timeline="timeline" post="post"></lb-author><div class="lb-post-highlighted" ng-if="post.lb_highlight"><i class="icon-star icon--orange"></i></div><div class="lb-post-permalink"><a href="{{ ctrl.timeline.permalink.get(post._id) }}" id="{{ post._id }}" target="_blank"><i class="icon-link icon--blue"></i></a></div></span><lb-gallery items="post.items" ng-if="ctrl.showGallery(post)"></lb-gallery><span ng-if="ctrl.isAd(post)"><div class="lb-advertisement" translate>Advertisement</div></span><span></span><div ng-repeat="item in post.items track by item._id" class="lb-item lb-article-{{ item.item_type | varname }}"><div ng-if="post.fullDetails && !$first" class="list-group-item"><div class="lb-timeline__header"><lb-author item="item" timeline="ctrl.timeline" post="post"></lb-author><lb-item ident="true" item="item" timeline="timeline" gallery="ctrl.showGallery(post)"></lb-item></div></div><div ng-if="!post.fullDetails || $first"><lb-item timeline="timeline" item="item" gallery="ctrl.showGallery(post)"></lb-item></div></div><div class="lb-updated-date ng-cloak" ng-if="!ctrl.isAd(post) || ctrl.hideInfo" ng-show="post.showUpdate" translate>Updated {{post.content_updated_date | prettifyIsoDate}}</div></article>'),e.put("views/embeds/consent-placeholder.html",'<div class="lb_consent--placeholder"><div class="lb_consent--description"><div lb-bind-html html-content="{{ timeline.settings.gdprConsentText }}"></div><button class="btn btn-primary lb_consent--accept">{{ \'Activate\' | translate }}</button></div></div>'),e.put("views/embeds/facebook.html",'<div class="fb-post" data-href="{{ item.meta.original_url }}" data-show-text="true"><blockquote cite="{{ item.meta.original_url }}" class="fb-xfbml-parse-ignore"><h4><a href="{{ item.meta.original_url }}">{{ item.meta.credit }}</a></h4><p>{{ item.meta.title }}</p><div class="item--embed__description">{{ item.meta.description }}</div></blockquote></div>'),e.put("views/embeds/generic.html",'<div lb-generic-embed lb-fluid-iframe item="item"></div>'),e.put("views/embeds/instagram.html",'<blockquote class="embedly-card" data-card-controls="0"><h4><a href="{{ item.meta.original_url }}">{{ item.meta.credit }}</a></h4><p>{{ item.meta.title }}</p></blockquote>'),e.put("views/embeds/twitter.html",'<lb-twitter-card lb-twitter-content="{{ item.meta.html }}"></lb-twitter-card>')}]);