!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,a){return void 0===a&&(a="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(a),a}:e(jQuery)}(function(e){"use strict";function t(e,a){if(!(this instanceof t)){var n=new t(e,a);return n.open(),n}this.id=t.id++,this.setup(e,a),this.chainCallbacks(t._callbackChain)}if(void 0===e)return void("console"in window&&window.console.info("Too much lightness, Featherlight needs jQuery."));if(e.fn.jquery.match(/-ajax/))return void("console"in window&&window.console.info("Featherlight needs regular jQuery, not the slim version."));var a=[],n=function(t){return a=e.grep(a,function(e){return e!==t&&e.$instance.closest("body").length>0})},r={allow:1,allowfullscreen:1,frameborder:1,height:1,longdesc:1,marginheight:1,marginwidth:1,mozallowfullscreen:1,name:1,referrerpolicy:1,sandbox:1,scrolling:1,src:1,srcdoc:1,style:1,webkitallowfullscreen:1,width:1},s={keyup:"onKeyUp",resize:"onResize"},o=function(a){e.each(t.opened().reverse(),function(){return a.isDefaultPrevented()||!1!==this[s[a.type]](a)?void 0:(a.preventDefault(),a.stopPropagation(),!1)})},p=function(a){if(a!==t._globalHandlerInstalled){t._globalHandlerInstalled=a;var n=e.map(s,function(e,a){return a+"."+t.prototype.namespace}).join(" ");e(window)[a?"on":"off"](n,o)}};t.prototype={constructor:t,namespace:"featherlight",targetAttr:"data-featherlight",variant:null,resetCss:!1,background:null,openTrigger:"click",closeTrigger:"click",filter:null,root:"body",openSpeed:250,closeSpeed:250,closeOnClick:"background",closeOnEsc:!0,closeIcon:"✕",loading:"",persist:!1,otherClose:null,beforeOpen:e.noop,beforeContent:e.noop,beforeClose:e.noop,afterOpen:e.noop,afterContent:e.noop,afterClose:e.noop,onKeyUp:e.noop,onResize:e.noop,type:null,contentFilters:["jquery","image","html","ajax","iframe","text"],setup:function(t,a){"object"!=typeof t||t instanceof e!=!1||a||(a=t,t=void 0);var n=e.extend(this,a,{target:t}),r=n.resetCss?n.namespace+"-reset":n.namespace,s=e(n.background||['
','
','",'
'+n.loading+"
","
","
"].join("")),o="."+n.namespace+"-close"+(n.otherClose?","+n.otherClose:"");return n.$instance=s.clone().addClass(n.variant),n.$instance.on(n.closeTrigger+"."+n.namespace,function(t){if(!t.isDefaultPrevented()){var a=e(t.target);("background"===n.closeOnClick&&a.is("."+n.namespace)||"anywhere"===n.closeOnClick||a.closest(o).length)&&(n.close(t),t.preventDefault())}}),this},getContent:function(){if(!1!==this.persist&&this.$content)return this.$content;var t=this,a=this.constructor.contentFilters,n=function(e){return t.$currentTarget&&t.$currentTarget.attr(e)},r=n(t.targetAttr),s=t.target||r||"",o=a[t.type];if(!o&&s in a&&(o=a[s],s=t.target&&r),s=s||n("href")||"",!o)for(var p in a)t[p]&&(o=a[p],s=t[p]);if(!o){var c=s;if(s=null,e.each(t.contentFilters,function(){return(o=a[this]).test&&(s=o.test(c)),!s&&o.regex&&c.match&&c.match(o.regex)&&(s=c),!s}),!s)return"console"in window&&window.console.error("Featherlight: no content filter found "+(c?' for "'+c+'"':" (no target specified)")),!1}return o.process.call(t,s)},setContent:function(t){return this.$instance.removeClass(this.namespace+"-loading"),this.$instance.toggleClass(this.namespace+"-iframe",t.is("iframe")),this.$instance.find("."+this.namespace+"-inner").not(t).slice(1).remove().end().replaceWith(e.contains(this.$instance[0],t[0])?"":t),this.$content=t.addClass(this.namespace+"-inner"),this},open:function(t){var n=this;if(n.$instance.hide().appendTo(n.root),!(t&&t.isDefaultPrevented()||!1===n.beforeOpen(t))){t&&t.preventDefault();var r=n.getContent();if(r)return a.push(n),p(!0),n.$instance.fadeIn(n.openSpeed),n.beforeContent(t),e.when(r).always(function(e){e&&(n.setContent(e),n.afterContent(t))}).then(n.$instance.promise()).done(function(){n.afterOpen(t)})}return n.$instance.detach(),e.Deferred().reject().promise()},close:function(t){var a=this,r=e.Deferred();return!1===a.beforeClose(t)?r.reject():(0===n(a).length&&p(!1),a.$instance.fadeOut(a.closeSpeed,function(){a.$instance.detach(),a.afterClose(t),r.resolve()})),r.promise()},resize:function(e,t){if(e&&t){this.$content.css("width","").css("height","");var a=Math.max(e/(this.$content.parent().width()-1),t/(this.$content.parent().height()-1));a>1&&(a=t/Math.floor(t/a),this.$content.css("width",""+e/a+"px").css("height",""+t/a+"px"))}},chainCallbacks:function(t){for(var a in t)this[a]=e.proxy(t[a],this,e.proxy(this[a],this))}},e.extend(t,{id:0,autoBind:"[data-featherlight]",defaults:t.prototype,contentFilters:{jquery:{regex:/^[#.]\w/,test:function(t){return t instanceof e&&t},process:function(t){return!1!==this.persist?e(t):e(t).clone(!0)}},image:{regex:/\.(png|jpg|jpeg|gif|tiff?|bmp|svg)(\?\S*)?$/i,process:function(t){var a=e.Deferred(),n=new Image,r=e('');return n.onload=function(){r.naturalWidth=n.width,r.naturalHeight=n.height,a.resolve(r)},n.onerror=function(){a.reject(r)},n.src=t,a.promise()}},html:{regex:/^\s*<[\w!][^<]*>/,process:function(t){return e(t)}},ajax:{regex:/./,process:function(t){var a=e.Deferred(),n=e("
").load(t,function(e,t){"error"!==t&&a.resolve(n.contents()),a.reject()});return a.promise()}},iframe:{process:function(t){var a=new e.Deferred,n=e("