function resizeIframes(){$(".RTE iframe, #videoModal iframe").each(function(){var n=$(this),t=n.attr("width"),i=n.attr("height"),r=i/t,u=n.width(),f=u*r;n.css("height",f)})}function getVideoEmbedHtml(n){var i="",t=null,r;return(n.indexOf("youtube.com")>-1?(r=/v=([a-zA-Z_0-9\-]+)/gi,t=r.exec(n)):n.indexOf("youtu.be")>-1&&(r=/youtu.be\/([a-zA-Z_0-9\-]+)/gi,t=r.exec(n)),t!==null&&t.length>0&&(i=t[1]),i!=="")?'<span class="close-modal" data-dismiss="modal">×<\/span><iframe width="640" height="360" src="//www.youtube.com/embed/'+i+'" frameborder="0" allowfullscreen><\/iframe>':(n.indexOf("vimeo.com")>-1&&(r=/\/([0-9]+)/gi,t=r.exec(n)),t!==null&&t.length>0&&(i=t[1]),i!==""?'<span class="close-modal" data-dismiss="modal">×<\/span><iframe src="https://player.vimeo.com/video/'+i+'?color=ffffff" width="640" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen><\/iframe>':void 0)}var swf;if($(window).bind("load resize",function(){resizeIframes()}),swf=swf||{},swf.geolocator={$pc:null,$loc:null,$frm:null,position:{latitude:0,longitude:0},init:function(){function t(t){n.$frm=t.parents("form");n.$pc=$(".geoPostcode",n.$frm);n.$loc=$(".geoLatLong",n.$frm)}var n=this;$(".geoLink").click(function(i){i.preventDefault();t($(this));n.setLocation();n.$pc.val("");$(".geoMessage",n.$frm).removeClass("hidden");$(this).addClass("hidden")});$(".geoPostcode").change(function(){t($(this));$(".geoMessage").addClass("hidden");$(".geoLink").removeClass("hidden");n.$loc.val("")});$(".geoSearchButton2").click(function(i){i.preventDefault();t($(this));n.$frm.submit()});$(".geoSearchButton").click(function(i){i.preventDefault();t($(this));n.$pc.val().length>0?n.getLocFromPostcode(function(){swf.eventIndex.getResultsForPage(1)}):swf.eventIndex.getResultsForPage(1)})},getLocation:function(n,t){navigator.geolocation.getCurrentPosition(function(t){return t.latitude=t.coords.latitude,t.longitude=t.coords.longitude,n(t)},function(){if(t)return t()})},getLocFromPostcode:function(n){var i=this,t=this.$pc.val(),r=t.match(/^[A-Z]{1,2}[0-9][0-9A-Z]?\s?[0-9][A-Z]{2}$/gi),f=r!==null&&r.length>0,u=t.match(/^[A-Z]{1,2}[0-9][0-9A-Z]?$/gi),e=u!==null&&u.length>0;t.length>=5&&f?($(".geoError",i.$frm).addClass("hidden"),$.getJSON("https://api.postcodes.io/postcodes/"+t.trim(),function(t){i.$loc.val(t.result.latitude+","+t.result.longitude);n!==undefined&&n()})):t.length>=2&&t.length<=4&&e?($(".geoError",i.$frm).addClass("hidden"),$.getJSON("https://api.postcodes.io/outcodes/"+t.trim(),function(t){i.$loc.val(t.result.latitude+","+t.result.longitude);n!==undefined&&n()})):i.$loc.val("")},setLocation:function(){var n=this,t=swf.geolocator;t.getLocation(function(t){$(".geoError",n.$frm).addClass("hidden");n.$loc.val(t.latitude+","+t.longitude)},function(){$(".geoError",n.$frm).removeClass("hidden");$(".geoMessage",n.$frm).addClass("hidden")})}},$(function(){function u(t,i){i.preventDefault();var r=$("#mainNav section:not(#headerSearch)").not(t),u=t.parent("li");t.css("z-index",1001);r.css("z-index",1e3);$("#auxNavLinks li").removeClass("selected");r.slideUp(n);t.is(":visible")?u.removeClass("selected"):u.addClass("selected");t.slideToggle(n)}function l(){$("#mainNav section:not(#headerSearch)").slideUp(n)}function d(){var n=swf.geolocator;n.getLocation(function(n){$("#headerContactBranchFinderError").addClass("hidden");$("#headerContactBranchLatLong").val(n.latitude+","+n.longitude);$("#frmHeaderBranchFinder").submit()},function(){$("#headerContactBranchFinderError").removeClass("hidden")})}function g(n,t){t?n.addClass("selected"):n.removeClass("selected")}function nt(){o.removeClass("selected");$("ul",o).removeAttr("style")}const n=100;var f=null,e=$("#mainNav > div > ul"),o=$("#mainNav > div > ul > li"),i=$("#mainNavBurger"),r=$("#mainNav li .expander, #auxNavLinks li .expander"),s=r.prev("a"),a=$("#headerFollowLink"),v=$("#headerContactLink"),y=$("#headerSearchLink"),p=$("#headerFollow"),w=$("#headerContactUs"),h=$("#headerSearch"),b=$("#headerContactBranchFinderGeoLink"),t=$("#search"),c=t.next("span"),k=navigator.userAgent.toLowerCase().indexOf("android")>-1;if(s.addClass("expanderAnchor"),i.click(function(){e.is(":visible")?(l(),i.removeClass("open")):i.addClass("open");e.slideToggle(n)}),s.click(function(n,t){if(t)return!1;if(console.log("this.next ul: "),$(this).parent("li").hasClass("selected")&&!$(this).hasClass("aux-nav-header")||$(this).parent("li").is(":hover"))location.href=$(this).attr("href");else return $(this).next(".expander").trigger("click",!0),!1}),r.click(function(){var t=$(this).parent("li"),i=t.children("section"),r=$("#mainNav > div > ul section:not(#headerSearch)").not(i),u=$("#mainNav > div > ul:first-of-type li").not(t);g(t,!i.is(":visible"));r.slideUp(n);u.removeClass("selected");i.slideToggle({duration:n,start:function(){jQuery(this).css("display","inline-block")}})}),a.click(function(n){u(p,n)}),v.click(function(n){u(w,n)}),y.click(function(n){n.preventDefault();h.is(":visible")||u(h,n);$("#search").focus()}),b.click(function(n){n.preventDefault();d()}),k)$(window).on("orientationchange",function(){clearTimeout(f);f=setTimeout(function(){nt();l()},100)});$("#btnSearch").click(function(n){t.val().length<2&&(n.preventDefault(),c.removeClass("hidden"),t.focus())});t.keyup(function(){$(this).val().length>1&&c.addClass("hidden")});$(window).scroll(function(){var n=$(document).scrollTop();n>98?$("body").addClass("nav-pinned"):$("body").removeClass("nav-pinned");n>540?$("body").addClass("nav-pinned2"):$("body").removeClass("nav-pinned2")})}),!function(n){"object"==typeof module&&"object"==typeof module.exports?n(require("jquery"),window,document):n(jQuery,window,document)}(function(n,t,i){var r=[],u=function(){return r.length?r[r.length-1]:null},f=function(){for(var t=!1,n=r.length-1;n>=0;n--)r[n].$blocker&&(r[n].$blocker.toggleClass("current",!t).toggleClass("behind",t),t=!0)};n.modal=function(t,i){var e,f;if(this.$body=n("body"),this.options=n.extend({},n.modal.defaults,i),this.options.doFade=!isNaN(parseInt(this.options.fadeDuration,10)),this.$blocker=null,this.options.closeExisting)for(;n.modal.isActive();)n.modal.close();if(r.push(this),t.is("a"))if(f=t.attr("href"),this.anchor=t,/^#/.test(f)){if(this.$elm=n(f),1!==this.$elm.length)return null;this.$body.append(this.$elm);this.open()}else this.$elm=n("<div>"),this.$body.append(this.$elm),e=function(n,t){t.elm.remove()},this.showSpinner(),t.trigger(n.modal.AJAX_SEND),n.get(f).done(function(i){if(n.modal.isActive()){t.trigger(n.modal.AJAX_SUCCESS);var r=u();r.$elm.empty().append(i).on(n.modal.CLOSE,e);r.hideSpinner();r.open();t.trigger(n.modal.AJAX_COMPLETE)}}).fail(function(){t.trigger(n.modal.AJAX_FAIL);var i=u();i.hideSpinner();r.pop();t.trigger(n.modal.AJAX_COMPLETE)});else this.$elm=t,this.anchor=t,this.$body.append(this.$elm),this.open()};n.modal.prototype={constructor:n.modal,open:function(){var t=this;this.block();this.anchor.blur();this.options.doFade?setTimeout(function(){t.show()},this.options.fadeDuration*this.options.fadeDelay):this.show();n(i).off("keydown.modal").on("keydown.modal",function(n){var t=u();27===n.which&&t.options.escapeClose&&t.close()});this.options.clickClose&&this.$blocker.click(function(t){t.target===this&&n.modal.close()})},close:function(){r.pop();this.unblock();this.hide();n.modal.isActive()||n(i).off("keydown.modal")},block:function(){this.$elm.trigger(n.modal.BEFORE_BLOCK,[this._ctx()]);this.$body.css("overflow","hidden");this.$blocker=n('<div class="'+this.options.blockerClass+' blocker current"><\/div>').appendTo(this.$body);f();this.options.doFade&&this.$blocker.css("opacity",0).animate({opacity:1},this.options.fadeDuration);this.$elm.trigger(n.modal.BLOCK,[this._ctx()])},unblock:function(t){!t&&this.options.doFade?this.$blocker.fadeOut(this.options.fadeDuration,this.unblock.bind(this,!0)):(this.$blocker.children().appendTo(this.$body),this.$blocker.remove(),this.$blocker=null,f(),n.modal.isActive()||this.$body.css("overflow",""))},show:function(){this.$elm.trigger(n.modal.BEFORE_OPEN,[this._ctx()]);this.options.showClose&&(this.closeButton=n('<a href="#close-modal" rel="modal:close" class="close-modal '+this.options.closeClass+'">'+this.options.closeText+"<\/a>"),this.$elm.append(this.closeButton));this.$elm.addClass(this.options.modalClass).appendTo(this.$blocker);this.options.doFade?this.$elm.css({opacity:0,display:"inline-block"}).animate({opacity:1},this.options.fadeDuration):this.$elm.css("display","inline-block");this.$elm.trigger(n.modal.OPEN,[this._ctx()])},hide:function(){this.$elm.trigger(n.modal.BEFORE_CLOSE,[this._ctx()]);this.closeButton&&this.closeButton.remove();var t=this;this.options.doFade?this.$elm.fadeOut(this.options.fadeDuration,function(){t.$elm.trigger(n.modal.AFTER_CLOSE,[t._ctx()])}):this.$elm.hide(0,function(){t.$elm.trigger(n.modal.AFTER_CLOSE,[t._ctx()])});this.$elm.trigger(n.modal.CLOSE,[this._ctx()])},showSpinner:function(){this.options.showSpinner&&(this.spinner=this.spinner||n('<div class="'+this.options.modalClass+'-spinner"><\/div>').append(this.options.spinnerHtml),this.$body.append(this.spinner),this.spinner.show())},hideSpinner:function(){this.spinner&&this.spinner.remove()},_ctx:function(){return{elm:this.$elm,$elm:this.$elm,$blocker:this.$blocker,options:this.options,$anchor:this.anchor}}};n.modal.close=function(t){if(n.modal.isActive()){t&&t.preventDefault();var i=u();return i.close(),i.$elm}};n.modal.isActive=function(){return r.length>0};n.modal.getCurrent=u;n.modal.defaults={closeExisting:!0,escapeClose:!0,clickClose:!0,closeText:"Close",closeClass:"",modalClass:"modal",blockerClass:"jquery-modal",spinnerHtml:'<div class="rect1"><\/div><div class="rect2"><\/div><div class="rect3"><\/div><div class="rect4"><\/div>',showSpinner:!0,showClose:!0,fadeDuration:null,fadeDelay:1};n.modal.BEFORE_BLOCK="modal:before-block";n.modal.BLOCK="modal:block";n.modal.BEFORE_OPEN="modal:before-open";n.modal.OPEN="modal:open";n.modal.BEFORE_CLOSE="modal:before-close";n.modal.CLOSE="modal:close";n.modal.AFTER_CLOSE="modal:after-close";n.modal.AJAX_SEND="modal:ajax:send";n.modal.AJAX_SUCCESS="modal:ajax:success";n.modal.AJAX_FAIL="modal:ajax:fail";n.modal.AJAX_COMPLETE="modal:ajax:complete";n.fn.modal=function(t){return 1===this.length&&new n.modal(this,t),this};n(i).on("click.modal",'a[rel~="modal:close"]',n.modal.close);n(i).on("click.modal",'a[rel~="modal:open"]',function(t){t.preventDefault();n(this).modal()})}),swf=swf||{},swf.forms={init:function(){function t(n){n.val()===""?n.addClass("default-option"):n.removeClass("default-option")}var i=this,n=$(".custom-select");n.each(function(n,i){t($(i))});n.on("change",function(){t($(this))});$("input[type=text], input[type=search], input[type=number], input[type=email], input[type=tel], input[type=date],input[type=password], textarea, select").focus(function(){$(this).parent("div").addClass("active")}).keydown(function(){$(this).parent("div").addClass("active")}).blur(function(){var n=$(this);setTimeout(function(){var t=n.parent("div");n.is("select")?$("option:selected",n).text().length===0&&t.removeClass("active"):n.val().length===0&&t.removeClass("active")},200)});$("input[type=email],input[type=tel]").keyup(function(){$(this).next("span").text().length>0&&$(this).valid()});$("#Title").change(function(){$(this).val()==="Other"?$("#OtherTitle").parent().removeClass("hidden"):$("#OtherTitle").parent().addClass("hidden")});$("#FundingRecipient").change(function(){$(this).val()==="Branch"?$("#fundingRecipientNameField").removeClass("hidden"):$("#fundingRecipientNameField").addClass("hidden")});$(".radioReveal input[type=radio]").change(function(){var n=$(this).parents("div").first().next();$(this).val()==="true"?n.removeClass("hidden"):n.addClass("hidden")});$("#HowMuchDoYouPlanToRaise").on("input",function(){$(this).val($(this).val().replace(/[^\d]/,""))});this.autosizeTextareas()},autosizeTextareas:function(){var n=$(document.createElement("div")),t=null;n.addClass("hiddendiv");$("body").append(n);$("form textarea").each(function(){var i=$(this);i.css({overflow:"hidden",resize:"none"});i.on("keyup",function(){i.val().length===0?i.css("height","auto"):(t=i.val(),n.css("width",i.width()),t=t.replace(/\n/g,"<br>"),n.html(t+'<br class="lbr">'),i.css("height",n.outerHeight()))})})},positionDirtyFieldLabels:function(){$("input[type=text], input[type=search], input[type=number], input[type=email], input[type=tel], input[type=date],input[type=password], textarea, select").each(function(){$(this).val().length>0&&$(this).parent("div").addClass("active")})}},$(function(){swf.forms.init()}),window.addEventListener("DOMContentLoaded",function(){if(window.wpnc){var n=$("input[type='radio'], input[type='checkbox']");new wpnc.SelectionButtons(n)}swf.forms.positionDirtyFieldLabels()}),$(function(){$('a[href*=vimeo],a[href*=youtube],a[href*="youtu.be"]',"main").click(function(n){var t,i;n.preventDefault();t=$("#videoModal");t.html(getVideoEmbedHtml($(this).attr("href")));t.css("display","flex");t.modal({backdrop:"static"});i=t.find("iframe");t.on("hidden.bs.modal",function(){i.attr("src","")});resizeIframes()});$("body").on($.modal.OPEN,function(){resizeIframes()});$("body").append('<div id="videoModal" class="modal"><\/div>')}),function(n){"use strict";var i=n.jQuery,r=n.wpnc||{},t=function(n,t){this.selectedClass="selected";this.focusedClass="focused";this.radioClass="selection-button-radio";this.checkboxClass="prefCentreCheckbox";t!==undefined&&i.each(t,function(n,t){this[n]=t}.bind(this));typeof n=="string"?(this.selector=n,this.setInitialState(i(this.selector))):n!==undefined&&(this.$elms=n,this.setInitialState(this.$elms));this.addEvents()};t.prototype.addEvents=function(){typeof this.$elms!="undefined"?this.addElementLevelEvents():this.addDocumentLevelEvents()};t.prototype.setInitialState=function(n){n.each(function(n,t){var r=i(t),u=r.attr("type")==="radio"?this.radioClass:this.checkboxClass;r.parent("label").addClass(u);r.is(":checked")&&this.markSelected(r)}.bind(this))};t.prototype.markFocused=function(n,t){t==="focused"?n.parent("label").addClass(this.focusedClass):n.parent("label").removeClass(this.focusedClass)};t.prototype.markSelected=function(n){var t;n.attr("type")==="radio"?(t=n.attr("name"),i(n[0].form).find('input[name="'+t+'"]').parent("label").removeClass(this.selectedClass),n.parent("label").addClass(this.selectedClass)):n.is(":checked")?n.parent("label").addClass(this.selectedClass):n.parent("label").removeClass(this.selectedClass)};t.prototype.addElementLevelEvents=function(){this.clickHandler=this.getClickHandler();this.focusHandler=this.getFocusHandler({level:"element"});this.$elms.on("click",this.clickHandler).on("focus blur",this.focusHandler)};t.prototype.addDocumentLevelEvents=function(){this.clickHandler=this.getClickHandler();this.focusHandler=this.getFocusHandler({level:"document"});i(document).on("click",this.selector,this.clickHandler).on("focus blur",this.selector,this.focusHandler)};t.prototype.getClickHandler=function(){return function(n){this.markSelected(i(n.target))}.bind(this)};t.prototype.getFocusHandler=function(n){var t=n.level==="document"?"focusin":"focus";return function(n){var r=n.type===t?"focused":"blurred";this.markFocused(i(n.target),r)}.bind(this)};t.prototype.destroy=function(){typeof this.selector!="undefined"?i(document).off("click",this.selector,this.clickHandler).off("focus blur",this.selector,this.focusHandler):this.$elms.off("click",this.clickHandler).off("focus blur",this.focusHandler)};r.SelectionButtons=t;n.wpnc=r}(window),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(n){"use strict";var t=n.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4");}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i),e="string"==typeof i?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));"number"==typeof i?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})}var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",n.proxy(this.keydown,this));"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",n.proxy(this.pause,this)).on("mouseleave.bs.carousel",n.proxy(this.cycle,this))},u,r;t.VERSION="3.4.1";t.TRANSITION_DURATION=600;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0};t.prototype.keydown=function(n){if(!/input|textarea/i.test(n.target.tagName)){switch(n.which){case 37:this.prev();break;case 39:this.next();break;default:return}n.preventDefault()}};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getItemIndex=function(n){return this.$items=n.parent().children(".item"),this.$items.index(n||this.$active)};t.prototype.getItemForDirection=function(n,t){var i=this.getItemIndex(t),f="prev"==n&&0===i||"next"==n&&i==this.$items.length-1,r,u;return f&&!this.options.wrap?t:(r="prev"==n?-1:1,u=(i+r)%this.$items.length,this.$items.eq(u))};t.prototype.to=function(n){var i=this,t=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(n>this.$items.length-1)&&!(0>n))return this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(n)}):t==n?this.pause().cycle():this.slide(n>t?"next":"prev",this.$items.eq(n))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(i,r){var e=this.$element.find(".item.active"),u=r||this.getItemForDirection(i,e),l=this.interval,f="next"==i?"left":"right",a=this,o,s,h,c;return u.hasClass("active")?this.sliding=!1:(o=u[0],s=n.Event("slide.bs.carousel",{relatedTarget:o,direction:f}),(this.$element.trigger(s),!s.isDefaultPrevented())?((this.sliding=!0,l&&this.pause(),this.$indicators.length)&&(this.$indicators.find(".active").removeClass("active"),h=n(this.$indicators.children()[this.getItemIndex(u)]),h&&h.addClass("active")),c=n.Event("slid.bs.carousel",{relatedTarget:o,direction:f}),n.support.transition&&this.$element.hasClass("slide")?(u.addClass(i),"object"==typeof u&&u.length&&u[0].offsetWidth,e.addClass(f),u.addClass(f),e.one("bsTransitionEnd",function(){u.removeClass([i,f].join(" ")).addClass("active");e.removeClass(["active",f].join(" "));a.sliding=!1;setTimeout(function(){a.$element.trigger(c)},0)}).emulateTransitionEnd(t.TRANSITION_DURATION)):(e.removeClass("active"),u.addClass("active"),this.sliding=!1,this.$element.trigger(c)),l&&this.cycle(),this):void 0)};u=n.fn.carousel;n.fn.carousel=i;n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=u,this};r=function(t){var u=n(this),f=u.attr("href"),s,r,o,e;f&&(f=f.replace(/.*(?=#[^\s]+$)/,""));s=u.attr("data-target")||f;r=n(document).find(s);r.hasClass("carousel")&&(o=n.extend({},r.data(),u.data()),e=u.attr("data-slide-to"),e&&(o.interval=!1),i.call(r,o),e&&r.data("bs.carousel").to(e),t.preventDefault())};n(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r);n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function r(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r="#"!==i?n(document).find(i):null,r&&r.length?r:t.parent()}function u(t){t&&3===t.which||(n(o).remove(),n(i).each(function(){var u=n(this),i=r(u),f={relatedTarget:this};i.hasClass("open")&&(t&&"click"==t.type&&/input|textarea/i.test(t.target.tagName)&&n.contains(i[0],t.target)||(i.trigger(t=n.Event("hide.bs.dropdown",f)),t.isDefaultPrevented()||(u.attr("aria-expanded","false"),i.removeClass("open").trigger(n.Event("hidden.bs.dropdown",f)))))}))}function e(i){return this.each(function(){var r=n(this),u=r.data("bs.dropdown");u||r.data("bs.dropdown",u=new t(this));"string"==typeof i&&u[i].call(r)})}var o=".dropdown-backdrop",i='[data-toggle="dropdown"]',t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.VERSION="3.4.1";t.prototype.toggle=function(t){var f=n(this),i,o,e;if(!f.is(".disabled, :disabled")){if(i=r(f),o=i.hasClass("open"),u(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&n(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(n(this)).on("click",u),e={relatedTarget:this},i.trigger(t=n.Event("show.bs.dropdown",e)),t.isDefaultPrevented())return;f.trigger("focus").attr("aria-expanded","true");i.toggleClass("open").trigger(n.Event("shown.bs.dropdown",e))}return!1}};t.prototype.keydown=function(t){var e,o,s,h,f,u;if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=r(e),s=o.hasClass("open"),!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(i).trigger("focus"),e.trigger("click");h=" li:not(.disabled):visible a";f=o.find(".dropdown-menu"+h);f.length&&(u=f.index(t.target),38==t.which&&u>0&&u--,40==t.which&&u<f.length-1&&u++,~u||(u=0),f.eq(u).trigger("focus"))}};f=n.fn.dropdown;n.fn.dropdown=e;n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",u).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i,t.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",t.prototype.keydown)}(jQuery);+function(n){"use strict";function i(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),"object"==typeof i&&i);u||f.data("bs.modal",u=new t(this,e));"string"==typeof i?u[i](r):e.show&&u.show(r)})}var t=function(t,i){this.options=i;this.$body=n(document.body);this.$element=n(t);this.$dialog=this.$element.find(".modal-dialog");this.$backdrop=null;this.isShown=null;this.originalBodyPad=null;this.scrollbarWidth=0;this.ignoreBackdropClick=!1;this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom";this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},r;t.VERSION="3.4.1";t.TRANSITION_DURATION=300;t.BACKDROP_TRANSITION_DURATION=150;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this.isShown?this.hide():this.show(n)};t.prototype.show=function(i){var r=this,u=n.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(u);this.isShown||u.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(t){n(t.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})}),this.backdrop(function(){var f=n.support.transition&&r.$element.hasClass("fade"),u;r.$element.parent().length||r.$element.appendTo(r.$body);r.$element.show().scrollTop(0);r.adjustDialog();f&&r.$element[0].offsetWidth;r.$element.addClass("in");r.enforceFocus();u=n.Event("shown.bs.modal",{relatedTarget:i});f?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(u)}).emulateTransitionEnd(t.TRANSITION_DURATION):r.$element.trigger("focus").trigger(u)}))};t.prototype.hide=function(i){i&&i.preventDefault();i=n.Event("hide.bs.modal");this.$element.trigger(i);this.isShown&&!i.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",n.proxy(this.hideModal,this)).emulateTransitionEnd(t.TRANSITION_DURATION):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){document===n.target||this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.trigger("focus")},this))};t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",n.proxy(function(n){27==n.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")};t.prototype.resize=function(){this.isShown?n(window).on("resize.bs.modal",n.proxy(this.handleUpdate,this)):n(window).off("resize.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.$body.removeClass("modal-open");n.resetAdjustments();n.resetScrollbar();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(i){var e=this,f=this.$element.hasClass("fade")?"fade":"",r,u;if(this.isShown&&this.options.backdrop){if(r=n.support.transition&&f,this.$backdrop=n(document.createElement("div")).addClass("modal-backdrop "+f).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(n.target===n.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!i)return;r?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):i()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),u=function(){e.removeBackdrop();i&&i()},n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",u).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):u()):i&&i()};t.prototype.handleUpdate=function(){this.adjustDialog()};t.prototype.adjustDialog=function(){var n=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&n?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!n?this.scrollbarWidth:""})};t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};t.prototype.checkScrollbar=function(){var n=window.innerWidth,t;n||(t=document.documentElement.getBoundingClientRect(),n=t.right-Math.abs(t.left));this.bodyIsOverflowing=document.body.clientWidth<n;this.scrollbarWidth=this.measureScrollbar()};t.prototype.setScrollbar=function(){var i=parseInt(this.$body.css("padding-right")||0,10),t;this.originalBodyPad=document.body.style.paddingRight||"";t=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",i+t),n(this.fixedContent).each(function(i,r){var u=r.style.paddingRight,f=n(r).css("padding-right");n(r).data("padding-right",u).css("padding-right",parseFloat(f)+t+"px")}))};t.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad);n(this.fixedContent).each(function(t,i){var r=n(i).data("padding-right");n(i).removeData("padding-right");i.style.paddingRight=r?r:""})};t.prototype.measureScrollbar=function(){var n=document.createElement("div"),t;return n.className="modal-scrollbar-measure",this.$body.append(n),t=n.offsetWidth-n.clientWidth,this.$body[0].removeChild(n),t};r=n.fn.modal;n.fn.modal=i;n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=r,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var r=n(this),f=r.attr("href"),e=r.attr("data-target")||f&&f.replace(/.*(?=#[^\s]+$)/,""),u=n(document).find(e),o=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(f)&&f},u.data(),r.data());r.is("a")&&t.preventDefault();u.one("show.bs.modal",function(n){n.isDefaultPrevented()||u.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})});i.call(u,o,this)})}(jQuery);+function(n){"use strict";function u(t,i){var r=t.nodeName.toLowerCase();if(-1!==n.inArray(r,i))return-1!==n.inArray(r,o)?Boolean(t.nodeValue.match(s)||t.nodeValue.match(h)):!0;for(var f=n(i).filter(function(n,t){return t instanceof RegExp}),u=0,e=f.length;e>u;u++)if(r.match(f[u]))return!0;return!1}function i(t,i,r){var e,f,h;if(0===t.length)return t;if(r&&"function"==typeof r)return r(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;e=document.implementation.createHTMLDocument("sanitization");e.body.innerHTML=t;for(var a=n.map(i,function(n,t){return t}),l=n(e.body).find("*"),s=0,v=l.length;v>s;s++)if(f=l[s],h=f.nodeName.toLowerCase(),-1!==n.inArray(h,a))for(var c=n.map(f.attributes,function(n){return n}),y=[].concat(i["*"]||[],i[h]||[]),o=0,p=c.length;p>o;o++)u(c[o],y)||f.removeAttribute(c[o].nodeName);else f.parentNode.removeChild(f);return e.body.innerHTML}function f(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f="object"==typeof i&&i;!r&&/destroy|hide/.test(i)||(r||u.data("bs.tooltip",r=new t(this,f)),"string"==typeof i&&r[i]())})}var e=["sanitize","whiteList","sanitizeFn"],o=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],s=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,h=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i,t=function(n,t){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",n,t)},r;t.VERSION="3.4.1";t.TRANSITION_DURATION=150;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}};t.prototype.init=function(t,i,r){var f,e,u,o,s;if(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(document).find(n.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],"click"==u)this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else"manual"!=u&&(o="hover"==u?"mouseenter":"focusin",s="hover"==u?"mouseleave":"focusout",this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this)));this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){var r=this.$element.data(),u;for(u in r)r.hasOwnProperty(u)&&-1!==n.inArray(u,e)&&delete r[u];return t=n.extend({},this.getDefaults(),r,t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=i(t.template,t.whiteList,t.sanitizeFn)),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusin"==t.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())};t.prototype.isInStateTrue=function(){for(var n in this.inState)if(this.inState[n])return!0;return!1};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusout"==t.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide())};t.prototype.show=function(){var c=n.Event("show.bs."+this.type),l,p,e,w,h;if(this.hasContent()&&this.enabled){if(this.$element.trigger(c),l=n.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),c.isDefaultPrevented()||!l)return;var u=this,r=this.tip(),a=this.getUID(this.type);this.setContent();r.attr("id",a);this.$element.attr("aria-describedby",a);this.options.animation&&r.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,v=/\s?auto?\s?/i,y=v.test(i);y&&(i=i.replace(v,"")||"top");r.detach().css({top:0,left:0,display:"block"}).addClass(i).data("bs."+this.type,this);this.options.container?r.appendTo(n(document).find(this.options.container)):r.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var f=this.getPosition(),o=r[0].offsetWidth,s=r[0].offsetHeight;y&&(p=i,e=this.getPosition(this.$viewport),i="bottom"==i&&f.bottom+s>e.bottom?"top":"top"==i&&f.top-s<e.top?"bottom":"right"==i&&f.right+o>e.width?"left":"left"==i&&f.left-o<e.left?"right":i,r.removeClass(p).addClass(i));w=this.getCalculatedOffset(i,f,o,s);this.applyPlacement(w,i);h=function(){var n=u.hoverState;u.$element.trigger("shown.bs."+u.type);u.hoverState=null;"out"==n&&u.leave(u)};n.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",h).emulateTransitionEnd(t.TRANSITION_DURATION):h()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top+=o;t.left+=s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;"top"==i&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var c=/top|bottom/.test(i),a=c?2*u.left-l+h:2*u.top-e+f,v=c?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(a,r[0][v],c)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i?"left":"top",50*(1-n/t)+"%").css(i?"top":"left","")};t.prototype.setContent=function(){var t=this.tip(),n=this.getTitle();this.options.html?(this.options.sanitize&&(n=i(n,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(n)):t.find(".tooltip-inner").text(n);t.removeClass("fade in top bottom left right")};t.prototype.hide=function(i){function f(){"in"!=r.hoverState&&u.detach();r.$element&&r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type);i&&i()}var r=this,u=n(this.$tip),e=n.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(u.removeClass("in"),n.support.transition&&u.hasClass("fade")?u.one("bsTransitionEnd",f).emulateTransitionEnd(t.TRANSITION_DURATION):f(),this.hoverState=null,this)};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||"string"!=typeof n.attr("data-original-title"))&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){t=t||this.$element;var r=t[0],u="BODY"==r.tagName,i=r.getBoundingClientRect();null==i.width&&(i=n.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var f=window.SVGElement&&r instanceof window.SVGElement,e=u?{top:0,left:0}:f?null:t.offset(),o={scroll:u?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},s=u?{width:n(window).width(),height:n(window).height()}:null;return n.extend({},i,o,s,e)};t.prototype.getCalculatedOffset=function(n,t,i,r){return"bottom"==n?{top:t.top+t.height,left:t.left+t.width/2-i/2}:"top"==n?{top:t.top-r,left:t.left+t.width/2-i/2}:"left"==n?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.right&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)};t.prototype.getUID=function(n){do n+=~~(1e6*Math.random());while(document.getElementById(n));return n};t.prototype.tip=function(){if(!this.$tip&&(this.$tip=n(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=this;t&&(i=n(t.currentTarget).data("bs."+this.type),i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)));t?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){var n=this;clearTimeout(this.timeout);this.hide(function(){n.$element.off("."+n.type).removeData("bs."+n.type);n.$tip&&n.$tip.detach();n.$tip=null;n.$arrow=null;n.$viewport=null;n.$element=null})};t.prototype.sanitizeHtml=function(n){return i(n,this.options.whiteList,this.options.sanitizeFn)};r=n.fn.tooltip;n.fn.tooltip=f;n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=r,this}}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f="object"==typeof i&&i;!r&&/destroy|hide/.test(i)||(r||u.data("bs.popover",r=new t(this,f)),"string"==typeof i&&r[i]())})}var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.4.1";t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent(),r;this.options.html?(r=typeof t,this.options.sanitize&&(i=this.sanitizeHtml(i),"string"===r&&(t=this.sanitizeHtml(t))),n.find(".popover-title").html(i),n.find(".popover-content").children().detach().end()["string"===r?"html":"append"](t)):(n.find(".popover-title").text(i),n.find(".popover-content").children().detach().end().text(t));n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};i=n.fn.popover;n.fn.popover=r;n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));"string"==typeof i&&r[i]()})}var t=function(t){this.element=n(t)},u,i;t.VERSION="3.4.1";t.TRANSITION_DURATION=150;t.prototype.show=function(){var t=this.element,f=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),u;if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=f.find(".active:last a"),e=n.Event("hide.bs.tab",{relatedTarget:t[0]}),o=n.Event("show.bs.tab",{relatedTarget:r[0]});(r.trigger(e),t.trigger(o),o.isDefaultPrevented()||e.isDefaultPrevented())||(u=n(document).find(i),this.activate(t.closest("li"),f),this.activate(u,u.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]});t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}};t.prototype.activate=function(i,r,u){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1);i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0);o?(i[0].offsetWidth,i.addClass("in")):i.removeClass("fade");i.parent(".dropdown-menu").length&&i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);u&&u()}var f=r.find("> .active"),o=u&&n.support.transition&&(f.length&&f.hasClass("fade")||!!r.find("> .fade").length);f.length&&o?f.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e();f.removeClass("in")};u=n.fn.tab;n.fn.tab=r;n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=u,this};i=function(t){t.preventDefault();r.call(n(this),"show")};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery);+function(n){"use strict";function r(t){var i,r=t.attr("data-target")||(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return n(document).find(r)}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.collapse"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i);!r&&f.toggle&&/show|hide/.test(i)&&(f.toggle=!1);r||u.data("bs.collapse",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.$trigger=n('[data-toggle="collapse"][href="#'+i.id+'"],[data-toggle="collapse"][data-target="#'+i.id+'"]');this.transitioning=null;this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger);this.options.toggle&&this.toggle()},u;t.VERSION="3.4.1";t.TRANSITION_DURATION=350;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"width":"height"};t.prototype.show=function(){var f,r,e,u,o,s;if(!this.transitioning&&!this.$element.hasClass("in")&&(r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing"),!(r&&r.length&&(f=r.data("bs.collapse"),f&&f.transitioning))&&(e=n.Event("show.bs.collapse"),this.$element.trigger(e),!e.isDefaultPrevented()))){if(r&&r.length&&(i.call(r,"hide"),f||r.data("bs.collapse",null)),u=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[u](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1,o=function(){this.$element.removeClass("collapsing").addClass("collapse in")[u]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return o.call(this);s=n.camelCase(["scroll",u].join("-"));this.$element.one("bsTransitionEnd",n.proxy(o,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[u](this.$element[0][s])}};t.prototype.hide=function(){var r,i,u;if(!this.transitioning&&this.$element.hasClass("in")&&(r=n.Event("hide.bs.collapse"),this.$element.trigger(r),!r.isDefaultPrevented()))return i=this.dimension(),this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1,u=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")},n.support.transition?void this.$element[i](0).one("bsTransitionEnd",n.proxy(u,this)).emulateTransitionEnd(t.TRANSITION_DURATION):u.call(this)};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};t.prototype.getParent=function(){return n(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(n.proxy(function(t,i){var u=n(i);this.addAriaAndCollapsedClass(r(u),u)},this)).end()};t.prototype.addAriaAndCollapsedClass=function(n,t){var i=n.hasClass("in");n.attr("aria-expanded",i);t.toggleClass("collapsed",!i).attr("aria-expanded",i)};u=n.fn.collapse;n.fn.collapse=i;n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=u,this};n(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var u=n(this);u.attr("data-target")||t.preventDefault();var f=r(u),e=f.data("bs.collapse"),o=e?"toggle":u.data();i.call(f,o)})}(jQuery)