
/**
 *  Ajax Autocomplete for jQuery, version 1.4.2
 *  (c) 2017 Tomas Kirda
 *
 *  Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
 *  For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete
 */
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports&&"function"==typeof require?require("jquery"):jQuery)}(function(a){"use strict";function b(c,d){var e=this;e.element=c,e.el=a(c),e.suggestions=[],e.badQueries=[],e.selectedIndex=-1,e.currentValue=e.element.value,e.timeoutId=null,e.cachedResponse={},e.onChangeTimeout=null,e.onChange=null,e.isLocal=!1,e.suggestionsContainer=null,e.noSuggestionsContainer=null,e.options=a.extend({},b.defaults,d),e.classes={selected:"autocomplete-selected",suggestion:"autocomplete-suggestion"},e.hint=null,e.hintValue="",e.selection=null,e.initialize(),e.setOptions(d)}function c(a,b,c){return-1!==a.value.toLowerCase().indexOf(c)}function d(b){return"string"==typeof b?a.parseJSON(b):b}function e(a,b){if(!b)return a.value;var c="("+g.escapeRegExChars(b)+")";return a.value.replace(new RegExp(c,"gi"),"<strong>$1</strong>").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/&lt;(\/?strong)&gt;/g,"<$1>")}function f(a,b){return'<div class="autocomplete-group">'+b+"</div>"}var g=function(){return{escapeRegExChars:function(a){return a.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(a){var b=document.createElement("div");return b.className=a,b.style.position="absolute",b.style.display="none",b}}}(),h={ESC:27,TAB:9,RETURN:13,LEFT:37,UP:38,RIGHT:39,DOWN:40},i=a.noop;b.utils=g,a.Autocomplete=b,b.defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:e,formatGroup:f,delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:i,onSearchComplete:i,onSearchError:i,preserveInput:!1,containerClass:"autocomplete-suggestions",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,preventBadQueries:!0,lookupFilter:c,paramName:"query",transformResult:d,showNoSuggestionNotice:!1,noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1},b.prototype={initialize:function(){var c,d=this,e="."+d.classes.suggestion,f=d.classes.selected,g=d.options;d.element.setAttribute("autocomplete","off"),d.noSuggestionsContainer=a('<div class="autocomplete-no-suggestion"></div>').html(this.options.noSuggestionNotice).get(0),d.suggestionsContainer=b.utils.createNode(g.containerClass),c=a(d.suggestionsContainer),c.appendTo(g.appendTo||"body"),"auto"!==g.width&&c.css("width",g.width),c.on("mouseover.autocomplete",e,function(){d.activate(a(this).data("index"))}),c.on("mouseout.autocomplete",function(){d.selectedIndex=-1,c.children("."+f).removeClass(f)}),c.on("click.autocomplete",e,function(){d.select(a(this).data("index"))}),c.on("click.autocomplete",function(){clearTimeout(d.blurTimeoutId)}),d.fixPositionCapture=function(){d.visible&&d.fixPosition()},a(window).on("resize.autocomplete",d.fixPositionCapture),d.el.on("keydown.autocomplete",function(a){d.onKeyPress(a)}),d.el.on("keyup.autocomplete",function(a){d.onKeyUp(a)}),d.el.on("blur.autocomplete",function(){d.onBlur()}),d.el.on("focus.autocomplete",function(){d.onFocus()}),d.el.on("change.autocomplete",function(a){d.onKeyUp(a)}),d.el.on("input.autocomplete",function(a){d.onKeyUp(a)})},onFocus:function(){var a=this;a.fixPosition(),a.el.val().length>=a.options.minChars&&a.onValueChange()},onBlur:function(){var a=this;a.blurTimeoutId=setTimeout(function(){a.hide()},200)},abortAjax:function(){var a=this;a.currentRequest&&(a.currentRequest.abort(),a.currentRequest=null)},setOptions:function(b){var c=this,d=c.options;this.options=a.extend({},d,b),c.isLocal=Array.isArray(d.lookup),c.isLocal&&(d.lookup=c.verifySuggestionsFormat(d.lookup)),d.orientation=c.validateOrientation(d.orientation,"bottom"),a(c.suggestionsContainer).css({"max-height":d.maxHeight+"px",width:d.width+"px","z-index":d.zIndex})},clearCache:function(){this.cachedResponse={},this.badQueries=[]},clear:function(){this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){var a=this;a.disabled=!0,clearTimeout(a.onChangeTimeout),a.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var b=this,c=a(b.suggestionsContainer),d=c.parent().get(0);if(d===document.body||b.options.forceFixPosition){var e=b.options.orientation,f=c.outerHeight(),g=b.el.outerHeight(),h=b.el.offset(),i={top:h.top,left:h.left};if("auto"===e){var j=a(window).height(),k=a(window).scrollTop(),l=-k+h.top-f,m=k+j-(h.top+g+f);e=Math.max(l,m)===l?"top":"bottom"}if("top"===e?i.top+=-f:i.top+=g,d!==document.body){var n,o=c.css("opacity");b.visible||c.css("opacity",0).show(),n=c.offsetParent().offset(),i.top-=n.top,i.left-=n.left,b.visible||c.css("opacity",o).hide()}"auto"===b.options.width&&(i.width=b.el.outerWidth()+"px"),c.css(i)}},isCursorAtEnd:function(){var a,b=this,c=b.el.val().length,d=b.element.selectionStart;return"number"==typeof d?d===c:document.selection?(a=document.selection.createRange(),a.moveStart("character",-c),c===a.text.length):!0},onKeyPress:function(a){var b=this;if(!b.disabled&&!b.visible&&a.which===h.DOWN&&b.currentValue)return void b.suggest();if(!b.disabled&&b.visible){switch(a.which){case h.ESC:b.el.val(b.currentValue),b.hide();break;case h.RIGHT:if(b.hint&&b.options.onHint&&b.isCursorAtEnd()){b.selectHint();break}return;case h.TAB:if(b.hint&&b.options.onHint)return void b.selectHint();if(-1===b.selectedIndex)return void b.hide();if(b.select(b.selectedIndex),b.options.tabDisabled===!1)return;break;case h.RETURN:if(-1===b.selectedIndex)return void b.hide();b.select(b.selectedIndex);break;case h.UP:b.moveUp();break;case h.DOWN:b.moveDown();break;default:return}a.stopImmediatePropagation(),a.preventDefault()}},onKeyUp:function(a){var b=this;if(!b.disabled){switch(a.which){case h.UP:case h.DOWN:return}clearTimeout(b.onChangeTimeout),b.currentValue!==b.el.val()&&(b.findBestHint(),b.options.deferRequestBy>0?b.onChangeTimeout=setTimeout(function(){b.onValueChange()},b.options.deferRequestBy):b.onValueChange())}},onValueChange:function(){var b=this,c=b.options,d=b.el.val(),e=b.getQuery(d);return b.selection&&b.currentValue!==e&&(b.selection=null,(c.onInvalidateSelection||a.noop).call(b.element)),clearTimeout(b.onChangeTimeout),b.currentValue=d,b.selectedIndex=-1,c.triggerSelectOnValidInput&&b.isExactMatch(e)?void b.select(0):void(e.length<c.minChars?b.hide():b.getSuggestions(e))},isExactMatch:function(a){var b=this.suggestions;return 1===b.length&&b[0].value.toLowerCase()===a.toLowerCase()},getQuery:function(b){var c,d=this.options.delimiter;return d?(c=b.split(d),a.trim(c[c.length-1])):b},getSuggestionsLocal:function(b){var c,d=this,e=d.options,f=b.toLowerCase(),g=e.lookupFilter,h=parseInt(e.lookupLimit,10);return c={suggestions:a.grep(e.lookup,function(a){return g(a,b,f)})},h&&c.suggestions.length>h&&(c.suggestions=c.suggestions.slice(0,h)),c},getSuggestions:function(b){var c,d,e,f,g=this,h=g.options,i=h.serviceUrl;if(h.params[h.paramName]=b,h.onSearchStart.call(g.element,h.params)!==!1){if(d=h.ignoreParams?null:h.params,a.isFunction(h.lookup))return void h.lookup(b,function(a){g.suggestions=a.suggestions,g.suggest(),h.onSearchComplete.call(g.element,b,a.suggestions)});g.isLocal?c=g.getSuggestionsLocal(b):(a.isFunction(i)&&(i=i.call(g.element,b)),e=i+"?"+a.param(d||{}),c=g.cachedResponse[e]),c&&Array.isArray(c.suggestions)?(g.suggestions=c.suggestions,g.suggest(),h.onSearchComplete.call(g.element,b,c.suggestions)):g.isBadQuery(b)?h.onSearchComplete.call(g.element,b,[]):(g.abortAjax(),f={url:i,data:d,type:h.type,dataType:h.dataType},a.extend(f,h.ajaxSettings),g.currentRequest=a.ajax(f).done(function(a){var c;g.currentRequest=null,c=h.transformResult(a,b),g.processResponse(c,b,e),h.onSearchComplete.call(g.element,b,c.suggestions)}).fail(function(a,c,d){h.onSearchError.call(g.element,b,a,c,d)}))}},isBadQuery:function(a){if(!this.options.preventBadQueries)return!1;for(var b=this.badQueries,c=b.length;c--;)if(0===a.indexOf(b[c]))return!0;return!1},hide:function(){var b=this,c=a(b.suggestionsContainer);a.isFunction(b.options.onHide)&&b.visible&&b.options.onHide.call(b.element,c),b.visible=!1,b.selectedIndex=-1,clearTimeout(b.onChangeTimeout),a(b.suggestionsContainer).hide(),b.signalHint(null)},suggest:function(){if(!this.suggestions.length)return void(this.options.showNoSuggestionNotice?this.noSuggestions():this.hide());var b,c=this,d=c.options,e=d.groupBy,f=d.formatResult,g=c.getQuery(c.currentValue),h=c.classes.suggestion,i=c.classes.selected,j=a(c.suggestionsContainer),k=a(c.noSuggestionsContainer),l=d.beforeRender,m="",n=function(a,c){var f=a.data[e];return b===f?"":(b=f,d.formatGroup(a,b))};return d.triggerSelectOnValidInput&&c.isExactMatch(g)?void c.select(0):(a.each(c.suggestions,function(a,b){e&&(m+=n(b,g,a)),m+='<div class="'+h+'" data-index="'+a+'">'+f(b,g,a)+"</div>"}),this.adjustContainerWidth(),k.detach(),j.html(m),a.isFunction(l)&&l.call(c.element,j,c.suggestions),c.fixPosition(),j.show(),d.autoSelectFirst&&(c.selectedIndex=0,j.scrollTop(0),j.children("."+h).first().addClass(i)),c.visible=!0,void c.findBestHint())},noSuggestions:function(){var b=this,c=b.options.beforeRender,d=a(b.suggestionsContainer),e=a(b.noSuggestionsContainer);this.adjustContainerWidth(),e.detach(),d.empty(),d.append(e),a.isFunction(c)&&c.call(b.element,d,b.suggestions),b.fixPosition(),d.show(),b.visible=!0},adjustContainerWidth:function(){var b,c=this,d=c.options,e=a(c.suggestionsContainer);"auto"===d.width?(b=c.el.outerWidth(),e.css("width",b>0?b:300)):"flex"===d.width&&e.css("width","")},findBestHint:function(){var b=this,c=b.el.val().toLowerCase(),d=null;c&&(a.each(b.suggestions,function(a,b){var e=0===b.value.toLowerCase().indexOf(c);return e&&(d=b),!e}),b.signalHint(d))},signalHint:function(b){var c="",d=this;b&&(c=d.currentValue+b.value.substr(d.currentValue.length)),d.hintValue!==c&&(d.hintValue=c,d.hint=b,(this.options.onHint||a.noop)(c))},verifySuggestionsFormat:function(b){return b.length&&"string"==typeof b[0]?a.map(b,function(a){return{value:a,data:null}}):b},validateOrientation:function(b,c){return b=a.trim(b||"").toLowerCase(),-1===a.inArray(b,["auto","bottom","top"])&&(b=c),b},processResponse:function(a,b,c){var d=this,e=d.options;a.suggestions=d.verifySuggestionsFormat(a.suggestions),e.noCache||(d.cachedResponse[c]=a,e.preventBadQueries&&!a.suggestions.length&&d.badQueries.push(b)),b===d.getQuery(d.currentValue)&&(d.suggestions=a.suggestions,d.suggest())},activate:function(b){var c,d=this,e=d.classes.selected,f=a(d.suggestionsContainer),g=f.find("."+d.classes.suggestion);return f.find("."+e).removeClass(e),d.selectedIndex=b,-1!==d.selectedIndex&&g.length>d.selectedIndex?(c=g.get(d.selectedIndex),a(c).addClass(e),c):null},selectHint:function(){var b=this,c=a.inArray(b.hint,b.suggestions);b.select(c)},select:function(a){var b=this;b.hide(),b.onSelect(a)},moveUp:function(){var b=this;if(-1!==b.selectedIndex)return 0===b.selectedIndex?(a(b.suggestionsContainer).children().first().removeClass(b.classes.selected),b.selectedIndex=-1,b.el.val(b.currentValue),void b.findBestHint()):void b.adjustScroll(b.selectedIndex-1)},moveDown:function(){var a=this;a.selectedIndex!==a.suggestions.length-1&&a.adjustScroll(a.selectedIndex+1)},adjustScroll:function(b){var c=this,d=c.activate(b);if(d){var e,f,g,h=a(d).outerHeight();e=d.offsetTop,f=a(c.suggestionsContainer).scrollTop(),g=f+c.options.maxHeight-h,f>e?a(c.suggestionsContainer).scrollTop(e):e>g&&a(c.suggestionsContainer).scrollTop(e-c.options.maxHeight+h),c.options.preserveInput||c.el.val(c.getValue(c.suggestions[b].value)),c.signalHint(null)}},onSelect:function(b){var c=this,d=c.options.onSelect,e=c.suggestions[b];c.currentValue=c.getValue(e.value),c.currentValue===c.el.val()||c.options.preserveInput||c.el.val(c.currentValue),c.signalHint(null),c.suggestions=[],c.selection=e,a.isFunction(d)&&d.call(c.element,e)},getValue:function(a){var b,c,d=this,e=d.options.delimiter;return e?(b=d.currentValue,c=b.split(e),1===c.length?a:b.substr(0,b.length-c[c.length-1].length)+a):a},dispose:function(){var b=this;b.el.off(".autocomplete").removeData("autocomplete"),a(window).off("resize.autocomplete",b.fixPositionCapture),a(b.suggestionsContainer).remove()}},a.fn.devbridgeAutocomplete=function(c,d){var e="autocomplete";return arguments.length?this.each(function(){var f=a(this),g=f.data(e);"string"==typeof c?g&&"function"==typeof g[c]&&g[c](d):(g&&g.dispose&&g.dispose(),g=new b(this,c),f.data(e,g))}):this.first().data(e)},a.fn.autocomplete||(a.fn.autocomplete=a.fn.devbridgeAutocomplete)});
function SuggestController() {

    this.init = function () {

        jQuery('form[data-suggest]').each(function () {
            var $form = $(this), $searchBox = $form.find('.tx-solr-suggest');

            $form.find('.tx-solr-suggest-focus').focus();

            jQuery.ajaxSetup({jsonp: "tx_solr[callback]"})

            // when no specific container found, use the form as container
            if ($searchBox.length === 0) {
                $searchBox = $form;
            }
            $searchBox.css('position', 'relative');

            // Prevent submit of empty search form
            $form.on('submit', function (e) {
                if ($form.find('.tx-solr-suggest').val() === '') {
                    e.preventDefault();
                    $form.find('.tx-solr-suggest').focus();
                }
            });

            $form.find('.tx-solr-suggest').devbridgeAutocomplete({
                serviceUrl: $form.data('suggest'),
                dataType: 'jsonp',
                paramName: 'tx_solr[queryString]',
                groupBy: 'category',
                maxHeight: 1000,
                autoSelectFirst: false,
                triggerSelectOnValidInput: false,
                width: $searchBox.outerWidth() * 0.66,
                onSelect: function (suggestion) {
                    // go to link when selecting found result
                    if (suggestion.data.link) {
                        // Open youtube in overlay
                        if (suggestion.data.link.indexOf('https://www.youtube.com') === 0) {
                            openVideoOverlay(suggestion.data.link);
                        } else {
                            location.href = suggestion.data.link;
                        }
                        // else trigger form submit (do search)
                    } else {
                        $form.trigger('submit');
                    }
                },
                transformResult: function (response) {
                    if (!response.suggestions) return {suggestions: []};
                    var firstSuggestion, result = {
                        suggestions: $.map(response.suggestions, function (count, suggestion) {
                            if (!firstSuggestion) firstSuggestion = suggestion;
                            return {value: suggestion, data: {category: 'suggestion', count: count}};
                        })
                    };

                    $.each(response.documents, function (key, value) {
                        var dataObject = value;

                        var defaultGroup = $form.data('suggest-header') ? $form.data('suggest-header') : 'Top results';
                        dataObject.category = defaultGroup;

                        // if a group is set we try to get a label
                        if(dataObject.group) {
                            dataObject.category = $form.data('suggest-header-' + dataObject.group) ? $form.data('suggest-header-' + dataObject.group) : dataObject.group;
                        }

                        result.suggestions.push(
                            {
                                value: firstSuggestion,
                                data: dataObject
                            }
                        );
                    });

                    return result;
                },
                beforeRender: function (container) {
                    // remove first group header
                    container.find('.autocomplete-group:first').remove();
                    container.addClass('tx-solr-autosuggest');

                    // add active class to container
                    $searchBox.parent().addClass('autocomplete-active').fadeIn();
                },
                formatResult: function (suggestion, currentValue) {
                    // Do not replace anything if there current value is empty
                    if (!currentValue) {
                        return suggestion.value;
                    }
                    var pattern = '(' + $.Autocomplete.utils.escapeRegExChars(currentValue.trim()) + ')';
                    // normal suggestion
                    if (suggestion.data.category === 'suggestion') {
                        return suggestion.value
                            .replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>')
                            .replace(/&/g, '&amp;')
                            .replace(/</g, '&lt;')
                            .replace(/>/g, '&gt;')
                            .replace(/"/g, '&quot;')
                            .replace(/&lt;(\/?strong)&gt;/g, '<$1>');

                        // results
                    } else {
                        var title = suggestion.data.title
                            .replace(new RegExp(pattern, 'gi'), '<em>$1<\/em>')
                            .replace(/&/g, '&amp;')
                            .replace(/</g, '&lt;')
                            .replace(/>/g, '&gt;')
                            .replace(/"/g, '&quot;')
                            .replace(/&lt;(\/?em)&gt;/g, '<$1>');

                        return '<div class="' + suggestion.data.type + '">' +
                            (!!suggestion.data.previewImage ? '<figure ' + (!!suggestion.data.hasVideo ? 'class="hasVideo"' : '') + '><img src="' + suggestion.data.previewImage + '" /></figure>' : '') +
                            '<a href="' + suggestion.data.link + '" class="internal-link">' + title + '</a>' +
                            '</div>';
                    }

                }
            }).on('blur', function () {
                $searchBox.parent().removeClass('autocomplete-active');
                var $box = $(this);
                setTimeout(function () {
                    $box.devbridgeAutocomplete('hide');
                }, 200);
            });
        });
    };
}

jQuery(document).ready(function() {
    /** solr search autocomplete **/
    var solrSuggestController = new SuggestController();
    solrSuggestController.init();

    jQuery("body").on("tx_solr_updated", function() {
        solrSuggestController.init();
    });
});


/*! URI.js v1.18.1 http://medialize.github.io/URI.js/ */
/* build contains: IPv6.js, punycode.js, SecondLevelDomains.js, URI.js */
(function(k,n){"object"===typeof exports?module.exports=n():"function"===typeof define&&define.amd?define(n):k.IPv6=n(k)})(this,function(k){var n=k&&k.IPv6;return{best:function(g){g=g.toLowerCase().split(":");var f=g.length,d=8;""===g[0]&&""===g[1]&&""===g[2]?(g.shift(),g.shift()):""===g[0]&&""===g[1]?g.shift():""===g[f-1]&&""===g[f-2]&&g.pop();f=g.length;-1!==g[f-1].indexOf(".")&&(d=7);var h;for(h=0;h<f&&""!==g[h];h++);if(h<d)for(g.splice(h,1,"0000");g.length<d;)g.splice(h,0,"0000");for(h=0;h<d;h++){for(var f=
g[h].split(""),k=0;3>k;k++)if("0"===f[0]&&1<f.length)f.splice(0,1);else break;g[h]=f.join("")}var f=-1,p=k=0,n=-1,u=!1;for(h=0;h<d;h++)u?"0"===g[h]?p+=1:(u=!1,p>k&&(f=n,k=p)):"0"===g[h]&&(u=!0,n=h,p=1);p>k&&(f=n,k=p);1<k&&g.splice(f,k,"");f=g.length;d="";""===g[0]&&(d=":");for(h=0;h<f;h++){d+=g[h];if(h===f-1)break;d+=":"}""===g[f-1]&&(d+=":");return d},noConflict:function(){k.IPv6===this&&(k.IPv6=n);return this}}});
(function(k){function n(d){throw new RangeError(e[d]);}function g(d,e){for(var f=d.length,h=[];f--;)h[f]=e(d[f]);return h}function f(d,e){var f=d.split("@"),h="";1<f.length&&(h=f[0]+"@",d=f[1]);d=d.replace(H,".");f=d.split(".");f=g(f,e).join(".");return h+f}function d(d){for(var e=[],f=0,h=d.length,g,a;f<h;)g=d.charCodeAt(f++),55296<=g&&56319>=g&&f<h?(a=d.charCodeAt(f++),56320==(a&64512)?e.push(((g&1023)<<10)+(a&1023)+65536):(e.push(g),f--)):e.push(g);return e}function h(d){return g(d,function(d){var e=
"";65535<d&&(d-=65536,e+=t(d>>>10&1023|55296),d=56320|d&1023);return e+=t(d)}).join("")}function w(d,e){return d+22+75*(26>d)-((0!=e)<<5)}function p(d,e,f){var h=0;d=f?r(d/700):d>>1;for(d+=r(d/e);455<d;h+=36)d=r(d/35);return r(h+36*d/(d+38))}function D(d){var e=[],f=d.length,g,k=0,a=128,b=72,c,l,m,q,y;c=d.lastIndexOf("-");0>c&&(c=0);for(l=0;l<c;++l)128<=d.charCodeAt(l)&&n("not-basic"),e.push(d.charCodeAt(l));for(c=0<c?c+1:0;c<f;){l=k;g=1;for(m=36;;m+=36){c>=f&&n("invalid-input");q=d.charCodeAt(c++);
q=10>q-48?q-22:26>q-65?q-65:26>q-97?q-97:36;(36<=q||q>r((2147483647-k)/g))&&n("overflow");k+=q*g;y=m<=b?1:m>=b+26?26:m-b;if(q<y)break;q=36-y;g>r(2147483647/q)&&n("overflow");g*=q}g=e.length+1;b=p(k-l,g,0==l);r(k/g)>2147483647-a&&n("overflow");a+=r(k/g);k%=g;e.splice(k++,0,a)}return h(e)}function u(e){var f,g,h,k,a,b,c,l,m,q=[],y,E,I;e=d(e);y=e.length;f=128;g=0;a=72;for(b=0;b<y;++b)m=e[b],128>m&&q.push(t(m));for((h=k=q.length)&&q.push("-");h<y;){c=2147483647;for(b=0;b<y;++b)m=e[b],m>=f&&m<c&&(c=m);
E=h+1;c-f>r((2147483647-g)/E)&&n("overflow");g+=(c-f)*E;f=c;for(b=0;b<y;++b)if(m=e[b],m<f&&2147483647<++g&&n("overflow"),m==f){l=g;for(c=36;;c+=36){m=c<=a?1:c>=a+26?26:c-a;if(l<m)break;I=l-m;l=36-m;q.push(t(w(m+I%l,0)));l=r(I/l)}q.push(t(w(l,0)));a=p(g,E,h==k);g=0;++h}++g;++f}return q.join("")}var B="object"==typeof exports&&exports&&!exports.nodeType&&exports,C="object"==typeof module&&module&&!module.nodeType&&module,z="object"==typeof global&&global;if(z.global===z||z.window===z||z.self===z)k=
z;var v,A=/^xn--/,F=/[^\x20-\x7E]/,H=/[\x2E\u3002\uFF0E\uFF61]/g,e={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},r=Math.floor,t=String.fromCharCode,x;v={version:"1.3.2",ucs2:{decode:d,encode:h},decode:D,encode:u,toASCII:function(d){return f(d,function(d){return F.test(d)?"xn--"+u(d):d})},toUnicode:function(d){return f(d,function(d){return A.test(d)?D(d.slice(4).toLowerCase()):d})}};if("function"==
typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return v});else if(B&&C)if(module.exports==B)C.exports=v;else for(x in v)v.hasOwnProperty(x)&&(B[x]=v[x]);else k.punycode=v})(this);
(function(k,n){"object"===typeof exports?module.exports=n():"function"===typeof define&&define.amd?define(n):k.SecondLevelDomains=n(k)})(this,function(k){var n=k&&k.SecondLevelDomains,g={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",
bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",
ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ","do":" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",
es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",
id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ","in":" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",
kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",
mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",
ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",
ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",
tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",
rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",
tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",
us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch "},has:function(f){var d=f.lastIndexOf(".");if(0>=d||d>=f.length-1)return!1;
var h=f.lastIndexOf(".",d-1);if(0>=h||h>=d-1)return!1;var k=g.list[f.slice(d+1)];return k?0<=k.indexOf(" "+f.slice(h+1,d)+" "):!1},is:function(f){var d=f.lastIndexOf(".");if(0>=d||d>=f.length-1||0<=f.lastIndexOf(".",d-1))return!1;var h=g.list[f.slice(d+1)];return h?0<=h.indexOf(" "+f.slice(0,d)+" "):!1},get:function(f){var d=f.lastIndexOf(".");if(0>=d||d>=f.length-1)return null;var h=f.lastIndexOf(".",d-1);if(0>=h||h>=d-1)return null;var k=g.list[f.slice(d+1)];return!k||0>k.indexOf(" "+f.slice(h+
1,d)+" ")?null:f.slice(h+1)},noConflict:function(){k.SecondLevelDomains===this&&(k.SecondLevelDomains=n);return this}};return g});
(function(k,n){"object"===typeof exports?module.exports=n(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"===typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],n):k.URI=n(k.punycode,k.IPv6,k.SecondLevelDomains,k)})(this,function(k,n,g,f){function d(a,b){var c=1<=arguments.length,l=2<=arguments.length;if(!(this instanceof d))return c?l?new d(a,b):new d(a):new d;if(void 0===a){if(c)throw new TypeError("undefined is not a valid argument for URI");
a="undefined"!==typeof location?location.href+"":""}this.href(a);return void 0!==b?this.absoluteTo(b):this}function h(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function w(a){return void 0===a?"Undefined":String(Object.prototype.toString.call(a)).slice(8,-1)}function p(a){return"Array"===w(a)}function D(a,b){var c={},d,m;if("RegExp"===w(b))c=null;else if(p(b))for(d=0,m=b.length;d<m;d++)c[b[d]]=!0;else c[b]=!0;d=0;for(m=a.length;d<m;d++)if(c&&void 0!==c[a[d]]||!c&&b.test(a[d]))a.splice(d,
1),m--,d--;return a}function u(a,b){var c,d;if(p(b)){c=0;for(d=b.length;c<d;c++)if(!u(a,b[c]))return!1;return!0}var m=w(b);c=0;for(d=a.length;c<d;c++)if("RegExp"===m){if("string"===typeof a[c]&&a[c].match(b))return!0}else if(a[c]===b)return!0;return!1}function B(a,b){if(!p(a)||!p(b)||a.length!==b.length)return!1;a.sort();b.sort();for(var c=0,d=a.length;c<d;c++)if(a[c]!==b[c])return!1;return!0}function C(a){return a.replace(/^\/+|\/+$/g,"")}function z(a){return escape(a)}function v(a){return encodeURIComponent(a).replace(/[!'()*]/g,
z).replace(/\*/g,"%2A")}function A(a){return function(b,c){if(void 0===b)return this._parts[a]||"";this._parts[a]=b||null;this.build(!c);return this}}function F(a,b){return function(c,d){if(void 0===c)return this._parts[a]||"";null!==c&&(c+="",c.charAt(0)===b&&(c=c.substring(1)));this._parts[a]=c;this.build(!d);return this}}var H=f&&f.URI;d.version="1.18.1";var e=d.prototype,r=Object.prototype.hasOwnProperty;d._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,
port:null,path:null,query:null,fragment:null,duplicateQueryParameters:d.duplicateQueryParameters,escapeQuerySpace:d.escapeQuerySpace}};d.duplicateQueryParameters=!1;d.escapeQuerySpace=!0;d.protocol_expression=/^[a-z][a-z0-9.+-]*$/i;d.idn_expression=/[^a-z0-9\.-]/i;d.punycode_expression=/(xn--)/i;d.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;d.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
d.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/ig;d.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/};d.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"};d.invalid_hostname_characters=
/[^a-zA-Z0-9\.-]/;d.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"};d.getDomAttribute=function(a){if(a&&a.nodeName){var b=a.nodeName.toLowerCase();return"input"===b&&"image"!==a.type?void 0:d.domAttributes[b]}};d.encode=v;d.decode=decodeURIComponent;d.iso8859=function(){d.encode=escape;d.decode=unescape};d.unicode=function(){d.encode=v;d.decode=
decodeURIComponent};d.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",",
"%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}};d.encodeQuery=function(a,b){var c=d.encode(a+"");void 0===b&&(b=d.escapeQuerySpace);return b?c.replace(/%20/g,"+"):c};d.decodeQuery=function(a,b){a+="";void 0===b&&(b=d.escapeQuerySpace);try{return d.decode(b?a.replace(/\+/g,
"%20"):a)}catch(c){return a}};var t={encode:"encode",decode:"decode"},x,G=function(a,b){return function(c){try{return d[b](c+"").replace(d.characters[a][b].expression,function(c){return d.characters[a][b].map[c]})}catch(l){return c}}};for(x in t)d[x+"PathSegment"]=G("pathname",t[x]),d[x+"UrnPathSegment"]=G("urnpath",t[x]);t=function(a,b,c){return function(l){var m;m=c?function(a){return d[b](d[c](a))}:d[b];l=(l+"").split(a);for(var e=0,f=l.length;e<f;e++)l[e]=m(l[e]);return l.join(a)}};d.decodePath=
t("/","decodePathSegment");d.decodeUrnPath=t(":","decodeUrnPathSegment");d.recodePath=t("/","encodePathSegment","decode");d.recodeUrnPath=t(":","encodeUrnPathSegment","decode");d.encodeReserved=G("reserved","encode");d.parse=function(a,b){var c;b||(b={});c=a.indexOf("#");-1<c&&(b.fragment=a.substring(c+1)||null,a=a.substring(0,c));c=a.indexOf("?");-1<c&&(b.query=a.substring(c+1)||null,a=a.substring(0,c));"//"===a.substring(0,2)?(b.protocol=null,a=a.substring(2),a=d.parseAuthority(a,b)):(c=a.indexOf(":"),
-1<c&&(b.protocol=a.substring(0,c)||null,b.protocol&&!b.protocol.match(d.protocol_expression)?b.protocol=void 0:"//"===a.substring(c+1,c+3)?(a=a.substring(c+3),a=d.parseAuthority(a,b)):(a=a.substring(c+1),b.urn=!0)));b.path=a;return b};d.parseHost=function(a,b){a=a.replace(/\\/g,"/");var c=a.indexOf("/"),d;-1===c&&(c=a.length);if("["===a.charAt(0))d=a.indexOf("]"),b.hostname=a.substring(1,d)||null,b.port=a.substring(d+2,c)||null,"/"===b.port&&(b.port=null);else{var m=a.indexOf(":");d=a.indexOf("/");
m=a.indexOf(":",m+1);-1!==m&&(-1===d||m<d)?(b.hostname=a.substring(0,c)||null,b.port=null):(d=a.substring(0,c).split(":"),b.hostname=d[0]||null,b.port=d[1]||null)}b.hostname&&"/"!==a.substring(c).charAt(0)&&(c++,a="/"+a);return a.substring(c)||"/"};d.parseAuthority=function(a,b){a=d.parseUserinfo(a,b);return d.parseHost(a,b)};d.parseUserinfo=function(a,b){var c=a.indexOf("/"),l=a.lastIndexOf("@",-1<c?c:a.length-1);-1<l&&(-1===c||l<c)?(c=a.substring(0,l).split(":"),b.username=c[0]?d.decode(c[0]):null,
c.shift(),b.password=c[0]?d.decode(c.join(":")):null,a=a.substring(l+1)):(b.username=null,b.password=null);return a};d.parseQuery=function(a,b){if(!a)return{};a=a.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"");if(!a)return{};for(var c={},l=a.split("&"),m=l.length,e,f,g=0;g<m;g++)if(e=l[g].split("="),f=d.decodeQuery(e.shift(),b),e=e.length?d.decodeQuery(e.join("="),b):null,r.call(c,f)){if("string"===typeof c[f]||null===c[f])c[f]=[c[f]];c[f].push(e)}else c[f]=e;return c};d.build=function(a){var b="";
a.protocol&&(b+=a.protocol+":");a.urn||!b&&!a.hostname||(b+="//");b+=d.buildAuthority(a)||"";"string"===typeof a.path&&("/"!==a.path.charAt(0)&&"string"===typeof a.hostname&&(b+="/"),b+=a.path);"string"===typeof a.query&&a.query&&(b+="?"+a.query);"string"===typeof a.fragment&&a.fragment&&(b+="#"+a.fragment);return b};d.buildHost=function(a){var b="";if(a.hostname)b=d.ip6_expression.test(a.hostname)?b+("["+a.hostname+"]"):b+a.hostname;else return"";a.port&&(b+=":"+a.port);return b};d.buildAuthority=
function(a){return d.buildUserinfo(a)+d.buildHost(a)};d.buildUserinfo=function(a){var b="";a.username&&(b+=d.encode(a.username));a.password&&(b+=":"+d.encode(a.password));b&&(b+="@");return b};d.buildQuery=function(a,b,c){var l="",m,e,f,g;for(e in a)if(r.call(a,e)&&e)if(p(a[e]))for(m={},f=0,g=a[e].length;f<g;f++)void 0!==a[e][f]&&void 0===m[a[e][f]+""]&&(l+="&"+d.buildQueryParameter(e,a[e][f],c),!0!==b&&(m[a[e][f]+""]=!0));else void 0!==a[e]&&(l+="&"+d.buildQueryParameter(e,a[e],c));return l.substring(1)};
d.buildQueryParameter=function(a,b,c){return d.encodeQuery(a,c)+(null!==b?"="+d.encodeQuery(b,c):"")};d.addQuery=function(a,b,c){if("object"===typeof b)for(var l in b)r.call(b,l)&&d.addQuery(a,l,b[l]);else if("string"===typeof b)void 0===a[b]?a[b]=c:("string"===typeof a[b]&&(a[b]=[a[b]]),p(c)||(c=[c]),a[b]=(a[b]||[]).concat(c));else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");};d.removeQuery=function(a,b,c){var l;if(p(b))for(c=0,l=b.length;c<l;c++)a[b[c]]=
void 0;else if("RegExp"===w(b))for(l in a)b.test(l)&&(a[l]=void 0);else if("object"===typeof b)for(l in b)r.call(b,l)&&d.removeQuery(a,l,b[l]);else if("string"===typeof b)void 0!==c?"RegExp"===w(c)?!p(a[b])&&c.test(a[b])?a[b]=void 0:a[b]=D(a[b],c):a[b]!==String(c)||p(c)&&1!==c.length?p(a[b])&&(a[b]=D(a[b],c)):a[b]=void 0:a[b]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");};d.hasQuery=function(a,b,c,l){switch(w(b)){case "String":break;
case "RegExp":for(var e in a)if(r.call(a,e)&&b.test(e)&&(void 0===c||d.hasQuery(a,e,c)))return!0;return!1;case "Object":for(var f in b)if(r.call(b,f)&&!d.hasQuery(a,f,b[f]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter");}switch(w(c)){case "Undefined":return b in a;case "Boolean":return a=!(p(a[b])?!a[b].length:!a[b]),c===a;case "Function":return!!c(a[b],b,a);case "Array":return p(a[b])?(l?u:B)(a[b],c):!1;case "RegExp":return p(a[b])?
l?u(a[b],c):!1:!(!a[b]||!a[b].match(c));case "Number":c=String(c);case "String":return p(a[b])?l?u(a[b],c):!1:a[b]===c;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter");}};d.joinPaths=function(){for(var a=[],b=[],c=0,l=0;l<arguments.length;l++){var e=new d(arguments[l]);a.push(e);for(var e=e.segment(),f=0;f<e.length;f++)"string"===typeof e[f]&&b.push(e[f]),e[f]&&c++}if(!b.length||!c)return new d("");b=(new d("")).segment(b);
""!==a[0].path()&&"/"!==a[0].path().slice(0,1)||b.path("/"+b.path());return b.normalize()};d.commonPath=function(a,b){var c=Math.min(a.length,b.length),d;for(d=0;d<c;d++)if(a.charAt(d)!==b.charAt(d)){d--;break}if(1>d)return a.charAt(0)===b.charAt(0)&&"/"===a.charAt(0)?"/":"";if("/"!==a.charAt(d)||"/"!==b.charAt(d))d=a.substring(0,d).lastIndexOf("/");return a.substring(0,d+1)};d.withinString=function(a,b,c){c||(c={});var l=c.start||d.findUri.start,e=c.end||d.findUri.end,f=c.trim||d.findUri.trim,g=
/[a-z0-9-]=["']?$/i;for(l.lastIndex=0;;){var h=l.exec(a);if(!h)break;h=h.index;if(c.ignoreHtml){var k=a.slice(Math.max(h-3,0),h);if(k&&g.test(k))continue}var k=h+a.slice(h).search(e),n=a.slice(h,k).replace(f,"");c.ignore&&c.ignore.test(n)||(k=h+n.length,n=b(n,h,k,a),a=a.slice(0,h)+n+a.slice(k),l.lastIndex=h+n.length)}l.lastIndex=0;return a};d.ensureValidHostname=function(a){if(a.match(d.invalid_hostname_characters)){if(!k)throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available');
if(k.toASCII(a).match(d.invalid_hostname_characters))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');}};d.noConflict=function(a){if(a)return a={URI:this.noConflict()},f.URITemplate&&"function"===typeof f.URITemplate.noConflict&&(a.URITemplate=f.URITemplate.noConflict()),f.IPv6&&"function"===typeof f.IPv6.noConflict&&(a.IPv6=f.IPv6.noConflict()),f.SecondLevelDomains&&"function"===typeof f.SecondLevelDomains.noConflict&&(a.SecondLevelDomains=f.SecondLevelDomains.noConflict()),
a;f.URI===this&&(f.URI=H);return this};e.build=function(a){if(!0===a)this._deferred_build=!0;else if(void 0===a||this._deferred_build)this._string=d.build(this._parts),this._deferred_build=!1;return this};e.clone=function(){return new d(this)};e.valueOf=e.toString=function(){return this.build(!1)._string};e.protocol=A("protocol");e.username=A("username");e.password=A("password");e.hostname=A("hostname");e.port=A("port");e.query=F("query","?");e.fragment=F("fragment","#");e.search=function(a,b){var c=
this.query(a,b);return"string"===typeof c&&c.length?"?"+c:c};e.hash=function(a,b){var c=this.fragment(a,b);return"string"===typeof c&&c.length?"#"+c:c};e.pathname=function(a,b){if(void 0===a||!0===a){var c=this._parts.path||(this._parts.hostname?"/":"");return a?(this._parts.urn?d.decodeUrnPath:d.decodePath)(c):c}this._parts.path=this._parts.urn?a?d.recodeUrnPath(a):"":a?d.recodePath(a):"/";this.build(!b);return this};e.path=e.pathname;e.href=function(a,b){var c;if(void 0===a)return this.toString();
this._string="";this._parts=d._parts();var e=a instanceof d,f="object"===typeof a&&(a.hostname||a.path||a.pathname);a.nodeName&&(f=d.getDomAttribute(a),a=a[f]||"",f=!1);!e&&f&&void 0!==a.pathname&&(a=a.toString());if("string"===typeof a||a instanceof String)this._parts=d.parse(String(a),this._parts);else if(e||f)for(c in e=e?a._parts:a,e)r.call(this._parts,c)&&(this._parts[c]=e[c]);else throw new TypeError("invalid input");this.build(!b);return this};e.is=function(a){var b=!1,c=!1,e=!1,f=!1,h=!1,
k=!1,n=!1,p=!this._parts.urn;this._parts.hostname&&(p=!1,c=d.ip4_expression.test(this._parts.hostname),e=d.ip6_expression.test(this._parts.hostname),b=c||e,h=(f=!b)&&g&&g.has(this._parts.hostname),k=f&&d.idn_expression.test(this._parts.hostname),n=f&&d.punycode_expression.test(this._parts.hostname));switch(a.toLowerCase()){case "relative":return p;case "absolute":return!p;case "domain":case "name":return f;case "sld":return h;case "ip":return b;case "ip4":case "ipv4":case "inet4":return c;case "ip6":case "ipv6":case "inet6":return e;
case "idn":return k;case "url":return!this._parts.urn;case "urn":return!!this._parts.urn;case "punycode":return n}return null};var J=e.protocol,K=e.port,L=e.hostname;e.protocol=function(a,b){if(void 0!==a&&a&&(a=a.replace(/:(\/\/)?$/,""),!a.match(d.protocol_expression)))throw new TypeError('Protocol "'+a+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return J.call(this,a,b)};e.scheme=e.protocol;e.port=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0!==
a&&(0===a&&(a=null),a&&(a+="",":"===a.charAt(0)&&(a=a.substring(1)),a.match(/[^0-9]/))))throw new TypeError('Port "'+a+'" contains characters other than [0-9]');return K.call(this,a,b)};e.hostname=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a){var c={};if("/"!==d.parseHost(a,c))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');a=c.hostname}return L.call(this,a,b)};e.origin=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===
a){var c=this.protocol();return this.authority()?(c?c+"://":"")+this.authority():""}c=d(a);this.protocol(c.protocol()).authority(c.authority()).build(!b);return this};e.host=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?d.buildHost(this._parts):"";if("/"!==d.parseHost(a,this._parts))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');this.build(!b);return this};e.authority=function(a,b){if(this._parts.urn)return void 0===
a?"":this;if(void 0===a)return this._parts.hostname?d.buildAuthority(this._parts):"";if("/"!==d.parseAuthority(a,this._parts))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');this.build(!b);return this};e.userinfo=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){var c=d.buildUserinfo(this._parts);return c?c.substring(0,c.length-1):c}"@"!==a[a.length-1]&&(a+="@");d.parseUserinfo(a,this._parts);this.build(!b);return this};e.resource=function(a,
b){var c;if(void 0===a)return this.path()+this.search()+this.hash();c=d.parse(a);this._parts.path=c.path;this._parts.query=c.query;this._parts.fragment=c.fragment;this.build(!b);return this};e.subdomain=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,c)||""}c=this._parts.hostname.length-this.domain().length;c=this._parts.hostname.substring(0,
c);c=new RegExp("^"+h(c));a&&"."!==a.charAt(a.length-1)&&(a+=".");a&&d.ensureValidHostname(a);this._parts.hostname=this._parts.hostname.replace(c,a);this.build(!b);return this};e.domain=function(a,b){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(b=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.match(/\./g);if(c&&2>c.length)return this._parts.hostname;c=this._parts.hostname.length-this.tld(b).length-1;c=this._parts.hostname.lastIndexOf(".",
c-1)+1;return this._parts.hostname.substring(c)||""}if(!a)throw new TypeError("cannot set domain empty");d.ensureValidHostname(a);!this._parts.hostname||this.is("IP")?this._parts.hostname=a:(c=new RegExp(h(this.domain())+"$"),this._parts.hostname=this._parts.hostname.replace(c,a));this.build(!b);return this};e.tld=function(a,b){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(b=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.lastIndexOf("."),
c=this._parts.hostname.substring(c+1);return!0!==b&&g&&g.list[c.toLowerCase()]?g.get(this._parts.hostname)||c:c}if(a)if(a.match(/[^a-zA-Z0-9-]/))if(g&&g.is(a))c=new RegExp(h(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(c,a);else throw new TypeError('TLD "'+a+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");c=new RegExp(h(this.tld())+"$");this._parts.hostname=this._parts.hostname.replace(c,
a)}else throw new TypeError("cannot set TLD empty");this.build(!b);return this};e.directory=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var c=this._parts.path.length-this.filename().length-1,c=this._parts.path.substring(0,c)||(this._parts.hostname?"/":"");return a?d.decodePath(c):c}c=this._parts.path.length-this.filename().length;c=this._parts.path.substring(0,c);c=new RegExp("^"+
h(c));this.is("relative")||(a||(a="/"),"/"!==a.charAt(0)&&(a="/"+a));a&&"/"!==a.charAt(a.length-1)&&(a+="/");a=d.recodePath(a);this._parts.path=this._parts.path.replace(c,a);this.build(!b);return this};e.filename=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var c=this._parts.path.lastIndexOf("/"),c=this._parts.path.substring(c+1);return a?d.decodePathSegment(c):c}c=!1;"/"===a.charAt(0)&&(a=a.substring(1));a.match(/\.?\//)&&
(c=!0);var e=new RegExp(h(this.filename())+"$");a=d.recodePath(a);this._parts.path=this._parts.path.replace(e,a);c?this.normalizePath(b):this.build(!b);return this};e.suffix=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var c=this.filename(),e=c.lastIndexOf(".");if(-1===e)return"";c=c.substring(e+1);c=/^[a-z0-9%]+$/i.test(c)?c:"";return a?d.decodePathSegment(c):c}"."===a.charAt(0)&&(a=a.substring(1));if(c=this.suffix())e=
a?new RegExp(h(c)+"$"):new RegExp(h("."+c)+"$");else{if(!a)return this;this._parts.path+="."+d.recodePath(a)}e&&(a=d.recodePath(a),this._parts.path=this._parts.path.replace(e,a));this.build(!b);return this};e.segment=function(a,b,c){var d=this._parts.urn?":":"/",e=this.path(),f="/"===e.substring(0,1),e=e.split(d);void 0!==a&&"number"!==typeof a&&(c=b,b=a,a=void 0);if(void 0!==a&&"number"!==typeof a)throw Error('Bad segment "'+a+'", must be 0-based integer');f&&e.shift();0>a&&(a=Math.max(e.length+
a,0));if(void 0===b)return void 0===a?e:e[a];if(null===a||void 0===e[a])if(p(b)){e=[];a=0;for(var g=b.length;a<g;a++)if(b[a].length||e.length&&e[e.length-1].length)e.length&&!e[e.length-1].length&&e.pop(),e.push(C(b[a]))}else{if(b||"string"===typeof b)b=C(b),""===e[e.length-1]?e[e.length-1]=b:e.push(b)}else b?e[a]=C(b):e.splice(a,1);f&&e.unshift("");return this.path(e.join(d),c)};e.segmentCoded=function(a,b,c){var e,f;"number"!==typeof a&&(c=b,b=a,a=void 0);if(void 0===b){a=this.segment(a,b,c);if(p(a))for(e=
0,f=a.length;e<f;e++)a[e]=d.decode(a[e]);else a=void 0!==a?d.decode(a):void 0;return a}if(p(b))for(e=0,f=b.length;e<f;e++)b[e]=d.encode(b[e]);else b="string"===typeof b||b instanceof String?d.encode(b):b;return this.segment(a,b,c)};var M=e.query;e.query=function(a,b){if(!0===a)return d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"===typeof a){var c=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace),e=a.call(this,c);this._parts.query=d.buildQuery(e||c,this._parts.duplicateQueryParameters,
this._parts.escapeQuerySpace);this.build(!b);return this}return void 0!==a&&"string"!==typeof a?(this._parts.query=d.buildQuery(a,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!b),this):M.call(this,a,b)};e.setQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"===typeof a||a instanceof String)e[a]=void 0!==b?b:null;else if("object"===typeof a)for(var f in a)r.call(a,f)&&(e[f]=a[f]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");
this._parts.query=d.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(c=b);this.build(!c);return this};e.addQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);d.addQuery(e,a,void 0===b?null:b);this._parts.query=d.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(c=b);this.build(!c);return this};e.removeQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,
this._parts.escapeQuerySpace);d.removeQuery(e,a,b);this._parts.query=d.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(c=b);this.build(!c);return this};e.hasQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return d.hasQuery(e,a,b,c)};e.setSearch=e.setQuery;e.addSearch=e.addQuery;e.removeSearch=e.removeQuery;e.hasSearch=e.hasQuery;e.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():
this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()};e.normalizeProtocol=function(a){"string"===typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!a));return this};e.normalizeHostname=function(a){this._parts.hostname&&(this.is("IDN")&&k?this._parts.hostname=k.toASCII(this._parts.hostname):this.is("IPv6")&&n&&(this._parts.hostname=n.best(this._parts.hostname)),this._parts.hostname=
this._parts.hostname.toLowerCase(),this.build(!a));return this};e.normalizePort=function(a){"string"===typeof this._parts.protocol&&this._parts.port===d.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!a));return this};e.normalizePath=function(a){var b=this._parts.path;if(!b)return this;if(this._parts.urn)return this._parts.path=d.recodeUrnPath(this._parts.path),this.build(!a),this;if("/"===this._parts.path)return this;var b=d.recodePath(b),c,e="",f,g;"/"!==b.charAt(0)&&(c=!0,
b="/"+b);if("/.."===b.slice(-3)||"/."===b.slice(-2))b+="/";b=b.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/");c&&(e=b.substring(1).match(/^(\.\.\/)+/)||"")&&(e=e[0]);for(;;){f=b.search(/\/\.\.(\/|$)/);if(-1===f)break;else if(0===f){b=b.substring(3);continue}g=b.substring(0,f).lastIndexOf("/");-1===g&&(g=f);b=b.substring(0,g)+b.substring(f+3)}c&&this.is("relative")&&(b=e+b.substring(1));this._parts.path=b;this.build(!a);return this};e.normalizePathname=e.normalizePath;e.normalizeQuery=
function(a){"string"===typeof this._parts.query&&(this._parts.query.length?this.query(d.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!a));return this};e.normalizeFragment=function(a){this._parts.fragment||(this._parts.fragment=null,this.build(!a));return this};e.normalizeSearch=e.normalizeQuery;e.normalizeHash=e.normalizeFragment;e.iso8859=function(){var a=d.encode,b=d.decode;d.encode=escape;d.decode=decodeURIComponent;try{this.normalize()}finally{d.encode=
a,d.decode=b}return this};e.unicode=function(){var a=d.encode,b=d.decode;d.encode=v;d.decode=unescape;try{this.normalize()}finally{d.encode=a,d.decode=b}return this};e.readable=function(){var a=this.clone();a.username("").password("").normalize();var b="";a._parts.protocol&&(b+=a._parts.protocol+"://");a._parts.hostname&&(a.is("punycode")&&k?(b+=k.toUnicode(a._parts.hostname),a._parts.port&&(b+=":"+a._parts.port)):b+=a.host());a._parts.hostname&&a._parts.path&&"/"!==a._parts.path.charAt(0)&&(b+="/");
b+=a.path(!0);if(a._parts.query){for(var c="",e=0,f=a._parts.query.split("&"),g=f.length;e<g;e++){var h=(f[e]||"").split("="),c=c+("&"+d.decodeQuery(h[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"));void 0!==h[1]&&(c+="="+d.decodeQuery(h[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}b+="?"+c.substring(1)}return b+=d.decodeQuery(a.hash(),!0)};e.absoluteTo=function(a){var b=this.clone(),c=["protocol","username","password","hostname","port"],e,f;if(this._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");
a instanceof d||(a=new d(a));b._parts.protocol||(b._parts.protocol=a._parts.protocol);if(this._parts.hostname)return b;for(e=0;f=c[e];e++)b._parts[f]=a._parts[f];b._parts.path?".."===b._parts.path.substring(-2)&&(b._parts.path+="/"):(b._parts.path=a._parts.path,b._parts.query||(b._parts.query=a._parts.query));"/"!==b.path().charAt(0)&&(c=(c=a.directory())?c:0===a.path().indexOf("/")?"/":"",b._parts.path=(c?c+"/":"")+b._parts.path,b.normalizePath());b.build();return b};e.relativeTo=function(a){var b=
this.clone().normalize(),c,e,f;if(b._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");a=(new d(a)).normalize();c=b._parts;e=a._parts;f=b.path();a=a.path();if("/"!==f.charAt(0))throw Error("URI is already relative");if("/"!==a.charAt(0))throw Error("Cannot calculate a URI relative to another relative URI");c.protocol===e.protocol&&(c.protocol=null);if(c.username===e.username&&c.password===e.password&&null===c.protocol&&null===c.username&&null===c.password&&c.hostname===
e.hostname&&c.port===e.port)c.hostname=null,c.port=null;else return b.build();if(f===a)return c.path="",b.build();f=d.commonPath(f,a);if(!f)return b.build();e=e.path.substring(f.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");c.path=e+c.path.substring(f.length)||"./";return b.build()};e.equals=function(a){var b=this.clone(),c=new d(a),e;a={};var f,g;b.normalize();c.normalize();if(b.toString()===c.toString())return!0;f=b.query();e=c.query();b.query("");c.query("");if(b.toString()!==c.toString()||
f.length!==e.length)return!1;b=d.parseQuery(f,this._parts.escapeQuerySpace);e=d.parseQuery(e,this._parts.escapeQuerySpace);for(g in b)if(r.call(b,g)){if(!p(b[g])){if(b[g]!==e[g])return!1}else if(!B(b[g],e[g]))return!1;a[g]=!0}for(g in e)if(r.call(e,g)&&!a[g])return!1;return!0};e.duplicateQueryParameters=function(a){this._parts.duplicateQueryParameters=!!a;return this};e.escapeQuerySpace=function(a){this._parts.escapeQuerySpace=!!a;return this};return d});

/*! URI.js v1.18.0 http://medialize.github.io/URI.js/ */
/* build contains: jquery.URI.js */
(function(d,e){"object"===typeof exports?module.exports=e(require("jquery"),require("./URI")):"function"===typeof define&&define.amd?define(["jquery","./URI"],e):e(d.jQuery,d.URI)})(this,function(d,e){function h(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function k(a){var b=a.nodeName.toLowerCase();return"input"===b&&"image"!==a.type?void 0:e.domAttributes[b]}function p(a){return{get:function(b){return d(b).uri()[a]()},set:function(b,c){d(b).uri()[a](c);return c}}}function l(a,b){var c,
e,f;if(!k(a)||!b)return!1;c=b.match(q);if(!c||!c[5]&&":"!==c[2]&&!g[c[2]])return!1;f=d(a).uri();if(c[5])return f.is(c[5]);if(":"===c[2])return e=c[1].toLowerCase()+":",g[e]?g[e](f,c[4]):!1;e=c[1].toLowerCase();return m[e]?g[c[2]](f[e](),c[4],e):!1}var m={},g={"=":function(a,b){return a===b},"^=":function(a,b){return!!(a+"").match(new RegExp("^"+h(b),"i"))},"$=":function(a,b){return!!(a+"").match(new RegExp(h(b)+"$","i"))},"*=":function(a,b,c){"directory"===c&&(a+="/");return!!(a+"").match(new RegExp(h(b),
"i"))},"equals:":function(a,b){return a.equals(b)},"is:":function(a,b){return a.is(b)}};d.each("origin authority directory domain filename fragment hash host hostname href password path pathname port protocol query resource scheme search subdomain suffix tld username".split(" "),function(a,b){m[b]=!0;d.attrHooks["uri:"+b]=p(b)});var r=function(a,b){return d(a).uri().href(b).toString()};d.each(["src","href","action","uri","cite"],function(a,b){d.attrHooks[b]={set:r}});d.attrHooks.uri.get=function(a){return d(a).uri()};
d.fn.uri=function(a){var b=this.first(),c=b.get(0),d=k(c);if(!d)throw Error('Element "'+c.nodeName+'" does not have either property: href, src, action, cite');if(void 0!==a){var f=b.data("uri");if(f)return f.href(a);a instanceof e||(a=e(a||""))}else{if(a=b.data("uri"))return a;a=e(b.attr(d)||"")}a._dom_element=c;a._dom_attribute=d;a.normalize();b.data("uri",a);return a};e.prototype.build=function(a){if(this._dom_element)this._string=e.build(this._parts),this._deferred_build=!1,this._dom_element.setAttribute(this._dom_attribute,
this._string),this._dom_element[this._dom_attribute]=this._string;else if(!0===a)this._deferred_build=!0;else if(void 0===a||this._deferred_build)this._string=e.build(this._parts),this._deferred_build=!1;return this};var n,q=/^([a-zA-Z]+)\s*([\^\$*]?=|:)\s*(['"]?)(.+)\3|^\s*([a-zA-Z0-9]+)\s*$/;n=d.expr.createPseudo?d.expr.createPseudo(function(a){return function(b){return l(b,a)}}):function(a,b,c){return l(a,c[3])};d.expr[":"].uri=n;return d});

function SearchController() {
    var _this = this;

    _this.ajaxType = 7383;

    this.init = function() {
        jQuery("body").delegate("a.solr-ajaxified", "click", _this.handleClickOnAjaxifiedUri);
    };

    this.handleClickOnAjaxifiedUri = function() {
        var clickedLink = jQuery(this);

        var solrContainer = clickedLink.closest(".tx_solr");
        var solrParent = solrContainer.parent();

        var loader = jQuery("<div class='tx-solr-loader'></div>");
        var uri = clickedLink.uri();

        solrParent.append(loader);
        uri.addQuery("type", _this.ajaxType);

        jQuery.get(
            uri.href(),
            function(data) {
                solrContainer = solrContainer.replaceWith(data);
                _this.scrollToTopOfElement(solrParent, 50);
                jQuery("body").trigger("tx_solr_updated");
                loader.fadeOut().remove();
            }
        );
        return false;
    };

    this.scrollToTopOfElement = function(element, deltaTop) {
        jQuery('html, body').animate({
            scrollTop: (element.offset().top - deltaTop) + 'px'
        }, 'slow');
    };

    this.setAjaxType = function(ajaxType) {
        _this.ajaxType = ajaxType;
    };
}

jQuery(document).ready(function() {
    var solrSearchController = new SearchController();
    solrSearchController.init();

    if(typeof solrSearchAjaxType !== "undefined") {
        solrSearchController.setAjaxType(solrSearchAjaxType);
    }
});

(function(undefined) {if (!("document"in this
)) {"undefined"==typeof WorkerGlobalScope&&"function"!=typeof importScripts&&(this.HTMLDocument?this.Document=this.HTMLDocument:(this.Document=this.HTMLDocument=document.constructor=new Function("return function Document() {}")(),this.Document.prototype=document));}if (!("Element"in this&&"HTMLElement"in this
)) {!function(){function e(){return a--||clearTimeout(t),!(!document.body||document.body.prototype||!/(complete|interactive)/.test(document.readyState))&&(m(document,!0),t&&document.body.prototype&&clearTimeout(t),!!document.body.prototype)}if(window.Element&&!window.HTMLElement)return void(window.HTMLElement=window.Element);window.Element=window.HTMLElement=new Function("return function Element() {}")();var t,n=document.appendChild(document.createElement("body")),o=n.appendChild(document.createElement("iframe")),r=o.contentWindow.document,c=Element.prototype=r.appendChild(r.createElement("*")),d={},m=function(e,t){var n,o,r,c=e.childNodes||[],u=-1;if(1===e.nodeType&&e.constructor!==Element){e.constructor=Element;for(n in d)o=d[n],e[n]=o}for(;r=t&&c[++u];)m(r,t);return e},u=document.getElementsByTagName("*"),i=document.createElement,a=100;c.attachEvent("onpropertychange",function(e){for(var t,n=e.propertyName,o=!d.hasOwnProperty(n),r=c[n],m=d[n],i=-1;t=u[++i];)1===t.nodeType&&(o||t[n]===m)&&(t[n]=r);d[n]=r}),c.constructor=Element,c.hasAttribute||(c.hasAttribute=function l(e){return null!==this.getAttribute(e)}),e()||(document.onreadystatechange=e,t=setInterval(e,25)),document.createElement=function p(e){var t=i(String(e).toLowerCase());return m(t)},document.removeChild(n)}();}if (!("defineProperty"in Object&&function(){try{var e={}
        return Object.defineProperty(e,"test",{value:42}),!0}catch(t){return!1}}()
)) {!function(e){var t=Object.prototype.hasOwnProperty("__defineGetter__"),r="A property cannot both have accessors and be writable or have a value";Object.defineProperty=function n(o,i,c){if(e&&(o===window||o===document||o===Element.prototype||o instanceof Element))return e(o,i,c);if(null===o||!(o instanceof Object||"object"==typeof o))throw new TypeError("Object.defineProperty called on non-object");if(!(c instanceof Object))throw new TypeError("Property description must be an object");var a=String(i),f="value"in c||"writable"in c,p="get"in c&&typeof c.get,s="set"in c&&typeof c.set;if(p){if("function"!==p)throw new TypeError("Getter must be a function");if(!t)throw new TypeError("Getters & setters cannot be defined on this javascript engine");if(f)throw new TypeError(r);Object.__defineGetter__.call(o,a,c.get)}else o[a]=c.value;if(s){if("function"!==s)throw new TypeError("Setter must be a function");if(!t)throw new TypeError("Getters & setters cannot be defined on this javascript engine");if(f)throw new TypeError(r);Object.__defineSetter__.call(o,a,c.set)}return"value"in c&&(o[a]=c.value),o}}(Object.defineProperty);}if (!("Window"in this
)) {"undefined"==typeof WorkerGlobalScope&&"function"!=typeof importScripts&&function(o){o.constructor?o.Window=o.constructor:(o.Window=o.constructor=new Function("return function Window() {}")()).prototype=this}(this);}if (!((function(n){if(!("Event"in n))return!1
        try{return new Event("click"),!0}catch(t){return!1}})(this)
)) {!function(){function e(e,t){for(var n=-1,o=e.length;++n<o;)if(n in e&&e[n]===t)return n;return-1}function t(e,t){if(!e)throw new Error("Not enough arguments");var n;if("createEvent"in document){n=document.createEvent("Event");var o=!(!t||t.bubbles===undefined)&&t.bubbles,i=!(!t||t.cancelable===undefined)&&t.cancelable;return n.initEvent(e,o,i),n}return n=document.createEventObject(),n.type=e,n.bubbles=!(!t||t.bubbles===undefined)&&t.bubbles,n.cancelable=!(!t||t.cancelable===undefined)&&t.cancelable,n}var n={click:1,dblclick:1,keyup:1,keypress:1,keydown:1,mousedown:1,mouseup:1,mousemove:1,mouseover:1,mouseenter:1,mouseleave:1,mouseout:1,storage:1,storagecommit:1,textinput:1};if("undefined"!=typeof document&&"undefined"!=typeof window){var o=window.Event&&window.Event.prototype||null;t.NONE=0,t.CAPTURING_PHASE=1,t.AT_TARGET=2,t.BUBBLING_PHASE=3,window.Event=Window.prototype.Event=t,o&&Object.defineProperty(window.Event,"prototype",{configurable:!1,enumerable:!1,writable:!0,value:o}),"createEvent"in document||(window.addEventListener=Window.prototype.addEventListener=Document.prototype.addEventListener=Element.prototype.addEventListener=function i(){var t=this,o=arguments[0],i=arguments[1];if(t===window&&o in n)throw new Error("In IE8 the event: "+o+" is not available on the window object. Please see https://github.com/Financial-Times/polyfill-service/issues/317 for more information.");t._events||(t._events={}),t._events[o]||(t._events[o]=function(n){var o,i=t._events[n.type].list,r=i.slice(),c=-1,a=r.length;for(n.preventDefault=function l(){!1!==n.cancelable&&(n.returnValue=!1)},n.stopPropagation=function s(){n.cancelBubble=!0},n.stopImmediatePropagation=function u(){n.cancelBubble=!0,n.cancelImmediate=!0},n.currentTarget=t,n.relatedTarget=n.fromElement||null,n.target=n.target||n.srcElement||t,n.timeStamp=(new Date).getTime(),n.clientX&&(n.pageX=n.clientX+document.documentElement.scrollLeft,n.pageY=n.clientY+document.documentElement.scrollTop);++c<a&&!n.cancelImmediate;)c in r&&(o=r[c],-1!==e(i,o)&&"function"==typeof o&&o.call(t,n))},t._events[o].list=[],t.attachEvent&&t.attachEvent("on"+o,t._events[o])),t._events[o].list.push(i)},window.removeEventListener=Window.prototype.removeEventListener=Document.prototype.removeEventListener=Element.prototype.removeEventListener=function r(){var t,n=this,o=arguments[0],i=arguments[1];n._events&&n._events[o]&&n._events[o].list&&-1!==(t=e(n._events[o].list,i))&&(n._events[o].list.splice(t,1),n._events[o].list.length||(n.detachEvent&&n.detachEvent("on"+o,n._events[o]),delete n._events[o]))},window.dispatchEvent=Window.prototype.dispatchEvent=Document.prototype.dispatchEvent=Element.prototype.dispatchEvent=function c(e){if(!arguments.length)throw new Error("Not enough arguments");if(!e||"string"!=typeof e.type)throw new Error("DOM Events Exception 0");var t=this,n=e.type;try{if(!e.bubbles){e.cancelBubble=!0;var o=function(e){e.cancelBubble=!0,(t||window).detachEvent("on"+n,o)};this.attachEvent("on"+n,o)}this.fireEvent("on"+n,e)}catch(i){e.target=t;do{e.currentTarget=t,"_events"in t&&"function"==typeof t._events[n]&&t._events[n].call(t,e),"function"==typeof t["on"+n]&&t["on"+n].call(t,e),t=9===t.nodeType?t.parentWindow:t.parentNode}while(t&&!e.cancelBubble)}return!0},document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&document.dispatchEvent(new t("DOMContentLoaded",{bubbles:!0}))}))}}();}if (!("CustomEvent"in this&&("function"==typeof this.CustomEvent||this.CustomEvent.toString().indexOf("CustomEventConstructor")>-1)
)) {this.CustomEvent=function e(t,n){if(!t)throw Error('TypeError: Failed to construct "CustomEvent": An event name must be provided.');var l;if(n=n||{bubbles:!1,cancelable:!1,detail:null},"createEvent"in document)try{l=document.createEvent("CustomEvent"),l.initCustomEvent(t,n.bubbles,n.cancelable,n.detail)}catch(a){l=document.createEvent("Event"),l.initEvent(t,n.bubbles,n.cancelable),l.detail=n.detail}else l=new Event(t,n),l.detail=n&&n.detail||null;return l},CustomEvent.prototype=Event.prototype;}}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
console.log('polyfill js for Event and CustomEvent added.');
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=46)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var o=function(){function e(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.group=(t||"").trim().toLowerCase(),this.name=(r||"default").trim(),this.controls=n||[],this.deepLinkParams=[],o&&o.has(this.group)&&(this.deepLinkParams=o.get(this.group)||[])}return n(e,[{key:"addControl",value:function(e){e&&e.name===this.name&&e.group===this.group&&this.controls.push(e)}},{key:"getDeepLink",value:function(){return""}}]),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(this.element=t,this.element.initialHTML=t.outerHTML,this.type=(t.getAttribute("data-jplist-control")||"").trim().toLowerCase(),this.group=(t.getAttribute("data-group")||"").trim().toLowerCase(),this.name=(t.getAttribute("data-name")||t.getAttribute("name")||"default").trim(),this.id=(t.getAttribute("data-id")||"").trim().toLowerCase(),this.jump=(t.getAttribute("data-jump")||"").trim())}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(0)),i=a(r(8));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"getSortOptions",value:function(){var e=[],t=!0,r=!1,n=void 0;try{for(var o,i=this.controls[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e=e.concat(a.getSortOptions())}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return e}},{key:"addControl",value:function(e){if(e.name!==this.name||e.group!==this.group)return null;var t=new i.default(e.element);return this.controls.push(t),t}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(0)),i=a(r(4));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"addControl",value:function(e){if(e.name!==this.name||e.group!==this.group)return null;var t=new i.default(e.element);return this.controls.push(t),t}},{key:"getPathFilterOptions",value:function(){var e=[],t=!0,r=!1,n=void 0;try{for(var o,i=this.controls[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e=e.concat(a.getPathFilterOptions())}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return e}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),a=(n=i)&&n.__esModule?n:{default:n};var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e&&(r.path=(e.getAttribute("data-path")||"").trim(),r.isInverted="true"===(e.getAttribute("data-inverted")||"").toLowerCase().trim(),r.or=e.getAttribute("data-or")||null),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),o(t,[{key:"getPathFilterOptions",value:function(){return{path:this.path,isInverted:this.isInverted,or:this.or}}},{key:"isEqualTo",value:function(e){return this.path===e.path&&this.isInverted===e.isInverted}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(0)),i=a(r(13));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"getTextFilterOptions",value:function(){var e=[],t=!0,r=!1,n=void 0;try{for(var o,i=this.controls[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e=e.concat(a.getTextFilterOptions())}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return e}},{key:"addControl",value:function(e){if(e.name!==this.name||e.group!==this.group)return null;var t=new i.default(e.element);return this.controls.push(t),t}},{key:"getDeepLink",value:function(){var e=this.controls.map(function(e){return e.id&&""!==e.text.trim()?e.id+"="+e.text.trim():""}).filter(function(e){return""!==e});return Array.from(new Set(e)).join("&")}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();r(53);var o=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t){if(this.element=t,!this.element)return;this.panels=this.element.querySelectorAll('[data-type="panel"]'),this.element.openedClass=(this.element.getAttribute("data-opened-class")||"jplist-dd-opened").trim();var r=!0,n=!1,o=void 0;try{for(var i,a=this.panels[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value;l.initialContent=l.innerHTML,l.element=t}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}this.contents=this.element.querySelectorAll('[data-type="content"]'),this.handlePanelsClick()}}return n(e,[{key:"handlePanelsClick",value:function(){var e=this;if(this.panels&&!(this.panels.length<=0)){var t=!0,r=!1,n=void 0;try{for(var o,i=function(){var t=o.value;t.addEventListener("click",function(r){var n=!1,o=!0,i=!1,a=void 0;try{for(var l,u=e.contents[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var s=l.value;s.classList.toggle(t.element.openedClass),s.classList.contains(t.element.openedClass)&&(n=!0)}}catch(e){i=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(i)throw a}}n?(t.classList.add(t.element.openedClass),t.element.classList.add(t.element.openedClass)):(t.classList.remove(t.element.openedClass),t.element.classList.remove(t.element.openedClass))})},a=this.panels[Symbol.iterator]();!(t=(o=a.next()).done);t=!0)i()}catch(e){r=!0,n=e}finally{try{!t&&a.return&&a.return()}finally{if(r)throw n}}document.addEventListener("click",function(t){e.element.contains(t.target)||e.close()})}}},{key:"setPanelsContent",value:function(e){var t=!0,r=!1,n=void 0;try{for(var o,i=this.panels[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){o.value.innerHTML=e}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}}},{key:"restorePanelsContent",value:function(){var e=!0,t=!1,r=void 0;try{for(var n,o=this.panels[Symbol.iterator]();!(e=(n=o.next()).done);e=!0){var i=n.value;i.initialContent&&(i.innerHTML=i.initialContent)}}catch(e){t=!0,r=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw r}}}},{key:"close",value:function(){var e=!0,t=!1,r=void 0;try{for(var n,o=this.contents[Symbol.iterator]();!(e=(n=o.next()).done);e=!0){n.value.classList.remove(this.panels[0].element.openedClass)}}catch(e){t=!0,r=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw r}}var i=!0,a=!1,l=void 0;try{for(var u,s=this.panels[Symbol.iterator]();!(i=(u=s.next()).done);i=!0){var c=u.value;c.classList.remove(c.element.openedClass),c.element.classList.remove(c.element.openedClass)}}catch(e){a=!0,l=e}finally{try{!i&&s.return&&s.return()}finally{if(a)throw l}}}}]),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.default=function(e){return function(t){function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t,n,o));return i.group=e,i.name=t,i.checkboxes=[],i.radios=[],i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),n(r,[{key:"addControl",value:function(e){var t=this,n=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0}(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"addControl",this).call(this,e);if(n.selected="true"===n.element.getAttribute("data-selected"),n.mode=n.element.getAttribute("data-mode")||"radio",n.id){var o=this.deepLinkParams.find(function(e){return e.key===n.id});o&&(n.selected="1"===o.value)}"radio"===n.mode&&(this.radios.push(n),this.handleRadios()),"checkbox"===n.mode&&(this.checkboxes.push(n),this.handleCheckboxes()),n.element.addEventListener("click",function(e){if(e.preventDefault(),"checkbox"===n.mode&&(n.selected=!n.selected,t.checkboxes.forEach(function(e){e.isEqualTo(n)&&(e.selected=n.selected)}),t.handleCheckboxes()),"radio"===n.mode){var r=!0,o=!1,i=void 0;try{for(var a,l=t.radios[Symbol.iterator]();!(r=(a=l.next()).done);r=!0)a.value.selected=!1}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}n.selected=!0,t.handleRadios()}window.jplist&&window.jplist.refresh(t.group,n)})}},{key:"handleCheckboxes",value:function(){var e=!0,t=!1,r=void 0;try{for(var n,o=this.checkboxes[Symbol.iterator]();!(e=(n=o.next()).done);e=!0){var i=n.value;i.selected?i.element.classList.add("jplist-selected"):i.element.classList.remove("jplist-selected"),i.element.checked=i.selected}}catch(e){t=!0,r=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw r}}}},{key:"getLastSelectedRadio",value:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var o,i=this.radios[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;a.selected&&(e=a)}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return e}},{key:"handleRadios",value:function(){if(this.radios.length>0){var e=this.getLastSelectedRadio(),t=!0,r=!1,n=void 0;try{for(var o,i=this.radios[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;a.selected=!1,a.element.classList.remove("jplist-selected")}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}e&&this.radios.forEach(function(t){t.isEqualTo(e)&&(t.selected=!0,t.element.checked=!0,t.element.classList.add("jplist-selected"))})}}},{key:"getDeepLink",value:function(){var e=this.checkboxes.map(function(e){return e.id?e.selected?e.id+"=1":e.id+"=0":""}).filter(function(e){return""!==e}),t=this.radios.map(function(e){return e.id&&e.selected?e.id+"=1":""}).filter(function(e){return""!==e}),r=e.concat(t);return Array.from(new Set(r)).join("&")}}]),r}()}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),a=(n=i)&&n.__esModule?n:{default:n};var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(e){r.path=(e.getAttribute("data-path")||"").trim(),r.dataType=(e.getAttribute("data-type")||"text").trim().toLowerCase(),r.order=(e.getAttribute("data-order")||"asc").trim().toLowerCase(),r.regex=e.getAttribute("data-regex")||"",r.dateTimeFormat=(e.getAttribute("data-date-format")||"").trim().toLowerCase(),r.multipleSortsNumber=r.getMultipleSortsNumber(e);for(var n=1;n<=r.multipleSortsNumber;n++)r["path"+n]=(e.getAttribute("data-path-"+n)||"").trim(),r["dataType"+n]=(e.getAttribute("data-type-"+n)||"text").trim().toLowerCase(),r["order"+n]=(e.getAttribute("data-order-"+n)||"asc").trim().toLowerCase(),r["regex"+n]=e.getAttribute("data-regex-"+n)||"",r["dateTimeFormat"+n]=(e.getAttribute("data-date-format-"+n)||"").trim().toLowerCase()}return r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),o(t,[{key:"getMultipleSortsNumber",value:function(e){var t=0,r=!0,n=!1,o=void 0;try{for(var i,a=e.attributes[Symbol.iterator]();!(r=(i=a.next()).done);r=!0)for(var l=i.value,u=null,s=/^data-path-([0-9]+)$/g;u=s.exec(l.nodeName);){var c=Number(u[1]);Number.isInteger(c)&&t++}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}return t}},{key:"getSortOptions",value:function(){var e=[];if(this.path){e.push({path:this.path,dataType:this.dataType,order:this.order,ignoreRegex:this.ignoreRegex,dateTimeFormat:this.dateTimeFormat});for(var t=1;t<=this.multipleSortsNumber;t++)e.push({path:this["path"+t],dataType:this["dataType"+t],order:this["order"+t],ignoreRegex:this["ignoreRegex"+t],dateTimeFormat:this["dateTimeFormat"+t]})}return e}},{key:"isEqualTo",value:function(e){for(var t=!0,r=["path","dataType","order","regex","dateTimeFormat"],n=0;n<r.length;n++)t=t&&this[r[n]]===e[r[n]];t=t&&this.multipleSortsNumber===e.multipleSortsNumber;for(var o=1;o<=this.multipleSortsNumber;o++)for(var i=0;i<r.length;i++)t=t&&this[r[i]+o]===e[r[i]+o];return t}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),a=(n=i)&&n.__esModule?n:{default:n};var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(e){r.path=(e.getAttribute("data-path")||"").trim();var n=e.getAttribute("data-from");r.from=null===n?-1/0:Number(n),isNaN(r.from)&&(r.from=-1/0);var o=e.getAttribute("data-to");r.to=null===o?1/0:Number(o),isNaN(r.to)&&(r.to=1/0);var i=e.getAttribute("data-min");r.min=null===i?r.from:Number(i),isNaN(r.min)&&(r.min=r.from);var a=e.getAttribute("data-max");r.max=null===a?r.to:Number(a),isNaN(r.max)&&(r.max=r.to),r.or=e.getAttribute("data-or")||null}return r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),o(t,[{key:"getRangeFilterOptions",value:function(){return{path:this.path,min:this.min,from:this.from,to:this.to,max:this.max,or:this.or}}},{key:"isEqualTo",value:function(e){return this.path===e.path&&this.from===e.from&&this.to===e.to&&this.min===e.min&&this.max===e.max}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(0)),i=a(r(9));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"addControl",value:function(e){if(e.name!==this.name||e.group!==this.group)return null;var t=new i.default(e.element);return this.controls.push(t),t}},{key:"getRangeFilterOptions",value:function(){var e=[],t=!0,r=!1,n=void 0;try{for(var o,i=this.controls[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e=e.concat(a.getRangeFilterOptions())}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return e}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.default=function(e){return function(t){function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t,n,o));return i.group=e,i.name=t,i.radios=[],i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),n(r,[{key:"addControl",value:function(e){var t=this,n=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0}(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"addControl",this).call(this,e);if(n.selected=n.element.checked,n.id){var o=this.deepLinkParams.find(function(e){return e.key===n.id});o&&(n.selected="1"===o.value)}this.radios.push(n),this.handleRadios(),n.element.addEventListener("change",function(e){e.preventDefault();var r=!0,o=!1,i=void 0;try{for(var a,l=t.radios[Symbol.iterator]();!(r=(a=l.next()).done);r=!0)a.value.selected=!1}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}n.selected=!0,t.handleRadios(),window.jplist&&window.jplist.refresh(t.group,n)})}},{key:"getLastSelectedRadio",value:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var o,i=this.radios[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;a.selected&&(e=a)}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return e}},{key:"handleRadios",value:function(){if(this.radios.length>0){var e=this.getLastSelectedRadio(),t=!0,r=!1,n=void 0;try{for(var o,i=this.radios[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;a.selected=!1,a.element.classList.remove("jplist-selected")}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}e&&this.radios.forEach(function(t){t.isEqualTo(e)&&(t.selected=!0,t.element.checked=!0,t.element.classList.add("jplist-selected"))})}}},{key:"getDeepLink",value:function(){var e=this.radios.map(function(e){return e.id&&e.selected?e.id+"=1":""}).filter(function(e){return""!==e});return Array.from(new Set(e)).join("&")}}]),r}()}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.default=function(e){return function(t){function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t,n,o));return i.group=e,i.name=t,i.checkboxes=[],i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),n(r,[{key:"addControl",value:function(e){var t=this,n=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0}(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"addControl",this).call(this,e);if(n.selected=n.element.checked,n.id){var o=this.deepLinkParams.find(function(e){return e.key===n.id});o&&(n.selected="1"===o.value)}this.checkboxes.push(n),this.handleCheckboxes(),n.element.addEventListener("change",function(e){e.preventDefault(),n.selected=!n.selected,t.checkboxes.forEach(function(e){e.isEqualTo(n)&&(e.selected=n.selected)}),t.handleCheckboxes(),window.jplist&&window.jplist.refresh(t.group,n)})}},{key:"handleCheckboxes",value:function(){var e=!0,t=!1,r=void 0;try{for(var n,o=this.checkboxes[Symbol.iterator]();!(e=(n=o.next()).done);e=!0){var i=n.value;i.selected?i.element.classList.add("jplist-selected"):i.element.classList.remove("jplist-selected"),i.element.checked=i.selected}}catch(e){t=!0,r=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw r}}}},{key:"getDeepLink",value:function(){var e=this.checkboxes.map(function(e){return e.id?e.selected?e.id+"=1":e.id+"=0":""}).filter(function(e){return""!==e});return Array.from(new Set(e)).join("&")}}]),r}()}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),a=(n=i)&&n.__esModule?n:{default:n};var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e&&(r.path=(e.getAttribute("data-path")||"").trim(),r.initialText=e.getAttribute("data-text")||e.value||"",r._text=(e.getAttribute("data-text")||e.value||"").trim(),r.mode=(e.getAttribute("data-mode")||"contains").trim(),r.regex=e.getAttribute("data-regex")||"",r.or=e.getAttribute("data-or")||null),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),o(t,[{key:"getTextFilterOptions",value:function(){return{path:this.path,text:this.text,mode:this.mode,ignoreRegex:this.regex,or:this.or}}},{key:"isEqualTo",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.path===e.path&&this.mode===e.mode&&this.regex===e.regex;return t&&(r=r&&this.text===e.text),r}},{key:"text",set:function(e){this.initialText=e||"",this._text=(e||"").trim()},get:function(){return this._text}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"textFilter",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"contains",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=[];if(!e)return[];if("default"===r)return e;var a=t.replace(new RegExp(o,"ig"),"").toLowerCase().trim(),l=!0,u=!1,s=void 0;try{for(var c,f=e[Symbol.iterator]();!(l=(c=f.next()).done);l=!0){var d=c.value,p=r?d.querySelectorAll(r):[d];if(p){var h=!1,v=!0,y=!1,b=void 0;try{for(var m,g=p[Symbol.iterator]();!(v=(m=g.next()).done);v=!0){var w=m.value.textContent.replace(new RegExp(o,"ig"),"").toLowerCase().trim();switch(n){case"startsWith":w.startsWith(a)&&(h=!0);break;case"endsWith":w.endsWith(a)&&(h=!0);break;case"equal":w===a&&(h=!0);break;default:-1!==w.indexOf(a)&&(h=!0)}if(h)break}}catch(e){y=!0,b=e}finally{try{!v&&g.return&&g.return()}finally{if(y)throw b}}h&&i.push(d)}}}catch(e){u=!0,s=e}finally{try{!l&&f.return&&f.return()}finally{if(u)throw s}}return i}},{key:"pathFilter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=[];if(!e)return[];if("default"===t||!t)return e;var o=!0,i=!1,a=void 0;try{for(var l,u=e[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var s=l.value,c=s.querySelector(t);(c&&!r||!c&&r)&&n.push(s)}}catch(e){i=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(i)throw a}}return n}},{key:"isNumeric",value:function(e){return!isNaN(parseFloat(e))&&isFinite(e)}},{key:"rangeFilter",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments[2],o=arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:o,l=[];if(!t)return[];if("default"===r)return t;n=Math.max(n,i),o=Math.min(o,a);var u=!0,s=!1,c=void 0;try{for(var f,d=t[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var p=f.value,h=r?p.querySelectorAll(r):[p];if(h){var v=[],y=!0,b=!1,m=void 0;try{for(var g,w=h[Symbol.iterator]();!(y=(g=w.next()).done);y=!0){var O=g.value,_=Number(O.textContent.trim().replace(/[^-0-9.]+/g,""));isNaN(_)||v.push(_)}}catch(e){b=!0,m=e}finally{try{!y&&w.return&&w.return()}finally{if(b)throw m}}if(v.length>0){var j=Math.max.apply(Math,v),P=Math.min.apply(Math,v),k=!0;e.isNumeric(n)&&n>P&&(k=!1),e.isNumeric(o)&&j>o&&(k=!1),k&&l.push(p)}}}}catch(e){s=!0,c=e}finally{try{!u&&d.return&&d.return()}finally{if(s)throw c}}return l}}]),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=s(r(0)),i=s(r(14)),a=s(r(4)),l=s(r(13)),u=s(r(9));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"render",value:function(e){var t=!0,r=!1,n=void 0;try{for(var o,i=this.controls[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;a.element.innerHTML=a.format.replace("{count}",e)}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}}},{key:"addControl",value:function(e){var r=this;(function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addControl",this).call(this,e),e.filterType=e.element.getAttribute("data-filter-type")||"path",e.format=e.element.getAttribute("data-format")||"{count}",e.mode=e.element.getAttribute("data-mode")||"dynamic";var n=null;switch(e.filterType){case"text":n=new l.default(e.element);break;case"path":n=new a.default(e.element);break;case"range":n=new u.default(e.element)}e.element.addEventListener("jplist.state",function(o){if(n&&o.jplistState){var i=0;if("static"===e.mode&&o.jplistState.groups&&o.jplistState.groups.has(e.group)){var a=o.jplistState.groups.get(e.group);i=t.getStaticCounterValue(n,e.filterType,a)}"dynamic"===e.mode&&o.jplistState.filtered&&o.jplistState.filtered.length>0&&(i=t.getDynamicCounterValue(n,e.filterType,o.jplistState.filtered)),r.render(i)}},!1)}}],[{key:"getDynamicCounterValue",value:function(e,r,n){return(n=t.getFilteredItems(e,r,n)).length}},{key:"getStaticCounterValue",value:function(e,r,n){var o=0,i=!0,a=!1,l=void 0;try{for(var u,s=n[Symbol.iterator]();!(i=(u=s.next()).done);i=!0){var c=u.value.items;o+=(c=t.getFilteredItems(e,r,c)).length}}catch(e){a=!0,l=e}finally{try{!i&&s.return&&s.return()}finally{if(a)throw l}}return o}},{key:"getFilteredItems",value:function(e,t,r){switch(t){case"text":r=i.default.textFilter(r,e.text,e.path,e.mode,e.regex);break;case"path":r=i.default.pathFilter(r,e.path,e.isInverted);break;case"range":r=i.default.rangeFilter(r,e.path,e.from,e.to,e.min,e.max)}return r}}]),t}();t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),a=(n=i)&&n.__esModule?n:{default:n};var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),o(t,[{key:"addControl",value:function(e){var r=this;(function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addControl",this).call(this,e),e.element.addEventListener("click",function(t){t.preventDefault(),window.jplist&&window.jplist.resetControls(r.group,e)},!1)}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),a=(n=i)&&n.__esModule?n:{default:n};var l=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,n,o));return i.group=e,i.name=r,i.classNames=new Set,i.selectedClassName="",i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),o(t,[{key:"addControl",value:function(e){var r=this;if(function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addControl",this).call(this,e),e.groupClassName=e.element.getAttribute("data-class")||"",e.selected="true"===e.element.getAttribute("data-selected"),e.id){var n=this.deepLinkParams.find(function(t){return t.key===e.id});n&&(e.selected="1"===n.value)}this.classNames.add(e.groupClassName),e.element.addEventListener("click",function(t){t.preventDefault(),r.handleSelectedControls(e.groupClassName),r.handleClasses(),window.jplist&&window.jplist.refresh(r.group,e)},!1),this.handleClasses()}},{key:"handleClasses",value:function(){var e=document.querySelectorAll('[data-jplist-group="'+this.group+'"]');this.resetAllGroups(e);var r=this.getLatestSelectedControl();r&&(this.handleSelectedControls(r.groupClassName),t.addClassToGroups(r.groupClassName,e))}},{key:"getLatestSelectedControl",value:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var o,i=this.controls[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;a.selected&&(e=a)}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return!e&&this.controls.length>0&&(e=this.controls[0]),e}},{key:"resetAllGroups",value:function(e){var t=!0,r=!1,n=void 0;try{for(var o,i=e[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value,l=!0,u=!1,s=void 0;try{for(var c,f=this.classNames[Symbol.iterator]();!(l=(c=f.next()).done);l=!0){var d=c.value;a.classList.remove(d)}}catch(e){u=!0,s=e}finally{try{!l&&f.return&&f.return()}finally{if(u)throw s}}}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}}},{key:"handleSelectedControls",value:function(e){var t=!0,r=!1,n=void 0;try{for(var o,i=this.controls[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;a.groupClassName===e?(a.selected=!0,a.element.classList.add("jplist-selected")):(a.selected=!1,a.element.classList.remove("jplist-selected"))}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}}},{key:"getDeepLink",value:function(){var e=this.controls.map(function(e){return e.id?e.selected?e.id+"=1":e.id+"=0":""}).filter(function(e){return""!==e});return Array.from(new Set(e)).join("&")}}],[{key:"addClassToGroups",value:function(e,t){var r=!0,n=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){i.value.classList.add(e)}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),a=(n=i)&&n.__esModule?n:{default:n};var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),o(t,[{key:"addControl",value:function(e){(function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addControl",this).call(this,e),e.element.addEventListener("jplist.state",function(t){if(t.jplistState){var r=Number(t.jplistState.itemsNumber)||0;e.element.style.display=0===r?"":"none"}},!1)}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();r(48);var o=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(e,t){};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t){if(this.element=t,this.element.classList.add("jplist-slider"),!this.element)return;this.isVertical=r,this.callback=l,this.min=n,this.max=a,r&&this.element.classList.add("jplist-slider-vertical"),this.handler1=document.createElement("span"),this.handler1.classList.add("jplist-slider-holder-1"),this.element.appendChild(this.handler1),this.range=document.createElement("span"),this.range.classList.add("jplist-slider-range"),this.element.appendChild(this.range),this.handler1.left=0,this.handler1.top=0,this.handler2=document.createElement("span"),this.handler2.classList.add("jplist-slider-holder-2"),this.element.appendChild(this.handler2),this.handler2.left=0,this.handler2.top=0,this.dragging=null,this.handler1.addEventListener("mousedown",this.start.bind(this)),this.handler2.addEventListener("mousedown",this.start.bind(this)),this.handler1.addEventListener("touchstart",this.start.bind(this)),this.handler2.addEventListener("touchstart",this.start.bind(this)),document.addEventListener("mousemove",this.render.bind(this)),document.addEventListener("touchmove",this.render.bind(this)),window.addEventListener("resize",this.resize.bind(this)),document.addEventListener("mouseup",this.stop.bind(this)),document.addEventListener("touchend",this.stop.bind(this)),document.body.addEventListener("mouseleave",this.stop.bind(this)),this.element.addEventListener("mousedown",this.jump.bind(this)),this.setValues(o,i)}}return n(e,[{key:"setValues",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t<e&&(t=e);var n=this.getInnerValue(e,this.min,this.max),o=this.getInnerValue(t,this.min,this.max);this.update({x:o,y:o},this.handler2,r),this.update({x:n,y:n},this.handler1,r)}},{key:"getPreviewValue",value:function(e,t,r){var n=t,o=r;return(e-0)/(this.element.getBoundingClientRect()[this.isVertical?"height":"width"]-0)*(o-n)+n}},{key:"getInnerValue",value:function(e,t,r){return(e-t)/(r-t)*(this.element.getBoundingClientRect()[this.isVertical?"height":"width"]-0)+0}},{key:"jump",value:function(e){e.preventDefault();var t=this.getHandlerPos(e);this.isVertical?this.dragging=Math.abs(t.y-this.handler1.top)<Math.abs(t.y-this.handler2.top)?this.handler1:this.handler2:this.dragging=Math.abs(t.x-this.handler1.left)<Math.abs(t.x-this.handler2.left)?this.handler1:this.handler2,this.render(e)}},{key:"setZIndex",value:function(){var e=window.getComputedStyle&&Number(document.defaultView.getComputedStyle(this.handler1,null).getPropertyValue("z-index"))||200,t=window.getComputedStyle&&Number(document.defaultView.getComputedStyle(this.handler2,null).getPropertyValue("z-index"))||200;if(e===t)this.dragging.style["z-index"]=e+1;else{var r=Math.max(e,t),n=Math.min(e,t);this.handler1.style["z-index"]=n,this.handler2.style["z-index"]=n,this.dragging.style["z-index"]=r}}},{key:"start",value:function(e){e.preventDefault(),e.stopPropagation(),this.dragging=e.target,this.setZIndex(),this.render()}},{key:"stop",value:function(e){this.dragging=null}},{key:"resize",value:function(e){this.handler1&&this.handler2&&this.setValues(this.handler1.value,this.handler2.value)}},{key:"render",value:function(e){e&&this.dragging&&this.update(this.getHandlerPos(e),this.dragging)}},{key:"update",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t){var n=this.element.getBoundingClientRect(),o=this.isVertical?"height":"width",i=this.isVertical?"y":"x",a=this.isVertical?"top":"left";e[i]<0&&(e[i]=0),e[i]>n[o]&&(e[i]=n[o]),t===this.handler1&&e[i]>=this.handler2[a]&&(e[i]=this.handler2[a]),t===this.handler2&&e[i]<=this.handler1[a]&&(e[i]=this.handler1[a]),t[a]=e[i],t.value=this.getPreviewValue(e[i],this.min,this.max),t.style[a]=e[i]+"px",this.range.style[a]=this.handler1[a]+"px";var l=this.handler2[a]-this.handler1[a];this.range.style[o]=(l>=0?l:0)+"px",this.callback&&r&&this.callback(this.handler1.value,this.handler2.value)}}},{key:"getHandlerPos",value:function(t){var r=this.element.getBoundingClientRect(),n={x:t.touches&&t.touches.length>0?t.touches[0].pageX:t.clientX,y:t.touches&&t.touches.length>0?t.touches[0].pageY:t.clientY},o={x:r.left,y:r.top};return e.sub(n,o)}}],[{key:"sub",value:function(e,t){return{x:e.x-t.x,y:e.y-t.y}}}]),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(10)),i=a(r(19));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,n,o));return i.group=e,i.name=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"addControl",value:function(e){var r=this,n=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addControl",this).call(this,e),o=e.element.querySelector('[data-type="slider"]');if(n.val1Elements=e.element.querySelectorAll('[data-type="value-1"]'),n.val2Elements=e.element.querySelectorAll('[data-type="value-2"]'),n.minElements=e.element.querySelectorAll('[data-type="min"]'),n.maxElements=e.element.querySelectorAll('[data-type="max"]'),o){var a=e.element.getAttribute("data-orientation")||"horizontal",l=!0,u=!1,s=void 0;try{for(var c,f=n.minElements[Symbol.iterator]();!(l=(c=f.next()).done);l=!0){c.value.textContent=n.min}}catch(e){u=!0,s=e}finally{try{!l&&f.return&&f.return()}finally{if(u)throw s}}var d=!0,p=!1,h=void 0;try{for(var v,y=n.maxElements[Symbol.iterator]();!(d=(v=y.next()).done);d=!0){v.value.textContent=n.max}}catch(e){p=!0,h=e}finally{try{!d&&y.return&&y.return()}finally{if(p)throw h}}if(n.id){var b=this.deepLinkParams.find(function(e){return e.key===n.id});if(b&&b.value){var m=b.value.split("_");2===m.length&&(n.from=Number(m[0])||0,n.to=Number(m[1])||0)}}n.slider=new i.default(o,"vertical"===a,n.min,n.from,n.to,n.max,function(e,t){var o=!0,i=!1,a=void 0;try{for(var l,u=n.val1Elements[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){l.value.textContent=Math.round(e)}}catch(e){i=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(i)throw a}}var s=!0,c=!1,f=void 0;try{for(var d,p=n.val2Elements[Symbol.iterator]();!(s=(d=p.next()).done);s=!0){d.value.textContent=Math.round(t)}}catch(e){c=!0,f=e}finally{try{!s&&p.return&&p.return()}finally{if(c)throw f}}var h=!0,v=!1,y=void 0;try{for(var b,m=r.controls[Symbol.iterator]();!(h=(b=m.next()).done);h=!0){var g=b.value;g.slider&&g.slider.setValues(e,t,!1)}}catch(e){v=!0,y=e}finally{try{!h&&m.return&&m.return()}finally{if(v)throw y}}window.jplist&&window.jplist.refresh(r.group,n)})}}},{key:"getRangeFilterOptions",value:function(){var e=[],t=!0,r=!1,n=void 0;try{for(var o,i=this.controls[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;if(a.slider&&a.slider.handler1&&a.slider.handler2){var l=a.getRangeFilterOptions();l.from=a.slider.handler1.value,l.to=a.slider.handler2.value,e=e.concat(l)}}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return e}},{key:"getDeepLink",value:function(){var e=this.controls.map(function(e){return e.id&&e.slider&&e.slider.handler1&&e.slider.handler2?e.id+"="+e.slider.handler1.value+"_"+e.slider.handler2.value:""}).filter(function(e){return""!==e});return Array.from(new Set(e)).join("&")}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(10)),i=a(r(7));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,(0,i.default)(o.default)),n(t,[{key:"getRangeFilterOptions",value:function(){var e=[],t=this.getLastSelectedRadio();t&&(e=e.concat(t.getRangeFilterOptions()));var r=!0,n=!1,o=void 0;try{for(var i,a=this.checkboxes[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value;l.selected&&(e=e.concat(l.getRangeFilterOptions()))}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}return e}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=l(r(3)),i=l(r(4)),a=l(r(6));function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,n,o));return i.group=e,i.name=r,i.selected="",i.id="",i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"addControl",value:function(e){var r=this,n=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addControl",this).call(this,e);n.dropdown=new a.default(e.element),n.buttons=[];var o=n.element.querySelectorAll("[data-path]"),l=!0,u=!1,s=void 0;try{for(var c,f=function(){var e=c.value;e.setAttribute("data-name",r.name),e.setAttribute("data-group",r.group),e.setAttribute("data-jump",n.jump);var t=new i.default(e);n.buttons.push(t),t.element.addEventListener("click",function(e){e.preventDefault(),r.selected=t,r.setSelectedButton(n),window.jplist&&window.jplist.refresh(r.group,t)})},d=o[Symbol.iterator]();!(l=(c=d.next()).done);l=!0)f()}catch(e){u=!0,s=e}finally{try{!l&&d.return&&d.return()}finally{if(u)throw s}}if(this.selected=t.getSelectedButton(n.buttons),this.setSelectedButton(n),n.id){this.id=n.id;var p=this.deepLinkParams.find(function(e){return e.key===n.id});if(p){var h=n.buttons.find(function(e){var t=e.element.getAttribute("data-value");return p.value===t?e:null});h&&(this.selected=h,this.setSelectedButton(n))}}}},{key:"getPathFilterOptions",value:function(){return this.selected?[this.selected.getPathFilterOptions()]:[]}},{key:"getDeepLink",value:function(){return this.id&&this.selected&&this.id+"="+this.selected.element.getAttribute("data-value")||""}},{key:"setSelectedButton",value:function(e){var t=this,r=!0,n=!1,o=void 0;try{for(var i,a=this.controls[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value;if(l.dropdown){var u=e.buttons.find(function(e){return t.selected.isEqualTo(e)});u&&l.dropdown.setPanelsContent(u.element.textContent),l.dropdown.close()}}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}}}],[{key:"getSelectedButton",value:function(e){if(e.length<=0)return null;var t=!0,r=!1,n=void 0;try{for(var o,i=e[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;if("true"===a.element.getAttribute("data-selected"))return a}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return e[0]}}]),t}();t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(3)),i=a(r(7));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,(0,i.default)(o.default)),n(t,[{key:"getPathFilterOptions",value:function(){var e=[],t=this.getLastSelectedRadio();t&&(e=e.concat(t.getPathFilterOptions()));var r=!0,n=!1,o=void 0;try{for(var i,a=this.checkboxes[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value;l.selected&&(e=e.concat(l.getPathFilterOptions()))}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}return e}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(3)),i=a(r(11));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,(0,i.default)(o.default)),n(t,[{key:"getPathFilterOptions",value:function(){var e=[],t=this.getLastSelectedRadio();return t&&(e=e.concat(t.getPathFilterOptions())),e}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(3)),i=a(r(12));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,(0,i.default)(o.default)),n(t,[{key:"getPathFilterOptions",value:function(){var e=[],t=!0,r=!1,n=void 0;try{for(var o,i=this.checkboxes[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;a.selected&&(e=e.concat(a.getPathFilterOptions()))}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return e}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(3)),i=a(r(4));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,n,o));return i.group=e,i.name=r,i.options=[],i.selected="",i.id="",i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"addControl",value:function(e){var r=this,n=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addControl",this).call(this,e),o=n.element.querySelectorAll("option"),a=!0,l=!1,u=void 0;try{for(var s,c=function(){var e=s.value;e.setAttribute("data-name",r.name),e.setAttribute("data-group",r.group),r.options.find(function(t){return t.element.value===e.value})||r.options.push(new i.default(e))},f=o[Symbol.iterator]();!(a=(s=f.next()).done);a=!0)c()}catch(e){l=!0,u=e}finally{try{!a&&f.return&&f.return()}finally{if(l)throw u}}if(this.selected=n.element.value,n.id){this.id=n.id;var d=this.deepLinkParams.find(function(e){return e.key===n.id});d&&(n.element.value=d.value,this.selected=d.value)}n.element.addEventListener("change",function(e){e.preventDefault(),r.selected=e.target.value;var t=!0,o=!1,i=void 0;try{for(var a,l=r.controls[Symbol.iterator]();!(t=(a=l.next()).done);t=!0){a.value.element.value=r.selected}}catch(e){o=!0,i=e}finally{try{!t&&l.return&&l.return()}finally{if(o)throw i}}window.jplist&&window.jplist.refresh(r.group,n)})}},{key:"getPathFilterOptions",value:function(){var e=this,t=this.options.find(function(t){return t.element.value===e.selected});return t?[t.getPathFilterOptions()]:[]}},{key:"getDeepLink",value:function(){var e=this,t=this.options.find(function(t){return t.element.value===e.selected});return this.id?this.id+"="+t.element.value:""}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(5)),i=a(r(7));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,(0,i.default)(o.default)),n(t,[{key:"getTextFilterOptions",value:function(){var e=[],t=this.getLastSelectedRadio();t&&(e=e.concat(t.getTextFilterOptions()));var r=!0,n=!1,o=void 0;try{for(var i,a=this.checkboxes[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value;l.selected&&(e=e.concat(l.getTextFilterOptions()))}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}return e}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(5)),i=a(r(11));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,(0,i.default)(o.default)),n(t,[{key:"getTextFilterOptions",value:function(){var e=[],t=this.getLastSelectedRadio();return t&&(e=e.concat(t.getTextFilterOptions())),e}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(5)),i=a(r(12));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,(0,i.default)(o.default)),n(t,[{key:"getTextFilterOptions",value:function(){var e=[],t=!0,r=!1,n=void 0;try{for(var o,i=this.checkboxes[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;a.selected&&(e=e.concat(a.getTextFilterOptions()))}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return e}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(5),a=(n=i)&&n.__esModule?n:{default:n};var l=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,n,o));return i.group=e,i.name=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),o(t,[{key:"addControl",value:function(e){var r=this,n=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addControl",this).call(this,e);if(n.id){var o=this.deepLinkParams.find(function(e){return e.key===n.id});o&&(n.text=o.value,n.element.value=o.value)}if(n.element.addEventListener("keyup",function(e){e.preventDefault(),n.text=e.target.value,r.textChanged(n)}),n.clearButtonID=(n.element.getAttribute("data-clear-btn-id")||"").trim(),n.clearButtonID){var i=document.getElementById(n.clearButtonID);i&&i.addEventListener("click",function(e){e.preventDefault(),n.text="",r.textChanged(n)})}}},{key:"textChanged",value:function(e){this.controls.forEach(function(t){t.isEqualTo(e,!1)&&(t.element.value=e.initialText,t.text=e.initialText)}),window.jplist&&window.jplist.refresh(this.group,e)}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),a=(n=i)&&n.__esModule?n:{default:n};var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e&&(r.itemsPerPage=Number(e.getAttribute("data-items-per-page"))||10,r.currentPage=Number(e.getAttribute("data-current-page"))||0,r.range=Number(e.getAttribute("data-range"))||10,r.disabledClass=(e.getAttribute("data-disabled-class")||"jplist-disabled").trim(),r.selectedClass=(e.getAttribute("data-selected-class")||"jplist-selected").trim()),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),o(t,[{key:"getPaginationOptions",value:function(){return{itemsPerPage:this.itemsPerPage,currentPage:this.currentPage,range:this.range}}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(0)),i=a(r(31));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"getPaginationOptions",value:function(){return this.controls.length>0?this.controls[this.controls.length-1].getPaginationOptions():null}},{key:"setPaginationOptions",value:function(e){}},{key:"addControl",value:function(e){if(e.name!==this.name||e.group!==this.group)return null;var t=new i.default(e.element);return this.controls.push(t),t}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(32)),i=a(r(6));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,n,o));return i.currentPage=0,i.itemsPerPage=0,i.range=0,i.id="",i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"addControl",value:function(e){var r=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addControl",this).call(this,e);if(this.currentPage=r.currentPage,this.itemsPerPage=Number(r.itemsPerPage)||0,this.range=r.range,this.restoreFromDeepLink(r),r.pageButtonsHolder=r.element.querySelector('[data-type="pages"]'),r.pageButtonsHolder&&(r.btnTemplate=r.pageButtonsHolder.innerHTML),r.firstButtons=r.element.querySelectorAll('[data-type="first"]'),r.lastButtons=r.element.querySelectorAll('[data-type="last"]'),r.prevButtons=r.element.querySelectorAll('[data-type="prev"]'),r.nextButtons=r.element.querySelectorAll('[data-type="next"]'),t.bindEventHandler(r.firstButtons,"click",this.pageButtonClick.bind(this),r),t.bindEventHandler(r.lastButtons,"click",this.pageButtonClick.bind(this),r),t.bindEventHandler(r.prevButtons,"click",this.pageButtonClick.bind(this),r),t.bindEventHandler(r.nextButtons,"click",this.pageButtonClick.bind(this),r),r.itemsPerPageSelects=Array.from(r.element.querySelectorAll('[data-type="items-per-page"]')),this.updateItemsPerPageSelect(r.itemsPerPageSelects),r.itemsPerPageDD=Array.from(r.element.querySelectorAll('[data-type="items-per-page-dd"]')),this.initCustomDropdowns(r),t.bindEventHandler(r.itemsPerPageSelects,"change",this.selectChange.bind(this),r),r.labels=r.element.querySelectorAll('[data-type="info"]'),r.labels){var n=!0,o=!1,i=void 0;try{for(var a,l=r.labels[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var u=a.value;u.template=u.innerHTML}}catch(e){o=!0,i=e}finally{try{!n&&l.return&&l.return()}finally{if(o)throw i}}}}},{key:"updateItemsPerPageSelect",value:function(e){var t=this,r=!0,n=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value,u=Array.from(l.options).find(function(e){return e.value===t.itemsPerPage.toString()});l.value=u&&Number(this.itemsPerPage)||0}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}}},{key:"initCustomDropdowns",value:function(e){var t=this,r=e.itemsPerPageDD;if(r&&!(r.length<=0)){var n=!0,o=!1,a=void 0;try{for(var l,u=function(){var r=l.value;r.dropdown=new i.default(r),r.buttons=Array.from(r.querySelectorAll("[data-value]"));var n=!0,o=!1,a=void 0;try{for(var u,s=function(){var n=u.value;n.addEventListener("click",function(o){o.preventDefault(),t.itemsPerPage=Number(n.getAttribute("data-value"))||0,t.setSelectedButton(),r.dropdown.close(),window.jplist&&window.jplist.refresh(t.group,e)})},c=r.buttons[Symbol.iterator]();!(n=(u=c.next()).done);n=!0)s()}catch(e){o=!0,a=e}finally{try{!n&&c.return&&c.return()}finally{if(o)throw a}}},s=r[Symbol.iterator]();!(n=(l=s.next()).done);n=!0)u()}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}this.setSelectedButton()}}},{key:"setSelectedButton",value:function(){var e=this,t=!0,r=!1,n=void 0;try{for(var o,i=this.controls[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;if(a.itemsPerPageDD){var l=!0,u=!1,s=void 0;try{for(var c,f=a.itemsPerPageDD[Symbol.iterator]();!(l=(c=f.next()).done);l=!0){var d=c.value;if(d.buttons){var p=d.buttons.find(function(t){return(Number(t.getAttribute("data-value"))||0)===e.itemsPerPage});p||(p=d.buttons.find(function(e){return 0===(Number(e.getAttribute("data-value"))||0)})),p&&d.dropdown.setPanelsContent(p.textContent)}}}catch(e){u=!0,s=e}finally{try{!l&&f.return&&f.return()}finally{if(u)throw s}}}}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}}},{key:"getPaginationOptions",value:function(){return{itemsPerPage:this.itemsPerPage,currentPage:this.currentPage,range:this.range}}},{key:"setPaginationOptions",value:function(e){var r=this;if(e){this.currentPage=e.currentPage,this.itemsPerPage=e.itemsPerPage;var n=!0,o=!1,i=void 0;try{for(var a,l=function(){var n=a.value;if(!n.btnTemplate||!n.pageButtonsHolder)return"continue";for(;n.pageButtonsHolder.firstChild;)n.pageButtonsHolder.removeChild(n.pageButtonsHolder.firstChild);for(var o=function(e){var t=document.createElement("div");t.innerHTML=n.btnTemplate.replace(new RegExp("{pageNumber}","g"),e+1).trim();var o=t.firstChild,i=o.querySelector('[data-type="page"]');i||(i=o),i.setAttribute("data-page",e.toString()),e===r.currentPage&&(i.classList.add(n.selectedClass),i.setAttribute("data-selected","true")),i.addEventListener("click",function(e){r.pageButtonClick(e,i,n)}),n.pageButtonsHolder.appendChild(o)},i=e.rangeStart;i<=e.rangeEnd;i++)o(i);t.setPageAttr(n.firstButtons,0,0!==r.currentPage,n.disabledClass),t.setPageAttr(n.lastButtons,e.pagesNumber-1,r.currentPage!==e.pagesNumber-1,n.disabledClass),t.setPageAttr(n.prevButtons,e.prevPage,0!==r.currentPage,n.disabledClass),t.setPageAttr(n.nextButtons,e.nextPage,r.currentPage!==e.pagesNumber-1,n.disabledClass);var l=[{key:"{pageNumber}",value:e.currentPage+1},{key:"{pagesNumber}",value:e.pagesNumber},{key:"{startItem}",value:e.start+1},{key:"{endItem}",value:e.end},{key:"{itemsNumber}",value:e.itemsNumber}];if(n.labels){var u=!0,s=!1,c=void 0;try{for(var f,d=n.labels[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var p=f.value;if(p.template){var h=p.template,v=!0,y=!1,b=void 0;try{for(var m,g=l[Symbol.iterator]();!(v=(m=g.next()).done);v=!0){var w=m.value;h=h.replace(new RegExp(w.key,"g"),w.value)}}catch(e){y=!0,b=e}finally{try{!v&&g.return&&g.return()}finally{if(y)throw b}}p.innerHTML=h}}}catch(e){s=!0,c=e}finally{try{!u&&d.return&&d.return()}finally{if(s)throw c}}}var O=Array.from(n.element.classList).filter(function(e){return e.startsWith("jplist-pages-number-")||e.startsWith("jplist-items-number-")}),_=!0,j=!1,P=void 0;try{for(var k,x=O[Symbol.iterator]();!(_=(k=x.next()).done);_=!0){var S=k.value;n.element.classList.remove(S)}}catch(e){j=!0,P=e}finally{try{!_&&x.return&&x.return()}finally{if(j)throw P}}n.element.classList.add("jplist-pages-number-"+e.pagesNumber),n.element.classList.add("jplist-items-number-"+e.itemsNumber)},u=this.controls[Symbol.iterator]();!(n=(a=u.next()).done);n=!0)l()}catch(e){o=!0,i=e}finally{try{!n&&u.return&&u.return()}finally{if(o)throw i}}}}},{key:"pageButtonClick",value:function(e,t,r){e&&e.preventDefault();var n=t?t.getAttribute("data-page"):e.target.getAttribute("data-page");this.currentPage=Number(n)||0,window.jplist&&window.jplist.refresh(this.group,r)}},{key:"selectChange",value:function(e,t,r){e.preventDefault();var n=Number(e.target.value);if(!isNaN(n)){this.itemsPerPage=n;var o=!0,i=!1,a=void 0;try{for(var l,u=this.controls[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var s=l.value;this.updateItemsPerPageSelect(s.itemsPerPageSelects)}}catch(e){i=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(i)throw a}}}window.jplist&&window.jplist.refresh(this.group,r)}},{key:"restoreFromDeepLink",value:function(e){if(e.id){this.id=e.id;var t=this.deepLinkParams.find(function(t){return t.key===e.id});if(t){var r=t.value.split("-");if(2!==r.length)return;var n=Number(r[0]),o=Number(r[1]);if(isNaN(n)||isNaN(o))return;this.currentPage=n,this.itemsPerPage=o}}}},{key:"getDeepLink",value:function(){return this.id?this.id+"="+this.currentPage+"-"+this.itemsPerPage:""}}],[{key:"setPageAttr",value:function(e,t,r,n){if(e){var o=!0,i=!1,a=void 0;try{for(var l,u=e[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var s=l.value;s.setAttribute("data-page",t),r?s.classList.remove(n):s.classList.add(n)}}catch(e){i=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(i)throw a}}}}},{key:"bindEventHandler",value:function(e,t,r,n){if(e){var o=!0,i=!1,a=void 0;try{for(var l,u=function(){var e=l.value;e.addEventListener(t,function(t){r(t,e,n)})},s=e[Symbol.iterator]();!(o=(l=s.next()).done);o=!0)u()}catch(e){i=!0,a=e}finally{try{!o&&s.return&&s.return()}finally{if(i)throw a}}}}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=l(r(2)),i=l(r(8)),a=l(r(6));function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,n,o));return i.group=e,i.name=r,i.selected=null,i.id="",i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"addControl",value:function(e){var r=this,n=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addControl",this).call(this,e);n.dropdown=new a.default(e.element),n.buttons=[];var o=n.element.querySelectorAll("[data-path]"),l=!0,u=!1,s=void 0;try{for(var c,f=function(){var e=c.value;e.setAttribute("data-name",r.name),e.setAttribute("data-group",r.group),e.setAttribute("data-jump",n.jump);var t=new i.default(e);n.buttons.push(t),t.element.addEventListener("click",function(e){e.preventDefault(),r.selected=t,r.setSelectedButton(n);var o=!0,i=!1,a=void 0;try{for(var l,u=r.controls[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var s=l.value;s.dropdown&&s.dropdown.close()}}catch(e){i=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(i)throw a}}window.jplist&&window.jplist.refresh(r.group,t)})},d=o[Symbol.iterator]();!(l=(c=d.next()).done);l=!0)f()}catch(e){u=!0,s=e}finally{try{!l&&d.return&&d.return()}finally{if(u)throw s}}if(this.selected=t.getSelectedButton(n.buttons),this.setSelectedButton(n),n.id){this.id=n.id;var p=this.deepLinkParams.find(function(e){return e.key===n.id});if(p){var h=n.buttons.find(function(e){var t=e.element.getAttribute("data-value");return p.value===t?e:null});h&&(this.selected=h,this.setSelectedButton(n))}}}},{key:"getSortOptions",value:function(){return this.selected?this.selected.getSortOptions():[]}},{key:"getDeepLink",value:function(){return this.id&&this.selected&&this.id+"="+this.selected.element.getAttribute("data-value")||""}},{key:"setSelectedButton",value:function(e){var t=this,r=!0,n=!1,o=void 0;try{for(var i,a=this.controls[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value;if(l.dropdown){var u=e.buttons.find(function(e){return t.selected.isEqualTo(e)});u&&l.dropdown.setPanelsContent(u.element.textContent)}}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}}}],[{key:"getSelectedButton",value:function(e){if(e.length<=0)return null;var t=!0,r=!1,n=void 0;try{for(var o,i=e[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;if("true"===a.element.getAttribute("data-selected"))return a}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return e[0]}}]),t}();t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(2)),i=a(r(8));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,n,o));return i.group=e,i.name=r,i.options=[],i.selected="",i.id="",i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"addControl",value:function(e){var r=this,n=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addControl",this).call(this,e),o=n.element.querySelectorAll("option"),a=!0,l=!1,u=void 0;try{for(var s,c=function(){var e=s.value;e.setAttribute("data-name",r.name),e.setAttribute("data-group",r.group),r.options.find(function(t){return t.element.value===e.value})||r.options.push(new i.default(e))},f=o[Symbol.iterator]();!(a=(s=f.next()).done);a=!0)c()}catch(e){l=!0,u=e}finally{try{!a&&f.return&&f.return()}finally{if(l)throw u}}if(this.selected=n.element.value,n.id){this.id=n.id;var d=this.deepLinkParams.find(function(e){return e.key===n.id});d&&(n.element.value=d.value,this.selected=d.value)}n.element.addEventListener("change",function(e){e.preventDefault(),r.selected=e.target.value;var t=!0,o=!1,i=void 0;try{for(var a,l=r.controls[Symbol.iterator]();!(t=(a=l.next()).done);t=!0){a.value.element.value=r.selected}}catch(e){o=!0,i=e}finally{try{!t&&l.return&&l.return()}finally{if(o)throw i}}window.jplist&&window.jplist.refresh(r.group,n)})}},{key:"getSortOptions",value:function(){var e=this,t=this.options.find(function(t){return t.element.value===e.selected});return t?t.getSortOptions():[]}},{key:"getDeepLink",value:function(){var e=this,t=this.options.find(function(t){return t.element.value===e.selected});return this.id?this.id+"="+t.element.value:""}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(2),a=(n=i)&&n.__esModule?n:{default:n};var l=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,n,o));return i.group=e,i.name=r,i.checkboxes=[],i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),o(t,[{key:"addControl",value:function(e){var r=this,n=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addControl",this).call(this,e);if(n.selected=n.element.checked,n.id){var o=this.deepLinkParams.find(function(e){return e.key===n.id});o&&(n.selected="1"===o.value)}this.checkboxes.push(n),this.handleCheckboxes(),n.element.addEventListener("change",function(e){e.preventDefault(),n.selected=!n.selected,r.checkboxes.forEach(function(e){e.isEqualTo(n)&&(e.selected=n.selected)}),r.handleCheckboxes(),window.jplist&&window.jplist.refresh(r.group,n)})}},{key:"handleCheckboxes",value:function(){var e=!0,t=!1,r=void 0;try{for(var n,o=this.checkboxes[Symbol.iterator]();!(e=(n=o.next()).done);e=!0){var i=n.value;i.selected?i.element.classList.add("jplist-selected"):i.element.classList.remove("jplist-selected"),i.element.checked=i.selected}}catch(e){t=!0,r=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw r}}}},{key:"getSortOptions",value:function(){var e=[],t=!1,r=!0,n=!1,o=void 0;try{for(var i,a=this.checkboxes[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value;l.selected?e=e.concat(l.getSortOptions()):t=!0}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}return t&&(e=e.concat([{path:"default"}])),e}},{key:"getDeepLink",value:function(){var e=this.checkboxes.map(function(e){return e.id?e.selected?e.id+"=1":e.id+"=0":""}).filter(function(e){return""!==e});return Array.from(new Set(e)).join("&")}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(2),a=(n=i)&&n.__esModule?n:{default:n};var l=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,n,o));return i.group=e,i.name=r,i.radios=[],i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),o(t,[{key:"addControl",value:function(e){var r=this,n=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addControl",this).call(this,e);if(n.selected=n.element.checked,n.id){var o=this.deepLinkParams.find(function(e){return e.key===n.id});o&&(n.selected="1"===o.value)}this.radios.push(n),this.handleRadios(),n.element.addEventListener("change",function(e){e.preventDefault();var t=!0,o=!1,i=void 0;try{for(var a,l=r.radios[Symbol.iterator]();!(t=(a=l.next()).done);t=!0){a.value.selected=!1}}catch(e){o=!0,i=e}finally{try{!t&&l.return&&l.return()}finally{if(o)throw i}}n.selected=!0,r.handleRadios(),window.jplist&&window.jplist.refresh(r.group,n)})}},{key:"getLastSelectedRadio",value:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var o,i=this.radios[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;a.selected&&(e=a)}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return e}},{key:"handleRadios",value:function(){if(this.radios.length>0){var e=this.getLastSelectedRadio(),t=!0,r=!1,n=void 0;try{for(var o,i=this.radios[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;a.selected=!1,a.element.classList.remove("jplist-selected")}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}e&&this.radios.forEach(function(t){t.isEqualTo(e)&&(t.selected=!0,t.element.checked=!0,t.element.classList.add("jplist-selected"))})}}},{key:"getSortOptions",value:function(){var e=[],t=this.getLastSelectedRadio();return t&&(e=e.concat(t.getSortOptions())),e}},{key:"getDeepLink",value:function(){var e=this.radios.map(function(e){return e.id&&e.selected?e.id+"=1":""}).filter(function(e){return""!==e});return Array.from(new Set(e)).join("&")}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(2),a=(n=i)&&n.__esModule?n:{default:n};var l=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,n,o));return i.group=e,i.name=r,i.checkboxes=[],i.radios=[],i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),o(t,[{key:"addControl",value:function(e){var r=this,n=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addControl",this).call(this,e);if(n.selected="true"===n.element.getAttribute("data-selected"),n.mode=n.element.getAttribute("data-mode")||"radio",n.id){var o=this.deepLinkParams.find(function(e){return e.key===n.id});o&&(n.selected="1"===o.value)}"radio"===n.mode&&(this.radios.push(n),this.handleRadios()),"checkbox"===n.mode&&(this.checkboxes.push(n),this.handleCheckboxes()),n.element.addEventListener("click",function(e){if(e.preventDefault(),"checkbox"===n.mode&&(n.selected=!n.selected,r.checkboxes.forEach(function(e){e.isEqualTo(n)&&(e.selected=n.selected)}),r.handleCheckboxes()),"radio"===n.mode){var t=!0,o=!1,i=void 0;try{for(var a,l=r.radios[Symbol.iterator]();!(t=(a=l.next()).done);t=!0){a.value.selected=!1}}catch(e){o=!0,i=e}finally{try{!t&&l.return&&l.return()}finally{if(o)throw i}}n.selected=!0,r.handleRadios()}window.jplist&&window.jplist.refresh(r.group,n)})}},{key:"handleCheckboxes",value:function(){var e=!0,t=!1,r=void 0;try{for(var n,o=this.checkboxes[Symbol.iterator]();!(e=(n=o.next()).done);e=!0){var i=n.value;i.selected?i.element.classList.add("jplist-selected"):i.element.classList.remove("jplist-selected")}}catch(e){t=!0,r=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw r}}}},{key:"getLastSelectedRadio",value:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var o,i=this.radios[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;a.selected&&(e=a)}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return e}},{key:"handleRadios",value:function(){if(this.radios.length>0){var e=this.getLastSelectedRadio(),t=!0,r=!1,n=void 0;try{for(var o,i=this.radios[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;a.selected=!1,a.element.classList.remove("jplist-selected")}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}e&&this.radios.forEach(function(t){t.isEqualTo(e)&&(t.selected=!0,t.element.checked=!0,t.element.classList.add("jplist-selected"))})}}},{key:"getSortOptions",value:function(){var e=[],t=!1,r=!0,n=!1,o=void 0;try{for(var i,a=this.checkboxes[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value;l.selected?e=e.concat(l.getSortOptions()):t=!0}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}t&&(e=e.concat([{path:"default"}]));var u=this.getLastSelectedRadio();return u&&(e=e.concat(u.getSortOptions())),e}},{key:"getDeepLink",value:function(){var e=this.checkboxes.map(function(e){return e.id&&e.selected?e.id+"=1":""}).filter(function(e){return""!==e}),t=this.radios.map(function(e){return e.id&&e.selected?e.id+"=1":""}).filter(function(e){return""!==e}),r=e.concat(t);return Array.from(new Set(r)).join("&")}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(2),i=(n=o)&&n.__esModule?n:{default:n};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"isSupported",value:function(e){if("cookies"===e)return!0;try{return e in window&&null!==window[e]}catch(e){return!1}}},{key:"set",value:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1;if("cookies"===r){var i=encodeURIComponent(t),a=new Date;-1===(o=Number(o)||-1)?document.cookie=name+"="+i+";path=/;":(a.setMinutes(a.getMinutes()+o),document.cookie=name+"="+i+";path=/; expires="+a.toUTCString())}else e.isSupported(r)&&(window[r][n]=t)}},{key:"get",value:function(t,r){var n="";if("cookies"===t)for(var o=document.cookie.split(";"),i=0;i<o.length;i++){var a=o[i].substr(0,o[i].indexOf("=")),l=o[i].substr(o[i].indexOf("=")+1);if((a=a.replace(/^\s+|\s+$/g,""))===r){n=decodeURIComponent(l);break}}else e.isSupported(t)&&(n=window[t][r]||"");return n}}]),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"getParam",value:function(e){if(!e)return null;var t=e.split("=");return t.length<2?null:{key:t[0].trim().toLowerCase(),value:t[1].trim().toLowerCase()}}},{key:"getUrlParams",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#",n=new Map;if(!t)return n;var o=window.decodeURIComponent(t.replace(r,"")).trim().toLowerCase();if(!o)return n;var i=o.split("&"),a="",l=!0,u=!1,s=void 0;try{for(var c,f=i[Symbol.iterator]();!(l=(c=f.next()).done);l=!0){var d=c.value,p=e.getParam(d);if(p)if("group"===p.key)a=p.value,n.has(p.value)||n.set(p.value,[]);else{var h=n.get(a);h&&h.push(p),n.set(a,h)}}}catch(e){u=!0,s=e}finally{try{!l&&f.return&&f.return()}finally{if(u)throw s}}return n}}]),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,r,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.itemsNumber=Number(n)||0,this.itemsPerPage=Number.isInteger(r)?Number(r):this.itemsNumber,0===this.itemsPerPage&&(this.itemsPerPage=n),this.pagesNumber=0===this.itemsPerPage?0:Math.ceil(this.itemsNumber/this.itemsPerPage),this.currentPage=Number(t)||0,this.currentPage>this.pagesNumber-1&&(this.currentPage=0),this.start=this.currentPage*this.itemsPerPage,this.end=this.start+this.itemsPerPage,this.end>this.itemsNumber&&(this.end=this.itemsNumber),this.prevPage=this.currentPage<=0?0:this.currentPage-1,this.nextPage=0===this.pagesNumber?0:this.currentPage>=this.pagesNumber-1?this.pagesNumber-1:this.currentPage+1,this.range=Number(o)||10;var i=Math.ceil((this.range-1)/2);this.rangeStart=this.currentPage-i,this.rangeEnd=Math.min(this.rangeStart+this.range-1,this.pagesNumber-1),this.rangeStart<=0&&(this.rangeStart=0,this.rangeEnd=Math.min(this.range-1,this.pagesNumber-1)),this.rangeEnd>=this.pagesNumber-1&&(this.rangeStart=Math.max(this.pagesNumber-this.range,0),this.rangeEnd=this.pagesNumber-1)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"sort",value:function(t,r){return!r||r.length<=0?(t.sort(function(t,r){return e.sortByIndex(t,r)}),t):(t.sort(function(t,n){return e.sortHelper(t,n,r,0)}),t)}},{key:"sortHelper",value:function(t,r,n,o){if(!n||n.length<=0||o>=n.length)return 0;var i=0,a=n[o];if("default"!==a.path)switch(a.dataType){case"number":i=e.sortNumbers(t,r,a.path,a.order);break;case"datetime":i=e.sortDateTime(t,r,a.path,a.order,a.dateTimeFormat);break;default:i=e.sortText(t,r,a.path,a.order,a.ignoreRegex)}else i=e.sortByIndex(t,r);return 0===i&&o+1<n.length&&(i=e.sortHelper(t,r,n,o+1)),i}},{key:"sortText",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"asc",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(!e||!t)return 0;var i=r?e.querySelector(r):e,a=r?t.querySelector(r):t;if(!i||!a)return 0;var l=i.textContent.trim().toLowerCase(),u=a.textContent.trim().toLowerCase();if(o){var s=new RegExp(o,"ig");l=l.replace(s,"").trim(),u=u.replace(s,"").trim()}return l===u?0:(n||(n="asc"),"".localeCompare?"asc"===n?l.localeCompare(u):u.localeCompare(l):"asc"===n?l>u?1:-1:l<u?1:-1)}},{key:"sortNumbers",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"asc";if(!e||!t)return 0;var o=r?e.querySelector(r):e,i=r?t.querySelector(r):t;if(!o||!i)return 0;var a=o.textContent.trim().toLowerCase(),l=i.textContent.trim().toLowerCase();return a=parseFloat(a.replace(/[^-0-9.]+/g,"")),l=parseFloat(l.replace(/[^-0-9.]+/g,"")),isNaN(a)||isNaN(l)?isNaN(a)&&isNaN(l)?0:isNaN(a)?1:-1:a===l?0:(n||(n="asc"),"asc"===n?a-l:l-a)}},{key:"sortByIndex",value:function(e,t){if(!e||!t)return 0;var r=Number(e.jplistIndex),n=Number(t.jplistIndex);return isNaN(r)||isNaN(n)?0:r-n}},{key:"sortDateTime",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"asc",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(!t||!r)return 0;var a=n?t.querySelector(n):t,l=n?r.querySelector(n):r;if(!a||!l)return 0;var u=a.textContent.trim().toLowerCase(),s=l.textContent.trim().toLowerCase(),c=void 0,f=void 0;return(i=i.trim())?(c=e.getDateFromString(u,i),f=e.getDateFromString(s,i)):(c=new Date(Date.parse(u)),f=new Date(Date.parse(s))),c.getTime()===f.getTime()?0:(o||(o="asc"),"asc"===o?c.getTime()>f.getTime()?1:-1:c.getTime()<f.getTime()?1:-1)}},{key:"getDateFromString",value:function(t,r){r=(r=(r=(r=(r=r.replace(/\./g,"\\.")).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")).replace(/\[/g,"\\[")).replace(/\]/g,"\\]");var n=e.getDateWildcardValue(r,"{year}",t);n=Number(n)||1900;var o=e.getDateWildcardValue(r,"{day}",t);o=Number(o)||1;var i=e.getDateWildcardValue(r,"{month}",t);-1===(i=e.getMonthByWildcard(i))&&(i=0);var a=e.getDateWildcardValue(r,"{hour}",t);a=Number(a)||0;var l=e.getDateWildcardValue(r,"{min}",t);l=Number(l)||0;var u=e.getDateWildcardValue(r,"{sec}",t);return u=Number(u)||0,new Date(n,i,o,a,l,u)}},{key:"getDateWildcardValue",value:function(e,t,r){var n=null,o=e.replace(t,"(.*)").replace(/{year}|{month}|{day}|{hour}|{min}|{sec}/g,".*"),i=new RegExp(o,"g").exec(r);return i&&i.length>1&&(n=i[1]),n}},{key:"getMonthByWildcard",value:function(t){t=t?t.trim().toLowerCase():"";var r=Number(t);return isNaN(r)?e.months.findIndex(function(e){return e.find(function(e){return e.trim()===t})}):r-1<0?-1:r-1}},{key:"months",get:function(){return[["january","jan","jan."],["february","feb","feb."],["march","mar","mar."],["april","apr","apr."],["may"],["june","jun."],["july","jul","jul."],["august","aug","aug."],["september","sep","sep."],["october","oct","oct."],["november","nov","nov."],["december","dec","dec."]]}}]),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&l.return&&l.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=f(r(43)),a=f(r(42)),l=f(r(1)),u=f(r(41)),s=f(r(40)),c=f(r(14));function f(e){return e&&e.__esModule?e:{default:e}}function d(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}var p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"apply",value:function(t,r,o){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;if(r&&o){var c=[{options:"pathFilterOptions",name:"pathFilter"},{options:"rangeFilterOptions",name:"rangeFilter"},{options:"textFilterOptions",name:"textFilter"}],f=!0,d=!1,p=void 0;try{for(var h,v=o[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=n(h.value,2),b=y[0],m=y[1];if(l&&l===b||!l){var g=r.get(b),w=e.collectControlsOptions(g),O=!0,_=!1,j=void 0;try{for(var P,k=m[Symbol.iterator]();!(O=(P=k.next()).done);O=!0){var x=P.value,S=x.items.length,C=e.getItemsFragment(x.items);w.sortOptions&&w.sortOptions.length>0&&(i.default.sort(x.items,w.sortOptions),C=e.getItemsFragment(x.items));var E=x.items,L=!0,T=!1,A=void 0;try{for(var N,M=c[Symbol.iterator]();!(L=(N=M.next()).done);L=!0){var F=N.value,D=F.options;if(w[D]){var R=e.splitByLogic(w[D]);for(var B in E=e.handleFilter(E,R.and,"and",F.name),R.or)E=e.handleFilter(E,R.or[B],"or",F.name);S=E.length,C=e.getItemsFragment(E)}}}catch(e){T=!0,A=e}finally{try{!L&&M.return&&M.return()}finally{if(T)throw A}}if(w.paginationOptions){var q=new a.default(w.paginationOptions.currentPage,w.paginationOptions.itemsPerPage,E.length,w.paginationOptions.range);if(g.length>0){var I=!0,H=!1,V=void 0;try{for(var W,G=g[Symbol.iterator]();!(I=(W=G.next()).done);I=!0){var z=W.value;z.setPaginationOptions&&z.setPaginationOptions(q)}}catch(e){H=!0,V=e}finally{try{!I&&G.return&&G.return()}finally{if(H)throw V}}}var U=E.slice(q.start,q.end);S=U.length,C=e.getItemsFragment(U)}x.root.appendChild(C),e.sendStateEvent(w,S,g,o,E)}}catch(e){_=!0,j=e}finally{try{!O&&k.return&&k.return()}finally{if(_)throw j}}e.jump(g,u)}}}catch(e){d=!0,p=e}finally{try{!f&&v.return&&v.return()}finally{if(d)throw p}}t.deepLinking?e.updateDeepLink(e.getDeepLink(r,o),t.hashStart):t.storage&&s.default.set(e.getDeepLink(r,o),t.storage,t.storageName,t.cookiesExpiration)}}},{key:"performFilter",value:function(e,t,r){switch(r){case"textFilter":return c.default.textFilter(t,e.text,e.path,e.mode,e.ignoreRegex);case"pathFilter":return c.default.pathFilter(t,e.path,e.isInverted);case"rangeFilter":return c.default.rangeFilter(t,e.path,e.from,e.to,e.min,e.max)}return t}},{key:"handleFilter",value:function(t,r,n,o){if(r.length<=0)return t;if("and"===n){var i=!0,a=!1,l=void 0;try{for(var u,s=r[Symbol.iterator]();!(i=(u=s.next()).done);i=!0){var c=u.value;t=e.performFilter(c,t,o)}}catch(e){a=!0,l=e}finally{try{!i&&s.return&&s.return()}finally{if(a)throw l}}}if("or"===n){var f=new Set,p=!0,h=!1,v=void 0;try{for(var y,b=r[Symbol.iterator]();!(p=(y=b.next()).done);p=!0){var m=y.value,g=e.performFilter(m,t,o);f=new Set([].concat(d(f),d(g)))}}catch(e){h=!0,v=e}finally{try{!p&&b.return&&b.return()}finally{if(h)throw v}}t=Array.from(f)}return t}},{key:"splitByLogic",value:function(e){var t={and:[],or:{}},r=!0,n=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value,u=l.or;u?void 0===t.or[u]?t.or[u]=[l]:t.or[u].push(l):t.and.push(l)}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}return t}},{key:"jump",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(t&&t.jump){var r=-1;if("top"===t.jump)r=0;else{var n=document.querySelector(t.jump);if(!n)return;var o=n.getBoundingClientRect();if(!n.width&&!n.height&&!n.getClientRects().length)return;var i=document.clientTop||document.body.clientTop||0;r<0?r=o.top+window.pageYOffset-i:o.top+window.pageYOffset-i<r&&(r=o.top+window.pageYOffset-i)}r>=0&&window.scroll(0,r)}}},{key:"sendStateEvent",value:function(e,t,r,n,o){if(r){var i=new CustomEvent("jplist.state");i.jplistState={options:e,itemsNumber:t,groups:n,filtered:o};var a=!0,l=!1,u=void 0;try{for(var s,c=r[Symbol.iterator]();!(a=(s=c.next()).done);a=!0){var f=s.value,d=!0,p=!1,h=void 0;try{for(var v,y=f.controls[Symbol.iterator]();!(d=(v=y.next()).done);d=!0){v.value.element.dispatchEvent(i)}}catch(e){p=!0,h=e}finally{try{!d&&y.return&&y.return()}finally{if(p)throw h}}}}catch(e){l=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(l)throw u}}}}},{key:"collectControlsOptions",value:function(e){var t={sortOptions:[],paginationOptions:null,textFilterOptions:[],pathFilterOptions:[],rangeFilterOptions:[]};if(!e)return t;var r=!0,n=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value;l.getSortOptions&&(t.sortOptions=t.sortOptions.concat(l.getSortOptions())),l.getTextFilterOptions&&(t.textFilterOptions=t.textFilterOptions.concat(l.getTextFilterOptions())),l.getPathFilterOptions&&(t.pathFilterOptions=t.pathFilterOptions.concat(l.getPathFilterOptions())),l.getRangeFilterOptions&&(t.rangeFilterOptions=t.rangeFilterOptions.concat(l.getRangeFilterOptions())),l.getPaginationOptions&&(t.paginationOptions=l.getPaginationOptions())}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}return t}},{key:"getItemsFragment",value:function(e){var t=document.createDocumentFragment(),r=!0,n=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value;t.appendChild(l)}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}return t}},{key:"updateDeepLink",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#",r=e.replace(t,"").trim();if(r=""===r?t:t+r,window.location.hash!==r){var n=window.location.href.indexOf(t),o=void 0;o=-1===n?window.location.href+r:window.location.href.substring(0,n)+r,"replaceState"in window.history?window.history.replaceState("","",o):window.location.replace(o)}}},{key:"getDeepLink",value:function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var a,l=t.keys()[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var u=a.value,s=e.get(u),c=[],f=!0,d=!1,p=void 0;try{for(var h,v=s[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=h.value.getDeepLink();y&&c.push(y)}}catch(e){d=!0,p=e}finally{try{!f&&v.return&&v.return()}finally{if(d)throw p}}c.length>0&&(r.push("group="+u),r=r.concat(c))}}catch(e){o=!0,i=e}finally{try{!n&&l.return&&l.return()}finally{if(o)throw i}}return r.join("&")}},{key:"findGroups",value:function(e){var t=new Map;if(!e)return t;var r=[].concat(d(e)),n=!0,o=!1,i=void 0;try{for(var a,l=r[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var u=a.value,s=u.getAttribute("data-jplist-group"),c=[];t.has(s)&&(c=t.get(s)),c.push({root:u,items:[].concat(d(u.querySelectorAll("[data-jplist-item]"))),fragment:document.createDocumentFragment()}),t.set(s,c)}}catch(e){o=!0,i=e}finally{try{!n&&l.return&&l.return()}finally{if(o)throw i}}return t}},{key:"findControls",value:function(e){if(!e)return[];var t=[],r=e.querySelectorAll("[data-jplist-control]");if(r){var n=!0,o=!1,i=void 0;try{for(var a,u=r[Symbol.iterator]();!(n=(a=u.next()).done);n=!0){var s=a.value;if(s.getAttribute("data-jplist-control")){var c=new l.default(s);t.push(c)}}}catch(e){o=!0,i=e}finally{try{!n&&u.return&&u.return()}finally{if(o)throw i}}}return t}},{key:"findControlGroups",value:function(e){var t=new Map;if(e){var r=!0,n=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value,u=[];t.has(l.group)&&(u=t.get(l.group)),u.push(l),t.set(l.group,u)}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}}return t}},{key:"findSameNameControls",value:function(e,t){var r=new Map;if(t){var n=null;if(e.deepLinking)n=u.default.getUrlParams(window.location.hash,e.hashStart);else if(e.storage){var o=s.default.get(e.storage,e.storageName);n=u.default.getUrlParams(o,"")}var i=!0,a=!1,l=void 0;try{for(var c,f=t[Symbol.iterator]();!(i=(c=f.next()).done);i=!0){var d=c.value;if(d.type&&window.jplist.controlTypes.has(d.type)){var p=window.jplist.controlTypes.get(d.type);if(p){var h=null;(h=r.has(d.name)?r.get(d.name):new p(d.group,d.name,[],n)).addControl(d),r.set(d.name,h)}}}}catch(e){a=!0,l=e}finally{try{!i&&f.return&&f.return()}finally{if(a)throw l}}}return r}},{key:"splitByGroupAndName",value:function(t,r){var o=new Map;if(!r)return o;var i=e.findControls(r),a=e.findControlGroups(i),l=!0,u=!1,s=void 0;try{for(var c,f=a[Symbol.iterator]();!(l=(c=f.next()).done);l=!0){var d=n(c.value,2),p=d[0],h=d[1],v=e.findSameNameControls(t,h),y=[],b=!0,m=!1,g=void 0;try{for(var w,O=v.values()[Symbol.iterator]();!(b=(w=O.next()).done);b=!0){var _=w.value;y.push(_)}}catch(e){m=!0,g=e}finally{try{!b&&O.return&&O.return()}finally{if(m)throw g}}o.set(p,y)}}catch(e){u=!0,s=e}finally{try{!l&&f.return&&f.return()}finally{if(u)throw s}}return o}}]),e}();t.default=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&l.return&&l.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=l(r(44)),a=l(r(1));function l(e){return e&&e.__esModule?e:{default:e}}function u(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,[{key:"init",value:function(e){this.settings=Object.assign({},{storage:"",storageName:"jplist",cookiesExpiration:-1,deepLinking:!1,hashStart:"#"},e),this.controls=i.default.splitByGroupAndName(this.settings,document.body),this.elements=document.querySelectorAll("[data-jplist-group]"),this.groups=i.default.findGroups(this.elements);for(var t=[].concat(u(document.querySelectorAll("[data-jplist-item]"))),r=0;r<t.length;r++)t[r].jplistIndex=r;this.refresh("")}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;i.default.apply(this.settings,this.controls,this.groups,e,t)}},{key:"resetControl",value:function(e){if(e&&this.controls){var t=!0,r=!1,o=void 0;try{for(var i,l=this.controls[Symbol.iterator]();!(t=(i=l.next()).done);t=!0){var u=n(i.value,2),s=u[0],c=u[1],f=!0,d=!1,p=void 0;try{for(var h,v=c[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=h.value,b=y.controls.findIndex(function(t){return t.element===e});if(b>=0){var m=y.controls[b].element,g=document.createElement("div");g.innerHTML=m.initialHTML;var w=g.firstChild;return void(m.parentNode&&(m.parentNode.replaceChild(w,m),y.controls.splice(b,1),y.addControl(new a.default(w)),this.refresh(s)))}}}catch(e){d=!0,p=e}finally{try{!f&&v.return&&v.return()}finally{if(d)throw p}}}}catch(e){r=!0,o=e}finally{try{!t&&l.return&&l.return()}finally{if(r)throw o}}}}},{key:"resetControls",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.controls){var t=!0,r=!1,o=void 0;try{for(var a,l=this.controls[Symbol.iterator]();!(t=(a=l.next()).done);t=!0){var u=n(a.value,2),s=(u[0],u[1]),c=!0,f=!1,d=void 0;try{for(var p,h=s[Symbol.iterator]();!(c=(p=h.next()).done);c=!0){var v=p.value,y=!0,b=!1,m=void 0;try{for(var g,w=v.controls[Symbol.iterator]();!(y=(g=w.next()).done);y=!0){var O=g.value;O.element&&O.element.initialHTML&&(O.element.outerHTML=O.element.initialHTML)}}catch(e){b=!0,m=e}finally{try{!y&&w.return&&w.return()}finally{if(b)throw m}}}}catch(e){f=!0,d=e}finally{try{!c&&h.return&&h.return()}finally{if(f)throw d}}}}catch(e){r=!0,o=e}finally{try{!t&&l.return&&l.return()}finally{if(r)throw o}}}this.controls=i.default.splitByGroupAndName(this.settings,document.body),this.refresh(e)}},{key:"resetContent",value:function(e){var t=!0,r=!1,o=void 0;try{for(var a,l=this.groups[Symbol.iterator]();!(t=(a=l.next()).done);t=!0){var s=n(a.value,2),c=(s[0],s[1]),f=!0,d=!1,p=void 0;try{for(var h,v=c[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=h.value,b=i.default.getItemsFragment(y.items);y.root.appendChild(b)}}catch(e){d=!0,p=e}finally{try{!f&&v.return&&v.return()}finally{if(d)throw p}}}}catch(e){r=!0,o=e}finally{try{!t&&l.return&&l.return()}finally{if(r)throw o}}e&&e(this.groups),this.elements=document.querySelectorAll("[data-jplist-group]"),this.groups=i.default.findGroups(this.elements);for(var m=[].concat(u(document.querySelectorAll("[data-jplist-item]"))),g=0;g<m.length;g++)m[g].jplistIndex=g;this.refresh("")}}]),e}();t.default=s},function(e,t,r){"use strict";var n=S(r(45)),o=S(r(39)),i=S(r(38)),a=S(r(37)),l=S(r(36)),u=S(r(35)),s=S(r(34)),c=S(r(33)),f=S(r(30)),d=S(r(29)),p=S(r(28)),h=S(r(27)),v=S(r(26)),y=S(r(25)),b=S(r(24)),m=S(r(23)),g=S(r(22)),w=S(r(21)),O=S(r(20)),_=S(r(18)),j=S(r(6)),P=S(r(17)),k=S(r(16)),x=S(r(15));function S(e){return e&&e.__esModule?e:{default:e}}!function(){if("function"!=typeof window.CustomEvent){var e=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r};e.prototype=window.Event.prototype,window.CustomEvent=e}window.jplist=window.jplist||{},window.jplist.controlTypes=window.jplist.controlTypes||new Map([["hidden-sort",o.default],["sort-buttons",i.default],["radio-buttons-sort",a.default],["checkbox-sort",l.default],["select-sort",u.default],["dropdown-sort",s.default],["pagination",c.default],["textbox-filter",f.default],["checkbox-text-filter",d.default],["radio-buttons-text-filter",p.default],["buttons-text-filter",h.default],["select-filter",v.default],["dropdown-filter",g.default],["checkbox-path-filter",y.default],["radio-buttons-path-filter",b.default],["buttons-path-filter",m.default],["buttons-range-filter",w.default],["slider-range-filter",O.default],["no-results",_.default],["dropdown",j.default],["layout",P.default],["reset",k.default],["counter",x.default]]);var t=new n.default;window.jplist.init=t.init.bind(t),window.jplist.refresh=t.refresh.bind(t),window.jplist.resetControls=t.resetControls.bind(t),window.jplist.resetControl=t.resetControl.bind(t),window.jplist.resetContent=t.resetContent.bind(t)}()},,function(e,t){},,,,,function(e,t){}]);
//# sourceMappingURL=jplist.min.js.map
/**
 * lazyFxx: Lazy Loading Effects
 *
 * Using the image processing framework of TYPO3 to create placeholder images.
 *
 * @author
 *   brainworXX GmbH <info@brainworxx.de>
 *
 * @license
 *   http://opensource.org/licenses/LGPL-2.1
 *
 *   GNU Lesser General Public License Version 2.1
 *
 *   lazyFxx Copyright (C) 2017-2018 Brainworxx GmbH
 *
 *   This library is free software; you can redistribute it and/or modify it
 *   under the terms of the GNU Lesser General Public License as published by
 *   the Free Software Foundation; either version 2.1 of the License, or (at
 *   your option) any later version.
 *   This library is distributed in the hope that it will be useful, but WITHOUT
 *   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *   FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 *   for more details.
 *   You should have received a copy of the GNU Lesser General Public License
 *   along with this library; if not, write to the Free Software Foundation,
 *   Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
(function () {
    "use strict";

    /**
     * Lazy loading of images, just because we can.
     *
     * @namespace lazyFxx
     *   Collection of js functions.
     */
    function lazyFxx() {}

    /**
     * Caching the images that we want to lazy load.
     *
     * @type {NodeList}
     */
    lazyFxx.images = {};

    /**
     * Registering everything as soon as the dom is ready.
     *
     * @event DOMContentLoaded
     */
    lazyFxx.onDocumentReady = function () {
        // 1. Get a list of all images
        lazyFxx.updateList();
        // 2. Test the list of elements
        window.setInterval(lazyFxx.checkList, 1000);
    };

    /**
     * Checking the visibility of the images when scrolling
     *
     * @event scroll|resize
     */
    lazyFxx.checkList = function () {
        // Check on scroll, if any image is in viewport and trigger a lazy load.
        for (var i = 0; i < lazyFxx.images.length; i++) {
            if (lazyFxx.isInViewport(lazyFxx.images[i])) {
                lazyFxx.lazyLoad(lazyFxx.images[i]);
            }
        }
    };

    /**
     * Update the list that we are watching.
     */
    lazyFxx.updateList = function () {
        lazyFxx.images = document.querySelectorAll('.lazyload-placeholder');
    };

    /**
     * Find out, if Element is in Viewport
     *
     * @param {Node} el
     */
    lazyFxx.isInViewport = function(el) {
        var rect = el.getBoundingClientRect();

        var atAllTop    = rect.top >= 0 && rect.left >= 0;
        var atAllBottom = rect.bottom >= 0 && rect.left >= 0;
        var bottom      = rect.bottom <= (window.innerHeight || document.documentElement.clientHeight);
        var right       = rect.right <= (window.innerWidth || document.documentElement.clientWidth);
        var top         = rect.top <= (window.innerHeight || document.documentElement.clientHeight);

        return (atAllTop && bottom && right) || (atAllBottom && top && right);
    };

    /**
     * Create a new element from the el, replace the src and show it.
     *
     * @param {Node} placeholder
     */
    lazyFxx.lazyLoad = function(placeholder) {
        // Create a new container around everything.
        var container = document.createElement('div');
        container.style['height'] = placeholder.offsetHeight + 'px';
        container.style['width'] = placeholder.offsetWidth + 'px';
        container.className += ' lazy-container';
        placeholder.parentNode.insertBefore(container, placeholder);

        // Copy the placeholder into the container
        container.appendChild(placeholder);

        // Create the original image.
        var original = placeholder.cloneNode(true);
        original.className += ' lazyload-original';

        // Add it to the dom.
        container.insertBefore(original, placeholder);
        // Replace the src.
        original.setAttribute('src', lazyFxx.getDataset(placeholder, 'src'));
        // Remove the lazyload class, becase we ara already lazy laoding this one.
        original.classList.remove('lazyload-placeholder');

        // Switch the image as soon as it's loaded.
        if (original.complete) {
            // It's already laoded. Maybe from the cache?
            lazyFxx.switchPlaceholder(original);
        } else {
            original.addEventListener('load', lazyFxx.switchPlaceholder)
        }
    };

    /**
     * Gets the dataset from en element.
     *
     * @param {Element} el
     * @param {string} what
     *
     * @returns {string}
     */
    lazyFxx.getDataset = function (el, what) {

        /** @type {string|null} */
        var result = el.getAttribute('data-' + what);
        if (result === null) {
            return '';
        }else {
            return result;
        }
    };

    /**
     * Switch the placeholder with te real image
     *
     * @param {Event|Node} original
     */
    lazyFxx.switchPlaceholder = function (original) {
        // Check, if we have an event, and get the real image.
        if (typeof original.target !== 'undefined') {
            original = original.target;
        }

        // Remove the event listener, just in case.
        original.removeEventListener('load', lazyFxx.switchPlaceholder);

        // Get the placeholder.
        var placeholder = original.nextSibling;
        var container = original.parentNode;
        var parent = container.parentNode;

        setTimeout(function(){
            placeholder.className += ' lazyload-hide';

            // Display the image
            original.className += ' lazyload-show';

            // Remove the placeholder from DOM and cache.
            placeholder.classList.remove('lazyload-placeholder');
            lazyFxx.updateList();

            // Re-witch the placeholder and the original, so we can keep the
            // registered events, which are probably on the placeholder.
            setTimeout(function(){
                placeholder.style['transition'] = 'none';
                placeholder.setAttribute('src', original.getAttribute('src'));
                placeholder.className = original.className;
                container.removeChild(original);

                // Remove all lazyloading debris.
                placeholder.style['transition'] = '';
                placeholder.classList.remove('lazyload-show');
                placeholder.classList.remove('lazyload-original');
                placeholder.removeAttribute('data-src');
                parent.insertBefore(placeholder, container);
                parent.removeChild(container);


            }, 500);

            container.style = [];
        }, 100);
    };

    // Start the drama as soon as the DOM is ready.
    document.addEventListener("DOMContentLoaded", lazyFxx.onDocumentReady);

    // Register it in the DOM
    window.lazyFxx = lazyFxx;

})();