From 6aadc882be410e80219a4fa4908bf905ecb0bc0d Mon Sep 17 00:00:00 2001 From: Mike Chagnon Date: Tue, 24 Aug 2021 09:30:23 -0400 Subject: [PATCH 01/19] simplify edit_user method and fix redundant calls causing problems (#167) Co-authored-by: kaimikacolin --- manage/views.py | 27 +++++++-------------------- templates/manage/edit_user.html | 2 +- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/manage/views.py b/manage/views.py index bf1b3f6..3a26355 100644 --- a/manage/views.py +++ b/manage/views.py @@ -70,35 +70,22 @@ def profile(request, id=None): @staff_required def edit_user(request, id=None): - if id: - user = get_object_or_404(User, pk=id) - else: - user = User() - + user = User.objects.filter(pk=id).first() form = UserForm(instance=user) - - try: - annotator_form = AnnotatorForm(instance=user.annotator) - except: - user.annotator = Annotator() + if user: annotator_form = AnnotatorForm(instance=user.annotator) - user.save() + else: + annotator_form = AnnotatorForm() if request.method == "POST": form = UserForm(request.POST, instance=user) - - annotator_form = AnnotatorForm(request.POST, instance=user.annotator) - - if form.is_valid(): - user = form.save(commit=False) - new_password = form.cleaned_data["new_password"] if new_password: - user.password = make_password(new_password) - - user.save() + form.instance.password = make_password(new_password) + user = form.save() + annotator_form = AnnotatorForm(request.POST, instance=user.annotator) if annotator_form.is_valid(): annotator_form.save() return redirect(reverse("manage:users")) diff --git a/templates/manage/edit_user.html b/templates/manage/edit_user.html index 6691004..8ddceb7 100644 --- a/templates/manage/edit_user.html +++ b/templates/manage/edit_user.html @@ -17,7 +17,7 @@
-

{% if user.id %}Edit{% else %}Create New{% endif %} User

+

{% if user %}Edit{% else %}Create New{% endif %} User

From 64e97f53cbd5cefa789e227202541e7dbb10510e Mon Sep 17 00:00:00 2001 From: Mike Chagnon Date: Tue, 24 Aug 2021 09:44:37 -0400 Subject: [PATCH 02/19] convert labels to list before serialization (#168) Co-authored-by: kaimikacolin --- web/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/views.py b/web/views.py index a3a7459..11b8ebb 100644 --- a/web/views.py +++ b/web/views.py @@ -174,7 +174,7 @@ def get_labels(request): collection_name = request.POST.get('collection') if collection_name is None: - labels = Label.objects.all().order_by('name') + labels = list(Label.objects.all().order_by('name').values()) else: rc = get_object_or_404(ImageCollection, name=collection_name) labels = rc.labels(check_if_has_winning=True) # This is currently our switch to enable/disable skipping empty labels From 8bb4502b0f0b84d0b9e5a6639c69182c58f92155 Mon Sep 17 00:00:00 2001 From: Mike Chagnon Date: Tue, 24 Aug 2021 15:53:56 +0200 Subject: [PATCH 03/19] fix label name in dropdown --- assets/src/js/app.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/assets/src/js/app.js b/assets/src/js/app.js index 249ba31..49a7977 100644 --- a/assets/src/js/app.js +++ b/assets/src/js/app.js @@ -276,7 +276,6 @@ function get_labels_callback(r){ } } function buildLabelSelect(){ - let $filter_label = $('#filter-label'); let $apply_label_select = $('#apply_label_select'); $filter_label.empty(); @@ -298,7 +297,7 @@ function buildLabelSelect(){ $apply_label_select.append(''); for (let i=0; i ${label_name} `)); From cb2094e5d4cf60ba3a7e90e9b0bcb8c67c93f05c Mon Sep 17 00:00:00 2001 From: Mike Chagnon Date: Tue, 24 Aug 2021 19:15:45 +0200 Subject: [PATCH 04/19] revert dropdown name change --- assets/src/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/src/js/app.js b/assets/src/js/app.js index 49a7977..e1fffdb 100644 --- a/assets/src/js/app.js +++ b/assets/src/js/app.js @@ -297,7 +297,7 @@ function buildLabelSelect(){ $apply_label_select.append(''); for (let i=0; i ${label_name} `)); From 7ce08e6559752cf708b7153ac898ca5ba33f21ea Mon Sep 17 00:00:00 2001 From: kaimikacolin <65564591+kaimikacolin@users.noreply.github.com> Date: Tue, 24 Aug 2021 11:21:29 -0600 Subject: [PATCH 05/19] 500 on all labels (#171) * compiled js * dynamic scaling of images * compiled js * moved the scale dropdown to the sidebar * convert labels to list before serialization * provide has_winning in _all Co-authored-by: Mike Chagnon Co-authored-by: kaimikacolin --- web/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/views.py b/web/views.py index 11b8ebb..988381e 100644 --- a/web/views.py +++ b/web/views.py @@ -174,7 +174,8 @@ def get_labels(request): collection_name = request.POST.get('collection') if collection_name is None: - labels = list(Label.objects.all().order_by('name').values()) + labels = Label.objects.all().order_by('name').values('name') + ret = [{'label_name': i.name, 'has_winning': True} for i in labels] # mark all labels as has_winning for _all else: rc = get_object_or_404(ImageCollection, name=collection_name) labels = rc.labels(check_if_has_winning=True) # This is currently our switch to enable/disable skipping empty labels From 5d6370c8f002dc4c3e43a84788dcdbf1e8fe4c1f Mon Sep 17 00:00:00 2001 From: Mike Chagnon Date: Tue, 24 Aug 2021 19:30:43 +0200 Subject: [PATCH 06/19] final update for 500 errors on getLabels call --- web/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/views.py b/web/views.py index 988381e..8f785fe 100644 --- a/web/views.py +++ b/web/views.py @@ -174,8 +174,8 @@ def get_labels(request): collection_name = request.POST.get('collection') if collection_name is None: - labels = Label.objects.all().order_by('name').values('name') - ret = [{'label_name': i.name, 'has_winning': True} for i in labels] # mark all labels as has_winning for _all + label_values = Label.objects.all().order_by('name').values('name') + labels = [{'label_name': i["name"], 'has_winning': True} for i in label_values] # mark all labels as has_winning for _all else: rc = get_object_or_404(ImageCollection, name=collection_name) labels = rc.labels(check_if_has_winning=True) # This is currently our switch to enable/disable skipping empty labels From 8a8b8bb8d344661f09062631a052221f6cfd8034 Mon Sep 17 00:00:00 2001 From: Mike Chagnon Date: Tue, 24 Aug 2021 22:26:27 +0200 Subject: [PATCH 07/19] deselect rois when they are hidden (#173) Co-authored-by: kaimikacolin --- assets/src/js/app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/src/js/app.js b/assets/src/js/app.js index e1fffdb..9830223 100644 --- a/assets/src/js/app.js +++ b/assets/src/js/app.js @@ -234,6 +234,7 @@ function apply_label_callback(evt){ for (let i=0; i Date: Tue, 24 Aug 2021 14:32:25 -0600 Subject: [PATCH 08/19] Fix Loading Indicator (#172) * reset image count on filter change * removed stray console logs Co-authored-by: kaimikacolin Co-authored-by: Mike Chagnon --- assets/src/js/app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/src/js/app.js b/assets/src/js/app.js index 9830223..290fe87 100644 --- a/assets/src/js/app.js +++ b/assets/src/js/app.js @@ -140,6 +140,7 @@ function filterChange(ev){ }); requestArray = []; scrollPageNum = 1; + imagesOutstanding = 0; let filters = getFilters(); updateQuery(filters); loadPage(scrollPageNum) @@ -564,6 +565,7 @@ function imageLoaded(evt) { $image.css("visibility", "visible") imagesOutstanding--; + if(imagesOutstanding==0){ allowLoad = true; showLoader(false); From 1d82ddaca95cd59c49e9b1aae9a37ef8a54bf46a Mon Sep 17 00:00:00 2001 From: Mike Chagnon Date: Tue, 24 Aug 2021 22:51:26 +0200 Subject: [PATCH 09/19] compiled js --- static/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/app.js b/static/js/app.js index 2e30570..143e7de 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -65,4 +65,4 @@ var e,n,i;t&&t.requirejs||(t?n=t:t={},function(t){var o,s,r,l,d={},u={},c={},h={ */ i=[n(0),n(2)],void 0===(o=function(e){return function(e,t,n){var i;r(e),l=i=e,d=i.fn.dataTable;var o=e.fn.dataTable;e.fn.dataTable.SearchPanes=c,e.fn.DataTable.SearchPanes=c,e.fn.dataTable.SearchPane=u,e.fn.DataTable.SearchPane=u;var s=e.fn.dataTable.Api.register;function a(e,t){void 0===t&&(t=!1);var n=new o.Api(e),i=n.init().searchPanes||o.defaults.searchPanes;return new c(n,i,t).getNode()}s("searchPanes()",(function(){return this})),s("searchPanes.clearSelections()",(function(){return this.iterator("table",(function(e){e._searchPanes&&e._searchPanes.clearSelections()}))})),s("searchPanes.rebuildPane()",(function(e,t){return this.iterator("table",(function(n){n._searchPanes&&n._searchPanes.rebuild(e,t)}))})),s("searchPanes.container()",(function(){var e=this.context[0];return e._searchPanes?e._searchPanes.getNode():null})),e.fn.dataTable.ext.buttons.searchPanesClear={text:"Clear Panes",action:function(e,t,n,i){t.searchPanes.clearSelections()}},e.fn.dataTable.ext.buttons.searchPanes={action:function(e,t,n,i){e.stopPropagation(),this.popover(i._panes.getNode(),{align:"dt-container"}),i._panes.rebuild(void 0,!0)},config:{},init:function(t,n,i){var o=new e.fn.dataTable.SearchPanes(t,e.extend({filterChanged:function(e){t.button(n).text(t.i18n("searchPanes.collapse",{0:"SearchPanes",_:"SearchPanes (%d)"},e))}},i.config)),s=t.i18n("searchPanes.collapse","SearchPanes",0);t.button(n).text(s),i._panes=o},text:"Search Panes"},e(n).on("preInit.dt.dtsp",(function(e,t,n){"dt"===e.namespace&&(t.oInit.searchPanes||o.defaults.searchPanes)&&(t._searchPanes||a(t,!0))})),o.ext.feature.push({cFeature:"P",fnInit:a}),o.ext.features&&o.ext.features.register("searchPanes",a)}(e,window,document)}.apply(t,i))||(e.exports=o)}()},function(e,t,n){"use strict";n.r(t),n.d(t,"Abide",(function(){return ae})),n.d(t,"Accordion",(function(){return re})),n.d(t,"AccordionMenu",(function(){return le})),n.d(t,"Box",(function(){return D})),n.d(t,"Core",(function(){return L})),n.d(t,"CoreUtils",(function(){return w})),n.d(t,"Drilldown",(function(){return de})),n.d(t,"Dropdown",(function(){return _e})),n.d(t,"DropdownMenu",(function(){return ye})),n.d(t,"Equalizer",(function(){return ge})),n.d(t,"Foundation",(function(){return L})),n.d(t,"Interchange",(function(){return ve})),n.d(t,"Keyboard",(function(){return j})),n.d(t,"Magellan",(function(){return we})),n.d(t,"MediaQuery",(function(){return M})),n.d(t,"Motion",(function(){return E})),n.d(t,"Move",(function(){return I})),n.d(t,"Nest",(function(){return N})),n.d(t,"OffCanvas",(function(){return Me})),n.d(t,"Orbit",(function(){return Le})),n.d(t,"ResponsiveAccordionTabs",(function(){return Ee})),n.d(t,"ResponsiveMenu",(function(){return Se})),n.d(t,"ResponsiveToggle",(function(){return De})),n.d(t,"Reveal",(function(){return ke})),n.d(t,"Slider",(function(){return xe})),n.d(t,"SmoothScroll",(function(){return be})),n.d(t,"Sticky",(function(){return Oe})),n.d(t,"Tabs",(function(){return Ae})),n.d(t,"Timer",(function(){return z})),n.d(t,"Toggler",(function(){return je})),n.d(t,"Tooltip",(function(){return Pe})),n.d(t,"Touch",(function(){return U})),n.d(t,"Triggers",(function(){return ne})),n.d(t,"onImagesLoaded",(function(){return Y}));var i=n(0),o=n.n(i);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){return(a="function"==typeof Symbol&&"symbol"===s(Symbol.iterator)?function(e){return s(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":s(e)})(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:6,t=arguments.length>1?arguments[1]:void 0,n="",i="0123456789abcdefghijklmnopqrstuvwxyz",o=i.length,s=0;s1&&void 0!==arguments[1]?arguments[1]:{},n=t.ignoreLeaveWindow,i=void 0!==n&&n,s=t.ignoreReappear,a=void 0!==s&&s;return function(t){for(var n=arguments.length,s=new Array(n>1?n-1:0),r=1;r').appendTo(document.head);var e,t=o()(".foundation-mq").css("font-family");for(var n in e=function(e){var t={};return"string"!=typeof e?t:(e=e.trim().slice(1,-1))?e.split("&").reduce((function(e,t){var n=t.replace(/\+/g," ").split("="),i=n[0],o=n[1];return i=decodeURIComponent(i),o=void 0===o?null:decodeURIComponent(o),e.hasOwnProperty(i)?Array.isArray(e[i])?e[i].push(o):e[i]=[e[i],o]:e[i]=o,e}),{}):t}(t),this.queries=[],e)e.hasOwnProperty(n)&&this.queries.push({name:n,value:"only screen and (min-width: ".concat(e[n],")")});this.current=this._getCurrentSize(),this._watcher()}},_reInit:function(){this.isInitialized=!1,this._init()},atLeast:function(e){var t=this.get(e);return!!t&&window.matchMedia(t).matches},only:function(e){return e===this._getCurrentSize()},upTo:function(e){var t=this.next(e);return!t||!this.atLeast(t)},is:function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],i=!0,o=!1,s=void 0;try{for(var a,r=e[Symbol.iterator]();!(i=(a=r.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){o=!0,s=e}finally{try{i||null==r.return||r.return()}finally{if(o)throw s}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(e.trim().split(" ").filter((function(e){return!!e.length})),2),n=t[0],i=t[1],o=void 0===i?"":i;if("only"===o)return this.only(n);if(!o||"up"===o)return this.atLeast(n);if("down"===o)return this.upTo(n);throw new Error('\n Invalid breakpoint passed to MediaQuery.is().\n Expected a breakpoint name formatted like " ", got "'.concat(e,'".\n '))},get:function(e){for(var t in this.queries)if(this.queries.hasOwnProperty(t)){var n=this.queries[t];if(e===n.name)return n.value}return null},next:function(e){var t=this,n=this.queries.findIndex((function(n){return t._getQueryName(n)===e}));if(-1===n)throw new Error('\n Unknown breakpoint "'.concat(e,'" passed to MediaQuery.next().\n Ensure it is present in your Sass "$breakpoints" setting.\n '));var i=this.queries[n+1];return i?i.name:null},_getQueryName:function(e){if("string"==typeof e)return e;if("object"===a(e))return e.name;throw new TypeError('\n Invalid value passed to MediaQuery._getQueryName().\n Expected a breakpoint name (String) or a breakpoint query (Object), got "'.concat(e,'" (').concat(a(e),")\n "))},_getCurrentSize:function(){for(var e,t=0;t1?t[1].trim():""}return void 0===e.prototype?e.constructor.name:e.prototype.constructor.name}function S(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}L.util={throttle:function(e,t){var n=null;return function(){var i=this,o=arguments;null===n&&(n=setTimeout((function(){e.apply(i,o),n=null}),t))}}},window.Foundation=L,function(){Date.now&&window.Date.now||(window.Date.now=Date.now=function(){return(new Date).getTime()});for(var e=["webkit","moz"],t=0;t1&&void 0!==arguments[1]?arguments[1]:"zf";e.attr("role","menubar"),e.find("a").attr({role:"menuitem"});var n=e.find("li").attr({role:"none"}),i="is-".concat(t,"-submenu"),s="".concat(i,"-item"),a="is-".concat(t,"-submenu-parent"),r="accordion"!==t;n.each((function(){var e=o()(this),n=e.children("ul");n.length&&(e.addClass(a),r&&(e.attr({"aria-haspopup":!0,"aria-label":e.children("a:first").text()}),"drilldown"===t&&e.attr({"aria-expanded":!1})),n.addClass("submenu ".concat(i)).attr({"data-submenu":"",role:"menubar"}),"drilldown"===t&&n.attr({"aria-hidden":!0})),e.parent("[data-submenu]").length&&e.addClass("is-submenu-item ".concat(s))}))},Burn:function(e,t){var n="is-".concat(t,"-submenu"),i="".concat(n,"-item"),o="is-".concat(t,"-submenu-parent");e.find(">li, > li > ul, .menu, .menu > li, [data-submenu] > li").removeClass("".concat(n," ").concat(i," ").concat(o," is-submenu-item submenu is-active")).removeAttr("data-submenu").css("display","")}};function z(e,t,n){var i,o,s=this,a=t.duration,r=Object.keys(e.data())[0]||"timer",l=-1;this.isPaused=!1,this.restart=function(){l=-1,clearTimeout(o),this.start()},this.start=function(){this.isPaused=!1,clearTimeout(o),l=l<=0?a:l,e.data("paused",!1),i=Date.now(),o=setTimeout((function(){t.infinite&&s.restart(),n&&"function"==typeof n&&n()}),l),e.trigger("timerstart.zf.".concat(r))},this.pause=function(){this.isPaused=!0,clearTimeout(o),e.data("paused",!0);var t=Date.now();l-=t-i,e.trigger("timerpaused.zf.".concat(r))}}var R,W,B,q,U={},J=!1,G=!1;function V(e){if(this.removeEventListener("touchmove",X),this.removeEventListener("touchend",V),!G){var t=o.a.Event("tap",q||e);o()(this).trigger(t)}q=null,J=!1,G=!1}function X(e){if(o.a.spotSwipe.preventDefault&&e.preventDefault(),J){var t,n=e.touches[0].pageX,i=(e.touches[0].pageY,R-n);G=!0,B=(new Date).getTime()-W,Math.abs(i)>=o.a.spotSwipe.moveThreshold&&B<=o.a.spotSwipe.timeThreshold&&(t=i>0?"left":"right"),t&&(e.preventDefault(),V.apply(this,arguments),o()(this).trigger(o.a.Event("swipe",Object.assign({},e)),t).trigger(o.a.Event("swipe".concat(t),Object.assign({},e))))}}function K(e){1==e.touches.length&&(R=e.touches[0].pageX,e.touches[0].pageY,q=e,J=!0,G=!1,W=(new Date).getTime(),this.addEventListener("touchmove",X,!1),this.addEventListener("touchend",V,!1))}function Z(){this.addEventListener&&this.addEventListener("touchstart",K,!1)}var Q=function(){function e(t){r(this,e),this.version="1.0.0",this.enabled="ontouchstart"in document.documentElement,this.preventDefault=!1,this.moveThreshold=75,this.timeThreshold=200,this.$=t,this._init()}return d(e,[{key:"_init",value:function(){var e=this.$;e.event.special.swipe={setup:Z},e.event.special.tap={setup:Z},e.each(["left","up","down","right"],(function(){e.event.special["swipe".concat(this)]={setup:function(){e(this).on("swipe",e.noop)}}}))}}]),e}();U.setupSpotSwipe=function(e){e.spotSwipe=new Q(e)},U.setupTouchHandler=function(e){e.fn.addTouch=function(){this.each((function(n,i){e(i).bind("touchstart touchmove touchend touchcancel",(function(e){t(e)}))}));var t=function(e){var t,n=e.changedTouches[0],i={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"}[e.type];"MouseEvent"in window&&"function"==typeof window.MouseEvent?t=new window.MouseEvent(i,{bubbles:!0,cancelable:!0,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY}):(t=document.createEvent("MouseEvent")).initMouseEvent(i,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(t)}}},U.init=function(e){void 0===e.spotSwipe&&(U.setupSpotSwipe(e),U.setupTouchHandler(e))};var ee=function(){for(var e=["WebKit","Moz","O","Ms",""],t=0;t1&&void 0!==arguments[1]?arguments[1]:{};this.$element=e,this.options=o.a.extend(!0,{},t.defaults,this.$element.data(),n),this.isEnabled=!0,this.formnovalidate=null,this.className="Abide",this._init()}},{key:"_init",value:function(){var e=this;this.$inputs=o.a.merge(this.$element.find("input").not('[type="submit"]'),this.$element.find("textarea, select")),this.$submits=this.$element.find('[type="submit"]');var t=this.$element.find("[data-abide-error]");this.options.a11yAttributes&&(this.$inputs.each((function(t,n){return e.addA11yAttributes(o()(n))})),t.each((function(t,n){return e.addGlobalErrorA11yAttributes(o()(n))}))),this._events()}},{key:"_events",value:function(){var e=this;this.$element.off(".abide").on("reset.zf.abide",(function(){e.resetForm()})).on("submit.zf.abide",(function(){return e.validateForm()})),this.$submits.off("click.zf.abide keydown.zf.abide").on("click.zf.abide keydown.zf.abide",(function(t){t.key&&" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),e.formnovalidate=null!==t.target.getAttribute("formnovalidate"),e.$element.submit())})),"fieldChange"===this.options.validateOn&&this.$inputs.off("change.zf.abide").on("change.zf.abide",(function(t){e.validateInput(o()(t.target))})),this.options.liveValidate&&this.$inputs.off("input.zf.abide").on("input.zf.abide",(function(t){e.validateInput(o()(t.target))})),this.options.validateOnBlur&&this.$inputs.off("blur.zf.abide").on("blur.zf.abide",(function(t){e.validateInput(o()(t.target))}))}},{key:"_reflow",value:function(){this._init()}},{key:"_validationIsDisabled",value:function(){return!1===this.isEnabled||("boolean"==typeof this.formnovalidate?this.formnovalidate:!!this.$submits.length&&null!==this.$submits[0].getAttribute("formnovalidate"))}},{key:"enableValidation",value:function(){this.isEnabled=!0}},{key:"disableValidation",value:function(){this.isEnabled=!1}},{key:"requiredCheck",value:function(e){if(!e.attr("required"))return!0;var t=!0;switch(e[0].type){case"checkbox":t=e[0].checked;break;case"select":case"select-one":case"select-multiple":var n=e.find("option:selected");n.length&&n.val()||(t=!1);break;default:e.val()&&e.val().length||(t=!1)}return t}},{key:"findFormError",value:function(e,t){var n=this,i=e.length?e[0].id:"",o=e.siblings(this.options.formErrorSelector);return o.length||(o=e.parent().find(this.options.formErrorSelector)),i&&(o=o.add(this.$element.find('[data-form-error-for="'.concat(i,'"]')))),t&&(o=o.not("[data-form-error-on]"),t.forEach((function(t){o=(o=o.add(e.siblings('[data-form-error-on="'.concat(t,'"]')))).add(n.$element.find('[data-form-error-for="'.concat(i,'"][data-form-error-on="').concat(t,'"]')))}))),o}},{key:"findLabel",value:function(e){var t=e[0].id,n=this.$element.find('label[for="'.concat(t,'"]'));return n.length?n:e.closest("label")}},{key:"findRadioLabels",value:function(e){var t=this,n=e.map((function(e,n){var i=n.id,s=t.$element.find('label[for="'.concat(i,'"]'));return s.length||(s=o()(n).closest("label")),s[0]}));return o()(n)}},{key:"findCheckboxLabels",value:function(e){var t=this,n=e.map((function(e,n){var i=n.id,s=t.$element.find('label[for="'.concat(i,'"]'));return s.length||(s=o()(n).closest("label")),s[0]}));return o()(n)}},{key:"addErrorClasses",value:function(e,t){var n=this.findLabel(e),i=this.findFormError(e,t);n.length&&n.addClass(this.options.labelErrorClass),i.length&&i.addClass(this.options.formErrorClass),e.addClass(this.options.inputErrorClass).attr({"data-invalid":"","aria-invalid":!0})}},{key:"addA11yAttributes",value:function(e){var t=this.findFormError(e),n=t.filter("label"),i=t.first();if(t.length){if(void 0===e.attr("aria-describedby")){var s=i.attr("id");void 0===s&&(s=_(6,"abide-error"),i.attr("id",s)),e.attr("aria-describedby",s)}if(n.filter("[for]").length=a&&(i=!0)),!0!==this.initialized&&a>1||(n.each((function(e,n){i?t.removeErrorClasses(o()(n)):t.addErrorClasses(o()(n),["required"])})),i)}},{key:"matchValidation",value:function(e,t,n){var i=this;return n=!!n,-1===t.split(" ").map((function(t){return i.options.validators[t](e,n,e.parent())})).indexOf(!1)}},{key:"resetForm",value:function(){var e=this.$element,t=this.options;o()(".".concat(t.labelErrorClass),e).not("small").removeClass(t.labelErrorClass),o()(".".concat(t.inputErrorClass),e).not("small").removeClass(t.inputErrorClass),o()("".concat(t.formErrorSelector,".").concat(t.formErrorClass)).removeClass(t.formErrorClass),e.find("[data-abide-error]").css("display","none"),o()(":input",e).not(":button, :submit, :reset, :hidden, :radio, :checkbox, [data-abide-ignore]").val("").attr({"data-invalid":null,"aria-invalid":null}),o()(":input:radio",e).not("[data-abide-ignore]").prop("checked",!1).attr({"data-invalid":null,"aria-invalid":null}),o()(":input:checkbox",e).not("[data-abide-ignore]").prop("checked",!1).attr({"data-invalid":null,"aria-invalid":null}),e.trigger("formreset.zf.abide",[e])}},{key:"_destroy",value:function(){var e=this;this.$element.off(".abide").find("[data-abide-error]").css("display","none"),this.$inputs.off(".abide").each((function(){e.removeErrorClasses(o()(this))})),this.$submits.off(".abide")}}]),t}(oe);ae.defaults={validateOn:"fieldChange",labelErrorClass:"is-invalid-label",inputErrorClass:"is-invalid-input",formErrorSelector:".form-error",formErrorClass:"is-visible",a11yAttributes:!0,a11yErrorLevel:"assertive",liveValidate:!1,validateOnBlur:!1,patterns:{alpha:/^[a-zA-Z]+$/,alpha_numeric:/^[a-zA-Z0-9]+$/,integer:/^[-+]?\d+$/,number:/^[-+]?\d*(?:[\.\,]\d+)?$/,card:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(?:222[1-9]|2[3-6][0-9]{2}|27[0-1][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,cvv:/^([0-9]){3,4}$/,email:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,url:/^((?:(https?|ftps?|file|ssh|sftp):\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))*\))+(?:\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))$/,domain:/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,datetime:/^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,date:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,time:/^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,dateISO:/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,month_day_year:/^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,day_month_year:/^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,color:/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,website:{test:function(e){return ae.defaults.patterns.domain.test(e)||ae.defaults.patterns.url.test(e)}}},validators:{equalTo:function(e,t,n){return o()("#".concat(e.attr("data-equalto"))).val()===e.val()}}};var re=function(e){function t(){return r(this,t),f(this,c(t).apply(this,arguments))}return u(t,e),d(t,[{key:"_setup",value:function(e,n){this.$element=e,this.options=o.a.extend({},t.defaults,this.$element.data(),n),this.className="Accordion",this._init(),j.register("Accordion",{ENTER:"toggle",SPACE:"toggle",ARROW_DOWN:"next",ARROW_UP:"previous"})}},{key:"_init",value:function(){var e=this;this._isInitializing=!0,this.$element.attr("role","tablist"),this.$tabs=this.$element.children("[data-accordion-item]"),this.$tabs.attr({role:"presentation"}),this.$tabs.each((function(e,t){var n=o()(t),i=n.children("[data-tab-content]"),s=i[0].id||_(6,"accordion"),a=t.id?"".concat(t.id,"-label"):"".concat(s,"-label");n.find("a:first").attr({"aria-controls":s,role:"tab",id:a,"aria-expanded":!1,"aria-selected":!1}),i.attr({role:"tabpanel","aria-labelledby":a,"aria-hidden":!0,id:s})}));var t=this.$element.find(".is-active").children("[data-tab-content]");t.length&&(this._initialAnchor=t.prev("a").attr("href"),this._openSingleTab(t)),this._checkDeepLink=function(){var t=window.location.hash;if(!t.length){if(e._isInitializing)return;e._initialAnchor&&(t=e._initialAnchor)}var n=t&&o()(t),i=t&&e.$element.find('[href$="'.concat(t,'"]'));n.length&&i.length&&(n&&i&&i.length?i.parent("[data-accordion-item]").hasClass("is-active")||e._openSingleTab(n):e._closeAllTabs(),e.options.deepLinkSmudge&&v(o()(window),(function(){var t=e.$element.offset();o()("html, body").animate({scrollTop:t.top-e.options.deepLinkSmudgeOffset},e.options.deepLinkSmudgeDelay)})),e.$element.trigger("deeplink.zf.accordion",[i,n]))},this.options.deepLink&&this._checkDeepLink(),this._events(),this._isInitializing=!1}},{key:"_events",value:function(){var e=this;this.$tabs.each((function(){var t=o()(this),n=t.children("[data-tab-content]");n.length&&t.children("a").off("click.zf.accordion keydown.zf.accordion").on("click.zf.accordion",(function(t){t.preventDefault(),e.toggle(n)})).on("keydown.zf.accordion",(function(i){j.handleKey(i,"Accordion",{toggle:function(){e.toggle(n)},next:function(){var n=t.next().find("a").focus();e.options.multiExpand||n.trigger("click.zf.accordion")},previous:function(){var n=t.prev().find("a").focus();e.options.multiExpand||n.trigger("click.zf.accordion")},handled:function(){i.preventDefault()}})}))})),this.options.deepLink&&o()(window).on("hashchange",this._checkDeepLink)}},{key:"toggle",value:function(e){if(e.closest("[data-accordion]").is("[disabled]"))console.info("Cannot toggle an accordion that is disabled.");else if(e.parent().hasClass("is-active")?this.up(e):this.down(e),this.options.deepLink){var t=e.prev("a").attr("href");this.options.updateHistory?history.pushState({},"",t):history.replaceState({},"",t)}}},{key:"down",value:function(e){e.closest("[data-accordion]").is("[disabled]")?console.info("Cannot call down on an accordion that is disabled."):this.options.multiExpand?this._openTab(e):this._openSingleTab(e)}},{key:"up",value:function(e){if(this.$element.is("[disabled]"))console.info("Cannot call up on an accordion that is disabled.");else{var t=e.parent();if(t.hasClass("is-active")){var n=t.siblings();(this.options.allowAllClosed||n.hasClass("is-active"))&&this._closeTab(e)}}}},{key:"_openSingleTab",value:function(e){var t=this.$element.children(".is-active").children("[data-tab-content]");t.length&&this._closeTab(t.not(e)),this._openTab(e)}},{key:"_openTab",value:function(e){var t=this,n=e.parent(),i=e.attr("aria-labelledby");e.attr("aria-hidden",!1),n.addClass("is-active"),o()("#".concat(i)).attr({"aria-expanded":!0,"aria-selected":!0}),e.finish().slideDown(this.options.slideSpeed,(function(){t.$element.trigger("down.zf.accordion",[e])}))}},{key:"_closeTab",value:function(e){var t=this,n=e.parent(),i=e.attr("aria-labelledby");e.attr("aria-hidden",!0),n.removeClass("is-active"),o()("#".concat(i)).attr({"aria-expanded":!1,"aria-selected":!1}),e.finish().slideUp(this.options.slideSpeed,(function(){t.$element.trigger("up.zf.accordion",[e])}))}},{key:"_closeAllTabs",value:function(){var e=this.$element.children(".is-active").children("[data-tab-content]");e.length&&this._closeTab(e)}},{key:"_destroy",value:function(){this.$element.find("[data-tab-content]").stop(!0).slideUp(0).css("display",""),this.$element.find("a").off(".zf.accordion"),this.options.deepLink&&o()(window).off("hashchange",this._checkDeepLink)}}]),t}(oe);re.defaults={slideSpeed:250,multiExpand:!1,allowAllClosed:!1,deepLink:!1,deepLinkSmudge:!1,deepLinkSmudgeDelay:300,deepLinkSmudgeOffset:0,updateHistory:!1};var le=function(e){function t(){return r(this,t),f(this,c(t).apply(this,arguments))}return u(t,e),d(t,[{key:"_setup",value:function(e,n){this.$element=e,this.options=o.a.extend({},t.defaults,this.$element.data(),n),this.className="AccordionMenu",this._init(),j.register("AccordionMenu",{ENTER:"toggle",SPACE:"toggle",ARROW_RIGHT:"open",ARROW_UP:"up",ARROW_DOWN:"down",ARROW_LEFT:"close",ESCAPE:"closeAll"})}},{key:"_init",value:function(){N.Feather(this.$element,"accordion");var e=this;this.$element.find("[data-submenu]").not(".is-active").slideUp(0),this.$element.attr({role:"tree","aria-multiselectable":this.options.multiOpen}),this.$menuLinks=this.$element.find(".is-accordion-submenu-parent"),this.$menuLinks.each((function(){var t=this.id||_(6,"acc-menu-link"),n=o()(this),i=n.children("[data-submenu]"),s=i[0].id||_(6,"acc-menu"),a=i.hasClass("is-active");e.options.parentLink&&n.children("a").clone().prependTo(i).wrap('
  • '),e.options.submenuToggle?(n.addClass("has-submenu-toggle"),n.children("a").after('")):n.attr({"aria-controls":s,"aria-expanded":a,id:t}),i.attr({"aria-labelledby":t,"aria-hidden":!a,role:"group",id:s})})),this.$element.find("li").attr({role:"treeitem"});var t=this.$element.find(".is-active");t.length&&t.each((function(){e.down(o()(this))})),this._events()}},{key:"_events",value:function(){var e=this;this.$element.find("li").each((function(){var t=o()(this).children("[data-submenu]");t.length&&(e.options.submenuToggle?o()(this).children(".submenu-toggle").off("click.zf.accordionMenu").on("click.zf.accordionMenu",(function(n){e.toggle(t)})):o()(this).children("a").off("click.zf.accordionMenu").on("click.zf.accordionMenu",(function(n){n.preventDefault(),e.toggle(t)})))})).on("keydown.zf.accordionMenu",(function(t){var n,i,s=o()(this),a=s.parent("ul").children("li"),r=s.children("[data-submenu]");a.each((function(e){if(o()(this).is(s))return n=a.eq(Math.max(0,e-1)).find("a").first(),i=a.eq(Math.min(e+1,a.length-1)).find("a").first(),o()(this).children("[data-submenu]:visible").length&&(i=s.find("li:first-child").find("a").first()),o()(this).is(":first-child")?n=s.parents("li").first().find("a").first():n.parents("li").first().children("[data-submenu]:visible").length&&(n=n.parents("li").find("li:last-child").find("a").first()),void(o()(this).is(":last-child")&&(i=s.parents("li").first().next("li").find("a").first()))})),j.handleKey(t,"AccordionMenu",{open:function(){r.is(":hidden")&&(e.down(r),r.find("li").first().find("a").first().focus())},close:function(){r.length&&!r.is(":hidden")?e.up(r):s.parent("[data-submenu]").length&&(e.up(s.parent("[data-submenu]")),s.parents("li").first().find("a").first().focus())},up:function(){return n.focus(),!0},down:function(){return i.focus(),!0},toggle:function(){return!e.options.submenuToggle&&(s.children("[data-submenu]").length?(e.toggle(s.children("[data-submenu]")),!0):void 0)},closeAll:function(){e.hideAll()},handled:function(e){e&&t.preventDefault()}})}))}},{key:"hideAll",value:function(){this.up(this.$element.find("[data-submenu]"))}},{key:"showAll",value:function(){this.down(this.$element.find("[data-submenu]"))}},{key:"toggle",value:function(e){e.is(":animated")||(e.is(":hidden")?this.down(e):this.up(e))}},{key:"down",value:function(e){var t=this;if(!this.options.multiOpen){var n=e.parentsUntil(this.$element).add(e).add(e.find(".is-active")),i=this.$element.find(".is-active").not(n);this.up(i)}e.addClass("is-active").attr({"aria-hidden":!1}),this.options.submenuToggle?e.prev(".submenu-toggle").attr({"aria-expanded":!0}):e.parent(".is-accordion-submenu-parent").attr({"aria-expanded":!0}),e.slideDown(this.options.slideSpeed,(function(){t.$element.trigger("down.zf.accordionMenu",[e])}))}},{key:"up",value:function(e){var t=this,n=e.find("[data-submenu]"),i=e.add(n);n.slideUp(0),i.removeClass("is-active").attr("aria-hidden",!0),this.options.submenuToggle?i.prev(".submenu-toggle").attr("aria-expanded",!1):i.parent(".is-accordion-submenu-parent").attr("aria-expanded",!1),e.slideUp(this.options.slideSpeed,(function(){t.$element.trigger("up.zf.accordionMenu",[e])}))}},{key:"_destroy",value:function(){this.$element.find("[data-submenu]").slideDown(0).css("display",""),this.$element.find("a").off("click.zf.accordionMenu"),this.$element.find("[data-is-parent-link]").detach(),this.options.submenuToggle&&(this.$element.find(".has-submenu-toggle").removeClass("has-submenu-toggle"),this.$element.find(".submenu-toggle").remove()),N.Burn(this.$element,"accordion")}}]),t}(oe);le.defaults={parentLink:!1,slideSpeed:250,submenuToggle:!1,submenuToggleText:"Toggle menu",multiOpen:!0};var de=function(e){function t(){return r(this,t),f(this,c(t).apply(this,arguments))}return u(t,e),d(t,[{key:"_setup",value:function(e,n){this.$element=e,this.options=o.a.extend({},t.defaults,this.$element.data(),n),this.className="Drilldown",this._init(),j.register("Drilldown",{ENTER:"open",SPACE:"open",ARROW_RIGHT:"next",ARROW_UP:"up",ARROW_DOWN:"down",ARROW_LEFT:"previous",ESCAPE:"close",TAB:"down",SHIFT_TAB:"up"})}},{key:"_init",value:function(){N.Feather(this.$element,"drilldown"),this.options.autoApplyClass&&this.$element.addClass("drilldown"),this.$element.attr({role:"tree","aria-multiselectable":!1}),this.$submenuAnchors=this.$element.find("li.is-drilldown-submenu-parent").children("a"),this.$submenus=this.$submenuAnchors.parent("li").children("[data-submenu]").attr("role","group"),this.$menuItems=this.$element.find("li").not(".js-drilldown-back").attr("role","treeitem").find("a"),this.$currentMenu=this.$element,this.$element.attr("data-mutate",this.$element.attr("data-drilldown")||_(6,"drilldown")),this._prepareMenu(),this._registerEvents(),this._keyboardEvents()}},{key:"_prepareMenu",value:function(){var e=this;this.$submenuAnchors.each((function(){var t=o()(this),n=t.parent();e.options.parentLink&&t.clone().prependTo(n.children("[data-submenu]")).wrap('
  • '),t.data("savedHref",t.attr("href")).removeAttr("href").attr("tabindex",0),t.children("[data-submenu]").attr({"aria-hidden":!0,tabindex:0,role:"group"}),e._events(t)})),this.$submenus.each((function(){var t=o()(this);if(!t.find(".js-drilldown-back").length)switch(e.options.backButtonPosition){case"bottom":t.append(e.options.backButton);break;case"top":t.prepend(e.options.backButton);break;default:console.error("Unsupported backButtonPosition value '"+e.options.backButtonPosition+"'")}e._back(t)})),this.$submenus.addClass("invisible"),this.options.autoHeight||this.$submenus.addClass("drilldown-submenu-cover-previous"),this.$element.parent().hasClass("is-drilldown")||(this.$wrapper=o()(this.options.wrapper).addClass("is-drilldown"),this.options.animateHeight&&this.$wrapper.addClass("animate-height"),this.$element.wrap(this.$wrapper)),this.$wrapper=this.$element.parent(),this.$wrapper.css(this._getMaxDims())}},{key:"_resize",value:function(){this.$wrapper.css({"max-width":"none","min-height":"none"}),this.$wrapper.css(this._getMaxDims())}},{key:"_events",value:function(e){var t=this;e.off("click.zf.drilldown").on("click.zf.drilldown",(function(n){if(o()(n.target).parentsUntil("ul","li").hasClass("is-drilldown-submenu-parent")&&n.preventDefault(),t._show(e.parent("li")),t.options.closeOnClick){var i=o()("body");i.off(".zf.drilldown").on("click.zf.drilldown",(function(e){e.target===t.$element[0]||o.a.contains(t.$element[0],e.target)||(e.preventDefault(),t._hideAll(),i.off(".zf.drilldown"))}))}}))}},{key:"_registerEvents",value:function(){this.options.scrollTop&&(this._bindHandler=this._scrollTop.bind(this),this.$element.on("open.zf.drilldown hide.zf.drilldown close.zf.drilldown closed.zf.drilldown",this._bindHandler)),this.$element.on("mutateme.zf.trigger",this._resize.bind(this))}},{key:"_scrollTop",value:function(){var e=this,t=""!=e.options.scrollTopElement?o()(e.options.scrollTopElement):e.$element,n=parseInt(t.offset().top+e.options.scrollTopOffset,10);o()("html, body").stop(!0).animate({scrollTop:n},e.options.animationDuration,e.options.animationEasing,(function(){this===o()("html")[0]&&e.$element.trigger("scrollme.zf.drilldown")}))}},{key:"_keyboardEvents",value:function(){var e=this;this.$menuItems.add(this.$element.find(".js-drilldown-back > a, .is-submenu-parent-item > a")).on("keydown.zf.drilldown",(function(t){var n,i,s=o()(this),a=s.parent("li").parent("ul").children("li").children("a");a.each((function(e){if(o()(this).is(s))return n=a.eq(Math.max(0,e-1)),void(i=a.eq(Math.min(e+1,a.length-1)))})),j.handleKey(t,"Drilldown",{next:function(){if(s.is(e.$submenuAnchors))return e._show(s.parent("li")),s.parent("li").one(g(s),(function(){s.parent("li").find("ul li a").not(".js-drilldown-back a").first().focus()})),!0},previous:function(){return e._hide(s.parent("li").parent("ul")),s.parent("li").parent("ul").one(g(s),(function(){setTimeout((function(){s.parent("li").parent("ul").parent("li").children("a").first().focus()}),1)})),!0},up:function(){return n.focus(),!s.is(e.$element.find("> li:first-child > a"))},down:function(){return i.focus(),!s.is(e.$element.find("> li:last-child > a"))},close:function(){s.is(e.$element.find("> li > a"))||(e._hide(s.parent().parent()),s.parent().parent().siblings("a").focus())},open:function(){return(!e.options.parentLink||!s.attr("href"))&&(s.is(e.$menuItems)?s.is(e.$submenuAnchors)?(e._show(s.parent("li")),s.parent("li").one(g(s),(function(){s.parent("li").find("ul li a").not(".js-drilldown-back a").first().focus()})),!0):void 0:(e._hide(s.parent("li").parent("ul")),s.parent("li").parent("ul").one(g(s),(function(){setTimeout((function(){s.parent("li").parent("ul").parent("li").children("a").first().focus()}),1)})),!0))},handled:function(e){e&&t.preventDefault()}})}))}},{key:"_hideAll",value:function(){var e=this,t=this.$element.find(".is-drilldown-submenu.is-active");if(t.addClass("is-closing"),this.options.autoHeight){var n=t.parent().closest("ul").data("calcHeight");this.$wrapper.css({height:n})}this.$element.trigger("close.zf.drilldown"),t.one(g(t),(function(){t.removeClass("is-active is-closing"),e.$element.trigger("closed.zf.drilldown")}))}},{key:"_back",value:function(e){var t=this;e.off("click.zf.drilldown"),e.children(".js-drilldown-back").on("click.zf.drilldown",(function(n){t._hide(e);var i=e.parent("li").parent("ul").parent("li");i.length&&t._show(i)}))}},{key:"_menuLinkEvents",value:function(){var e=this;this.$menuItems.not(".is-drilldown-submenu-parent").off("click.zf.drilldown").on("click.zf.drilldown",(function(t){setTimeout((function(){e._hideAll()}),0)}))}},{key:"_setShowSubMenuClasses",value:function(e,t){e.addClass("is-active").removeClass("invisible").attr("aria-hidden",!1),e.parent("li").attr("aria-expanded",!0),!0===t&&this.$element.trigger("open.zf.drilldown",[e])}},{key:"_setHideSubMenuClasses",value:function(e,t){e.removeClass("is-active").addClass("invisible").attr("aria-hidden",!0),e.parent("li").attr("aria-expanded",!1),!0===t&&e.trigger("hide.zf.drilldown",[e])}},{key:"_showMenu",value:function(e,t){var n=this;if(this.$element.find('li[aria-expanded="true"] > ul[data-submenu]').each((function(e){n._setHideSubMenuClasses(o()(this))})),this.$currentMenu=e,e.is("[data-drilldown]"))return!0===t&&e.find('li[role="treeitem"] > a').first().focus(),void(this.options.autoHeight&&this.$wrapper.css("height",e.data("calcHeight")));var i=e.children().first().parentsUntil("[data-drilldown]","[data-submenu]");i.each((function(s){0===s&&n.options.autoHeight&&n.$wrapper.css("height",o()(this).data("calcHeight"));var a=s==i.length-1;!0===a&&o()(this).one(g(o()(this)),(function(){!0===t&&e.find('li[role="treeitem"] > a').first().focus()})),n._setShowSubMenuClasses(o()(this),a)}))}},{key:"_show",value:function(e){var t=e.children("[data-submenu]");e.attr("aria-expanded",!0),this.$currentMenu=t,t.addClass("is-active").removeClass("invisible").attr("aria-hidden",!1),this.options.autoHeight&&this.$wrapper.css({height:t.data("calcHeight")}),this.$element.trigger("open.zf.drilldown",[e])}},{key:"_hide",value:function(e){this.options.autoHeight&&this.$wrapper.css({height:e.parent().closest("ul").data("calcHeight")}),e.parent("li").attr("aria-expanded",!1),e.attr("aria-hidden",!0),e.addClass("is-closing").one(g(e),(function(){e.removeClass("is-active is-closing"),e.blur().addClass("invisible")})),e.trigger("hide.zf.drilldown",[e])}},{key:"_getMaxDims",value:function(){var e=0,t={},n=this;return this.$submenus.add(this.$element).each((function(){o()(this).children("li").length;var t=D.GetDimensions(this).height;e=t>e?t:e,n.options.autoHeight&&o()(this).data("calcHeight",t)})),this.options.autoHeight?t.height=this.$currentMenu.data("calcHeight"):t["min-height"]="".concat(e,"px"),t["max-width"]="".concat(this.$element[0].getBoundingClientRect().width,"px"),t}},{key:"_destroy",value:function(){this.options.scrollTop&&this.$element.off(".zf.drilldown",this._bindHandler),this._hideAll(),this.$element.off("mutateme.zf.trigger"),N.Burn(this.$element,"drilldown"),this.$element.unwrap().find(".js-drilldown-back, .is-submenu-parent-item").remove().end().find(".is-active, .is-closing, .is-drilldown-submenu").removeClass("is-active is-closing is-drilldown-submenu").end().find("[data-submenu]").removeAttr("aria-hidden tabindex role"),this.$submenuAnchors.each((function(){o()(this).off(".zf.drilldown")})),this.$element.find("[data-is-parent-link]").detach(),this.$submenus.removeClass("drilldown-submenu-cover-previous invisible"),this.$element.find("a").each((function(){var e=o()(this);e.removeAttr("tabindex"),e.data("savedHref")&&e.attr("href",e.data("savedHref")).removeData("savedHref")}))}}]),t}(oe);de.defaults={autoApplyClass:!0,backButton:'
  • Back
  • ',backButtonPosition:"top",wrapper:"
    ",parentLink:!1,closeOnClick:!1,autoHeight:!1,animateHeight:!1,scrollTop:!1,scrollTopElement:"",scrollTopOffset:0,animationDuration:500,animationEasing:"swing"};var ue=["left","right","top","bottom"],ce=["top","bottom","center"],he=["left","right","center"],fe={left:ce,right:ce,top:he,bottom:he};function pe(e,t){var n=t.indexOf(e);return n===t.length-1?t[0]:t[n+1]}var me=function(e){function t(){return r(this,t),f(this,c(t).apply(this,arguments))}return u(t,e),d(t,[{key:"_init",value:function(){this.triedPositions={},this.position="auto"===this.options.position?this._getDefaultPosition():this.options.position,this.alignment="auto"===this.options.alignment?this._getDefaultAlignment():this.options.alignment,this.originalPosition=this.position,this.originalAlignment=this.alignment}},{key:"_getDefaultPosition",value:function(){return"bottom"}},{key:"_getDefaultAlignment",value:function(){switch(this.position){case"bottom":case"top":return m()?"right":"left";case"left":case"right":return"bottom"}}},{key:"_reposition",value:function(){this._alignmentsExhausted(this.position)?(this.position=pe(this.position,ue),this.alignment=fe[this.position][0]):this._realign()}},{key:"_realign",value:function(){this._addTriedPosition(this.position,this.alignment),this.alignment=pe(this.alignment,fe[this.position])}},{key:"_addTriedPosition",value:function(e,t){this.triedPositions[e]=this.triedPositions[e]||[],this.triedPositions[e].push(t)}},{key:"_positionsExhausted",value:function(){for(var e=!0,t=0;t-1,r=a?e.$tabs:s.siblings("li").add(s);r.each((function(e){if(o()(this).is(s))return n=r.eq(e-1),void(i=r.eq(e+1))}));var l=function(){i.children("a:first").focus(),t.preventDefault()},d=function(){n.children("a:first").focus(),t.preventDefault()},u=function(){var n=s.children("ul.is-dropdown-submenu");n.length&&(e._show(n),s.find("li > a:first").focus(),t.preventDefault())},c=function(){var n=s.parent("ul").parent("li");n.children("a:first").focus(),e._hide(n),t.preventDefault()},h={open:u,close:function(){e._hide(e.$element),e.$menuItems.eq(0).children("a").focus(),t.preventDefault()}};a?e._isVertical()?e._isRtl()?o.a.extend(h,{down:l,up:d,next:c,previous:u}):o.a.extend(h,{down:l,up:d,next:u,previous:c}):e._isRtl()?o.a.extend(h,{next:d,previous:l,down:u,up:c}):o.a.extend(h,{next:l,previous:d,down:u,up:c}):e._isRtl()?o.a.extend(h,{next:c,previous:u,down:l,up:d}):o.a.extend(h,{next:u,previous:c,down:l,up:d}),j.handleKey(t,"DropdownMenu",h)}))}},{key:"_addBodyHandler",value:function(){var e=this,t=o()(document.body);this._removeBodyHandler(),t.on("click.zf.dropdownMenu tap.zf.dropdownMenu",(function(t){o()(t.target).closest(e.$element).length||(e._hide(),e._removeBodyHandler())}))}},{key:"_removeBodyHandler",value:function(){o()(document.body).off("click.zf.dropdownMenu tap.zf.dropdownMenu")}},{key:"_show",value:function(e){var t=this.$tabs.index(this.$tabs.filter((function(t,n){return o()(n).find(e).length>0}))),n=e.parent("li.is-dropdown-submenu-parent").siblings("li.is-dropdown-submenu-parent");this._hide(n,t),e.css("visibility","hidden").addClass("js-dropdown-active").parent("li.is-dropdown-submenu-parent").addClass("is-active");var i=D.ImNotTouchingYou(e,null,!0);if(!i){var s="left"===this.options.alignment?"-right":"-left",a=e.parent(".is-dropdown-submenu-parent");a.removeClass("opens".concat(s)).addClass("opens-".concat(this.options.alignment)),(i=D.ImNotTouchingYou(e,null,!0))||a.removeClass("opens-".concat(this.options.alignment)).addClass("opens-inner"),this.changed=!0}e.css("visibility",""),this.options.closeOnClick&&this._addBodyHandler(),this.$element.trigger("show.zf.dropdownMenu",[e])}},{key:"_hide",value:function(e,t){var n;if((n=e&&e.length?e:void 0!==t?this.$tabs.not((function(e,n){return e===t})):this.$element).hasClass("is-active")||n.find(".is-active").length>0){var i=n.find("li.is-active");if(i.add(n).attr({"data-is-click":!1}).removeClass("is-active"),n.find("ul.js-dropdown-active").removeClass("js-dropdown-active"),this.changed||n.find("opens-inner").length){var o="left"===this.options.alignment?"right":"left";n.find("li.is-dropdown-submenu-parent").add(n).removeClass("opens-inner opens-".concat(this.options.alignment)).addClass("opens-".concat(o)),this.changed=!1}clearTimeout(i.data("_delay")),this._removeBodyHandler(),this.$element.trigger("hide.zf.dropdownMenu",[n])}}},{key:"_destroy",value:function(){this.$menuItems.off(".zf.dropdownMenu").removeAttr("data-is-click").removeClass("is-right-arrow is-left-arrow is-down-arrow opens-right opens-left opens-inner"),o()(document.body).off(".zf.dropdownMenu"),N.Burn(this.$element,"dropdown")}}]),t}(oe);ye.defaults={disableHover:!1,autoclose:!0,hoverDelay:50,clickOpen:!1,closingTime:500,alignment:"auto",closeOnClick:!0,closeOnClickInside:!0,verticalClass:"vertical",rightClass:"align-right",forceFollow:!0};var ge=function(e){function t(){return r(this,t),f(this,c(t).apply(this,arguments))}return u(t,e),d(t,[{key:"_setup",value:function(e,n){this.$element=e,this.options=o.a.extend({},t.defaults,this.$element.data(),n),this.className="Equalizer",this._init()}},{key:"_init",value:function(){var e=this.$element.attr("data-equalizer")||"",t=this.$element.find('[data-equalizer-watch="'.concat(e,'"]'));M._init(),this.$watched=t.length?t:this.$element.find("[data-equalizer-watch]"),this.$element.attr("data-resize",e||_(6,"eq")),this.$element.attr("data-mutate",e||_(6,"eq")),this.hasNested=this.$element.find("[data-equalizer]").length>0,this.isNested=this.$element.parentsUntil(document.body,"[data-equalizer]").length>0,this.isOn=!1,this._bindHandler={onResizeMeBound:this._onResizeMe.bind(this),onPostEqualizedBound:this._onPostEqualized.bind(this)};var n,i=this.$element.find("img");this.options.equalizeOn?(n=this._checkMQ(),o()(window).on("changed.zf.mediaquery",this._checkMQ.bind(this))):this._events(),(void 0!==n&&!1===n||void 0===n)&&(i.length?Y(i,this._reflow.bind(this)):this._reflow())}},{key:"_pauseEvents",value:function(){this.isOn=!1,this.$element.off({".zf.equalizer":this._bindHandler.onPostEqualizedBound,"resizeme.zf.trigger":this._bindHandler.onResizeMeBound,"mutateme.zf.trigger":this._bindHandler.onResizeMeBound})}},{key:"_onResizeMe",value:function(e){this._reflow()}},{key:"_onPostEqualized",value:function(e){e.target!==this.$element[0]&&this._reflow()}},{key:"_events",value:function(){this._pauseEvents(),this.hasNested?this.$element.on("postequalized.zf.equalizer",this._bindHandler.onPostEqualizedBound):(this.$element.on("resizeme.zf.trigger",this._bindHandler.onResizeMeBound),this.$element.on("mutateme.zf.trigger",this._bindHandler.onResizeMeBound)),this.isOn=!0}},{key:"_checkMQ",value:function(){var e=!M.is(this.options.equalizeOn);return e?this.isOn&&(this._pauseEvents(),this.$watched.css("height","auto")):this.isOn||this._events(),e}},{key:"_killswitch",value:function(){}},{key:"_reflow",value:function(){if(!this.options.equalizeOnStack&&this._isStacked())return this.$watched.css("height","auto"),!1;this.options.equalizeByRow?this.getHeightsByRow(this.applyHeightByRow.bind(this)):this.getHeights(this.applyHeight.bind(this))}},{key:"_isStacked",value:function(){return!this.$watched[0]||!this.$watched[1]||this.$watched[0].getBoundingClientRect().top!==this.$watched[1].getBoundingClientRect().top}},{key:"getHeights",value:function(e){for(var t=[],n=0,i=this.$watched.length;n1&&void 0!==arguments[1]?arguments[1]:t.defaults,i=arguments.length>2?arguments[2]:void 0,s=o()(e);if(!s.length)return!1;var a=Math.round(s.offset().top-n.threshold/2-n.offset);o()("html, body").stop(!0).animate({scrollTop:a},n.animationDuration,n.animationEasing,(function(){"function"==typeof i&&i()}))}}]),t}(oe);be.defaults={animationDuration:500,animationEasing:"linear",threshold:50,offset:0};var we=function(e){function t(){return r(this,t),f(this,c(t).apply(this,arguments))}return u(t,e),d(t,[{key:"_setup",value:function(e,n){this.$element=e,this.options=o.a.extend({},t.defaults,this.$element.data(),n),this.className="Magellan",ne.init(o.a),this._init(),this.calcPoints()}},{key:"_init",value:function(){var e=this.$element[0].id||_(6,"magellan");this.$targets=o()("[data-magellan-target]"),this.$links=this.$element.find("a"),this.$element.attr({"data-resize":e,"data-scroll":e,id:e}),this.$active=o()(),this.scrollPos=parseInt(window.pageYOffset,10),this._events()}},{key:"calcPoints",value:function(){var e=this,t=document.body,n=document.documentElement;this.points=[],this.winHeight=Math.round(Math.max(window.innerHeight,n.clientHeight)),this.docHeight=Math.round(Math.max(t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight)),this.$targets.each((function(){var t=o()(this),n=Math.round(t.offset().top-e.options.threshold);t.targetPoint=n,e.points.push(n)}))}},{key:"_events",value:function(){var e=this;o()(window).one("load",(function(){e.options.deepLinking&&location.hash&&e.scrollToLoc(location.hash),e.calcPoints(),e._updateActive()})),e.onLoadListener=v(o()(window),(function(){e.$element.on({"resizeme.zf.trigger":e.reflow.bind(e),"scrollme.zf.trigger":e._updateActive.bind(e)}).on("click.zf.magellan",'a[href^="#"]',(function(t){t.preventDefault();var n=this.getAttribute("href");e.scrollToLoc(n)}))})),this._deepLinkScroll=function(t){e.options.deepLinking&&e.scrollToLoc(window.location.hash)},o()(window).on("hashchange",this._deepLinkScroll)}},{key:"scrollToLoc",value:function(e){this._inTransition=!0;var t=this,n={animationEasing:this.options.animationEasing,animationDuration:this.options.animationDuration,threshold:this.options.threshold,offset:this.options.offset};be.scrollToLoc(e,n,(function(){t._inTransition=!1}))}},{key:"reflow",value:function(){this.calcPoints(),this._updateActive()}},{key:"_updateActive",value:function(){var e=this;if(!this._inTransition){var t,n=parseInt(window.pageYOffset,10),i=this.scrollPos>n;if(this.scrollPos=n,n0&&"push"===this.options.transition&&(this.options.contentScroll=!1);var s=this.$element.attr("class").match(/\bin-canvas-for-(\w+)/);s&&2===s.length?this.options.inCanvasOn=s[1]:this.options.inCanvasOn&&this.$element.addClass("in-canvas-for-".concat(this.options.inCanvasOn)),this.options.inCanvasOn&&this._checkInCanvas(),this._removeContentClasses()}},{key:"_events",value:function(){var e=this;this.$element.off(".zf.trigger .zf.offCanvas").on({"open.zf.trigger":this.open.bind(this),"close.zf.trigger":this.close.bind(this),"toggle.zf.trigger":this.toggle.bind(this),"keydown.zf.offCanvas":this._handleKeyboard.bind(this)}),!0===this.options.closeOnClick&&(this.options.contentOverlay?this.$overlay:this.$content).on({"click.zf.offCanvas":this.close.bind(this)}),this.options.inCanvasOn&&o()(window).on("changed.zf.mediaquery",(function(){e._checkInCanvas()}))}},{key:"_setMQChecker",value:function(){var e=this;this.onLoadListener=v(o()(window),(function(){M.atLeast(e.options.revealOn)&&e.reveal(!0)})),o()(window).on("changed.zf.mediaquery",(function(){M.atLeast(e.options.revealOn)?e.reveal(!0):e.reveal(!1)}))}},{key:"_checkInCanvas",value:function(){this.isInCanvas=M.atLeast(this.options.inCanvasOn),!0===this.isInCanvas&&this.close()}},{key:"_removeContentClasses",value:function(e){"boolean"!=typeof e?this.$content.removeClass(this.contentClasses.base.join(" ")):!1===e&&this.$content.removeClass("has-reveal-".concat(this.position))}},{key:"_addContentClasses",value:function(e){this._removeContentClasses(e),"boolean"!=typeof e?this.$content.addClass("has-transition-".concat(this.options.transition," has-position-").concat(this.position)):!0===e&&this.$content.addClass("has-reveal-".concat(this.position))}},{key:"_fixStickyElements",value:function(){this.$sticky.each((function(e,t){var n=o()(t);if("fixed"===n.css("position")){var i=parseInt(n.css("top"),10);n.data("offCanvasSticky",{top:i});var s=o()(document).scrollTop()+i;n.css({top:"".concat(s,"px"),width:"100%",transition:"none"})}}))}},{key:"_unfixStickyElements",value:function(){this.$sticky.each((function(e,t){var n=o()(t),i=n.data("offCanvasSticky");"object"===a(i)&&(n.css({top:"".concat(i.top,"px"),width:"",transition:""}),n.data("offCanvasSticky",""))}))}},{key:"reveal",value:function(e){e?(this.close(),this.isRevealed=!0,this.$element.attr("aria-hidden","false"),this.$element.off("open.zf.trigger toggle.zf.trigger"),this.$element.removeClass("is-closed")):(this.isRevealed=!1,this.$element.attr("aria-hidden","true"),this.$element.off("open.zf.trigger toggle.zf.trigger").on({"open.zf.trigger":this.open.bind(this),"toggle.zf.trigger":this.toggle.bind(this)}),this.$element.addClass("is-closed")),this._addContentClasses(e)}},{key:"_stopScrolling",value:function(e){return!1}},{key:"_recordScrollable",value:function(e){this.scrollHeight!==this.clientHeight&&(0===this.scrollTop&&(this.scrollTop=1),this.scrollTop===this.scrollHeight-this.clientHeight&&(this.scrollTop=this.scrollHeight-this.clientHeight-1)),this.allowUp=this.scrollTop>0,this.allowDown=this.scrollTop0?t.scrollTop--:this.scrollTop>=this.scrollHeight-this.clientHeight-1&&t.scrollTop1&&this.geoSync(),this.options.accessible&&this.$wrapper.attr("tabindex",0)}},{key:"_loadBullets",value:function(){this.$bullets=this.$element.find(".".concat(this.options.boxOfBullets)).find("button")}},{key:"geoSync",value:function(){var e=this;this.timer=new z(this.$element,{duration:this.options.timerDelay,infinite:!1},(function(){e.changeSlide(!0)})),this.timer.start()}},{key:"_prepareForOrbit",value:function(){this._setWrapperHeight()}},{key:"_setWrapperHeight",value:function(e){var t,n=0,i=0,s=this;this.$slides.each((function(){t=this.getBoundingClientRect().height,o()(this).attr("data-slide",i),/mui/g.test(o()(this)[0].className)||s.$slides.filter(".is-active")[0]===s.$slides.eq(i)[0]||o()(this).css({display:"none"}),n=t>n?t:n,i++})),i===this.$slides.length&&(this.$wrapper.css({height:n}),e&&e(n))}},{key:"_setSlideHeight",value:function(e){this.$slides.each((function(){o()(this).css("max-height",e)}))}},{key:"_events",value:function(){var e=this;this.$element.off(".resizeme.zf.trigger").on({"resizeme.zf.trigger":this._prepareForOrbit.bind(this)}),this.$slides.length>1&&(this.options.swipe&&this.$slides.off("swipeleft.zf.orbit swiperight.zf.orbit").on("swipeleft.zf.orbit",(function(t){t.preventDefault(),e.changeSlide(!0)})).on("swiperight.zf.orbit",(function(t){t.preventDefault(),e.changeSlide(!1)})),this.options.autoPlay&&(this.$slides.on("click.zf.orbit",(function(){e.$element.data("clickedOn",!e.$element.data("clickedOn")),e.timer[e.$element.data("clickedOn")?"pause":"start"]()})),this.options.pauseOnHover&&this.$element.on("mouseenter.zf.orbit",(function(){e.timer.pause()})).on("mouseleave.zf.orbit",(function(){e.$element.data("clickedOn")||e.timer.start()}))),this.options.navButtons&&this.$element.find(".".concat(this.options.nextClass,", .").concat(this.options.prevClass)).attr("tabindex",0).on("click.zf.orbit touchend.zf.orbit",(function(t){t.preventDefault(),e.changeSlide(o()(this).hasClass(e.options.nextClass))})),this.options.bullets&&this.$bullets.on("click.zf.orbit touchend.zf.orbit",(function(){if(/is-active/g.test(this.className))return!1;var t=o()(this).data("slide"),n=t>e.$slides.filter(".is-active").data("slide"),i=e.$slides.eq(t);e.changeSlide(n,i,t)})),this.options.accessible&&this.$wrapper.add(this.$bullets).on("keydown.zf.orbit",(function(t){j.handleKey(t,"Orbit",{next:function(){e.changeSlide(!0)},previous:function(){e.changeSlide(!1)},handled:function(){o()(t.target).is(e.$bullets)&&e.$bullets.filter(".is-active").focus()}})})))}},{key:"_reset",value:function(){void 0!==this.$slides&&this.$slides.length>1&&(this.$element.off(".zf.orbit").find("*").off(".zf.orbit"),this.options.autoPlay&&this.timer.restart(),this.$slides.each((function(e){o()(e).removeClass("is-active is-active is-in").removeAttr("aria-live").hide()})),this.$slides.first().addClass("is-active").show(),this.$element.trigger("slidechange.zf.orbit",[this.$slides.first()]),this.options.bullets&&this._updateBullets(0))}},{key:"changeSlide",value:function(e,t,n){if(this.$slides){var i=this.$slides.filter(".is-active").eq(0);if(/mui/g.test(i[0].className))return!1;var o,s=this.$slides.first(),a=this.$slides.last(),r=e?"Right":"Left",l=e?"Left":"Right",d=this;(o=t||(e?this.options.infiniteWrap?i.next(".".concat(this.options.slideClass)).length?i.next(".".concat(this.options.slideClass)):s:i.next(".".concat(this.options.slideClass)):this.options.infiniteWrap?i.prev(".".concat(this.options.slideClass)).length?i.prev(".".concat(this.options.slideClass)):a:i.prev(".".concat(this.options.slideClass)))).length&&(this.$element.trigger("beforeslidechange.zf.orbit",[i,o]),this.options.bullets&&(n=n||this.$slides.index(o),this._updateBullets(n)),this.options.useMUI&&!this.$element.is(":hidden")?(E.animateIn(o.addClass("is-active"),this.options["animInFrom".concat(r)],(function(){o.css({display:"block"}).attr("aria-live","polite")})),E.animateOut(i.removeClass("is-active"),this.options["animOutTo".concat(l)],(function(){i.removeAttr("aria-live"),d.options.autoPlay&&!d.timer.isPaused&&d.timer.restart()}))):(i.removeClass("is-active is-in").removeAttr("aria-live").hide(),o.addClass("is-active is-in").attr("aria-live","polite").show(),this.options.autoPlay&&!this.timer.isPaused&&this.timer.restart()),this.$element.trigger("slidechange.zf.orbit",[o]))}}},{key:"_updateBullets",value:function(e){var t=this.$bullets.filter(".is-active"),n=this.$bullets.not(".is-active"),i=this.$bullets.eq(e);t.removeClass("is-active").blur(),i.addClass("is-active");var s=t.children("[data-slide-active-label]").last();if(!s.length){var a=t.children("span");n.toArray().map((function(e){return o()(e).children("span").length})).every((function(e){return e1?i[0]:"small",a=i.length>1?i[1]:i[0];null!==Te[a]&&(e[s]=Te[a])}this.rules=e}o.a.isEmptyObject(this.rules)||this._checkMediaQueries(),this.$element.attr("data-mutate",this.$element.attr("data-mutate")||_(6,"responsive-menu"))}},{key:"_events",value:function(){var e=this;o()(window).on("changed.zf.mediaquery",(function(){e._checkMediaQueries()}))}},{key:"_checkMediaQueries",value:function(){var e,t=this;o.a.each(this.rules,(function(t){M.atLeast(t)&&(e=t)})),e&&(this.currentPlugin instanceof this.rules[e].plugin||(o.a.each(Te,(function(e,n){t.$element.removeClass(n.cssClass)})),this.$element.addClass(this.rules[e].cssClass),this.currentPlugin&&this.currentPlugin.destroy(),this.currentPlugin=new this.rules[e].plugin(this.$element,{})))}},{key:"_destroy",value:function(){this.currentPlugin.destroy(),o()(window).off(".zf.ResponsiveMenu")}}]),t}(oe);Se.defaults={};var De=function(e){function t(){return r(this,t),f(this,c(t).apply(this,arguments))}return u(t,e),d(t,[{key:"_setup",value:function(e,n){this.$element=o()(e),this.options=o.a.extend({},t.defaults,this.$element.data(),n),this.className="ResponsiveToggle",this._init(),this._events()}},{key:"_init",value:function(){M._init();var e=this.$element.data("responsive-toggle");if(e||console.error("Your tab bar needs an ID of a Menu as the value of data-tab-bar."),this.$targetMenu=o()("#".concat(e)),this.$toggler=this.$element.find("[data-toggle]").filter((function(){var t=o()(this).data("toggle");return t===e||""===t})),this.options=o.a.extend({},this.options,this.$targetMenu.data()),this.options.animate){var t=this.options.animate.split(" ");this.animationIn=t[0],this.animationOut=t[1]||null}this._update()}},{key:"_events",value:function(){this._updateMqHandler=this._update.bind(this),o()(window).on("changed.zf.mediaquery",this._updateMqHandler),this.$toggler.on("click.zf.responsiveToggle",this.toggleMenu.bind(this))}},{key:"_update",value:function(){M.atLeast(this.options.hideFor)?(this.$element.hide(),this.$targetMenu.show()):(this.$element.show(),this.$targetMenu.hide())}},{key:"toggleMenu",value:function(){var e=this;M.atLeast(this.options.hideFor)||(this.options.animate?this.$targetMenu.is(":hidden")?E.animateIn(this.$targetMenu,this.animationIn,(function(){e.$element.trigger("toggled.zf.responsiveToggle"),e.$targetMenu.find("[data-mutate]").triggerHandler("mutateme.zf.trigger")})):E.animateOut(this.$targetMenu,this.animationOut,(function(){e.$element.trigger("toggled.zf.responsiveToggle")})):(this.$targetMenu.toggle(0),this.$targetMenu.find("[data-mutate]").trigger("mutateme.zf.trigger"),this.$element.trigger("toggled.zf.responsiveToggle")))}},{key:"_destroy",value:function(){this.$element.off(".zf.responsiveToggle"),this.$toggler.off(".zf.responsiveToggle"),o()(window).off("changed.zf.mediaquery",this._updateMqHandler)}}]),t}(oe);De.defaults={hideFor:"medium",animate:!1};var ke=function(e){function t(){return r(this,t),f(this,c(t).apply(this,arguments))}return u(t,e),d(t,[{key:"_setup",value:function(e,n){this.$element=e,this.options=o.a.extend({},t.defaults,this.$element.data(),n),this.className="Reveal",this._init(),U.init(o.a),ne.init(o.a),j.register("Reveal",{ESCAPE:"close"})}},{key:"_init",value:function(){var e=this;M._init(),this.id=this.$element.attr("id"),this.isActive=!1,this.cached={mq:M.current},this.$anchor=o()('[data-open="'.concat(this.id,'"]')).length?o()('[data-open="'.concat(this.id,'"]')):o()('[data-toggle="'.concat(this.id,'"]')),this.$anchor.attr({"aria-controls":this.id,"aria-haspopup":!0,tabindex:0}),(this.options.fullScreen||this.$element.hasClass("full"))&&(this.options.fullScreen=!0,this.options.overlay=!1),this.options.overlay&&!this.$overlay&&(this.$overlay=this._makeOverlay(this.id)),this.$element.attr({role:"dialog","aria-hidden":!0,"data-yeti-box":this.id,"data-resize":this.id}),this.$overlay?this.$element.detach().appendTo(this.$overlay):(this.$element.detach().appendTo(o()(this.options.appendTo)),this.$element.addClass("without-overlay")),this._events(),this.options.deepLink&&window.location.hash==="#".concat(this.id)&&(this.onLoadListener=v(o()(window),(function(){return e.open()})))}},{key:"_makeOverlay",value:function(){var e="";return this.options.additionalOverlayClasses&&(e=" "+this.options.additionalOverlayClasses),o()("
    ").addClass("reveal-overlay"+e).appendTo(this.options.appendTo)}},{key:"_updatePosition",value:function(){var e,t=this.$element.outerWidth(),n=o()(window).width(),i=this.$element.outerHeight(),s=o()(window).height(),a=null;e="auto"===this.options.hOffset?parseInt((n-t)/2,10):parseInt(this.options.hOffset,10),"auto"===this.options.vOffset?a=i>s?parseInt(Math.min(100,s/10),10):parseInt((s-i)/4,10):null!==this.options.vOffset&&(a=parseInt(this.options.vOffset,10)),null!==a&&this.$element.css({top:a+"px"}),this.$overlay&&"auto"===this.options.hOffset||(this.$element.css({left:e+"px"}),this.$element.css({margin:"0px"}))}},{key:"_events",value:function(){var e=this,t=this;this.$element.on({"open.zf.trigger":this.open.bind(this),"close.zf.trigger":function(n,i){if(n.target===t.$element[0]||o()(n.target).parents("[data-closable]")[0]===i)return e.close.apply(e)},"toggle.zf.trigger":this.toggle.bind(this),"resizeme.zf.trigger":function(){t._updatePosition()}}),this.options.closeOnClick&&this.options.overlay&&this.$overlay.off(".zf.reveal").on("click.zf.dropdown tap.zf.dropdown",(function(e){e.target!==t.$element[0]&&!o.a.contains(t.$element[0],e.target)&&o.a.contains(document,e.target)&&t.close()})),this.options.deepLink&&o()(window).on("hashchange.zf.reveal:".concat(this.id),this._handleState.bind(this))}},{key:"_handleState",value:function(e){window.location.hash!=="#"+this.id||this.isActive?this.close():this.open()}},{key:"_disableScroll",value:function(e){e=e||o()(window).scrollTop(),o()(document).height()>o()(window).height()&&o()("html").css("top",-e)}},{key:"_enableScroll",value:function(e){e=e||parseInt(o()("html").css("top")),o()(document).height()>o()(window).height()&&(o()("html").css("top",""),o()(window).scrollTop(-e))}},{key:"open",value:function(){var e=this,t="#".concat(this.id);this.options.deepLink&&window.location.hash!==t&&(window.history.pushState?this.options.updateHistory?window.history.pushState({},"",t):window.history.replaceState({},"",t):window.location.hash=t),this.$activeAnchor=o()(document.activeElement).is(this.$anchor)?o()(document.activeElement):this.$anchor,this.isActive=!0,this.$element.css({visibility:"hidden"}).show().scrollTop(0),this.options.overlay&&this.$overlay.css({visibility:"hidden"}).show(),this._updatePosition(),this.$element.hide().css({visibility:""}),this.$overlay&&(this.$overlay.css({visibility:""}).hide(),this.$element.hasClass("fast")?this.$overlay.addClass("fast"):this.$element.hasClass("slow")&&this.$overlay.addClass("slow")),this.options.multipleOpened||this.$element.trigger("closeme.zf.reveal",this.id),0===o()(".reveal:visible").length&&this._disableScroll();var n=this;this.options.animationIn?(this.options.overlay&&E.animateIn(this.$overlay,"fade-in"),E.animateIn(this.$element,this.options.animationIn,(function(){e.$element&&(e.focusableElements=j.findFocusable(e.$element),n.$element.attr({"aria-hidden":!1,tabindex:-1}).focus(),n._addGlobalClasses(),j.trapFocus(n.$element))}))):(this.options.overlay&&this.$overlay.show(0),this.$element.show(this.options.showDelay)),this.$element.attr({"aria-hidden":!1,tabindex:-1}).focus(),j.trapFocus(this.$element),this._addGlobalClasses(),this._addGlobalListeners(),this.$element.trigger("open.zf.reveal")}},{key:"_addGlobalClasses",value:function(){var e=function(){o()("html").toggleClass("zf-has-scroll",!!(o()(document).height()>o()(window).height()))};this.$element.on("resizeme.zf.trigger.revealScrollbarListener",(function(){return e()})),e(),o()("html").addClass("is-reveal-open")}},{key:"_removeGlobalClasses",value:function(){this.$element.off("resizeme.zf.trigger.revealScrollbarListener"),o()("html").removeClass("is-reveal-open"),o()("html").removeClass("zf-has-scroll")}},{key:"_addGlobalListeners",value:function(){var e=this;this.$element&&(this.focusableElements=j.findFocusable(this.$element),this.options.overlay||!this.options.closeOnClick||this.options.fullScreen||o()("body").on("click.zf.dropdown tap.zf.dropdown",(function(t){t.target!==e.$element[0]&&!o.a.contains(e.$element[0],t.target)&&o.a.contains(document,t.target)&&e.close()})),this.options.closeOnEsc&&o()(window).on("keydown.zf.reveal",(function(t){j.handleKey(t,"Reveal",{close:function(){e.options.closeOnEsc&&e.close()}})})))}},{key:"close",value:function(){if(!this.isActive||!this.$element.is(":visible"))return!1;var e=this;function t(){var t=parseInt(o()("html").css("top"));0===o()(".reveal:visible").length&&e._removeGlobalClasses(),j.releaseFocus(e.$element),e.$element.attr("aria-hidden",!0),0===o()(".reveal:visible").length&&e._enableScroll(t),e.$element.trigger("closed.zf.reveal")}if(this.options.animationOut?(this.options.overlay&&E.animateOut(this.$overlay,"fade-out"),E.animateOut(this.$element,this.options.animationOut,t)):(this.$element.hide(this.options.hideDelay),this.options.overlay?this.$overlay.hide(0,t):t()),this.options.closeOnEsc&&o()(window).off("keydown.zf.reveal"),!this.options.overlay&&this.options.closeOnClick&&o()("body").off("click.zf.dropdown tap.zf.dropdown"),this.$element.off("keydown.zf.reveal"),this.options.resetOnClose&&this.$element.html(this.$element.html()),this.isActive=!1,e.options.deepLink&&window.location.hash==="#".concat(this.id))if(window.history.replaceState){var n=window.location.pathname+window.location.search;this.options.updateHistory?window.history.pushState({},"",n):window.history.replaceState("",document.title,n)}else window.location.hash="";this.$activeAnchor.focus()}},{key:"toggle",value:function(){this.isActive?this.close():this.open()}},{key:"_destroy",value:function(){this.options.overlay&&(this.$element.appendTo(o()(this.options.appendTo)),this.$overlay.hide().off().remove()),this.$element.hide().off(),this.$anchor.off(".zf"),o()(window).off(".zf.reveal:".concat(this.id)),this.onLoadListener&&o()(window).off(this.onLoadListener),0===o()(".reveal:visible").length&&this._removeGlobalClasses()}}]),t}(oe);ke.defaults={animationIn:"",animationOut:"",showDelay:0,hideDelay:0,closeOnClick:!0,closeOnEsc:!0,multipleOpened:!1,vOffset:"auto",hOffset:"auto",fullScreen:!1,overlay:!0,resetOnClose:!1,deepLink:!1,updateHistory:!1,appendTo:"body",additionalOverlayClasses:""};var xe=function(e){function t(){return r(this,t),f(this,c(t).apply(this,arguments))}return u(t,e),d(t,[{key:"_setup",value:function(e,n){this.$element=e,this.options=o.a.extend({},t.defaults,this.$element.data(),n),this.className="Slider",U.init(o.a),ne.init(o.a),this._init(),j.register("Slider",{ltr:{ARROW_RIGHT:"increase",ARROW_UP:"increase",ARROW_DOWN:"decrease",ARROW_LEFT:"decrease",SHIFT_ARROW_RIGHT:"increase_fast",SHIFT_ARROW_UP:"increase_fast",SHIFT_ARROW_DOWN:"decrease_fast",SHIFT_ARROW_LEFT:"decrease_fast",HOME:"min",END:"max"},rtl:{ARROW_LEFT:"increase",ARROW_RIGHT:"decrease",SHIFT_ARROW_LEFT:"increase_fast",SHIFT_ARROW_RIGHT:"decrease_fast"}})}},{key:"_init",value:function(){this.inputs=this.$element.find("input"),this.handles=this.$element.find("[data-slider-handle]"),this.$handle=this.handles.eq(0),this.$input=this.inputs.length?this.inputs.eq(0):o()("#".concat(this.$handle.attr("aria-controls"))),this.$fill=this.$element.find("[data-slider-fill]").css(this.options.vertical?"height":"width",0),(this.options.disabled||this.$element.hasClass(this.options.disabledClass))&&(this.options.disabled=!0,this.$element.addClass(this.options.disabledClass)),this.inputs.length||(this.inputs=o()().add(this.$input),this.options.binding=!0),this._setInitAttr(0),this.handles[1]&&(this.options.doubleSided=!0,this.$handle2=this.handles.eq(1),this.$input2=this.inputs.length>1?this.inputs.eq(1):o()("#".concat(this.$handle2.attr("aria-controls"))),this.inputs[1]||(this.inputs=this.inputs.add(this.$input2)),this._setInitAttr(1)),this.setHandles(),this._events()}},{key:"setHandles",value:function(){var e=this;this.handles[1]?this._setHandlePos(this.$handle,this.inputs.eq(0).val(),(function(){e._setHandlePos(e.$handle2,e.inputs.eq(1).val())})):this._setHandlePos(this.$handle,this.inputs.eq(0).val())}},{key:"_reflow",value:function(){this.setHandles()}},{key:"_pctOfBar",value:function(e){var t=Ye(e-this.options.start,this.options.end-this.options.start);switch(this.options.positionValueFunction){case"pow":t=this._logTransform(t);break;case"log":t=this._powTransform(t)}return t.toFixed(2)}},{key:"_value",value:function(e){switch(this.options.positionValueFunction){case"pow":e=this._powTransform(e);break;case"log":e=this._logTransform(e)}return this.options.vertical?parseFloat(this.options.end)+e*(this.options.start-this.options.end):(this.options.end-this.options.start)*e+parseFloat(this.options.start)}},{key:"_logTransform",value:function(e){return function(e,t){return Math.log(t)/Math.log(e)}(this.options.nonLinearBase,e*(this.options.nonLinearBase-1)+1)}},{key:"_powTransform",value:function(e){return(Math.pow(this.options.nonLinearBase,e)-1)/(this.options.nonLinearBase-1)}},{key:"_setHandlePos",value:function(e,t,n){if(!this.$element.hasClass(this.options.disabledClass)){(t=parseFloat(t))this.options.end&&(t=this.options.end);var i=this.options.doubleSided;if(i)if(0===this.handles.index(e)){var o=parseFloat(this.$handle2.attr("aria-valuenow"));t=t>=o?o-this.options.step:t}else{var s=parseFloat(this.$handle.attr("aria-valuenow"));t=t<=s?s+this.options.step:t}var a=this,r=this.options.vertical,l=r?"height":"width",d=r?"top":"left",u=e[0].getBoundingClientRect()[l],c=this.$element[0].getBoundingClientRect()[l],h=this._pctOfBar(t),f=(100*Ye((c-u)*h,c)).toFixed(this.options.decimal);t=parseFloat(t.toFixed(this.options.decimal));var p={};if(this._setValues(e,t),i){var m,_=0===this.handles.index(e),y=~~(100*Ye(u,c));if(_)p[d]="".concat(f,"%"),m=parseFloat(this.$handle2[0].style[d])-f+y,n&&"function"==typeof n&&n();else{var g=parseFloat(this.$handle[0].style[d]);m=f-(isNaN(g)?(this.options.initialStart-this.options.start)/((this.options.end-this.options.start)/100):g)+y}p["min-".concat(l)]="".concat(m,"%")}this.$element.one("finished.zf.animate",(function(){a.$element.trigger("moved.zf.slider",[e])})),I(this.$element.data("dragging")?1e3/60:this.options.moveTime,e,(function(){isNaN(f)?e.css(d,"".concat(100*h,"%")):e.css(d,"".concat(f,"%")),a.options.doubleSided?a.$fill.css(p):a.$fill.css(l,"".concat(100*h,"%"))})),clearTimeout(a.timeout),a.timeout=setTimeout((function(){a.$element.trigger("changed.zf.slider",[e])}),a.options.changedDelay)}}},{key:"_setInitAttr",value:function(e){var t=0===e?this.options.initialStart:this.options.initialEnd,n=this.inputs.eq(e).attr("id")||_(6,"slider");this.inputs.eq(e).attr({id:n,max:this.options.end,min:this.options.start,step:this.options.step}),this.inputs.eq(e).val(t),this.handles.eq(e).attr({role:"slider","aria-controls":n,"aria-valuemax":this.options.end,"aria-valuemin":this.options.start,"aria-valuenow":t,"aria-orientation":this.options.vertical?"vertical":"horizontal",tabindex:0})}},{key:"_setValues",value:function(e,t){var n=this.options.doubleSided?this.handles.index(e):0;this.inputs.eq(n).val(t),e.attr("aria-valuenow",t)}},{key:"_handleEvent",value:function(e,t,n){var i;if(n)i=this._adjustValue(null,n);else{e.preventDefault();var s=this.options.vertical,a=s?"height":"width",r=s?"top":"left",l=s?e.pageY:e.pageX,d=this.$element[0].getBoundingClientRect()[a],u=s?o()(window).scrollTop():o()(window).scrollLeft(),c=this.$element.offset()[r];e.clientY===e.pageY&&(l+=u);var h,f=l-c,p=Ye(h=f<0?0:f>d?d:f,d);i=this._value(p),m()&&!this.options.vertical&&(i=this.options.end-i),i=this._adjustValue(null,i),t||(t=Ce(this.$handle,r,h,a)<=Ce(this.$handle2,r,h,a)?this.$handle:this.$handle2)}this._setHandlePos(t,i)}},{key:"_adjustValue",value:function(e,t){var n,i,o,s=this.options.step,a=parseFloat(s/2);return 0===(i=(n=e?parseFloat(e.attr("aria-valuenow")):t)>=0?n%s:s+n%s)?n:n=n>=(o=n-i)+a?o+s:o}},{key:"_events",value:function(){this._eventsForHandle(this.$handle),this.handles[1]&&this._eventsForHandle(this.$handle2)}},{key:"_eventsForHandle",value:function(e){var t,n=this,i=function(e){var t=n.inputs.index(o()(this));n._handleEvent(e,n.handles.eq(t),o()(this).val())};if(this.inputs.off("keyup.zf.slider").on("keyup.zf.slider",(function(e){13==e.keyCode&&i.call(this,e)})),this.inputs.off("change.zf.slider").on("change.zf.slider",i),this.options.clickSelect&&this.$element.off("click.zf.slider").on("click.zf.slider",(function(e){if(n.$element.data("dragging"))return!1;o()(e.target).is("[data-slider-handle]")||(n.options.doubleSided?n._handleEvent(e):n._handleEvent(e,n.$handle))})),this.options.draggable){this.handles.addTouch();var s=o()("body");e.off("mousedown.zf.slider").on("mousedown.zf.slider",(function(i){e.addClass("is-dragging"),n.$fill.addClass("is-dragging"),n.$element.data("dragging",!0),t=o()(i.currentTarget),s.on("mousemove.zf.slider",(function(e){e.preventDefault(),n._handleEvent(e,t)})).on("mouseup.zf.slider",(function(i){n._handleEvent(i,t),e.removeClass("is-dragging"),n.$fill.removeClass("is-dragging"),n.$element.data("dragging",!1),s.off("mousemove.zf.slider mouseup.zf.slider")}))})).on("selectstart.zf.slider touchmove.zf.slider",(function(e){e.preventDefault()}))}e.off("keydown.zf.slider").on("keydown.zf.slider",(function(e){var t,i=o()(this),s=n.options.doubleSided?n.handles.index(i):0,a=parseFloat(n.inputs.eq(s).val());j.handleKey(e,"Slider",{decrease:function(){t=a-n.options.step},increase:function(){t=a+n.options.step},decrease_fast:function(){t=a-10*n.options.step},increase_fast:function(){t=a+10*n.options.step},min:function(){t=n.options.start},max:function(){t=n.options.end},handled:function(){e.preventDefault(),n._setHandlePos(i,t)}})}))}},{key:"_destroy",value:function(){this.handles.off(".zf.slider"),this.inputs.off(".zf.slider"),this.$element.off(".zf.slider"),clearTimeout(this.timeout)}}]),t}(oe);function Ye(e,t){return e/t}function Ce(e,t,n,i){return Math.abs(e.position()[t]+e[i]()/2-n)}xe.defaults={start:0,end:100,step:1,initialStart:0,initialEnd:100,binding:!1,clickSelect:!0,vertical:!1,draggable:!0,disabled:!1,doubleSided:!1,decimal:2,moveTime:200,disabledClass:"disabled",invertVertical:!1,changedDelay:500,nonLinearBase:5,positionValueFunction:"linear"};var Oe=function(e){function t(){return r(this,t),f(this,c(t).apply(this,arguments))}return u(t,e),d(t,[{key:"_setup",value:function(e,n){this.$element=e,this.options=o.a.extend({},t.defaults,this.$element.data(),n),this.className="Sticky",ne.init(o.a),this._init()}},{key:"_init",value:function(){M._init();var e=this.$element.parent("[data-sticky-container]"),t=this.$element[0].id||_(6,"sticky"),n=this;e.length?this.$container=e:(this.wasWrapped=!0,this.$element.wrap(this.options.container),this.$container=this.$element.parent()),this.$container.addClass(this.options.containerClass),this.$element.addClass(this.options.stickyClass).attr({"data-resize":t,"data-mutate":t}),""!==this.options.anchor&&o()("#"+n.options.anchor).attr({"data-mutate":t}),this.scrollCount=this.options.checkEvery,this.isStuck=!1,this.onLoadListener=v(o()(window),(function(){n.containerHeight="none"==n.$element.css("display")?0:n.$element[0].getBoundingClientRect().height,n.$container.css("height",n.containerHeight),n.elemHeight=n.containerHeight,""!==n.options.anchor?n.$anchor=o()("#"+n.options.anchor):n._parsePoints(),n._setSizes((function(){var e=window.pageYOffset;n._calc(!1,e),n.isStuck||n._removeSticky(!(e>=n.topPoint))})),n._events(t.split("-").reverse().join("-"))}))}},{key:"_parsePoints",value:function(){for(var e=[""==this.options.topAnchor?1:this.options.topAnchor,""==this.options.btmAnchor?document.documentElement.scrollHeight:this.options.btmAnchor],t={},n=0,i=e.length;n=this.topPoint?t<=this.bottomPoint?this.isStuck||this._setSticky():this.isStuck&&this._removeSticky(!1):this.isStuck&&this._removeSticky(!0)}},{key:"_setSticky",value:function(){var e=this,t=this.options.stickTo,n="top"===t?"marginTop":"marginBottom",i="top"===t?"bottom":"top",o={};o[n]="".concat(this.options[n],"em"),o[t]=0,o[i]="auto",this.isStuck=!0,this.$element.removeClass("is-anchored is-at-".concat(i)).addClass("is-stuck is-at-".concat(t)).css(o).trigger("sticky.zf.stuckto:".concat(t)),this.$element.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",(function(){e._setSizes()}))}},{key:"_removeSticky",value:function(e){var t=this.options.stickTo,n="top"===t,i={},o=(this.points?this.points[1]-this.points[0]:this.anchorHeight)-this.elemHeight,s=e?"top":"bottom";i[n?"marginTop":"marginBottom"]=0,i.bottom="auto",i.top=e?0:o,this.isStuck=!1,this.$element.removeClass("is-stuck is-at-".concat(t)).addClass("is-anchored is-at-".concat(s)).css(i).trigger("sticky.zf.unstuckfrom:".concat(s))}},{key:"_setSizes",value:function(e){this.canStick=M.is(this.options.stickyOn),this.canStick||e&&"function"==typeof e&&e();var t=this.$container[0].getBoundingClientRect().width,n=window.getComputedStyle(this.$container[0]),i=parseInt(n["padding-left"],10),o=parseInt(n["padding-right"],10);if(this.$anchor&&this.$anchor.length?this.anchorHeight=this.$anchor[0].getBoundingClientRect().height:this._parsePoints(),this.$element.css({"max-width":"".concat(t-i-o,"px")}),this.options.dynamicHeight||!this.containerHeight){var s=this.$element[0].getBoundingClientRect().height||this.containerHeight;s="none"==this.$element.css("display")?0:s,this.$container.css("height",s),this.containerHeight=s}if(this.elemHeight=this.containerHeight,!this.isStuck&&this.$element.hasClass("is-at-bottom")){var a=(this.points?this.points[1]-this.$container.offset().top:this.anchorHeight)-this.elemHeight;this.$element.css("top",a)}this._setBreakPoints(this.containerHeight,(function(){e&&"function"==typeof e&&e()}))}},{key:"_setBreakPoints",value:function(e,t){if(!this.canStick){if(!t||"function"!=typeof t)return!1;t()}var n=He(this.options.marginTop),i=He(this.options.marginBottom),o=this.points?this.points[0]:this.$anchor.offset().top,s=this.points?this.points[1]:o+this.anchorHeight,a=window.innerHeight;"top"===this.options.stickTo?(o-=n,s-=e+n):"bottom"===this.options.stickTo&&(o-=a-(e+i),s-=a-i),this.topPoint=o,this.bottomPoint=s,t&&"function"==typeof t&&t()}},{key:"_destroy",value:function(){this._removeSticky(!0),this.$element.removeClass("".concat(this.options.stickyClass," is-anchored is-at-top")).css({height:"",top:"",bottom:"","max-width":""}).off("resizeme.zf.trigger").off("mutateme.zf.trigger"),this.$anchor&&this.$anchor.length&&this.$anchor.off("change.zf.sticky"),this.scrollListener&&o()(window).off(this.scrollListener),this.onLoadListener&&o()(window).off(this.onLoadListener),this.wasWrapped?this.$element.unwrap():this.$container.removeClass(this.options.containerClass).css({height:""})}}]),t}(oe);function He(e){return parseInt(window.getComputedStyle(document.body,null).fontSize,10)*e}Oe.defaults={container:"
    ",stickTo:"top",anchor:"",topAnchor:"",btmAnchor:"",marginTop:1,marginBottom:1,stickyOn:"medium",stickyClass:"sticky",containerClass:"sticky-container",dynamicHeight:!0,checkEvery:-1};var Ae=function(e){function t(){return r(this,t),f(this,c(t).apply(this,arguments))}return u(t,e),d(t,[{key:"_setup",value:function(e,n){this.$element=e,this.options=o.a.extend({},t.defaults,this.$element.data(),n),this.className="Tabs",this._init(),j.register("Tabs",{ENTER:"open",SPACE:"open",ARROW_RIGHT:"next",ARROW_UP:"previous",ARROW_DOWN:"next",ARROW_LEFT:"previous"})}},{key:"_init",value:function(){var e=this,t=this;if(this._isInitializing=!0,this.$element.attr({role:"tablist"}),this.$tabTitles=this.$element.find(".".concat(this.options.linkClass)),this.$tabContent=o()('[data-tabs-content="'.concat(this.$element[0].id,'"]')),this.$tabTitles.each((function(){var e=o()(this),n=e.find("a"),i=e.hasClass("".concat(t.options.linkActiveClass)),s=n.attr("data-tabs-target")||n[0].hash.slice(1),a=n[0].id?n[0].id:"".concat(s,"-label"),r=o()("#".concat(s));e.attr({role:"presentation"}),n.attr({role:"tab","aria-controls":s,"aria-selected":i,id:a,tabindex:i?"0":"-1"}),r.attr({role:"tabpanel","aria-labelledby":a}),i&&(t._initialAnchor="#".concat(s)),i||r.attr("aria-hidden","true"),i&&t.options.autoFocus&&(t.onLoadListener=v(o()(window),(function(){o()("html, body").animate({scrollTop:e.offset().top},t.options.deepLinkSmudgeDelay,(function(){n.focus()}))})))})),this.options.matchHeight){var n=this.$tabContent.find("img");n.length?Y(n,this._setHeight.bind(this)):this._setHeight()}this._checkDeepLink=function(){var t=window.location.hash;if(!t.length){if(e._isInitializing)return;e._initialAnchor&&(t=e._initialAnchor)}var n=t.indexOf("#")>=0?t.slice(1):t,i=n&&o()("#".concat(n)),s=t&&e.$element.find('[href$="'.concat(t,'"],[data-tabs-target="').concat(n,'"]')).first();if(i.length&&s.length){if(i&&i.length&&s&&s.length?e.selectTab(i,!0):e._collapse(),e.options.deepLinkSmudge){var a=e.$element.offset();o()("html, body").animate({scrollTop:a.top},e.options.deepLinkSmudgeDelay)}e.$element.trigger("deeplink.zf.tabs",[s,i])}},this.options.deepLink&&this._checkDeepLink(),this._events(),this._isInitializing=!1}},{key:"_events",value:function(){this._addKeyHandler(),this._addClickHandler(),this._setHeightMqHandler=null,this.options.matchHeight&&(this._setHeightMqHandler=this._setHeight.bind(this),o()(window).on("changed.zf.mediaquery",this._setHeightMqHandler)),this.options.deepLink&&o()(window).on("hashchange",this._checkDeepLink)}},{key:"_addClickHandler",value:function(){var e=this;this.$element.off("click.zf.tabs").on("click.zf.tabs",".".concat(this.options.linkClass),(function(t){t.preventDefault(),e._handleTabChange(o()(this))}))}},{key:"_addKeyHandler",value:function(){var e=this;this.$tabTitles.off("keydown.zf.tabs").on("keydown.zf.tabs",(function(t){if(9!==t.which){var n,i,s=o()(this),a=s.parent("ul").children("li");a.each((function(t){o()(this).is(s)&&(e.options.wrapOnKeys?(n=0===t?a.last():a.eq(t-1),i=t===a.length-1?a.first():a.eq(t+1)):(n=a.eq(Math.max(0,t-1)),i=a.eq(Math.min(t+1,a.length-1))))})),j.handleKey(t,"Tabs",{open:function(){s.find('[role="tab"]').focus(),e._handleTabChange(s)},previous:function(){n.find('[role="tab"]').focus(),e._handleTabChange(n)},next:function(){i.find('[role="tab"]').focus(),e._handleTabChange(i)},handled:function(){t.preventDefault()}})}}))}},{key:"_handleTabChange",value:function(e,t){if(e.hasClass("".concat(this.options.linkActiveClass)))this.options.activeCollapse&&this._collapse();else{var n=this.$element.find(".".concat(this.options.linkClass,".").concat(this.options.linkActiveClass)),i=e.find('[role="tab"]'),o=i.attr("data-tabs-target"),s=o&&o.length?"#".concat(o):i[0].hash,a=this.$tabContent.find(s);this._collapseTab(n),this._openTab(e),this.options.deepLink&&!t&&(this.options.updateHistory?history.pushState({},"",s):history.replaceState({},"",s)),this.$element.trigger("change.zf.tabs",[e,a]),a.find("[data-mutate]").trigger("mutateme.zf.trigger")}}},{key:"_openTab",value:function(e){var t=e.find('[role="tab"]'),n=t.attr("data-tabs-target")||t[0].hash.slice(1),i=this.$tabContent.find("#".concat(n));e.addClass("".concat(this.options.linkActiveClass)),t.attr({"aria-selected":"true",tabindex:"0"}),i.addClass("".concat(this.options.panelActiveClass)).removeAttr("aria-hidden")}},{key:"_collapseTab",value:function(e){var t=e.removeClass("".concat(this.options.linkActiveClass)).find('[role="tab"]').attr({"aria-selected":"false",tabindex:-1});o()("#".concat(t.attr("aria-controls"))).removeClass("".concat(this.options.panelActiveClass)).attr({"aria-hidden":"true"})}},{key:"_collapse",value:function(){var e=this.$element.find(".".concat(this.options.linkClass,".").concat(this.options.linkActiveClass));e.length&&(this._collapseTab(e),this.$element.trigger("collapse.zf.tabs",[e]))}},{key:"selectTab",value:function(e,t){var n,i;(n="object"===a(e)?e[0].id:e).indexOf("#")<0?i="#".concat(n):(i=n,n=n.slice(1));var o=this.$tabTitles.has('[href$="'.concat(i,'"],[data-tabs-target="').concat(n,'"]')).first();this._handleTabChange(o,t)}},{key:"_setHeight",value:function(){var e=0,t=this;this.$tabContent.find(".".concat(this.options.panelClass)).css("height","").each((function(){var n=o()(this),i=n.hasClass("".concat(t.options.panelActiveClass));i||n.css({visibility:"hidden",display:"block"});var s=this.getBoundingClientRect().height;i||n.css({visibility:"",display:""}),e=s>e?s:e})).css("height","".concat(e,"px"))}},{key:"_destroy",value:function(){this.$element.find(".".concat(this.options.linkClass)).off(".zf.tabs").hide().end().find(".".concat(this.options.panelClass)).hide(),this.options.matchHeight&&null!=this._setHeightMqHandler&&o()(window).off("changed.zf.mediaquery",this._setHeightMqHandler),this.options.deepLink&&o()(window).off("hashchange",this._checkDeepLink),this.onLoadListener&&o()(window).off(this.onLoadListener)}}]),t}(oe);Ae.defaults={deepLink:!1,deepLinkSmudge:!1,deepLinkSmudgeDelay:300,updateHistory:!1,autoFocus:!1,wrapOnKeys:!0,matchHeight:!1,activeCollapse:!1,linkClass:"tabs-title",linkActiveClass:"is-active",panelClass:"tabs-panel",panelActiveClass:"is-active"};var je=function(e){function t(){return r(this,t),f(this,c(t).apply(this,arguments))}return u(t,e),d(t,[{key:"_setup",value:function(e,n){this.$element=e,this.options=o.a.extend({},t.defaults,e.data(),n),this.className="",this.className="Toggler",ne.init(o.a),this._init(),this._events()}},{key:"_init",value:function(){var e,t=this.$element[0].id,n=o()('[data-open~="'.concat(t,'"], [data-close~="').concat(t,'"], [data-toggle~="').concat(t,'"]'));if(this.options.animate)e=this.options.animate.split(" "),this.animationIn=e[0],this.animationOut=e[1]||null,n.attr("aria-expanded",!this.$element.is(":hidden"));else{if("string"!=typeof(e=this.options.toggler)||!e.length)throw new Error("The 'toogler' option containing the target class is required, got \"".concat(e,'"'));this.className="."===e[0]?e.slice(1):e,n.attr("aria-expanded",this.$element.hasClass(this.className))}n.each((function(e,n){var i=o()(n),s=i.attr("aria-controls")||"";new RegExp("\\b".concat(y(t),"\\b")).test(s)||i.attr("aria-controls",s?"".concat(s," ").concat(t):t)}))}},{key:"_events",value:function(){this.$element.off("toggle.zf.trigger").on("toggle.zf.trigger",this.toggle.bind(this))}},{key:"toggle",value:function(){this[this.options.animate?"_toggleAnimate":"_toggleClass"]()}},{key:"_toggleClass",value:function(){this.$element.toggleClass(this.className);var e=this.$element.hasClass(this.className);e?this.$element.trigger("on.zf.toggler"):this.$element.trigger("off.zf.toggler"),this._updateARIA(e),this.$element.find("[data-mutate]").trigger("mutateme.zf.trigger")}},{key:"_toggleAnimate",value:function(){var e=this;this.$element.is(":hidden")?E.animateIn(this.$element,this.animationIn,(function(){e._updateARIA(!0),this.trigger("on.zf.toggler"),this.find("[data-mutate]").trigger("mutateme.zf.trigger")})):E.animateOut(this.$element,this.animationOut,(function(){e._updateARIA(!1),this.trigger("off.zf.toggler"),this.find("[data-mutate]").trigger("mutateme.zf.trigger")}))}},{key:"_updateARIA",value:function(e){var t=this.$element[0].id;o()('[data-open="'.concat(t,'"], [data-close="').concat(t,'"], [data-toggle="').concat(t,'"]')).attr({"aria-expanded":!!e})}},{key:"_destroy",value:function(){this.$element.off(".zf.toggler")}}]),t}(oe);je.defaults={toggler:void 0,animate:!1};var Pe=function(e){function t(){return r(this,t),f(this,c(t).apply(this,arguments))}return u(t,e),d(t,[{key:"_setup",value:function(e,n){this.$element=e,this.options=o.a.extend({},t.defaults,this.$element.data(),n),this.className="Tooltip",this.isActive=!1,this.isClick=!1,ne.init(o.a),this._init()}},{key:"_init",value:function(){M._init();var e=this.$element.attr("aria-describedby")||_(6,"tooltip");this.options.tipText=this.options.tipText||this.$element.attr("title"),this.template=this.options.template?o()(this.options.template):this._buildTemplate(e),this.options.allowHtml?this.template.appendTo(document.body).html(this.options.tipText).hide():this.template.appendTo(document.body).text(this.options.tipText).hide(),this.$element.attr({title:"","aria-describedby":e,"data-yeti-box":e,"data-toggle":e,"data-resize":e}).addClass(this.options.triggerClass),p(c(t.prototype),"_init",this).call(this),this._events()}},{key:"_getDefaultPosition",value:function(){var e=this.$element[0].className;this.$element[0]instanceof SVGElement&&(e=e.baseVal);var t=e.match(/\b(top|left|right|bottom)\b/g);return t?t[0]:"top"}},{key:"_getDefaultAlignment",value:function(){return"center"}},{key:"_getHOffset",value:function(){return"left"===this.position||"right"===this.position?this.options.hOffset+this.options.tooltipWidth:this.options.hOffset}},{key:"_getVOffset",value:function(){return"top"===this.position||"bottom"===this.position?this.options.vOffset+this.options.tooltipHeight:this.options.vOffset}},{key:"_buildTemplate",value:function(e){var t="".concat(this.options.tooltipClass," ").concat(this.options.templateClasses).trim();return o()("
    ").addClass(t).attr({role:"tooltip","aria-hidden":!0,"data-is-active":!1,"data-is-focus":!1,id:e})}},{key:"_setPosition",value:function(){p(c(t.prototype),"_setPosition",this).call(this,this.$element,this.template)}},{key:"show",value:function(){if("all"!==this.options.showOn&&!M.is(this.options.showOn))return!1;this.template.css("visibility","hidden").show(),this._setPosition(),this.template.removeClass("top bottom left right").addClass(this.position),this.template.removeClass("align-top align-bottom align-left align-right align-center").addClass("align-"+this.alignment),this.$element.trigger("closeme.zf.tooltip",this.template.attr("id")),this.template.attr({"data-is-active":!0,"aria-hidden":!1}),this.isActive=!0,this.template.stop().hide().css("visibility","").fadeIn(this.options.fadeInDuration,(function(){})),this.$element.trigger("show.zf.tooltip")}},{key:"hide",value:function(){var e=this;this.template.stop().attr({"aria-hidden":!0,"data-is-active":!1}).fadeOut(this.options.fadeOutDuration,(function(){e.isActive=!1,e.isClick=!1})),this.$element.trigger("hide.zf.tooltip")}},{key:"_events",value:function(){var e=this,t="ontouchstart"in window||void 0!==window.ontouchstart,n=(this.template,!1);t&&this.options.disableForTouch||(this.options.disableHover||this.$element.on("mouseenter.zf.tooltip",(function(t){e.isActive||(e.timeout=setTimeout((function(){e.show()}),e.options.hoverDelay))})).on("mouseleave.zf.tooltip",b((function(t){clearTimeout(e.timeout),(!n||e.isClick&&!e.options.clickOpen)&&e.hide()}))),t&&this.$element.on("tap.zf.tooltip touchend.zf.tooltip",(function(t){e.isActive?e.hide():e.show()})),this.options.clickOpen?this.$element.on("mousedown.zf.tooltip",(function(t){e.isClick||(e.isClick=!0,!e.options.disableHover&&e.$element.attr("tabindex")||e.isActive||e.show())})):this.$element.on("mousedown.zf.tooltip",(function(t){e.isClick=!0})),this.$element.on({"close.zf.trigger":this.hide.bind(this)}),this.$element.on("focus.zf.tooltip",(function(t){if(n=!0,e.isClick)return e.options.clickOpen||(n=!1),!1;e.show()})).on("focusout.zf.tooltip",(function(t){n=!1,e.isClick=!1,e.hide()})).on("resizeme.zf.trigger",(function(){e.isActive&&e._setPosition()})))}},{key:"toggle",value:function(){this.isActive?this.hide():this.show()}},{key:"_destroy",value:function(){this.$element.attr("title",this.template.text()).off(".zf.trigger .zf.tooltip").removeClass(this.options.triggerClass).removeClass("top right left bottom").removeAttr("aria-describedby data-disable-hover data-resize data-toggle data-tooltip data-yeti-box"),this.template.remove()}}]),t}(me);Pe.defaults={hoverDelay:200,fadeInDuration:150,fadeOutDuration:150,disableHover:!1,disableForTouch:!1,templateClasses:"",tooltipClass:"tooltip",triggerClass:"has-tip",showOn:"small",template:"",tipText:"",touchCloseText:"Tap to close.",clickOpen:!0,position:"auto",alignment:"auto",allowOverlap:!1,allowBottomOverlap:!1,vOffset:0,hOffset:0,tooltipHeight:14,tooltipWidth:12,allowHtml:!1};var Fe={tabs:{cssClass:"tabs",plugin:Ae,open:function(e,t){return e.selectTab(t)},close:null,toggle:null},accordion:{cssClass:"accordion",plugin:re,open:function(e,t){return e.down(o()(t))},close:function(e,t){return e.up(o()(t))},toggle:function(e,t){return e.toggle(o()(t))}}},Ee=function(e){function t(e,n){var i;return r(this,t),i=f(this,c(t).call(this,e,n)),f(i,i.options.reflow&&i.storezfData||h(i))}return u(t,e),d(t,[{key:"_setup",value:function(e,n){this.$element=o()(e),this.$element.data("zfPluginBase",this),this.options=o.a.extend({},t.defaults,this.$element.data(),n),this.rules=this.$element.data("responsive-accordion-tabs"),this.currentMq=null,this.currentRule=null,this.currentPlugin=null,this.className="ResponsiveAccordionTabs",this.$element.attr("id")||this.$element.attr("id",_(6,"responsiveaccordiontabs")),this._init(),this._events()}},{key:"_init",value:function(){if(M._init(),"string"==typeof this.rules){for(var e={},t=this.rules.split(" "),n=0;n1?i[0]:"small",a=i.length>1?i[1]:i[0];null!==Fe[a]&&(e[s]=Fe[a])}this.rules=e}this._getAllOptions(),o.a.isEmptyObject(this.rules)||this._checkMediaQueries()}},{key:"_getAllOptions",value:function(){for(var e in this.allOptions={},Fe)if(Fe.hasOwnProperty(e)){var t=Fe[e];try{var n=o()("
      "),i=new t.plugin(n,this.options);for(var s in i.options)if(i.options.hasOwnProperty(s)&&"zfPlugin"!==s){var a=i.options[s];this.allOptions[s]=a}i.destroy()}catch(e){}}}},{key:"_events",value:function(){this._changedZfMediaQueryHandler=this._checkMediaQueries.bind(this),o()(window).on("changed.zf.mediaquery",this._changedZfMediaQueryHandler)}},{key:"_checkMediaQueries",value:function(){var e,t=this;o.a.each(this.rules,(function(t){M.atLeast(t)&&(e=t)})),e&&(this.currentPlugin instanceof this.rules[e].plugin||(o.a.each(Fe,(function(e,n){t.$element.removeClass(n.cssClass)})),this.$element.addClass(this.rules[e].cssClass),this.currentPlugin&&(!this.currentPlugin.$element.data("zfPlugin")&&this.storezfData&&this.currentPlugin.$element.data("zfPlugin",this.storezfData),this.currentPlugin.destroy()),this._handleMarkup(this.rules[e].cssClass),this.currentRule=this.rules[e],this.currentPlugin=new this.currentRule.plugin(this.$element,this.options),this.storezfData=this.currentPlugin.$element.data("zfPlugin")))}},{key:"_handleMarkup",value:function(e){var t=this,n="accordion",i=o()("[data-tabs-content="+this.$element.attr("id")+"]");if(i.length&&(n="tabs"),n!==e){var s=t.allOptions.linkClass?t.allOptions.linkClass:"tabs-title",a=t.allOptions.panelClass?t.allOptions.panelClass:"tabs-panel";this.$element.removeAttr("role");var r=this.$element.children("."+s+",[data-accordion-item]").removeClass(s).removeClass("accordion-item").removeAttr("data-accordion-item"),l=r.children("a").removeClass("accordion-title");if("tabs"===n?(i=i.children("."+a).removeClass(a).removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby")).children("a").removeAttr("role").removeAttr("aria-controls").removeAttr("aria-selected"):i=r.children("[data-tab-content]").removeClass("accordion-content"),i.css({display:"",visibility:""}),r.css({display:"",visibility:""}),"accordion"===e)i.each((function(e,n){o()(n).appendTo(r.get(e)).addClass("accordion-content").attr("data-tab-content","").removeClass("is-active").css({height:""}),o()("[data-tabs-content="+t.$element.attr("id")+"]").after('
      ').detach(),r.addClass("accordion-item").attr("data-accordion-item",""),l.addClass("accordion-title")}));else if("tabs"===e){var d=o()("[data-tabs-content="+t.$element.attr("id")+"]"),u=o()("#tabs-placeholder-"+t.$element.attr("id"));u.length?(d=o()('
      ').insertAfter(u).attr("data-tabs-content",t.$element.attr("id")),u.remove()):d=o()('
      ').insertAfter(t.$element).attr("data-tabs-content",t.$element.attr("id")),i.each((function(e,t){var n=o()(t).appendTo(d).addClass(a),i=l.get(e).hash.slice(1),s=o()(t).attr("id")||_(6,"accordion");i!==s&&(""!==i?o()(t).attr("id",i):(i=s,o()(t).attr("id",i),o()(l.get(e)).attr("href",o()(l.get(e)).attr("href").replace("#","")+"#"+i))),o()(r.get(e)).hasClass("is-active")&&n.addClass("is-active")})),r.addClass(s)}}}},{key:"open",value:function(e){var t;if(this.currentRule&&"function"==typeof this.currentRule.open)return(t=this.currentRule).open.apply(t,[this.currentPlugin].concat(Array.prototype.slice.call(arguments)))}},{key:"close",value:function(e){var t;if(this.currentRule&&"function"==typeof this.currentRule.close)return(t=this.currentRule).close.apply(t,[this.currentPlugin].concat(Array.prototype.slice.call(arguments)))}},{key:"toggle",value:function(e){var t;if(this.currentRule&&"function"==typeof this.currentRule.toggle)return(t=this.currentRule).toggle.apply(t,[this.currentPlugin].concat(Array.prototype.slice.call(arguments)))}},{key:"_destroy",value:function(){this.currentPlugin&&this.currentPlugin.destroy(),o()(window).off("changed.zf.mediaquery",this._changedZfMediaQueryHandler)}}]),t}(oe);Ee.defaults={},L.addToJquery(o.a),L.rtl=m,L.GetYoDigits=_,L.transitionend=g,L.RegExpEscape=y,L.onLoad=v,L.Box=D,L.onImagesLoaded=Y,L.Keyboard=j,L.MediaQuery=M,L.Motion=E,L.Move=I,L.Nest=N,L.Timer=z,U.init(o.a),ne.init(o.a,L),M._init(),L.plugin(ae,"Abide"),L.plugin(re,"Accordion"),L.plugin(le,"AccordionMenu"),L.plugin(de,"Drilldown"),L.plugin(_e,"Dropdown"),L.plugin(ye,"DropdownMenu"),L.plugin(ge,"Equalizer"),L.plugin(ve,"Interchange"),L.plugin(we,"Magellan"),L.plugin(Me,"OffCanvas"),L.plugin(Le,"Orbit"),L.plugin(Se,"ResponsiveMenu"),L.plugin(De,"ResponsiveToggle"),L.plugin(ke,"Reveal"),L.plugin(xe,"Slider"),L.plugin(be,"SmoothScroll"),L.plugin(Oe,"Sticky"),L.plugin(Ae,"Tabs"),L.plugin(je,"Toggler"),L.plugin(Pe,"Tooltip"),L.plugin(Ee,"ResponsiveAccordionTabs"),t.default=L},function(e,t,n){"use strict";n.r(t);var i=n(0),o=n.n(i);n(143); /*! Selectionjs 2.0.2 MIT | https://github.com/Simonwep/selection */ -const s=(e,t="px")=>"number"==typeof e?e+t:e;function a({style:e},t,n){if("object"==typeof t)for(const[n,i]of Object.entries(t))e[n]=s(i);else void 0!==n&&(e[t]=s(n))}function r(e){return(t,n,i,o={})=>{t instanceof HTMLCollection||t instanceof NodeList?t=Array.from(t):Array.isArray(t)||(t=[t]),Array.isArray(n)||(n=[n]);for(const s of t)for(const t of n)s[e](t,i,{capture:!1,...o});return[t,n,i,o]}}const l=r("addEventListener"),d=r("removeEventListener"),u=e=>{const t=e.touches&&e.touches[0]||e;return{tap:t,x:t.clientX,y:t.clientY,target:t.target}};function c(e,t,n="touch"){switch(n){case"center":{const n=t.left+t.width/2,i=t.top+t.height/2;return n>=e.left&&n<=e.right&&i>=e.top&&i<=e.bottom}case"cover":return t.left>=e.left&&t.top>=e.top&&t.right<=e.right&&t.bottom<=e.bottom;case"touch":return e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom;default:throw new Error(`Unkown intersection mode: ${n}`)}}function h(e,t){const n=e.indexOf(t);~n&&e.splice(n,1)}function f(e,t=document){const n=Array.isArray(e)?e:[e],i=[];for(let e=0,o=n.length;ec(e.getBoundingClientRect(),r));const p=function(e){let t=e.path||e.composedPath&&e.composedPath();if(t)return t;let n=e.target.parentElement;for(t=[e.target,n];n=n.parentElement;)t.push(n);return t.push(document,window),t}(e);if(!this.L||!d.find(e=>p.includes(e))||!h.find(e=>p.includes(e)))return;if(!t&&!1===this.k("beforestart",e))return;this.l={x1:n,y1:i,x2:0,y2:0};const m=a.scrollingElement||a.body;this.v={x:m.scrollLeft,y:m.scrollTop},this.u=!0,this.clearSelection(!1),l(a,["touchmove","mousemove"],this.M,{passive:!1}),l(a,["mouseup","touchcancel","touchend"],this.j),l(a,"scroll",this.O)}R(e){const{intersect:t}=this._.singleTap,n=u(e);let i=null;if("native"===t)i=n.target;else if("touch"===t){this.resolveSelectables();const{x:e,y:t}=n;i=this.o.find(n=>{const{right:i,left:o,top:s,bottom:a}=n.getBoundingClientRect();return eo&&ts})}if(!i)return;for(this.resolveSelectables();!this.o.includes(i);){if(!i.parentElement)return;i=i.parentElement}const{stored:o}=this.i;if(this.k("start",e),e.shiftKey&&o.length){const e=o[o.length-1],[t,n]=4&e.compareDocumentPosition(i)?[i,e]:[e,i],s=[...this.o.filter(e=>4&e.compareDocumentPosition(t)&&2&e.compareDocumentPosition(n)),i];this.select(s)}else o.includes(i)?this.deselect(i):this.select(i);this.k("stop",e)}M(e){const{startThreshold:t,container:n,document:i}=this._,{x1:o,y1:s}=this.l,{x:r,y:c}=u(e),h=typeof t;("number"===h&&p(r+c-(o+s))>=t||"object"===h&&p(r-o)>=t.x||p(c-s)>=t.y)&&(d(i,["mousemove","touchmove"],this.M,{passive:!1}),l(i,["mousemove","touchmove"],this.$,{passive:!1}),a(this.S,"display","block"),f(n,i)[0].appendChild(this.T),this.resolveSelectables(),this.u=!1,this.C=this.L.getBoundingClientRect(),this.p=this.L.scrollHeight!==this.L.clientHeight||this.L.scrollWidth!==this.L.clientWidth,this.p&&(l(i,"wheel",this.D,{passive:!1}),this.o=this.o.filter(e=>this.L.contains(e))),this.H(),this.k("start",e),this.$(e)),e.preventDefault()}H(){const{T:e,L:t,S:n}=this,i=this.C=t.getBoundingClientRect();this.p?(a(e,{top:i.top,left:i.left,width:i.width,height:i.height}),a(n,{marginTop:-i.top,marginLeft:-i.left})):(a(e,{top:0,left:0,width:"100%",height:"100%"}),a(n,{marginTop:0,marginLeft:0}))}$(e){const{x:t,y:n}=u(e),{m:i,l:o,_:s}=this,{speedDivider:a}=s.scrolling,r=this.L;if(o.x2=t,o.y2=n,this.p&&(i.y||i.x)){const t=()=>{if(!i.x&&!i.y)return;const{scrollTop:n,scrollLeft:s}=r;i.y&&(r.scrollTop+=y(i.y/a),o.y1-=r.scrollTop-n),i.x&&(r.scrollLeft+=y(i.x/a),o.x1-=r.scrollLeft-s),this.q(),this.F(),this.k("move",e),this.W(),requestAnimationFrame(t)};requestAnimationFrame(t)}else this.q(),this.F(),this.k("move",e),this.W();e.preventDefault()}O(){const{v:e,_:{document:t}}=this,{scrollTop:n,scrollLeft:i}=t.scrollingElement||t.body;this.l.x1+=e.x-i,this.l.y1+=e.y-n,e.x=i,e.y=n,this.H(),this.q(),this.F(),this.k("move",null),this.W()}D(e){const{manualSpeed:t}=this._.scrolling,n=e.deltaY?e.deltaY>0?1:-1:0,i=e.deltaX?e.deltaX>0?1:-1:0;this.m.y+=n*t,this.m.x+=i*t,this.$(e),e.preventDefault()}q(){const{m:e,l:t,h:n,L:i,C:o}=this,{scrollTop:s,scrollHeight:a,clientHeight:r,scrollLeft:l,scrollWidth:d,clientWidth:u}=i,c=o;let{x1:h,y1:f,x2:y,y2:g}=t;yc.right?(e.x=d-l-u?p(c.left+c.width-y):0,y=c.right):e.x=0,gc.bottom?(e.y=a-s-r?p(c.top+c.height-g):0,g=c.bottom):e.y=0;const v=_(h,y),b=_(f,g),w=m(h,y),M=m(f,g);n.x=v,n.y=b,n.width=w-v,n.height=M-b}W(){const{x:e,y:t,width:n,height:i}=this.h,{style:o}=this.S;o.left=`${e}px`,o.top=`${t}px`,o.width=`${n}px`,o.height=`${i}px`}j(e,t){const{document:n,singleTap:i}=this._,{u:o}=this;d(n,["mousemove","touchmove"],this.M),d(n,["touchmove","mousemove"],this.$),d(n,["mouseup","touchcancel","touchend"],this.j),d(n,"scroll",this.O),e&&o&&i.allow?this.R(e):o||t||(this.F(),this.k("stop",e)),this.m.x=0,this.m.y=0,this.p&&d(n,"wheel",this.D,{passive:!0}),this.T.remove(),a(this.S,"display","none")}F(){const{o:e,_:t,i:n,h:i}=this,{stored:o,selected:s,touched:a}=n,{intersect:r,overlap:l}=t,d=[],u=[],h=[];for(let t=0;t!s.includes(e)));for(let e=0;e!s.includes(e));switch(e.overlap){case"drop":t.stored=a.concat(s.filter(e=>!o.includes(e)));break;case"invert":t.stored=a.concat(s.filter(e=>!i.removed.includes(e)));break;case"keep":t.stored=s.concat(n.filter(e=>!s.includes(e)))}}clearSelection(e=!0){this.i={stored:e?[]:this.i.stored,selected:[],touched:[],changed:{added:[],removed:[]}}}getSelection(){return this.i.stored}getSelectionArea(){return this.S}cancel(e=!1){this.j(null,!e)}destroy(){this.disable(),this.T.remove()}select(e,t=!1){const{changed:n,selected:i,stored:o}=this.i,s=f(e,this._.document).filter(e=>!i.includes(e)&&!o.includes(e));return i.push(...s),n.added.push(...s),!t&&this.k("move",null),s}deselect(e,t=!1){const{selected:n,stored:i,changed:o}=this.i;return!(!n.includes(e)&&!i.includes(e)||(o.removed.push(e),h(i,e),h(n,e),!t&&this.k("move",null),0))}}g.version="2.0.2";var v=g,b=(n(144),n(146),n(141)),w=n.n(b),M=n(1),L=n.n(M);function T(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){r=!0,s=e},f:function(){try{a||null==n.return||n.return()}finally{if(r)throw s}}}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n img"],boundaries:["#roi-container"],singleTap:{allow:!0,intersect:"native"}}).on("beforestart",(function(e){if(e.store,2==e.event.button)return!1})).on("start",(function(e){var t=e.store,n=e.event;if(!n.ctrlKey&&!n.metaKey){var i,o=T(t.stored);try{for(o.s();!(i=o.n()).done;)i.value.classList.remove("selected")}catch(e){o.e(e)}finally{o.f()}Y.clearSelection()}})).on("move",(function(e){var t,n=e.store.changed,i=n.added,o=n.removed,s=T(i);try{for(s.s();!(t=s.n()).done;)t.value.classList.add("selected")}catch(e){s.e(e)}finally{s.f()}var a,r=T(o);try{for(r.s();!(a=r.n()).done;)a.value.classList.remove("selected")}catch(e){r.e(e)}finally{r.f()}})).on("stop",(function(e){var t=e.store;e.event,Y.keepSelection(),o()(t.selected).addClass("selected"),o()(t.changed.removed).removeClass("selected")}));function C(){var e={};return e.annotator=o()("#filter-annotator").val(),e.label=null!=o()("#filter-label").val()?o()("#filter-label").val():O("label"),e.collection=o()("#filter-collection").val(),e.sortby=o()("#filter-sortby").val(),e}function O(e){return new URLSearchParams(window.location.search).get(e)}o()("body").on("contextmenu",(function(e){Q()})),o()("body").on("click",(function(e){o()(e.target).is("#tag-holder")||Q()}));var H=O("sortby");function A(e){e.preventDefault(),x.empty(),ee.forEach((function(e){e.abort()})),ee=[],te=1,function(e){var t=new URL(document.location),n=t.searchParams;for(var i in e)n.set(i,e[i]);t.search=n.toString(),window.localStorage.setItem("search_params",t.search),window.history.pushState({path:t.toString()},"",t.toString())}(C()),de(te)}function j(){return Y.getSelection()}function P(e){for(var t=j(),n=0;nV;)t.pop();window.localStorage.setItem("recent_labels",JSON.stringify(t)),W()}(t)}}()}));var F=[];function E(e){for(var t=j(),n=0;nAll'),t.append('');var i=X();if(i)for(var s=0;s ').concat(a," ")))}t.append('');for(var l=0;l ").concat(d," "))),t.append(o()("")))}}function B(e){if(e.collections){var t=o()("#filter-collection");t.empty();for(var n=O("collection"),i=0;i ').concat(s," ")))}}}function q(){!function e(t){var n=t.next();0==n.length&&(n=o()("#filter-label option").first()),!n.hasClass("has_winning")&&o()("#filter-label option.has_winning").length>0?e(n):n.prop("selected",!0).change()}(o()("#filter-label option:selected"))}function U(){!function e(t){var n=t.prev();0==n.length&&(n=o()("#filter-label option").last()),!n.hasClass("has_winning")&&o()("#filter-label option.has_winning").length>0?e(n):n.prop("selected",!0).change()}(o()("#filter-label option:selected"))}function J(e){e.created?G("Label created"):G("Label already exists",!0),z()}function G(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];w()({text:e,offset:{x:15,y:60},duration:3e3,newWindow:!0,close:!0,gravity:"top",position:"right",backgroundColor:t?"crimson":"seagreen",stopOnFocus:!0}).showToast()}o()("#add-label-form").on("keyup",(function(e){N($,o()("#add-label-form"),o()("#add_label_text"))})),o()("#next_label").on("click",q),o()("#prev_label").on("click",U),o()(document).on("keypress",(function(e){if(!o()(e.target).closest("input,textarea")[0]){var t=e.key.toUpperCase();"N"==t?q():"P"===t?U():"ENTER"===t&&o()("#apply-label-form").trigger("submit")}})),o()("#unhide-last-form").on("submit",(function(e){e.preventDefault();var t=F.pop();t&&o()(t).fadeIn(),F&&o()("#unhide_last").addClass("disabled")})),o()("#add-label-form").on("submit",(function(e){if(e.preventDefault(),N($,o()("#add-label-form"),o()("#add_label_text"))){var t=o()("#add_label_text").val();o.a.post("api/create_label",{name:t},J),o()("#add_label_text").val("")}}));var V=5;function X(){return JSON.parse(window.localStorage.getItem("recent_labels")||"[]")}o()(".homeLink").on("click",(function(e){e.preventDefault();var t=new URL(document.location);t.pathname="";var n=window.localStorage.getItem("search_params");n&&(t.search=n),document.location=t.toString()}));var K=o()("#tag-holder"),Z=K.find("table").DataTable({data:[],paging:!1,searching:!1,info:!1,columns:[{title:"Label",render:function(e,t,n){return' ').concat(e," ")}},{title:"Annotator"},{title:"Time",render:function(e,t,n){return L()(e).format("YYYY-MM-DD h:mma Z")}},{title:"Verifications"}]});function Q(e){K.hide()}o()("body").on("click",".filterByLabel",(function(e){var t;e.preventDefault(),t=o()(e.target).data("label-id"),o()("#filter-label").val(t),o()("#filter-label").trigger("change")})),k.on("contextmenu","img",(function(e){return e.preventDefault(),o.a.post("api/roi_annotations",{roi_id:o()(e.target).data("roi-id")},(function(t){var n,i,o,s,a,r;n=e,i=t.rows,o=t.roi_id,s=n.pageX,a=n.pageY,r=K.outerWidth(),K.css({position:"absolute",top:15+a+"px",left:s-r/2+"px"}),K.show(),K.find(".roi_id span").html(o),Z.clear(),Z.rows.add(i),Z.draw()})),!1})),o()(document).ajaxSend((function(e,t,n){var i=o()('[name="csrfmiddlewaretoken"]').val();null!=i&&t.setRequestHeader("X-CSRFToken",i)}));var ee=[],te=1,ne=!0,ie=0;function oe(e){e?o()("#roi-container-loader").addClass("visible"):o()("#roi-container-loader").removeClass("visible")}function se(e){var t=o()(this);t.attr("original-width",t.width()),ae(t),t.css("visibility","visible"),0==--ie&&(le=!0,oe(!1),k.height()