PageSourceSearch

https://www.24hourfitness.com/etc/designs/24-hour-fitness-home/clientlib-components-home.min.js

js 24hourfitness.com collected 2026-10-02 04:55:30 UTC 113,477 bytes, 1,544 lines download raw bytes

1(function(){
2
3    if($(".card-content .class-schedule-search").length > 0 ){ 
4        $(".class-search-button").on("click",function(t){
5            t.preventDefault()
6        }),
7        $(".class-schedule-search .class-search-button").on("click",function(){
8            $(".class-schedule-search .form-search").hide(), 
9            $(".class-schedule-search .class-search-button").show(), 
10            $(this).siblings(".form-search").fadeIn(), 
11            $(this).closest(".class-search-button").hide()
12        }) 
13    }    
14})();
15
16window.onload = (event) => {
17
18    $("#leaderships .link-button-24.text-cta-24").click(function(e) {
19        if($(this).hasClass("less")){
20            $(this).removeClass("less");
21            $(this).find('a').text('READ MORE');
22        } else {
23            $(this).addClass("less");
24            $(this).find('a').text('READ LESS');
25        }
26        
27        e.preventDefault();
28        $(this).closest(".card-content").find(".text-24 .toggle-text").fadeToggle();
29    });
30};
31/* eslint-disable */
32$().ready(function() {
33	var $corporateCodeForm = $("#corporateLandingPageForm");
34	var $corporateCode = $("#corporateCode");
35    var $submitBtn = $corporateCodeForm.find(".link-button-24");
36    
37    $corporateCodeForm.validate({
38    	rules: {
39    		corporateCode: {
40    			required: true,
41    			maxlength: 16
42    		}
43    	},
44    	messages: {
45    		corporateCode: {
46    			required: "Enter a Corporate Code",
47    			maxlength: "Corporate code must be 16 characters. Please try again."
48    		}
49    	}
50    });	
51    
52    $corporateCode.on('blur keyup', function() {
53        if ($corporateCodeForm.valid()) {
54        	$submitBtn.prop('disabled', false);  
55        } else {
56        	$submitBtn.prop('disabled', 'disabled');
57        }
58    });
59	 
60	 
61	$corporateCodeForm.on("submit", function(event) {
62		event.preventDefault();
63		var corporateCode = $.trim($corporateCode.val());
64		
65		var ordersPath = '/sales/orders';
66		var customersPath = '/sales/orders/customers';
67		var promoPath = '/sales/orders/promo';
68		var productsPath = '/sales/orders/products';
69		
70		//Ajax call
71		$('#errorMessage').hide();
72		$('#wait').show();
73		corporateCode = corporateCode.toUpperCase();
74		console.log("corporateCode: "+corporateCode);
75		if(corporateCode.indexOf("CORP") == -1) {
76			corporateCode = corporateCode.concat("CORP");
77			console.log("corporateCode plus CORP: "+corporateCode);
78		}
79		$.ajax({
80			headers: { 
81		        "Content-Type": "application/json"
82		    },
83		    url: globalData.apiEndpoint+'/sales/v3/corporate/'+corporateCode+'/validate',
84		    type: 'GET',
85		    data: "",
86		    datatype: 'json'
87		})
88    	.done(function(data) {
89    		var corporateId = data.corporateId;
90    		$.ajax({
91    			headers: { 
92    		        "Content-Type": "application/json"
93    		    },
94    		    url: globalData.apiEndpoint+'/sales/v3/corporate-exclusion/'+corporateId+'/validate',
95    		    type: 'GET',
96    		    data: "",
97    		    datatype: 'json'
98    		})
99        	.done(function(data) {
100        		var corporateId = data.corporateId;
101    			$('#wait').hide();
102        		window.location.href = "/health_clubs/find-a-gym/?type=sales&flow=POS&corporateId="+corporateCode
103        	})
104        	.fail(function(errorMessage) {
105        		$('#wait').hide();
106        		$('#errorMessage').html("<p>Please visit the club to redeem this corporate ID.</p>")
107        		$('#errorMessage').show();
108        		
109        	});
110    	})
111    	.fail(function(errorMessage) {
112    		$('#wait').hide();
113    		$('#errorMessage').html("<p>Corporate ID does not exist.</p>")
114    		$('#errorMessage').show();
115    	});
116    });
117});
118
119
120(function () {
121
122	if($("#club-header-24").length === 0){
123		return;
124	}
125
126	var $header = $("#club-header-24");
127	var $controls = $header.find(".controls");
128	var $pauseBtn = $header.find(".pause-btn");
129	var $playBtn = $header.find(".play-btn");
130	var videoHeader = document.getElementById("videoHeader");
131	
132	var $videoCont = $header.find('#video-cont');
133	var mobile = $videoCont.data('video-mobile'); 
134	var desktop = $videoCont.data('video-desktop'); 
135	var desktopHd = $videoCont.data('video-desktop-hd'); 
136	var videoCont = $videoCont.find('video');
137	var posterMobile = $videoCont.data('poster-mobile');
138	var posterDesktop = $videoCont.data('poster-desktop');
139	//var initialLoad = true;
140
141    var mqls = [
142		window.matchMedia("(min-width: 641px)"), 
143		window.matchMedia("(min-width: 1200px)")
144	];
145
146	function mediaqueryresponse(){
147
148		if (mqls[0].matches == false && mqls[1].matches == false) {
149			if( videoCont.attr('src') != mobile ){
150				videoCont.attr('poster', posterMobile);
151				videoCont.attr('src', mobile);
152			}
153		}
154		if (mqls[0].matches && mqls[1].matches == false) { 			
155			if( videoCont.attr('src') != desktop  ){
156				videoCont.attr('poster', posterDesktop);
157				videoCont.attr('src', desktop);					
158			}
159		}
160
161		if (mqls[1].matches){ 			
162			if( videoCont.attr('src') != desktopHd  ) {
163				videoCont.attr('poster', posterDesktop);
164				videoCont.attr('src', desktopHd);
165			}				
166		}
167	} 
168
169	mediaqueryresponse();
170
171	for (var i=0; i<mqls.length; i++){
172		mqls[i].addEventListener("change", mediaqueryresponse);
173	}	
174	
175	function playVideo(){
176		videoHeader.play();		
177		$controls.attr("aria-label", "Pause Video");
178		$playBtn.hide();
179		$pauseBtn.show();
180	}
181	function pauseVideo(){
182		videoHeader.pause();		
183		$controls.attr("aria-label", "Play Video");
184		$playBtn.show();
185		$pauseBtn.hide();
186	}
187
188	function muteVideo(){	
189		videoHeader.muted = true;
190	}
191
192	function isPlaying(){
193		return $pauseBtn.css("display") !== "none";
194	}
195
196	$controls.on("click", function(){
197		if(isPlaying()){
198			pauseVideo();
199		}else{
200			playVideo();
201		}
202		
203	});
204
205	if(videoHeader !== null && videoHeader.getAttribute("autoplay") === 'autoplay'){
206		videoHeader.addEventListener("canplay", function() {
207			playVideo();
208			muteVideo();
209		});
210	}
211
212
213	$("#modal-link").on("click", function(){
214		pauseVideo();
215
216		setTimeout(function(){
217			var targetNode = document.getElementsByClassName('modal fade in')[0];
218			var observer = new MutationObserver(function(){
219				if(targetNode.style.display !== 'block'){						
220					playVideo();
221					observer.disconnect();
222				}
223			});
224			observer.observe(targetNode, { attributes: true, childList: true });
225		},300);
226	});
227
228
229
230	function videoPlay() {
231		videoHeader.play();
232	}
233
234
235	
236	
237})();
238
239$(document).on("click", ".show-disclaimer",  function(e) {
240    e.preventDefault();
241    $(".container-disclaimer").slideDown( "slow" );
242    $(".disclaimer").hide();
243});
244
245
246$(document).on("click", ".disclaimer-close", function(e) {
247    e.preventDefault();
248    $(".container-disclaimer").hide();
249    $(".disclaimer").slideDown("slow");
250});
251
252/*******************************************************************************
253 * Copyright 2022 Adobe
254 *
255 * Licensed under the Apache License, Version 2.0 (the "License");
256 * you may not use this file except in compliance with the License.
257 * You may obtain a copy of the License at
258 *
259 *     http://www.apache.org/licenses/LICENSE-2.0
260 *
261 * Unless required by applicable law or agreed to in writing, software
262 * distributed under the License is distributed on an "AS IS" BASIS,
263 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
264 * See the License for the specific language governing permissions and
265 * limitations under the License.
266 ******************************************************************************/
267(function(document) {
268    "use strict";
269
270    window.CMP = window.CMP || {};
271    window.CMP.utils = (function() {
272        var NS = "cmp";
273
274        /**
275         * Reads options data from the Component wrapper element, defined via {@code data-cmp-*} data attributes
276         *
277         * @param {HTMLElement} element The component element to read options data from
278         * @param {String} is The component identifier
279         * @returns {String[]} The options read from the component data attributes
280         */
281        var readData = function(element, is) {
282            var data = element.dataset;
283            var options = [];
284            var capitalized = is;
285            capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1);
286            var reserved = ["is", "hook" + capitalized];
287
288            for (var key in data) {
289                if (Object.prototype.hasOwnProperty.call(data, key)) {
290                    var value = data[key];
291
292                    if (key.indexOf(NS) === 0) {
293                        key = key.slice(NS.length);
294                        key = key.charAt(0).toLowerCase() + key.substring(1);
295
296                        if (reserved.indexOf(key) === -1) {
297                            options[key] = value;
298                        }
299                    }
300                }
301            }
302            return options;
303        };
304
305        /**
306         * Set up the final properties of a component by evaluating the transform function or fall back to the default value on demand
307         * @param {String[]} options the options to transform
308         * @param {Object} properties object of properties of property functions
309         * @returns {Object} transformed properties
310         */
311        var setupProperties = function(options, properties) {
312            var transformedProperties = {};
313
314            for (var key in properties) {
315                if (Object.prototype.hasOwnProperty.call(properties, key)) {
316                    var property = properties[key];
317                    if (options && options[key] != null) {
318                        if (property && typeof property.transform === "function") {
319                            transformedProperties[key] = property.transform(options[key]);
320                        } else {
321                            transformedProperties[key] = options[key];
322                        }
323                    } else {
324                        transformedProperties[key] = properties[key]["default"];
325                    }
326                }
327            }
328            return transformedProperties;
329        };
330
331
332        return {
333            readData: readData,
334            setupProperties: setupProperties
335        };
336    }());
337}(window.document));
338
339/*******************************************************************************
340 * Copyright 2018 Adobe
341 *
342 * Licensed under the Apache License, Version 2.0 (the "License");
343 * you may not use this file except in compliance with the License.
344 * You may obtain a copy of the License at
345 *
346 *     http://www.apache.org/licenses/LICENSE-2.0
347 *
348 * Unless required by applicable law or agreed to in writing, software
349 * distributed under the License is distributed on an "AS IS" BASIS,
350 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
351 * See the License for the specific language governing permissions and
352 * limitations under the License.
353 ******************************************************************************/
354(function() {
355    "use strict";
356
357    var containerUtils = window.CQ && window.CQ.CoreComponents && window.CQ.CoreComponents.container && window.CQ.CoreComponents.container.utils ? window.CQ.CoreComponents.container.utils : undefined;
358    if (!containerUtils) {
359        // eslint-disable-next-line no-console
360        console.warn("Tabs: container utilities at window.CQ.CoreComponents.container.utils are not available. This can lead to missing features. Ensure the core.wcm.components.commons.site.container client library is included on the page.");
361    }
362    var dataLayerEnabled;
363    var dataLayer;
364    var dataLayerName;
365
366    var NS = "cmp";
367    var IS = "carousel";
368
369    var keyCodes = {
370        SPACE: 32,
371        END: 35,
372        HOME: 36,
373        ARROW_LEFT: 37,
374        ARROW_UP: 38,
375        ARROW_RIGHT: 39,
376        ARROW_DOWN: 40
377    };
378
379    var selectors = {
380        self: "[data-" + NS + '-is="' + IS + '"]'
381    };
382
383    var properties = {
384        /**
385         * Determines whether the Carousel will automatically transition between slides
386         *
387         * @memberof Carousel
388         * @type {Boolean}
389         * @default false
390         */
391        "autoplay": {
392            "default": false,
393            "transform": function(value) {
394                return !(value === null || typeof value === "undefined");
395            }
396        },
397        /**
398         * Duration (in milliseconds) before automatically transitioning to the next slide
399         *
400         * @memberof Carousel
401         * @type {Number}
402         * @default 5000
403         */
404        "delay": {
405            "default": 5000,
406            "transform": function(value) {
407                value = parseFloat(value);
408                return !isNaN(value) ? value : null;
409            }
410        },
411        /**
412         * Determines whether automatic pause on hovering the carousel is disabled
413         *
414         * @memberof Carousel
415         * @type {Boolean}
416         * @default false
417         */
418        "autopauseDisabled": {
419            "default": false,
420            "transform": function(value) {
421                return !(value === null || typeof value === "undefined");
422            }
423        }
424    };
425
426    /**
427     * Carousel Configuration
428     *
429     * @typedef {Object} CarouselConfig Represents a Carousel configuration
430     * @property {HTMLElement} element The HTMLElement representing the Carousel
431     * @property {*[]} options The Carousel options
432     */
433
434    /**
435     * Carousel
436     *
437     * @class Carousel
438     * @classdesc An interactive Carousel component for navigating a list of generic items
439     * @param {CarouselConfig} config The Carousel configuration
440     */
441    function Carousel(config) {
442        var that = this;
443
444        if (config && config.element) {
445            init(config);
446        }
447
448        /**
449         * Initializes the Carousel
450         *
451         * @private
452         * @param {CarouselConfig} config The Carousel configuration
453         */
454        function init(config) {
455            that._config = config;
456
457            // prevents multiple initialization
458            config.element.removeAttribute("data-" + NS + "-is");
459
460            setupProperties(config.options);
461            cacheElements(config.element);
462
463            that._active = 0;
464            that._paused = false;
465
466            if (that._elements.item) {
467                initializeActive();
468                bindEvents();
469                resetAutoplayInterval();
470                refreshPlayPauseActions();
471                scrollToDeepLinkIdInCarousel();
472            }
473
474            // TODO: This section is only relevant in edit mode and should move to the editor clientLib
475            if (window.Granite && window.Granite.author && window.Granite.author.MessageChannel) {
476                /*
477                 * Editor message handling:
478                 * - subscribe to "cmp.panelcontainer" message requests sent by the editor frame
479                 * - check that the message data panel container type is correct and that the id (path) matches this specific Carousel component
480                 * - if so, route the "navigate" operation to enact a navigation of the Carousel based on index data
481                 */
482                window.CQ = window.CQ || {};
483                window.CQ.CoreComponents = window.CQ.CoreComponents || {};
484                window.CQ.CoreComponents.MESSAGE_CHANNEL = window.CQ.CoreComponents.MESSAGE_CHANNEL || new window.Granite.author.MessageChannel("cqauthor", window);
485                window.CQ.CoreComponents.MESSAGE_CHANNEL.subscribeRequestMessage("cmp.panelcontainer", function(message) {
486                    if (message.data && message.data.type === "cmp-carousel" && message.data.id === that._elements.self.dataset["cmpPanelcontainerId"]) {
487                        if (message.data.operation === "navigate") {
488                            navigate(message.data.index);
489                        }
490                    }
491                });
492            }
493        }
494
495        /**
496         * Displays the slide containing the element that corresponds to the deep link in the URI fragment
497         * and scrolls the browser to this element.
498         */
499        function scrollToDeepLinkIdInCarousel() {
500            if (containerUtils) {
501                var deepLinkItemIdx = containerUtils.getDeepLinkItemIdx(that, "item", "item");
502                if (deepLinkItemIdx > -1) {
503                    var deepLinkItem = that._elements["item"][deepLinkItemIdx];
504                    if (deepLinkItem && that._elements["item"][that._active].id !== deepLinkItem.id) {
505                        navigateAndFocusIndicator(deepLinkItemIdx, true);
506                        // pause the carousel auto-rotation
507                        pause();
508                    }
509                    var hashId = window.location.hash.substring(1);
510                    if (hashId) {
511                        var hashItem = document.querySelector("[id='" + hashId + "']");
512                        if (hashItem) {
513                            hashItem.scrollIntoView();
514                        }
515                    }
516                }
517            }
518        }
519
520        /**
521         * Caches the Carousel elements as defined via the {@code data-carousel-hook="ELEMENT_NAME"} markup API
522         *
523         * @private
524         * @param {HTMLElement} wrapper The Carousel wrapper element
525         */
526        function cacheElements(wrapper) {
527            that._elements = {};
528            that._elements.self = wrapper;
529            var hooks = that._elements.self.querySelectorAll("[data-" + NS + "-hook-" + IS + "]");
530
531            for (var i = 0; i < hooks.length; i++) {
532                var hook = hooks[i];
533                var capitalized = IS;
534                capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1);
535                var key = hook.dataset[NS + "Hook" + capitalized];
536                if (that._elements[key]) {
537                    if (!Array.isArray(that._elements[key])) {
538                        var tmp = that._elements[key];
539                        that._elements[key] = [tmp];
540                    }
541                    that._elements[key].push(hook);
542                } else {
543                    that._elements[key] = hook;
544                }
545            }
546        }
547
548        /**
549         * Sets up properties for the Carousel based on the passed options.
550         *
551         * @private
552         * @param {Object} options The Carousel options
553         */
554        function setupProperties(options) {
555            that._properties = {};
556
557            for (var key in properties) {
558                if (Object.prototype.hasOwnProperty.call(properties, key)) {
559                    var property = properties[key];
560                    var value = null;
561
562                    if (options && options[key] != null) {
563                        value = options[key];
564
565                        // transform the provided option
566                        if (property && typeof property.transform === "function") {
567                            value = property.transform(value);
568                        }
569                    }
570
571                    if (value === null) {
572                        // value still null, take the property default
573                        value = properties[key]["default"];
574                    }
575
576                    that._properties[key] = value;
577                }
578            }
579        }
580
581        /**
582         * Binds Carousel event handling
583         *
584         * @private
585         */
586        function bindEvents() {
587            window.addEventListener("hashchange", scrollToDeepLinkIdInCarousel, false);
588            if (that._elements["previous"]) {
589                that._elements["previous"].addEventListener("click", function() {
590                    var index = getPreviousIndex();
591                    navigate(index);
592                    if (dataLayerEnabled) {
593                        dataLayer.push({
594                            event: "cmp:show",
595                            eventInfo: {
596                                path: "component." + getDataLayerId(that._elements.item[index])
597                            }
598                        });
599                    }
600                });
601            }
602
603            if (that._elements["next"]) {
604                that._elements["next"].addEventListener("click", function() {
605                    var index = getNextIndex();
606                    navigate(index);
607                    if (dataLayerEnabled) {
608                        dataLayer.push({
609                            event: "cmp:show",
610                            eventInfo: {
611                                path: "component." + getDataLayerId(that._elements.item[index])
612                            }
613                        });
614                    }
615                });
616            }
617
618            var indicators = that._elements["indicator"];
619            if (indicators) {
620                for (var i = 0; i < indicators.length; i++) {
621                    (function(index) {
622                        indicators[i].addEventListener("click", function(event) {
623                            navigateAndFocusIndicator(index);
624                            // pause the carousel auto-rotation
625                            pause();
626                        });
627                    })(i);
628                }
629            }
630
631            if (that._elements["pause"]) {
632                if (that._properties.autoplay) {
633                    that._elements["pause"].addEventListener("click", onPauseClick);
634                }
635            }
636
637            if (that._elements["play"]) {
638                if (that._properties.autoplay) {
639                    that._elements["play"].addEventListener("click", onPlayClick);
640                }
641            }
642
643            that._elements.self.addEventListener("keydown", onKeyDown);
644
645            if (!that._properties.autopauseDisabled) {
646                that._elements.self.addEventListener("mouseenter", onMouseEnter);
647                that._elements.self.addEventListener("mouseleave", onMouseLeave);
648            }
649
650            // for accessibility we pause animation when a element get focused
651            var items = that._elements["item"];
652            if (items) {
653                for (var j = 0; j < items.length; j++) {
654                    items[j].addEventListener("focusin", onMouseEnter);
655                    items[j].addEventListener("focusout", onMouseLeave);
656                }
657            }
658        }
659
660        /**
661         * Handles carousel keydown events
662         *
663         * @private
664         * @param {Object} event The keydown event
665         */
666        function onKeyDown(event) {
667            var index = that._active;
668            var lastIndex = that._elements["indicator"].length - 1;
669
670            switch (event.keyCode) {
671                case keyCodes.ARROW_LEFT:
672                case keyCodes.ARROW_UP:
673                    event.preventDefault();
674                    if (index > 0) {
675                        navigateAndFocusIndicator(index - 1);
676                    }
677                    break;
678                case keyCodes.ARROW_RIGHT:
679                case keyCodes.ARROW_DOWN:
680                    event.preventDefault();
681                    if (index < lastIndex) {
682                        navigateAndFocusIndicator(index + 1);
683                    }
684                    break;
685                case keyCodes.HOME:
686                    event.preventDefault();
687                    navigateAndFocusIndicator(0);
688                    break;
689                case keyCodes.END:
690                    event.preventDefault();
691                    navigateAndFocusIndicator(lastIndex);
692                    break;
693                case keyCodes.SPACE:
694                    if (that._properties.autoplay && (event.target !== that._elements["previous"] && event.target !== that._elements["next"])) {
695                        event.preventDefault();
696                        if (!that._paused) {
697                            pause();
698                        } else {
699                            play();
700                        }
701                    }
702                    if (event.target === that._elements["pause"]) {
703                        that._elements["play"].focus();
704                    }
705                    if (event.target === that._elements["play"]) {
706                        that._elements["pause"].focus();
707                    }
708                    break;
709                default:
710                    return;
711            }
712        }
713
714        /**
715         * Handles carousel mouseenter events
716         *
717         * @private
718         * @param {Object} event The mouseenter event
719         */
720        function onMouseEnter(event) {
721            clearAutoplayInterval();
722        }
723
724        /**
725         * Handles carousel mouseleave events
726         *
727         * @private
728         * @param {Object} event The mouseleave event
729         */
730        function onMouseLeave(event) {
731            resetAutoplayInterval();
732        }
733
734        /**
735         * Handles pause element click events
736         *
737         * @private
738         * @param {Object} event The click event
739         */
740        function onPauseClick(event) {
741            pause();
742            that._elements["play"].focus();
743        }
744
745        /**
746         * Handles play element click events
747         *
748         * @private
749         * @param {Object} event The click event
750         */
751        function onPlayClick() {
752            play();
753            that._elements["pause"].focus();
754        }
755
756        /**
757         * Pauses the playing of the Carousel. Sets {@code Carousel#_paused} marker.
758         * Only relevant when autoplay is enabled
759         *
760         * @private
761         */
762        function pause() {
763            that._paused = true;
764            clearAutoplayInterval();
765            refreshPlayPauseActions();
766        }
767
768        /**
769         * Enables the playing of the Carousel. Sets {@code Carousel#_paused} marker.
770         * Only relevant when autoplay is enabled
771         *
772         * @private
773         */
774        function play() {
775            that._paused = false;
776
777            // If the Carousel is hovered, don't begin auto transitioning until the next mouse leave event
778            var hovered = false;
779            if (that._elements.self.parentElement) {
780                hovered = that._elements.self.parentElement.querySelector(":hover") === that._elements.self;
781            }
782            if (that._properties.autopauseDisabled || !hovered) {
783                resetAutoplayInterval();
784            }
785
786            refreshPlayPauseActions();
787        }
788
789        /**
790         * Refreshes the play/pause action markup based on the {@code Carousel#_paused} state
791         *
792         * @private
793         */
794        function refreshPlayPauseActions() {
795            setActionDisabled(that._elements["pause"], that._paused);
796            setActionDisabled(that._elements["play"], !that._paused);
797        }
798
799        /**
800         * Initialize {@code Carousel#_active} based on the active item of the carousel.
801         */
802        function initializeActive() {
803            var items = that._elements["item"];
804            if (items && Array.isArray(items)) {
805                for (var i = 0; i < items.length; i++) {
806                    if (items[i].classList.contains("cmp-carousel__item--active")) {
807                        that._active = i;
808                        break;
809                    }
810                }
811            }
812        }
813
814        /**
815         * Refreshes the item markup based on the current {@code Carousel#_active} index
816         *
817         * @private
818         */
819        function refreshActive() {
820            var items = that._elements["item"];
821            var indicators = that._elements["indicator"];
822
823            if (items) {
824                if (Array.isArray(items)) {
825                    for (var i = 0; i < items.length; i++) {
826                        if (i === parseInt(that._active)) {
827                            items[i].classList.add("cmp-carousel__item--active");
828                            items[i].removeAttribute("aria-hidden");
829                            indicators[i].classList.add("cmp-carousel__indicator--active");
830                            indicators[i].setAttribute("aria-selected", true);
831                            indicators[i].setAttribute("tabindex", "0");
832                        } else {
833                            items[i].classList.remove("cmp-carousel__item--active");
834                            items[i].setAttribute("aria-hidden", true);
835                            indicators[i].classList.remove("cmp-carousel__indicator--active");
836                            indicators[i].setAttribute("aria-selected", false);
837                            indicators[i].setAttribute("tabindex", "-1");
838                        }
839                    }
840                } else {
841                    // only one item
842                    items.classList.add("cmp-carousel__item--active");
843                    indicators.classList.add("cmp-carousel__indicator--active");
844                }
845            }
846        }
847
848        /**
849         * Focuses the element and prevents scrolling the element into view
850         *
851         * @param {HTMLElement} element Element to focus
852         */
853        function focusWithoutScroll(element) {
854            var x = window.scrollX || window.pageXOffset;
855            var y = window.scrollY || window.pageYOffset;
856            element.focus();
857            window.scrollTo(x, y);
858        }
859
860        /**
861         * Retrieves the next active index, with looping
862         *
863         * @private
864         * @returns {Number} Index of the next carousel item
865         */
866        function getNextIndex() {
867            return that._active === (that._elements["item"].length - 1) ? 0 : that._active + 1;
868        }
869
870        /**
871         * Retrieves the previous active index, with looping
872         *
873         * @private
874         * @returns {Number} Index of the previous carousel item
875         */
876        function getPreviousIndex() {
877            return that._active === 0 ? (that._elements["item"].length - 1) : that._active - 1;
878        }
879
880        /**
881         * Navigates to the item at the provided index
882         *
883         * @private
884         * @param {Number} index The index of the item to navigate to
885         * @param {Boolean} keepHash true to keep the hash in the URL, false to update it
886         */
887        function navigate(index, keepHash) {
888            if (index < 0 || index > (that._elements["item"].length - 1)) {
889                return;
890            }
891
892            that._active = index;
893            refreshActive();
894
895            if (!keepHash && containerUtils) {
896                containerUtils.updateUrlHash(that, "item", index);
897            }
898
899            if (dataLayerEnabled) {
900                var carouselId = that._elements.self.id;
901                var activeItem = getDataLayerId(that._elements.item[index]);
902                var updatePayload = { component: {} };
903                updatePayload.component[carouselId] = { shownItems: [activeItem] };
904
905                var removePayload = { component: {} };
906                removePayload.component[carouselId] = { shownItems: undefined };
907
908                dataLayer.push(removePayload);
909                dataLayer.push(updatePayload);
910            }
911
912            // reset the autoplay transition interval following navigation, if not already hovering the carousel
913            if (that._elements.self.parentElement) {
914                if (that._elements.self.parentElement.querySelector(":hover") !== that._elements.self) {
915                    resetAutoplayInterval();
916                }
917            }
918        }
919
920        /**
921         * Navigates to the item at the provided index and ensures the active indicator gains focus
922         *
923         * @private
924         * @param {Number} index The index of the item to navigate to
925         * @param {Boolean} keepHash true to keep the hash in the URL, false to update it
926         */
927        function navigateAndFocusIndicator(index, keepHash) {
928            navigate(index, keepHash);
929            focusWithoutScroll(that._elements["indicator"][index]);
930
931            if (dataLayerEnabled) {
932                dataLayer.push({
933                    event: "cmp:show",
934                    eventInfo: {
935                        path: "component." + getDataLayerId(that._elements.item[index])
936                    }
937                });
938            }
939        }
940
941        /**
942         * Starts/resets automatic slide transition interval
943         *
944         * @private
945         */
946        function resetAutoplayInterval() {
947            if (that._paused || !that._properties.autoplay) {
948                return;
949            }
950            clearAutoplayInterval();
951            that._autoplayIntervalId = window.setInterval(function() {
952                if (document.visibilityState && document.hidden) {
953                    return;
954                }
955                var indicators = that._elements["indicators"];
956                if (indicators !== document.activeElement && indicators.contains(document.activeElement)) {
957                    // if an indicator has focus, ensure we switch focus following navigation
958                    navigateAndFocusIndicator(getNextIndex(), true);
959                } else {
960                    navigate(getNextIndex(), true);
961                }
962            }, that._properties.delay);
963        }
964
965        /**
966         * Clears/pauses automatic slide transition interval
967         *
968         * @private
969         */
970        function clearAutoplayInterval() {
971            window.clearInterval(that._autoplayIntervalId);
972            that._autoplayIntervalId = null;
973        }
974
975        /**
976         * Sets the disabled state for an action and toggles the appropriate CSS classes
977         *
978         * @private
979         * @param {HTMLElement} action Action to disable
980         * @param {Boolean} [disable] {@code true} to disable, {@code false} to enable
981         */
982        function setActionDisabled(action, disable) {
983            if (!action) {
984                return;
985            }
986            if (disable !== false) {
987                action.disabled = true;
988                action.classList.add("cmp-carousel__action--disabled");
989            } else {
990                action.disabled = false;
991                action.classList.remove("cmp-carousel__action--disabled");
992            }
993        }
994    }
995
996    /**
997     * Parses the dataLayer string and returns the ID
998     *
999     * @private
1000     * @param {HTMLElement} item the accordion item
1001     * @returns {String} dataLayerId or undefined
1002     */
1003    function getDataLayerId(item) {
1004        if (item) {
1005            if (item.dataset.cmpDataLayer) {
1006                return Object.keys(JSON.parse(item.dataset.cmpDataLayer))[0];
1007            } else {
1008                return item.id;
1009            }
1010        }
1011        return null;
1012    }
1013
1014    /**
1015     * Document ready handler and DOM mutation observers. Initializes Carousel components as necessary.
1016     *
1017     * @private
1018     */
1019    function onDocumentReady() {
1020        dataLayerEnabled = document.body.hasAttribute("data-cmp-data-layer-enabled");
1021        if (dataLayerEnabled) {
1022            dataLayerName = document.body.getAttribute("data-cmp-data-layer-name") || "adobeDataLayer";
1023            dataLayer = window[dataLayerName] = window[dataLayerName] || [];
1024        }
1025
1026        var elements = document.querySelectorAll(selectors.self);
1027        for (var i = 0; i < elements.length; i++) {
1028            new Carousel({ element: elements[i], options: CMP.utils.readData(elements[i], IS) });
1029        }
1030
1031        var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
1032        var body = document.querySelector("body");
1033        var observer = new MutationObserver(function(mutations) {
1034            mutations.forEach(function(mutation) {
1035                // needed for IE
1036                var nodesArray = [].slice.call(mutation.addedNodes);
1037                if (nodesArray.length > 0) {
1038                    nodesArray.forEach(function(addedNode) {
1039                        if (addedNode.querySelectorAll) {
1040                            var elementsArray = [].slice.call(addedNode.querySelectorAll(selectors.self));
1041                            elementsArray.forEach(function(element) {
1042                                new Carousel({ element: element, options: CMP.utils.readData(element, IS) });
1043                            });
1044                        }
1045                    });
1046                }
1047            });
1048        });
1049
1050        observer.observe(body, {
1051            subtree: true,
1052            childList: true,
1053            characterData: true
1054        });
1055    }
1056
1057    var documentReady = document.readyState !== "loading" ? Promise.resolve() : new Promise(function(resolve) {
1058        document.addEventListener("DOMContentLoaded", resolve);
1059    });
1060    Promise.all([documentReady]).then(onDocumentReady);
1061
1062    if (containerUtils) {
1063        window.addEventListener("load", containerUtils.scrollToAnchor, false);
1064    }
1065
1066}());
1067
1068$(document).ready(function() {
1069
1070async function validateImageUrls($carousel) {
1071        const imgs = $carousel.find(".cmp-carousel__item .cmp-image__image");
1072        const checks = [];
1073
1074        imgs.each(function() {
1075            const src = $(this).attr('src');
1076            if (src) {
1077                checks.push(
1078                    fetch(src, { method: 'HEAD' })
1079                    .then(res => res.ok)
1080                    .catch(() => false)
1081                );
1082            }
1083        });
1084        const results = await Promise.all(checks);
1085        const validCount = results.filter(Boolean).length;
1086        return validCount > 0;
1087}
1088
1089$(".main-carousel").each(async function() {
1090        var $sync1 = $(this);
1091        var autoplay = $sync1.data("autoplay") === true || $sync1.data("autoplay") === "true";
1092        var $container = $sync1.closest('.container-24');
1093        var $sync2 = $container.find('.thumbnails-carousel');
1094        var slidesPerPage = 7;
1095
1096        const hasValidImages = await validateImageUrls($sync1);                
1097        if (!hasValidImages) {
1098            console.warn("No carousel images.");
1099            return;
1100        }
1101
1102        $sync1.owlCarousel({
1103            items: 1,
1104            slideSpeed: 2000,
1105            nav: true,
1106            autoplay: autoplay,
1107            dots: autoplay,
1108            loop: true,
1109            autoplaySpeed: 400,
1110            responsiveRefreshRate: 200,
1111            navText: ['<span>‹</span>', '<span>›</span>'],
1112        }).on('changed.owl.carousel', function(event) {
1113            if ($sync2.length > 0) {
1114                syncPosition(event, $sync2);
1115            }
1116        });
1117
1118        if ($sync2.length > 0 ) {
1119            $sync2.on('initialized.owl.carousel', function() {
1120                $sync2.find(".owl-item").eq(0).addClass("current");
1121            })
1122            .owlCarousel({
1123                responsive: {
1124                    0: {
1125                        items: 3,
1126                        nav: true,
1127                        loop: false
1128                    },
1129                    600: {
1130                        items: slidesPerPage,
1131                        nav: true,
1132                        loop: false
1133                    },
1134                    1000: {
1135                        items: slidesPerPage,
1136                        nav: true,
1137                        loop: false
1138                    }
1139                },
1140                dots: autoplay,
1141                nav: true,
1142                smartSpeed: 200,
1143                slideSpeed: 500,
1144                slideBy: slidesPerPage,
1145                responsiveRefreshRate: 100,
1146            })
1147
1148        
1149        }
1150
1151        if (autoplay) {
1152            var $pauseButton = $sync1.closest('.cmp-carousel').find('.cmp-carousel__action--pause');
1153            var $playButton = $sync1.closest('.cmp-carousel').find('.cmp-carousel__action--play');
1154
1155            $pauseButton.on('click', function() {
1156                $sync1.trigger('stop.owl.autoplay');
1157                $pauseButton.addClass('cmp-carousel__action--disabled');
1158                $playButton.removeClass('cmp-carousel__action--disabled');
1159            });
1160
1161            $playButton.on('click', function() {
1162                $sync1.trigger('play.owl.autoplay', [1000]);
1163                $playButton.addClass('cmp-carousel__action--disabled');
1164                $pauseButton.removeClass('cmp-carousel__action--disabled');
1165            });
1166        }
1167
1168
1169        function syncPosition(el) {            
1170            var count = el.item.count - 1;
1171            var current = Math.round(el.item.index - (el.item.count / 2) - .5);            
1172            
1173            if (current < 0) {
1174                current = count;
1175            }
1176            if (current > count) {
1177                current -= 1;
1178            }
1179                        
1180            $sync2
1181                .find(".owl-item")
1182                .removeClass("current")
1183                .eq(current)
1184                .addClass("current");
1185            var onscreen = $sync2.find('.owl-item.active').length - 1;
1186            var start = $sync2.find('.owl-item.active').first().index();
1187            var end = $sync2.find('.owl-item.active').last().index();
1188    
1189            if (current > end) {
1190                $sync2.data('owl.carousel').to(current, 100, true);
1191            }
1192            if (current < start) {
1193                $sync2.data('owl.carousel').to(current - onscreen, 100, true);
1194            }
1195        }    
1196
1197        $(document).on("click", ".thumbnails-carousel .owl-item", function(e) {
1198            e.preventDefault();
1199            var $thisCarousel = $(this).closest('.thumbnails-carousel');
1200            var index = $(this).index();
1201            var $mainCarousel = $thisCarousel.closest('.container-24').find('.main-carousel');
1202            console.log("Thumbnail clicked index: ", index);
1203            $mainCarousel.data('owl.carousel').to(index, 300, true);
1204        });
1205        
1206
1207    });
1208
1209    
1210    
1211});
1212
1213const $input = $('#autocomplete-input');
1214const $results = $('#autocomplete-results');
1215
1216function throttle(func, delay) {
1217  let lastCall = 0;
1218  return function (...args) {
1219    const now = new Date().getTime();
1220    if (now - lastCall >= delay) {
1221      lastCall = now;
1222      func.apply(this, args);
1223    }
1224  };
1225}
1226
1227function customSortBy(collection, prop) {
1228    return collection.sort((a, b) => {
1229      if (a[prop] < b[prop]) {
1230        return -1;
1231      }
1232      if (a[prop] > b[prop]) {
1233        return 1;
1234      }
1235      return 0;
1236    });
1237  }
1238
1239function renderResults(results) {
1240    $results.empty();
1241    let autocompleteLocations = [];
1242    let searchType = '';
1243
1244    if (results && results.length) {
1245      results.forEach((location) => {
1246
1247        if (location.recordType) {
1248          searchType = location.recordType;
1249        }
1250
1251        let itemID = '';
1252
1253        if (location.place.properties.countryCode === "US") {
1254          if (searchType === "city" && location.place.properties.county && location.place.properties.county.length > 0) {
1255            itemID = location.place.properties.city.replace(/\s/g, "-") + '-' + (location.place.properties.stateCode || location.place.properties.countryCode);
1256            autocompleteLocations.push(
1257              {
1258                location:
1259                  location.place.properties.city +
1260                  ", " +
1261                  (location.place.properties.stateCode ||
1262                    location.place.properties.countryCode),
1263                locationDetail: location.place.properties.county,
1264                recordType: searchType,
1265                itemID: itemID,
1266                stateCode: location.place.properties.stateCode,
1267                queryString: location.place.properties.city + ', ' + location.place.properties.county + ', ' + location.place.properties.stateCode,
1268              }
1269            );
1270          } else if (searchType === "postalCode") {
1271            if (location.place.properties.countryCode === 'US') {
1272              itemID = location.place.properties.postalCode + '-' + location.place.properties.city.replace(/\s/g, "-") + '-' + location.place.properties.stateCode;
1273              autocompleteLocations.push(
1274                {
1275                  location:
1276                    location.place.properties.postalCode +
1277                    " - " +
1278                    location.place.properties.city +
1279                    ", " +
1280                    location.place.properties.stateCode,
1281                  recordType: searchType,
1282                  zipcode: location.place.properties.postalCode,
1283                  itemID: itemID,
1284                  stateCode: location.place.properties.stateCode
1285                }
1286              );
1287            } else {
1288              // throw error?
1289            }
1290          }
1291        }
1292      });
1293    }
1294    let locationResults = customSortBy(autocompleteLocations, 'stateCode').slice(0,4);
1295    if (locationResults.length === 0) {
1296      $results.removeClass('hidden').append('<li>No results found</li>');
1297      return;
1298    } else {
1299      $results.removeClass('hidden');
1300      locationResults.forEach((item) => {
1301        $results.append(
1302          `<li recordType="${item.recordType}" queryString="${item.queryString}" location="${item.location}" zipcode="${item.zipcode}">
1303            ${item.location}
1304            ${item.locationDetail ? `<span class="location-detail">${item.locationDetail}</span>` : ''}
1305          </li>`
1306        );
1307      });
1308    }
1309  }
1310
1311function fetchResults(query) {
1312  $.getJSON('https://www.mapquestapi.com/search/v3/prediction', {
1313    key: MP_KEY,
1314    limit: 10,
1315    collection: "adminArea",
1316    q: query,
1317    full_headers: 1,
1318    full_status: 1,
1319    countryCode: "US",
1320    }, function (data) {
1321    renderResults(data.results);
1322  });
1323}
1324
1325const MP_KEY = "Gmjtd%7Clu6zn1ua2d%2C7s%3Do5-9rag9";
1326const throttledFetch = throttle(fetchResults, 1000);
1327
1328$(document).ready(function () {
1329  let debounce;
1330
1331  function updateSearchLink(value) {
1332    const $searchLink = $('#location-search-link');
1333    if (value) {
1334      $searchLink.attr('href', `/gyms/find-a-gym/?location=${value}&type=join`);
1335      $searchLink.removeClass('disabled');
1336    } else {
1337      $searchLink.attr('href', '#');
1338      $searchLink.addClass('disabled');
1339    }
1340  }
1341
1342  $input.on('input', function () {
1343    let rawValue = $(this).val();
1344    let cleanedValue = rawValue.replace(/[^a-z0-9\s]/gi, '').replace(/\s+/g, ' ');
1345
1346    if (rawValue !== cleanedValue) {
1347      $(this).val(cleanedValue);
1348    }
1349
1350    const query = cleanedValue.trim();
1351    clearTimeout(debounce);
1352
1353    if (query.length >= 3) {
1354      debounce = setTimeout(function () {
1355        throttledFetch(query);
1356      }, 300);
1357    } else {
1358      $results.empty();
1359    }
1360  });
1361
1362  $results.on('click', 'li', function () {
1363    const recordType = $(this).attr('recordType');
1364
1365    let urlValue = '';
1366    if (recordType === 'postalCode') {
1367      urlValue =  $(this).attr('zipcode');
1368      $input.val($(this).attr('location'));
1369
1370    } else {
1371      urlValue = $(this).attr('queryString');
1372      $input.val(urlValue);
1373    }
1374
1375    updateSearchLink(urlValue);
1376    $results.empty().addClass('hidden');
1377
1378  });
1379
1380  $('#clear-input').on('click', function () {
1381    $input.val('');
1382    $results.empty().addClass('hidden');
1383    updateSearchLink('', '');
1384  });
1385});
1386var skipCookie = getCookie("SKIPHOMEPAGECOOKIE");
1387if (skipCookie && skipCookie === "MEMBERCOOKIE") {
1388  $(".member-only").show();
1389} else {
1390  $(".nonmember-only").show();
1391}
1392
1393function getCookie(name) {
1394  if (document.cookie.length > 0) {
1395    var start = document.cookie.indexOf(name + "=");
1396    if (start != -1) {
1397      start = start + name.length + 1;
1398      var end = document.cookie.indexOf(";", start);
1399      if (end == -1) end = document.cookie.length;
1400      return unescape(document.cookie.substring(start, end))
1401    }
1402  }
1403  return ""
1404}
1405
1406/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
1407 * https://jqueryvalidation.org/
1408 * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
1409!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)}
vendor: 11,440 bytes, line 1409
1409,a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=".  Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){"string"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.n
1409ame],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);
vendor: 4,097 bytes, line 1409
1409return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.val
1409idator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
1410/*! jquery.cookie v1.4.1 | MIT */
1411!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});
1412/**
1413 * jQuery plugin to convert a given $.ajax response xml object to json.
1414 *
1415 * @example var json = $.xml2json(response);
1416 */
1417(function() {
1418
1419	// default options based on https://github.com/Leonidas-from-XIV/node-xml2js
1420	var defaultOptions = {
1421		attrkey: '$',
1422		charkey: '_',
1423		normalize: false
1424	};
1425
1426	// extracted from jquery
1427	function parseXML(data) {
1428		var xml, tmp;
1429		if (!data || typeof data !== "string") {
1430			return null;
1431		}
1432		try {
1433			if (window.DOMParser) { // Standard
1434				tmp = new DOMParser();
1435				xml = tmp.parseFromString(data, "text/xml");
1436			} else { // IE
1437				xml = new ActiveXObject("Microsoft.XMLDOM");
1438				xml.async = "false";
1439				xml.loadXML(data);
1440			}
1441		} catch (e) {
1442			xml = undefined;
1443		}
1444		if (!xml || !xml.documentElement || xml.getElementsByTagName("parsererror").length) {
1445			throw new Error("Invalid XML: " + data);
1446		}
1447		return xml;
1448	}
1449
1450	function normalize(value, options){
1451		if (!!options.normalize){
1452			return (value || '').trim();
1453		}
1454		return value;
1455	}
1456
1457	function xml2jsonImpl(xml, options) {
1458
1459		var i, result = {}, attrs = {}, node, child, name;
1460		result[options.attrkey] = attrs;
1461
1462		if (xml.attributes && xml.attributes.length > 0) {
1463			for (i = 0; i < xml.attributes.length; i++){
1464				var item = xml.attributes.item(i);
1465				attrs[item.nodeName] = item.value;
1466			}
1467		}
1468
1469		// element content
1470		if (xml.childElementCount === 0) {
1471			result[options.charkey] = normalize(xml.textContent, options);
1472		}
1473
1474		for (i = 0; i < xml.childNodes.length; i++) {
1475			node = xml.childNodes[i];
1476			if (node.nodeType === 1) {
1477
1478				if (node.attributes.length === 0 && node.childElementCount === 0){
1479					child = normalize(node.textContent, options);
1480				} else {
1481					child = xml2jsonImpl(node, options);
1482				}
1483
1484				name = node.nodeName;
1485				if (result.hasOwnProperty(name)) {
1486					// For repeating elements, cast/promote the node to array
1487					var val = result[name];
1488					if (!Array.isArray(val)) {
1489						val = [val];
1490						result[name] = val;
1491					}
1492					val.push(child);
1493				} else {
1494					result[name] = child;
1495				}
1496			}
1497		}
1498
1499		return result;
1500	}
1501
1502	/**w
1503	 * Converts an xml document or string to a JSON object.
1504	 *
1505	 * @param xml
1506	 */
1507	function xml2json(xml, options) {
1508		if (!xml) {
1509			return xml;
1510		}
1511
1512		options = options || defaultOptions;
1513
1514		if (typeof xml === 'string') {
1515			xml = parseXML(xml).documentElement;
1516		}
1517
1518		var root = {};		
1519		if ( (typeof xml.attributes === 'undefined') || (xml.attributes === null) ) {
1520			root[xml.nodeName] = xml2jsonImpl(xml, options);
1521		} else if (xml.attributes.length === 0 && xml.childElementCount === 0){
1522			root[xml.nodeName] = normalize(xml.textContent, options);
1523		} else {
1524			root[xml.nodeName] = xml2jsonImpl(xml, options);
1525		}
1526
1527		return root;
1528	}
1529
1530	if (typeof jQuery !== 'undefined') {
1531		jQuery.extend({xml2json: xml2json});
1532	} else if (typeof module !== 'undefined') {
1533		module.exports = xml2json;
1534	} else if (typeof window !== 'undefined') {
1535		window.xml2json = xml2json;
1536	}
1537})();
vendor: 32,159 bytes, lines 1538-1543
1538/*!
1539 * Bootstrap v3.3.7 (http://getbootstrap.com)
1540 * Copyright 2011-2016 Twitter, Inc.
1541 * Licensed under the MIT license
1542 */
1543if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){document===a.target||this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);if(this.$element.trigger(g),!g.isDefaultPrevented())return f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=window.SVGElement&&c instanceof window.SVGElement,g=d?{top:0,left:0}:f?null:b.offset(),h={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},i=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,h,i,g)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){
vendor: 2,604 bytes, line 1544
1544  this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;
vendor: 2,285 bytes, line 1544
1544e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e<c&&"top";if("bottom"==this.affixed)return null!=c?!(e+this.unpin<=f.top)&&"bottom":!(e+g<=a-d)&&"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&e<=c?"top":null!=d&&i+j>=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.