/*!
* Datepicker for Bootstrap v1.7.1 (https://github.com/uxsolutions/bootstrap-datepicker) * * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0) */
!function(n){“function”==typeof define&&define.amd?define(,n):n(“object”==typeof exports?require(“jquery”):jQuery)}(function(n,t){function f(){return new Date(Date.UTC.apply(Date,arguments))}function s(){var n=new Date;return f(n.getFullYear(),n.getMonth(),n.getDate())}function l(n,t){return n.getUTCFullYear()===t.getUTCFullYear()&&n.getUTCMonth()===t.getUTCMonth()&&n.getUTCDate()===t.getUTCDate()}function h(i,r){return function(){return r!==t&&n.fn.datepicker.deprecated®,this.apply(this,arguments)}}function p(n){return n&&!isNaN(n.getTime())}function w(t,i){function o(n,t){return t.toLowerCase()}var u,f=n(t).data(),e={},s=new RegExp(“^”+i.toLowerCase()+“()”),r;i=new RegExp(“^”+i.toLowerCase());for(r in f)i.test®&&(u=r.replace(s,o),e=f);return e}function b(t){var u={},i;if(r||(t=t.split(“-”),r))return i=r,n.each(y,function(n,t){t in i&&(u=i)}),u}var a=function(){var t={get:function(n){return this.slice(n)},contains:function(n){for(var i=n&&n.valueOf(),t=0,r=this.length;tr[this.o.language].daysMin[i+
%7]+”</th>“;t+=”</tr>“;this.picker.find(”.datepicker-days thead“).append(t)}},fillMonths:function(){for(var t,i=this._utc_to_local(this.viewDate),u=”“,n=0;n<12;n++)t=i&&i.getMonth()===n?” focused“:”“,u+='<span class=”month’t
‘“>’r[this.o.language].monthsShort[n]
”</span>“;this.picker.find(”.datepicker-months td“).html(u)},setRange:function(t){t&&t.length?this.range=n.map(t,function(n){return n.valueOf()}):delete this.range;this.fill()},getClassNames:function(t){var i=[],r=this.viewDate.getUTCFullYear(),u=this.viewDate.getUTCMonth(),f=s();return t.getUTCFullYear()v
'“':”“)+”>“a
”</span>“;b.find(”.datepicker-switch“).text(y+”-“+p);b.find(”td“).html(w)},fill:function(){var y,u,w=new Date(this.viewDate),o=w.getUTCFullYear(),d=w.getUTCMonth(),a=this.o.startDate!==-(1/0)?this.o.startDate.getUTCFullYear():-(1/0),ut=this.o.startDate!==-(1/0)?this.o.startDate.getUTCMonth():-(1/0),v=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,ft=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,et=r.today||r.en.today||”“,ot=r.clear||r.en.clear||”“,st=r.titleFormat||r.en.titleFormat,e,g,h,p,s,c,k,it,l,rt;if(!isNaN(o)&&!isNaN(d)){for(this.picker.find(”.datepicker-days .datepicker-switch“).text(i.formatDate(w,st,this.o.language)),this.picker.find(”tfoot .today“).text(et).css(”display“,this.o.todayBtn===!0||”linked“===this.o.todayBtn?”table-cell“:”none“),this.picker.find(”tfoot .clear“).text(ot).css(”display“,this.o.clearBtn===!0?”table-cell“:”none“),this.picker.find(”thead .datepicker-title“).text(this.o.title).css(”display“,”string“==typeof this.o.title&&”“!==this.o.title?”table-cell“:”none“),this.updateNavArrows(),this.fillMonths(),e=f(o,d,0),g=e.getUTCDate(),e.setUTCDate(g-(e.getUTCDay()-this.o.weekStart+7)%7),h=new Date(e),e.getUTCFullYear()<100&&h.setUTCFullYear(e.getUTCFullYear()),h.setUTCDate(h.getUTCDate()+42),h=h.valueOf(),c=[];e.valueOf()<h;){if(p=e.getUTCDay(),p===this.o.weekStart&&(c.push(”<tr>“),this.o.calendarWeeks)){var nt=new Date(e
(this.o.weekStart-p-7)%7*864e5),tt=new Date(Number(nt)+(11-nt.getUTCDay())%7*864e5),b=new Date(Number(b=f(tt.getUTCFullYear(),0,1))+(11-b.getUTCDay())%7*864e5),ht=(tt-b)/6048e5+1;c.push('<td class=”cw“>'ht
”</td>“)}s=this.getClassNames(e);s.push(”day“);k=e.getUTCDate();this.o.beforeShowDay!==n.noop&&(u=this.o.beforeShowDay(this._utc_to_local(e)),u===t?u={}:”boolean“==typeof u?u={enabled:u}:”string“==typeof u&&(u={classes:u}),u.enabled===!1&&s.push(”disabled“),u.classes&&(s=s.concat(u.classes.split(/s+/))),u.tooltip&&(y=u.tooltip),u.content&&(k=u.content));s=n.isFunction(n.uniqueSort)?n.uniqueSort(s):n.unique(s);c.push('<td class=”'+s.join(“ ”)+'“'+(y?' title=”'y
'“':”“)+' data-date=”'+e.getTime().toString()+'“>'k
”</td>“);y=null;p===this.o.weekEnd&&c.push(”</tr>“);e.setUTCDate(e.getUTCDate()+1)}this.picker.find(”.datepicker-days tbody“).html(c.join(”“));it=r.monthsTitle||r.en.monthsTitle||”Months“;l=this.picker.find(”.datepicker-months“).find(”.datepicker-switch“).text(this.o.maxViewMode<2?it:o).end().find(”tbody span“).removeClass(”active“);(n.each(this.dates,function(n,t){t.getUTCFullYear()===o&&l.eq(t.getUTCMonth()).addClass(”active“)}),(o<a||o>v)&&l.addClass(”disabled“),o===a&&l.slice(0,ut).addClass(”disabled“),o===v&&l.slice(ft+1).addClass(”disabled“),this.o.beforeShowMonth!==n.noop)&&(rt=this,n.each(l,function(i,r){var f=new Date(o,i,1),u=rt.o.beforeShowMonth(f);u===t?u={}:”boolean“==typeof u?u={enabled:u}:”string“==typeof u&&(u={classes:u});u.enabled!==!1||n®.hasClass(”disabled“)||n®.addClass(”disabled“);u.classes&&n®.addClass(u.classes);u.tooltip&&n®.prop(”title“,u.tooltip)}));this._fill_yearsView(”.datepicker-years“,”year“,10,o,a,v,this.o.beforeShowYear);this._fill_yearsView(”.datepicker-decades“,”decade“,100,o,a,v,this.o.beforeShowDecade);this._fill_yearsView(”.datepicker-centuries“,”century“,1e3,o,a,v,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var i,r,u=new Date(this.viewDate),t=u.getUTCFullYear(),f=u.getUTCMonth(),e=this.o.startDate!==-(1/0)?this.o.startDate.getUTCFullYear():-(1/0),s=this.o.startDate!==-(1/0)?this.o.startDate.getUTCMonth():-(1/0),o=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,h=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,n=1;switch(this.viewMode){case 0:i=t<=e&&f<=s;r=t>=o&&f>=h;break;case 4:n*=10;case 3:n*=10;case 2:n*=10;case 1:i=Math.floor(t/n)*n<=e;r=Math.floor(t/n)*n+n>=o}this.picker.find(”.prev“).toggleClass(”disabled“,i);this.picker.find(”.next“).toggleClass(”disabled“,r)}},click:function(t){t.preventDefault();t.stopPropagation();var r,o,u,e;r=n(t.target);r.hasClass(”datepicker-switch“)&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1);r.hasClass(”today“)&&!r.hasClass(”day“)&&(this.setViewMode(0),this._setDate(s(),”linked“===this.o.todayBtn?null:”view“));r.hasClass(”clear“)&&this.clearDates();r.hasClass(”disabled“)||(r.hasClass(”month“)||r.hasClass(”year“)||r.hasClass(”decade“)||r.hasClass(”century“))&&(this.viewDate.setUTCDate(1),o=1,1===this.viewMode?(e=r.parent().find(”span“).index®,u=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(e)):(e=0,u=Number(r.text()),this.viewDate.setUTCFullYear(u)),this._trigger(i.viewModes.e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(f(u,e,o)):(this.setViewMode(this.viewMode-1),this.fill()));this.picker.is(”:visible“)&&this._focused_from&&this._focused_from.focus();delete this._focused_from},dayCellClick:function(t){var r=n(t.currentTarget),u=r.data(”date“),i=new Date(u);this.o.updateViewDate&&(i.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger(”changeYear“,this.viewDate),i.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger(”changeMonth“,this.viewDate));this._setDate(i)},navArrowsClick:function(t){var u=n(t.currentTarget),r=u.hasClass(”prev“)?-1:1;0!==this.viewMode&&(r*=12*i.viewModes.navStep);this.viewDate=this.moveMonth(this.viewDate,r);this._trigger(i.viewModes.e,this.viewDate);this.fill()},_toggle_multidate:function(n){var t=this.dates.contains(n);if(n||this.dates.clear(),t!==-1?(this.o.multidate===!0||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(t):this.o.multidate===!1?(this.dates.clear(),this.dates.push(n)):this.dates.push(n),”number“==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(n,t){t&&”date“!==t||this._toggle_multidate(n&&new Date(n));(!t&&this.o.updateViewDate||”view“===t)&&(this.viewDate=n&&new Date(n));this.fill();this.setValue();t&&”view“===t||this._trigger(”changeDate“);this.inputField.trigger(”change“);!this.o.autoclose||t&&”date“!==t||this.hide()},moveDay:function(n,t){var i=new Date(n);return i.setUTCDate(n.getUTCDate()+t),i},moveWeek:function(n,t){return this.moveDay(n,7*t)},moveMonth:function(n,t){var f;if(!p(n))return this.o.defaultViewDate;if(!t)return n;var r,u,i=new Date(n.valueOf()),e=i.getUTCDate(),o=i.getUTCMonth(),s=Math.abs(t);if(t=t>0?1:-1,1===s)u=t===-1?function(){return i.getUTCMonth()===o}:function(){return i.getUTCMonth()!==r},r=o+t,i.setUTCMonth®,r=(r+12)%12;else{for(f=0;f<s;f++)i=this.moveMonth(i,t);r=i.getUTCMonth();i.setUTCDate(e);u=function(){return r!==i.getUTCMonth()}}for(;u();)i.setUTCDate(–e),i.setUTCMonth®;return i},moveYear:function(n,t){return this.moveMonth(n,12*t)},moveAvailableDate:function(n,t,i){do{if(n=this(n,t),!this.dateWithinRange(n))return!1;i=”moveDay“}while(this.dateIsDisabled(n));return n},weekOfDateIsDisabled:function(t){return n.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)!==-1},dateIsDisabled:function(t){return this.weekOfDateIsDisabled(t)||n.grep(this.o.datesDisabled,function(n){return l(t,n)}).length>0},dateWithinRange:function(n){return n>=this.o.startDate&&n<=this.o.endDate},keydown:function(n){if(!this.picker.is(”:visible“))return void(40!==n.keyCode&&27!==n.keyCode||(this.show(),n.stopPropagation()));var i,t,u=!1,r=this.focusDate||this.viewDate;switch(n.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide();n.preventDefault();n.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;i=37===n.keyCode||38===n.keyCode?-1:1;0===this.viewMode?n.ctrlKey?(t=this.moveAvailableDate(r,i,”moveYear“),t&&this._trigger(”changeYear“,this.viewDate)):n.shiftKey?(t=this.moveAvailableDate(r,i,”moveMonth“),t&&this._trigger(”changeMonth“,this.viewDate)):37===n.keyCode||39===n.keyCode?t=this.moveAvailableDate(r,i,”moveDay“):this.weekOfDateIsDisabled®||(t=this.moveAvailableDate(r,i,”moveWeek“)):1===this.viewMode?(38!==n.keyCode&&40!==n.keyCode||(i*=4),t=this.moveAvailableDate(r,i,”moveMonth“)):2===this.viewMode&&(38!==n.keyCode&&40!==n.keyCode||(i*=4),t=this.moveAvailableDate(r,i,”moveYear“));t&&(this.focusDate=this.viewDate=t,this.setValue(),this.fill(),n.preventDefault());break;case 13:if(!this.o.forceParse)break;r=this.focusDate||this.dates.get(-1)||this.viewDate;this.o.keyboardNavigation&&(this._toggle_multidate®,u=!0);this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.setValue();this.fill();this.picker.is(”:visible“)&&(n.preventDefault(),n.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.fill();this.hide()}u&&(this.dates.length?this._trigger(”changeDate“):this._trigger(”clearDate“),this.inputField.trigger(”change“))},setViewMode:function(n){this.viewMode=n;this.picker.children(”div“).hide().filter(”.datepicker-“+i.viewModes.clsName).show();this.updateNavArrows();this._trigger(”changeViewMode“,new Date(this.viewDate))}};c=function(t,i){n.data(t,”datepicker“,this);this.element=n(t);this.inputs=n.map(i.inputs,function(n){return n.jquery?n:n});delete i.inputs;this.keepEmptyValues=i.keepEmptyValues;delete i.keepEmptyValues;o.call(n(this.inputs),i).on(”changeDate“,n.proxy(this.dateUpdated,this));this.pickers=n.map(this.inputs,function(t){return n.data(t,”datepicker“)});this.updateDates()};c.prototype={updateDates:function(){this.dates=n.map(this.pickers,function(n){return n.getUTCDate()});this.updateRanges()},updateRanges:function(){var t=n.map(this.dates,function(n){return n.valueOf()});n.each(this.pickers,function(n,i){i.setRange(t)})},dateUpdated:function(i){var u;if(!this.updating&&(this.updating=!0,u=n.data(i.target,”datepicker“),u!==t)){var r=u.getUTCDate(),s=this.keepEmptyValues,o=n.inArray(i.target,this.inputs),f=o-1,e=o+1,h=this.inputs.length;if(o!==-1){if(n.each(this.pickers,function(n,t){t.getUTCDate()||t!==u&&s||t.setUTCDate®}),ri
” function)“);return r};n.fn.datepicker=o;e=n.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:n.noop,beforeShowMonth:n.noop,beforeShowYear:n.noop,beforeShowDecade:n.noop,beforeShowCentury:n.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:,datesDisabled:[],endDate:1/0,forceParse:!0,format:”mm/dd/yyyy“,keepEmptyValues:!1,keyboardNavigation:!0,language:”en“,minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:”,“,orientation:”auto“,rtl:!1,startDate:-(1/0),startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:”body“,immediateUpdates:!1,title:”“,templates:{leftArrow:”«“,rightArrow:”»“},showWeekDays:!0};y=n.fn.datepicker.locale_opts=;n.fn.datepicker.Constructor=u;r=n.fn.datepicker.dates={en:{days:,daysShort:,daysMin:,months:,monthsShort:,today:”Today“,clear:”Clear“,titleFormat:”MM yyyy“}};i={viewModes:[{names:,clsName:”days“,e:”changeMonth“},{names:,clsName:”months“,e:”changeYear“,navStep:1},{names:,clsName:”years“,e:”changeDecade“,navStep:10},{names:,clsName:”decades“,e:”changeCentury“,navStep:100},{names:,clsName:”centuries“,e:”changeMillennium“,navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -/:-@u5e74u6708u65e5+/g,parseFormat:function(n){if(”function“==typeof n.toValue&&”function“==typeof n.toDisplay)return n;var t=n.replace(this.validParts,”0“).split(”0“),i=n.match(this.validParts);if(!t||!t.length||!i||0===i.length)throw new Error(”Invalid date format.“);return{separators:t,parts:i}},parseDate:function(f,e,o,h){function et(n,t){return t===!0&&(t=10),n<100&&(n+=2e3,n>(new Date).getFullYear()+t&&(n-=100)),n}function tt(){var n=this.slice(0,l.length),t=l.slice(0,n.length);return n.toLowerCase()===t.toLowerCase()}var l,y,it,c,rt,ut,g,v,ft,d,w;if(!f)return t;if(f instanceof Date)return f;if(”string“==typeof e&&(e=i.parseFormat(e)),e.toValue)return e.toValue(f,e,o);if(ut={d:”moveDay“,m:”moveMonth“,w:”moveWeek“,y:”moveYear“},g={yesterday:”-1d“,today:”+0d“,tomorrow:”+1d“},f in g&&(f=g),/^[-+]d+([s,]+d+)*$/i.test(f)){for(l=f.match(/(d+)()/gi),f=new Date,c=0;ce.templates.leftArrow
'</th><th colspan=”5“ class=”datepicker-switch“></th><th class=”next“>'e.templates.rightArrow
”</th></tr></thead>“,contTemplate:'<tbody><tr><td colspan=”7“></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan=”7“ class=”today“></th></tr><tr><th colspan=”7“ class=”clear“></th></tr></tfoot>'};i.template='<div class=”datepicker“><div class=”datepicker-days“><table class=”table-condensed“>'i.headTemplate
”<tbody></tbody>“i.footTemplate
'</table></div><div class=”datepicker-months“><table class=”table-condensed“>'+i.headTemplate+i.contTemplate+i.footTemplate+'</table></div><div class=”datepicker-years“><table class=”table-condensed“>'+i.headTemplate+i.contTemplate+i.footTemplate+'</table></div><div class=”datepicker-decades“><table class=”table-condensed“>'+i.headTemplate+i.contTemplate+i.footTemplate+'</table></div><div class=”datepicker-centuries“><table class=”table-condensed“>'+i.headTemplate+i.contTemplate+i.footTemplate+”</table></div></div>“;n.fn.datepicker.DPGlobal=i;n.fn.datepicker.noConflict=function(){return n.fn.datepicker=v,this};n.fn.datepicker.version=”1.7.1“;n.fn.datepicker.deprecated=function(n){var t=window.console;t&&t.warn&&t.warn(”DEPRECATED: “+n)};n(document).on(”focus.datepicker.data-api click.datepicker.data-api“,‘',function(t){var i=n(this);i.data(”datepicker“)||(t.preventDefault(),o.call(i,”show“))});n(function(){o.call(n(’'))})});!function(n,t,i,r){function s(t,i){this.element=n(t);this.settings=n.extend({},d,i);this._defaults=d;this._name=u;this.init()}function a(t){f&&(t.element.addClass(”navbar-hidden“).animate({top:-1*parseInt(t.element.css(”height“),10)+t.settings.navbarOffset},{queue:!1,duration:t.settings.animationDuration}),n(”.dropdown.open .dropdown-toggle“,t.element).dropdown(”toggle“),f=!1)}function o(n){f||(n.element.removeClass(”navbar-hidden“).animate({top:0},{queue:!1,duration:n.settings.animationDuration}),f=!0)}function g(n){var t=e.scrollTop(),i=t-b;if(b=t,0>i){if(f)return;(n.settings.showOnUpscroll||h>=t)&&o(n)}else if(i>0){if(!f)return void(n.settings.showOnBottom&&t+k===c.height()&&o(n));t>=h&&a(n)}}function v(n){n.settings.disableAutohide||(w=(new Date).getTime(),g(n))}function nt(n){c.on(”scroll.“+u,function(){(new Date).getTime()-w>l?v(n):(clearTimeout(y),y=setTimeout(function(){v(n)},l))});e.on(”resize.“+u,function(){clearTimeout(p);p=setTimeout(function(){k=e.height()},l)})}function tt(){c.off(”.“+u);e.off(”.“+u)}var h,u=”autoHidingNavbar“,e=n(t),c=n(i),y=null,p=null,l=70,w=0,b=null,k=e.height(),f=!0,d={disableAutohide:!1,showOnUpscroll:!0,showOnBottom:!0,hideOffset:”auto“,animationDuration:200,navbarOffset:0};s.prototype={init:function(){return this.elements={navbar:this.element},this.setDisableAutohide(this.settings.disableAutohide),this.setShowOnUpscroll(this.settings.showOnUpscroll),this.setShowOnBottom(this.settings.showOnBottom),this.setHideOffset(this.settings.hideOffset),this.setAnimationDuration(this.settings.animationDuration),h=”auto“===this.settings.hideOffset?parseInt(this.element.css(”height“),10):this.settings.hideOffset,nt(this),this.element},setDisableAutohide:function(n){return this.settings.disableAutohide=n,this.element},setShowOnUpscroll:function(n){return this.settings.showOnUpscroll=n,this.element},setShowOnBottom:function(n){return this.settings.showOnBottom=n,this.element},setHideOffset:function(n){return this.settings.hideOffset=n,this.element},setAnimationDuration:function(n){return this.settings.animationDuration=n,this.element},show:function(){return o(this),this.element},hide:function(){return a(this),this.element},destroy:function(){return tt(this),o(this),n.data(this,”plugin_“+u,null),this.element}};n.fn=function(t){var f=arguments,i;return t===r||”object“==typeof t?this.each(function(){n.data(this,”plugin_“+u)||n.data(this,”plugin_“+u,new s(this,t))}):”string“==typeof t&&”_“!==t&&”init“!==t?(this.each(function(){var r=n.data(this,”plugin_“+u);r instanceof s&&”function“==typeof r&&(i=r.apply(r,Array.prototype.slice.call(f,1)))}),i!==r?i:this):void 0}}(jQuery,window,document);!function(n){”use strict“;function t(n,i){if(!(this instanceof t)){var r=new t(n,i);return r.open(),r}this.id=t.id++;this.setup(n,i);this.chainCallbacks(t._callbackChain)}function e(n,t){var r={};for(var i in n)i in t&&(r=n,delete n);return r}function o(n,t){var u={},e=new RegExp(”^“t
”()(.*)“),r,i,f;for(r in n)i=r.match(e),i&&(f=(i+i.replace(/()/g,”-$1“)).toLowerCase(),u=n);return u}if(”undefined“==typeof n)return void(”console“in window&&window.console.info(”Too much lightness, Featherlight needs jQuery.“));var i=[],r=function(t){return i=n.grep(i,function(n){return n!==t&&n.$instance.closest(”body“).length>0})},s={allowfullscreen:1,frameborder:1,height:1,longdesc:1,marginheight:1,marginwidth:1,name:1,referrerpolicy:1,scrolling:1,sandbox:1,src:1,srcdoc:1,width:1},u={keyup:”onKeyUp“,resize:”onResize“},h=function(i){n.each(t.opened().reverse(),function(){if(!i.isDefaultPrevented()&&!1===this[u](i))return(i.preventDefault(),i.stopPropagation(),!1)})},f=function(i){if(i!==t._globalHandlerInstalled){t._globalHandlerInstalled=i;var r=n.map(u,function(n,i){return i+”.“+t.prototype.namespace}).join(” “);n(window)(r,h)}};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:n.noop,beforeContent:n.noop,beforeClose:n.noop,afterOpen:n.noop,afterContent:n.noop,afterClose:n.noop,onKeyUp:n.noop,onResize:n.noop,type:null,contentFilters:,setup:function(t,i){”object“!=typeof t||t instanceof n!=!1||i||(i=t,t=void 0);var r=n.extend(this,i,{target:t}),u=r.resetCss?r.namespace+”-reset“:r.namespace,f=n(r.background||['<div class=”'u
“-loading ”u
'“>','<div class=”'u
'-content“>','<button class=”'u
“-close-icon ”r.namespace
'-close“ aria-label=”Close“>',r.closeIcon,”</button>“,'<div class=”'r.namespace
'-inner“>'r.loading
”</div>“,”</div>“,”</div>“].join(”“)),e=”.“r.namespace
”-close“+(r.otherClose?”,“+r.otherClose:”“);return r.$instance=f.clone().addClass(r.variant),r.$instance.on(r.closeTrigger+”.“+r.namespace,function(t){var i=n(t.target);(”background“===r.closeOnClick&&i.is(”.“+r.namespace)||”anywhere“===r.closeOnClick||i.closest(e).length)&&(r.close(t),t.preventDefault())}),this},getContent:function(){var e,u;if(this.persist!==!1&&this.$content)return this.$content;var r=this,f=this.constructor.contentFilters,o=function(n){return r.$currentTarget&&r.$currentTarget.attr(n)},s=o(r.targetAttr),t=r.target||s||”“,i=f;if(!i&&t in f&&(i=f,t=r.target&&s),t=t||o(”href“)||”“,!i)for(e in f)r&&(i=f,t=r);return!i&&(u=t,t=null,n.each(r.contentFilters,function(){return i=f,i.test&&(t=i.test(u)),!t&&i.regex&&u.match&&u.match(i.regex)&&(t=u),!t}),!t)?(”console“in window&&window.console.error(”Featherlight: no content filter found “+(u?' for ”'u
'“':” (no target specified)“)),!1):i.process.call(r,t)},setContent:function(t){var i=this;return t.is(”iframe“)&&i.$instance.addClass(i.namespace+”-iframe“),i.$instance.removeClass(i.namespace+”-loading“),i.$instance.find(”.“i.namespace
”-inner“).not(t).slice(1).remove().end().replaceWith(n.contains(i.$instance,t)?”“:t),i.$content=t.addClass(i.namespace+”-inner“),i},open:function(t){var r=this,u;return(r.$instance.hide().appendTo(r.root),!(t&&t.isDefaultPrevented()||r.beforeOpen(t)===!1))&&(t&&t.preventDefault(),u=r.getContent(),u)?(i.push®,f(!0),r.$instance.fadeIn(r.openSpeed),r.beforeContent(t),n.when(u).always(function(n){r.setContent(n);r.afterContent(t)}).then(r.$instance.promise()).done(function(){r.afterOpen(t)})):(r.$instance.detach(),n.Deferred().reject().promise())},close:function(t){var i=this,u=n.Deferred();return i.beforeClose(t)===!1?u.reject():(0===r(i).length&&f(!1),i.$instance.fadeOut(i.closeSpeed,function(){i.$instance.detach();i.afterClose(t);u.resolve()})),u.promise()},resize:function(n,t){if(n&&t){this.$content.css(”width“,”“).css(”height“,”“);var i=Math.max(n/(this.$content.parent().width()-1),t/(this.$content.parent().height()-1));i>1&&(i=t/Math.floor(t/i),this.$content.css(”width“,”“n/i
”px“).css(”height“,”“t/i
”px“))}},chainCallbacks:function(t){for(var i in t)this=n.proxy(t,this,n.proxy(this,this))}};n.extend(t,{id:0,autoBind:”“,defaults:t.prototype,contentFilters:{jquery:{regex:/^w/,test:function(t){return t instanceof n&&t},process:function(t){return this.persist!==!1?n(t):n(t).clone(!0)}},image:{regex:/.(png|jpg|jpeg|gif|tiff|bmp|svg)(?S*)?$/i,process:function(t){var f=this,u=n.Deferred(),i=new Image,r=n('<img src=”'t
'“ alt=”“ class=”'f.namespace
'-image“ />');return i.onload=function(){r.naturalWidth=i.width;r.naturalHeight=i.height;u.resolve®},i.onerror=function(){u.reject®},i.src=t,u.promise()}},html:{regex:/^s*<[^<]*>/,process:function(t){return n(t)}},ajax:{regex:/./,process:function(t){var i=n.Deferred(),r=n(”<div></div>“).load(t,function(n,t){”error“!==t&&i.resolve(r.contents());i.fail()});return i.promise()}},iframe:{process:function(t){var i=new n.Deferred,r=n(”<iframe/>“),u=o(this,”iframe“),f=e(u,s);return r.hide().attr(”src“,t).attr(f).css(u).on(”load“,function(){i.resolve(r.show())}).appendTo(this.$instance.find(”.“this.namespace
”-content“)),i.promise()}},text:{process:function(t){return n(”<div>“,{text:t})}}},functionAttributes:,readElementConfig:function(t,i){var u=this,f=new RegExp(”^data-“i
”-(.*)“),r={};return t&&t.attributes&&n.each(t.attributes,function(){var e=this.name.match(f),t,i;if(e){if(t=this.value,i=n.camelCase(e),n.inArray(i,u.functionAttributes)>=0)t=new Function(t);else try{t=JSON.parse(t)}catch(o){}r=t}}),r},extend:function(t,i){var r=function(){this.constructor=t};return r.prototype=this.prototype,t.prototype=new r,t.__super__=this.prototype,n.extend(t,this,i),t.defaults=t.prototype,t},attach:function(t,i,r){var u=this;”object“!=typeof i||i instanceof n!=!1||r||(r=i,i=void 0);r=n.extend({},r);var e,s=r.namespace||u.defaults.namespace,f=n.extend({},u.defaults,u.readElementConfig(t,s),r),o=function(o){var h=n(o.currentTarget),c=n.extend({$source:t,$currentTarget:h},u.readElementConfig(t,f.namespace),u.readElementConfig(o.currentTarget,f.namespace),r),s=e||h.data(”featherlight-persisted“)||new u(i,c);”shared“===s.persist?e=s:s.persist!==!1&&h.data(”featherlight-persisted“,s);c.$currentTarget.blur&&c.$currentTarget.blur();s.open(o)};return t.on(f.openTrigger+”.“+f.namespace,f.filter,o),o},current:function(){var n=this.opened();return n||null},opened:function(){var t=this;return r(),n.grep(i,function(n){return n instanceof t})},close:function(n){var t=this.current();if(t)return t.close(n)},_onReady:function(){var t=this;t.autoBind&&(n(t.autoBind).each(function(){t.attach(n(this))}),n(document).on(”click“,t.autoBind,function(i){if(!i.isDefaultPrevented()){var r=t.attach(n(i.currentTarget));r(i)}}))},_callbackChain:{onKeyUp:function(t,i){return 27===i.keyCode?(this.closeOnEsc&&n.featherlight.close(i),!1):t(i)},beforeOpen:function(t,i){return n(document.documentElement).addClass(”with-featherlight“),this._previouslyActive=document.activeElement,this._$previouslyTabbable=n(”a, input, select, textarea, iframe, button, iframe, [contentEditable=true]“).not(”“).not(this.$instance.find(”button“)),this._$previouslyWithTabIndex=n(”“).not(‘'),this._previousWithTabIndices=this._$previouslyWithTabIndex.map(function(t,i){return n(i).attr(”tabindex“)}),this._$previouslyWithTabIndex.add(this._$previouslyTabbable).attr(”tabindex“,-1),document.activeElement.blur&&document.activeElement.blur(),t(i)},afterClose:function(i,r){var u=i®,f=this;return this._$previouslyTabbable.removeAttr(”tabindex“),this._$previouslyWithTabIndex.each(function(t,i){n(i).attr(”tabindex“,f._previousWithTabIndices)}),this._previouslyActive.focus(),0===t.opened().length&&n(document.documentElement).removeClass(”with-featherlight“),u},onResize:function(n,t){return this.resize(this.$content.naturalWidth,this.$content.naturalHeight),n(t)},afterContent:function(n,t){var i=n(t);return this.$instance.find(”:not()“).focus(),this.onResize(t),i}}});n.featherlight=t;n.fn.featherlight=function(n,i){return t.attach(this,n,i),this};n(document).ready(function(){t._onReady()})}(jQuery),function(n){function t(n,t){this.previewElement=n;this.options=t;this.animationLoaded=!1}t.scopes=[];t.prototype={supportedFormats:,activate:function(){var n=this;this.previewElement.width()===0?setTimeout(function(){n.activate()},100):(n.mode=n.getOption(”mode“),n.wrap(),n.addSpinner(),n.addControl(),n.addEvents())},wrap:function(){this.previewElement.addClass(”gifplayer-ready“);this.wrapper=this.previewElement.wrap(”<div class='gifplayer-wrapper'></div>“).parent();this.wrapper.css(”width“,this.previewElement.width());this.wrapper.css(”height“,this.previewElement.height());this.previewElement.css(”cursor“,”pointer“)},addSpinner:function(){this.spinnerElement=n(”<div class = 'spinner'></div>“);this.wrapper.append(this.spinnerElement);this.spinnerElement.hide()},getOption:function(n){var t=this.previewElement.data(n.toLowerCase());return t!=undefined&&t!=”“?t:this.options},addControl:function(){var t=this.getOption(”label“);this.playElement=n(”<ins class='play-gif'>“t
”</ins>“);this.wrapper.append(this.playElement);this.playElement.css(”top“,this.previewElement.height()/2-this.playElement.height()/2);this.playElement.css(”left“,this.previewElement.width()/2-this.playElement.width()/2)},addEvents:function(){var n=this,t=this.getOption(”playOn“);switch(t){case”click“:n.playElement.on(”click“,function(){n.previewElement.trigger(”click“)});n.previewElement.on(”click“,function(t){n.loadAnimation();t.preventDefault();t.stopPropagation()});break;case”hover“:n.previewElement.on(”click mouseover“,function(t){n.loadAnimation();t.preventDefault();t.stopPropagation()});break;case”auto“:console.log(”auto not implemented yet“);break;default:console.log(t+” is not accepted as playOn value.“)}},processScope:function(){scope=this.getOption(”scope“);scope&&(t.scopes&&t.scopes.stopGif(),t.scopes=this)},loadAnimation:function(){this.processScope();this.spinnerElement.show();this.mode==”gif“?this.loadGif():this.mode==”video“&&(this.videoLoaded?this.playVideo():this.loadVideo());this.getOption(”onPlay“).call(this.previewElement)},stopGif:function(){this.gifElement.hide();this.previewElement.show();this.playElement.show();this.resetEvents();this.getOption(”onStop“).call(this.previewElement)},getFile:function(n){var t=this.getOption(n);if(t!=undefined&&t!=”“)return t;for(replaceString=this.previewElement.attr(”src“),i=0;i<this.supportedFormats.length;i++)pattrn=new RegExp(this.supportedFormats+”$“,”i“),replaceString=replaceString.replace(pattrn,n);return replaceString},loadGif:function(){var t=this,i;t.playElement.hide();this.animationLoaded||this.enableAbort();var r=this.getFile(”gif“),u=this.previewElement.width(),f=this.previewElement.height();this.gifElement=n(”<img class='gp-gif-element' width='“u
”' height=' “f
” '/>“);i=this.getOption(”wait“);i?this.gifElement.load(function(){t.animationLoaded=!0;t.resetEvents();t.previewElement.hide();t.wrapper.append(t.gifElement);t.spinnerElement.hide();t.getOption(”onLoadComplete“).call(t.previewElement)}):(t.animationLoaded=!0,t.resetEvents(),t.previewElement.hide(),t.wrapper.append(t.gifElement),t.spinnerElement.hide());this.gifElement.css(”cursor“,”pointer“);this.gifElement.css(”position“,”absolute“);this.gifElement.css(”top“,”0“);this.gifElement.css(”left“,”0“);this.gifElement.attr(”src“,r);this.gifElement.click(function(i){n(this).remove();t.stopGif();i.preventDefault();i.stopPropagation()});t.getOption(”onLoad“).call(t.previewElement)},loadVideo:function(){this.videoLoaded=!0;var f=this.getFile(”mp4“),e=this.getFile(”webm“),i=this.previewElement.width(),r=this.previewElement.height();this.videoElement=n('<video class=”gp-video-element“ width=”'i
'px“ height=”'r
'“ style=”margin:0 auto;width:'i
“px;height:”r
'px;“ autoplay=”autoplay“ loop=”loop“ muted=”muted“ poster=”'+this.previewElement.attr(“src”)+'“><source type=”video/mp4“ src=”'f
'“><source type=”video/webm“ src=”'e
'“></video>');var t=this,u=function(){t.videoElement.readyState===4?(t.playVideo(),t.animationLoaded=!0):setTimeout(u,100)},o=this.getOption(”wait“);o?u():this.playVideo();this.videoElement.on(”click“,function(){t.videoPaused?t.resumeVideo():t.pauseVideo()})},playVideo:function(){this.spinnerElement.hide();this.previewElement.hide();this.playElement.hide();this.gifLoaded=!0;this.previewElement.hide();this.wrapper.append(this.videoElement);this.videoPaused=!1;this.videoElement.play();this.getOption(”onPlay“).call(this.previewElement)},pauseVideo:function(){this.videoPaused=!0;this.videoElement.pause();this.playElement.show();this.mouseoverEnabled=!1;this.getOption(”onStop“).call(this.previewElement)},resumeVideo:function(){this.videoPaused=!1;this.videoElement.play();this.playElement.hide();this.getOption(”onPlay“).call(this.previewElement)},enableAbort:function(){var n=this;this.previewElement.click(function(t){n.abortLoading(t)});this.spinnerElement.click(function(t){n.abortLoading(t)})},abortLoading:function(n){this.spinnerElement.hide();this.playElement.show();n.preventDefault();n.stopPropagation();this.gifElement.off(”load“).on(”load“,function(n){n.preventDefault();n.stopPropagation()});this.resetEvents();this.getOption(”onStop“).call(this.previewElement)},resetEvents:function(){this.previewElement.off(”click“);this.previewElement.off(”mouseover“);this.playElement.off(”click“);this.spinnerElement.off(”click“);this.addEvents()}};n.fn.gifplayer=function(i){return/^(play|stop)$/i.test(i)?this.each(function(){if(i=i.toLowerCase(),n(this).hasClass(”gifplayer-ready“)){var r=new t(n(this),null);r.options={};r.options=n.extend({},n.fn.gifplayer.defaults,r.options);r.wrapper=n(this).parent();r.spinnerElement=r.wrapper.find(”.spinner“);r.playElement=r.wrapper.find(”.play-gif“);r.gifElement=r.wrapper.find(”.gp-gif-element“);r.videoElement=r.wrapper.find(”.gp-video-element“);r.mode=r.getOption(”mode“);switch(i){case”play“:r.playElement.trigger(”click“);break;case”stop“:r.playElement.is(”:visible“)||(r.mode==”gif“?r.stopGif():r.mode==”video“&&r.videoElement.trigger(”click“))}}}):this.each(function(){i=n.extend({},n.fn.gifplayer.defaults,i);var r=new t(n(this),i);r.activate()})};n.fn.gifplayer.defaults={label:”GIF“,playOn:”click“,mode:”gif“,gif:”“,mp4:”“,webm:”“,wait:!1,scope:!1,onPlay:function(){},onStop:function(){},onLoad:function(){},onLoadComplete:function(){}}}(jQuery);