PageSourceSearch

https://www.ccslib.org/sites/default/files/js/js_e7b6FWeCRH6XO6NTodqxjq9z20Z8hSNzKZoABuaHhqI.js

js ccslib.org collected 2026-09-28 09:29:51 UTC 68,014 bytes, 1,752 lines download raw bytes

1jQuery(document).ready(function ($) {
2    $('.advgb-tabs-wrapper').each(function () {
3        var activeTab = $(this).data('tab-active');
4        var tabPanel = $(this).find('.advgb-tab-panel');
5
6        var tab = $(this).find('li.advgb-tab:not(".advgb-tab-active")');
7        if($(this).prop('id') !== '') {
8            tab = $(this).find('li.advgb-tab:not(".ui-state-active")');
9        }
10        var tabs = $(this).find('.advgb-tab');
11        var bodyHeaders = $(this).find('.advgb-tab-body-header');
12        var bodyContainers = $(this).find('.advgb-tab-body-container');
13        var bgColor = tab.css('background-color');
14        var borderColor = tab.css('border-color');
15        var borderWidth = tab.css('border-width');
16        var borderStyle = tab.css('border-style');
17        var borderRadius = tab.css('border-radius');
18        var textColor = tab.find('a').css('color');
19
20        if($(this).prop('id') !== '') {
21            $( this ).find( ".advgb-tab a:not(.ui-tabs-anchor)" ).unbind( "click" );
22            // Render tabs UI
23            $( this ).tabs( {
24                active: parseInt( activeTab ),
25                activate: function ( e, ui ) {
26                    var newIdx = ui.newTab.index();
27                    bodyHeaders.removeClass( 'header-active' );
28                    bodyHeaders.eq( newIdx ).addClass( 'header-active' );
29                }
30            } );
31        } else {
32
33            $( this ).find( ".advgb-tab a:not(.advgb-tabs-anchor)" ).unbind( "click" );
34
35            tabs.on( 'click', function ( event ) {
36                event.preventDefault();
37                var currentTabActive = $( event.target ).closest( '.advgb-tab' );
38                var href = currentTabActive.find( 'a' ).attr( 'href' );
39
40                tabs.removeClass( 'advgb-tab-active' );
41                currentTabActive.addClass( 'advgb-tab-active' );
42                bodyContainers.find( '.advgb-tab-body' ).hide();
43                bodyContainers.find( '.advgb-tab-body[aria-labelledby="' + href.replace( /^#/, "" ) + '"]' ).show();
44            } );
45
46            tabs.eq( activeTab ).trigger( 'click' ); // Default
47        }
48
49        bodyHeaders.eq(activeTab).addClass('header-active');
50        bodyHeaders.css({
51            backgroundColor: bgColor,
52            color: textColor,
53            borderColor: borderColor,
54            borderWidth: borderWidth,
55            borderStyle: borderStyle,
56            borderRadius: borderRadius
57        })
58    });
59
60    $('.advgb-tab-body-header').click(function () {
61        var bodyContainer = $(this).closest('.advgb-tab-body-container');
62        var bodyWrapper = $(this).closest('.advgb-tab-body-wrapper');
63        var tabsWrapper = $(this).closest('.advgb-tabs-wrapper');
64        var tabsPanel = tabsWrapper.find('.advgb-tabs-panel');
65        var idx = bodyContainer.index();
66
67        bodyWrapper.find('.advgb-tab-body-header').removeClass('header-active');
68        $(this).addClass('header-active');
69        tabsPanel.find('.advgb-tab').eq(idx).find('a').trigger('click');
70    })
71});;
72(function ($, Drupal) {
73  // Use strict mode to reduce development errors.
74  // @link http://www.nczonline.net/blog/2012/03/13/its-time-to-start-using-javascript-strict-mode/
75  "use strict";
76
77  $(document).ready(function () {
78
79    // $('.advgb-accordion-item:first-child').addClass('expanded');
80    $('.advgb-accordion-header').on('click', function () {
81
82      var thisparent = $(this).parent();
83      thisparent.toggleClass('expanded');
84
85      $('.advgb-accordion-item').not(thisparent).removeClass('expanded');
86
87    });
88  });
89})(jQuery, Drupal);;
90/*
91 * Superfish v1.4.8 - jQuery menu widget
92 * Copyright (c) 2008 Joel Birch
93 *
94 * Dual licensed under the MIT and GPL licenses:
95 *  http://www.opensource.org/licenses/mit-license.php
96 *  http://www.gnu.org/licenses/gpl.html
97 *
98 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
99 */
100/*
101 * This is not the original jQuery Superfish plugin.
102 * Please refer to the README for more information.
103 */
104
105(function($){
106  $.fn.superfish = function(op){
107    var sf = $.fn.superfish,
108      c = sf.c,
109      $arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
110      over = function(){
111        var $$ = $(this), menu = getMenu($$);
112        clearTimeout(menu.sfTimer);
113        $$.showSuperfishUl().siblings().hideSuperfishUl();
114      },
115      out = function(){
116        var $$ = $(this), menu = getMenu($$), o = sf.op;
117        clearTimeout(menu.sfTimer);
118        menu.sfTimer=setTimeout(function(){
119          if ($$.children('.sf-clicked').length == 0){
120            o.retainPath=($.inArray($$[0],o.$path)>-1);
121            $$.hideSuperfishUl();
122            if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
123          }
124        },o.delay);
125      },
126      getMenu = function($menu){
127        var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
128        sf.op = sf.o[menu.serial];
129        return menu;
130      },
131      addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
132
133    return this.each(function() {
134      var s = this.serial = sf.o.length;
135      var o = $.extend({},sf.defaults,op);
136      o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels),
137      p = o.$path;
138      for (var l = 0; l < p.length; l++){
139        p.eq(l).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);
140      }
141      sf.o[s] = sf.op = o;
142
143      $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
144        if (o.autoArrows) addArrow( $(this).children('a:first-child, span.nolink:first-child') );
145      })
146      .not('.'+c.bcClass)
147        .hideSuperfishUl();
148
149      var $a = $('a, span.nolink',this);
150      $a.each(function(i){
151        var $li = $a.eq(i).parents('li');
152        $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
153      });
154      o.onInit.call(this);
155
156    }).each(function() {
157      var menuClasses = [c.menuClass];
158      if (sf.op.dropShadows){
159        menuClasses.push(c.shadowClass);
160      }
161      $(this).addClass(menuClasses.join(' '));
162    });
163  };
164
165  var sf = $.fn.superfish;
166  sf.o = [];
167  sf.op = {};
168
169  sf.c = {
170    bcClass: 'sf-breadcrumb',
171    menuClass: 'sf-js-enabled',
172    anchorClass: 'sf-with-ul',
173    arrowClass: 'sf-sub-indicator',
174    shadowClass: 'sf-shadow'
175  };
176  sf.defaults = {
177    hoverClass: 'sfHover',
178    pathClass: 'overideThisToUse',
179    pathLevels: 1,
180    delay: 800,
181    animation: {opacity:'show'},
182    speed: 'fast',
183    autoArrows: true,
184    dropShadows: true,
185    disableHI: false, // true disables hoverIntent detection
186    onInit: function(){}, // callback functions
187    onBeforeShow: function(){},
188    onShow: function(){},
189    onHide: function(){}
190  };
191  $.fn.extend({
192    hideSuperfishUl : function(){
193      var o = sf.op,
194        not = (o.retainPath===true) ? o.$path : '';
195      o.retainPath = false;
196      var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
197          .children('ul').addClass('sf-hidden');
198      o.onHide.call($ul);
199      return this;
200    },
201    showSuperfishUl : function(){
202      var o = sf.op,
203        sh = sf.c.shadowClass+'-off',
204        $ul = this.addClass(o.hoverClass)
205          .children('ul.sf-hidden').hide().removeClass('sf-hidden');
206      o.onBeforeShow.call($ul);
207      $ul.animate(o.animation,o.speed,function(){ o.onShow.call($ul); });
208      return this;
209    }
210  });
211})(jQuery);;
212/*!
213 * hoverIntent v1.10.1 // 2019.10.05 // jQuery v1.7.0+
214 * http://briancherne.github.io/jquery-hoverIntent/
215 *
216 * You may use hoverIntent under the terms of the MIT license. Basically that
217 * means you are free to use hoverIntent as long as this header is left intact.
218 * Copyright 2007-2019 Brian Cherne
219 */
220!function(factory){"use strict";"function"==typeof define&&define.amd?define(["jquery"],factory):"object"==typeof module&&module.exports?module.exports=factory(require("jquery")):jQuery&&!jQuery.fn.hoverIntent&&factory(jQuery)}(function($){"use strict";function track(ev){cX=ev.pageX,cY=ev.pageY}var cX,cY,_cfg={interval:100,sensitivity:6,timeout:0},INSTANCE_COUNT=0,compare=function(ev,$el,s,cfg){if(Math.sqrt((s.pX-cX)*(s.pX-cX)+(s.pY-cY)*(s.pY-cY))<cfg.sensitivity)return $el.off(s.event,track),delete s.timeoutId,s.isActive=!0,ev.pageX=cX,ev.pageY=cY,delete s.pX,delete s.pY,cfg.over.apply($el[0],[ev]);s.pX=cX,s.pY=cY,s.timeoutId=setTimeout(function(){compare(ev,$el,s,cfg)},cfg.interval)};$.fn.hoverIntent=function(handlerIn,handlerOut,selector){var instanceId=INSTANCE_COUNT++,cfg=$.extend({},_cfg);$.isPlainObject(handlerIn)?(cfg=$.extend(cfg,handlerIn),$.isFunction(cfg.out)||(cfg.out=cfg.over)):cfg=$.isFunction(handlerOut)?$.extend(cfg,{over:handlerIn,out:handlerOut,selector:selector}):$.extend(cfg,{over:handlerIn,out:handlerIn,selector:handlerOut});function handleHover(e){var ev=$.extend({},e),$el=$(this),hoverIntentData=$el.data("hoverIntent");hoverIntentData||$el.data("hoverIntent",hoverIntentData={});var state=hoverIntentData[instanceId];state||(hoverIntentData[instanceId]=state={id:instanceId}),state.timeoutId&&(state.timeoutId=clearTimeout(state.timeoutId));
220var mousemove=state.event="mousemove.hoverIntent.hoverIntent"+instanceId;if("mouseenter"===e.type){if(state.isActive)return;state.pX=ev.pageX,state.pY=ev.pageY,$el.off(mousemove,track).on(mousemove,track),state.timeoutId=setTimeout(function(){compare(ev,$el,state,cfg)},cfg.interval)}else{if(!state.isActive)return;$el.off(mousemove,track),state.timeoutId=setTimeout(function(){!function(ev,$el,s,out){var data=$el.data("hoverIntent");data&&delete data[s.id],out.apply($el[0],[ev])}(ev,$el,state,cfg.out)},cfg.timeout)}}return this.on({"mouseenter.hoverIntent":handleHover,"mouseleave.hoverIntent":handleHover},cfg.selector)}});;
221/*
222 * sf-Smallscreen v1.3b - Provides small-screen compatibility for the jQuery Superfish plugin.
223 *
224 * Developer's note:
225 * Built as a part of the Superfish project for Drupal (http://drupal.org/project/superfish)
226 * Found any bug? have any cool ideas? contact me right away! http://drupal.org/user/619294/contact
227 *
228 * jQuery version: 1.3.x or higher.
229 *
230 * Dual licensed under the MIT and GPL licenses:
231 *  http://www.opensource.org/licenses/mit-license.php
232 *  http://www.gnu.org/licenses/gpl.html
233  */
234
235(function($){
236  $.fn.sfsmallscreen = function(options){
237    options = $.extend({
238      mode: 'inactive',
239      type: 'accordion',
240      breakpoint: 768,
241      breakpointUnit: 'px',
242      useragent: '',
243      title: '',
244      addSelected: false,
245      menuClasses: false,
246      hyperlinkClasses: false,
247      excludeClass_menu: '',
248      excludeClass_hyperlink: '',
249      includeClass_menu: '',
250      includeClass_hyperlink: '',
251      accordionButton: 1,
252      expandText: 'Expand',
253      collapseText: 'Collapse'
254    }, options);
255
256    // We need to clean up the menu from anything unnecessary.
257    function refine(menu){
258      var
259      refined = menu.clone(),
260      // Things that should not be in the small-screen menus.
261      rm = refined.find('span.sf-sub-indicator'),
262      // This is a helper class for those who need to add extra markup that shouldn't exist
263      // in the small-screen versions.
264      rh = refined.find('.sf-smallscreen-remove'),
265      // Mega-menus has to be removed too.
266      mm = refined.find('ul.sf-multicolumn');
267      for (var a = 0; a < rh.length; a++){
268        rh.eq(a).replaceWith(rh.eq(a).html());
269      }
270      if (options.accordionButton == 2 || options.type == 'select'){
271        for (var b = 0; b < rm.length; b++){
272          rm.eq(b).remove();
273        }
274      }
275      if (mm.length > 0){
276        mm.removeClass('sf-multicolumn');
277        var ol = refined.find('div.sf-multicolumn-column > ol');
278        for (var o = 0; o < ol.length; o++){
279          ol.eq(o).replaceWith('<ul>' + ol.eq(o).html() + '</ul>');
280        }
281        var elements = ['div.sf-multicolumn-column','.sf-multicolumn-wrapper > ol','li.sf-multicolumn-wrapper'];
282        for (var i = 0; i < elements.length; i++){
283          obj = refined.find(elements[i]);
284          for (var t = 0; t < obj.length; t++){
285            obj.eq(t).replaceWith(obj.eq(t).html());
286          }
287        }
288        refined.find('.sf-multicolumn-column').removeClass('sf-multicolumn-column');
289      }
290      refined.add(refined.find('*')).css({width:''});
291      return refined;
292    }
293
294    // Creating <option> elements out of the menu.
295    function toSelect(menu, level){
296      var
297      items = '',
298      childLI = $(menu).children('li');
299      for (var a = 0; a < childLI.length; a++){
300        var list = childLI.eq(a), parent = list.children('a, span');
301        for (var b = 0; b < parent.length; b++){
302          var
303          item = parent.eq(b),
304          path = (item.is('a') && !!item.attr('href')) ? item.attr('href') : '',
305          // Class names modification.
306          itemClone = item.clone(),
307          classes = (options.hyperlinkClasses) ? ((options.excludeClass_hyperlink && itemClone.hasClass(options.excludeClass_hyperlink)) ? itemClone.removeClass(options.excludeClass_hyperlink).attr('class') : itemClone.attr('class')) : '',
308          classes = (options.includeClass_hyperlink && !itemClone.hasClass(options.includeClass_hyperlink)) ? ((options.hyperlinkClasses) ? itemClone.addClass(options.includeClass_hyperlink).attr('class') : options.includeClass_hyperlink) : classes;
309          // Retaining the active class if requested.
310          if (options.addSelected && item.hasClass('active')){
311            classes += ' active';
312          }
313          classes = (classes) ? ' class="' + classes + '"' : '';
314          // <option> has to be disabled if the item is not a link.
315          disable = (path == '') || (path == '#') ? ' disabled="disabled"' : '',
316          // Crystal clear.
317          subIndicator = 1 < level ? Array(level).join('-') + ' ' : '';
318          // Preparing the <option> element.
319          items += '<option value="' + path + '"' + classes + disable + '>' + subIndicator + $.trim(item.text()) +'</option>',
320          childUL = list.find('> ul');
321          // Using the function for the sub-menu of this item.
322          for (var u = 0; u < childUL.length; u++){
323            items += toSelect(childUL.eq(u), level + 1);
324          }
325        }
326      }
327      return items;
328    }
329
330    // Create the new version, hide the original.
331    function convert(menu){
332      var menuID = menu.attr('id'),
333      // Creating a refined version of the menu.
334      refinedMenu = refine(menu);
335      // Currently the plugin provides two reactions to small screens.
336      // Converting the menu to a <select> element, and converting to an accordion version of the menu.
337      if (options.type == 'accordion'){
338        var
339        toggleID = menuID + '-toggle',
340        accordionID = menuID + '-accordion';
341        // Making sure the accordion does not exist.
342        if ($('#' + accordionID).length == 0){
343          var
344          // Getting the style class.
345          styleClass = menu.attr('class').split(' ').filter(function(item){
346            return item.indexOf('sf-style-') > -1 ? item : '';
347          }),
348          // Creating the accordion.
349          accordion = $(refinedMenu).attr('id', accordionID);
350          // Removing unnecessary classes.
351          accordion.removeClass('sf-horizontal sf-vertical sf-navbar sf-shadow sf-js-enabled');
352          // Adding necessary classes.
353          accordion.addClass('sf-accordion sf-hidden');
354          // Removing style attributes and any unnecessary class.
355          accordion.find('li').each(function(){
356            $(this).removeAttr('style').removeClass('sfHover').attr('id', $(this).attr('id') + '-accordion');
357          });
358          // Doing the same and making sure all the sub-menus are off-screen (hidden).
359          accordion.children('ul').removeAttr('style').not('.sf-hidden').addClass('sf-hidden');
360          // Creating the accordion toggle switch.
361          var toggle = '<div class="sf-accordion-toggle ' + styleClass + '"><a href="#" id="' + toggleID + '"><span>' + options.title + '</span></a></div>';
362
363          // Adding Expand\Collapse buttons if requested.
364          if (options.accordionButton == 2){
365            accordion.addClass('sf-accordion-with-buttons');
366            var parent = accordion.find('li.menuparent');
367            for (var i = 0; i < parent.length; i++){
368              parent.eq(i).prepend('<a href="#" class="sf-accordion-button">' + options.expandText + '</a>');
369            }
370          }
371          // Inserting the according and hiding the original menu.
372          menu.before(toggle).before(accordion).hide();
373
374          var
375          accordionElement = $('#' + accordionID),
376          // Deciding what should be used as accordion buttons.
377          buttonElement = (options.accordionButton < 2) ? 'a.menuparent,span.nolink.menuparent' : 'a.sf-accordion-button',
378          button = accordionElement.find(buttonElement);
379
380          // Attaching a click event to the toggle switch.
381          $('#' + toggleID).on('click', function(e){
382            // Preventing the click.
383            e.preventDefault();
384            // Adding the sf-expanded class.
385            $(this).toggleClass('sf-expanded');
386
387            if (accordionElement.hasClass('sf-expanded')){
388              // If the accordion is already expanded:
389              // Hiding its expanded sub-menus and then the accordion itself as well.
390              accordionElement.add(accordionElement.find('li.sf-expanded')).removeClass('sf-expanded')
391              .end().children('ul').hide()
392              // This is a bit tricky, it's the same trick that has been in use in the main plugin for some time.
393              // Basically we'll add a class that keeps the sub-menu off-screen and still visible,
394              // and make it invisible and removing the class one moment before showing or hiding it.
395              // This helps screen reader software access all the menu items.
396              .end().hide().addClass('sf-hidden').show();
397              // Changing the caption of any existing accordion buttons to 'Expand'.
398              if (options.accordionButton == 2){
399                accordionElement.find('a.sf-accordion-button').text(options.expandText);
400              }
401            }
402            else {
403              // But if it's collapsed,
404              accordionElement.addClass('sf-expanded').hide().removeClass('sf-hidden').show();
405            }
406          });
407
408          // Attaching a click event to the buttons.
409          button.on('click', function(e){
410            // Making sure the buttons does not exist already.
411            if ($(this).closest('li').children('ul').length > 0){
412              e.preventDefault();
413              // Selecting the parent menu items.
414              var parent = $(this).closest('li');
415              // Creating and inserting Expand\Collapse buttons to the parent menu items,
416              // of course only if not already happened.
417              if (options.accordionButton == 1 && parent.children('a.menuparent,span.nolink.menuparent').length > 0 && parent.children('ul').children('li.sf-clone-parent').length == 0){
418                var
419                // Cloning the hyperlink of the parent menu item.
420                cloneLink = parent.children('a.menuparent').clone();
421                // Removing unnecessary classes and element(s).
422                cloneLink.removeClass('menuparent sf-with-ul').children('.sf-sub-indicator').remove();
423                // Wrapping the hyerplinks in <li>.
424                cloneLink = $('<li class="sf-clone-parent" />').html(cloneLink);
425                // Adding a helper class and attaching them to the sub-menus.
426                parent.children('ul').addClass('sf-has-clone-parent').prepend(cloneLink);
427              }
428              // Once the button is clicked, collapse the sub-menu if it's expanded.
429              if (parent.hasClass('sf-expanded')){
430                parent.children('ul').slideUp('fast', function(){
431                  // Doing the accessibility trick after hiding the sub-menu.
432                  $(this).closest('li').removeClass('sf-expanded').end().addClass('sf-hidden').show();
433                });
434                // Changing the caption of the inserted Collapse link to 'Expand', if any is inserted.
435                if (options.accordionButton == 2 && parent.children('.sf-accordion-button').length > 0){
436                  parent.children('.sf-accordion-button').text(options.expandText);
437                }
438              }
439              // Otherwise, expand the sub-menu.
440              else {
441                // Doing the accessibility trick and then showing the sub-menu.
442                parent.children('ul').hide().removeClass('sf-hidden').slideDown('fast')
443                // Changing the caption of the inserted Expand link to 'Collape', if any is inserted.
444                .end().addClass('sf-expanded').children('a.sf-accordion-button').text(options.collapseText)
445                // Hiding any expanded sub-menu of the same level.
446                .end().siblings('li.sf-expanded').children('ul')
447                .slideUp('fast', function(){
448                  // Doing the accessibility trick after hiding it.
449                  $(this).closest('li').removeClass('sf-expanded').end().addClass('sf-hidden').show();
450                })
451                // Assuming Expand\Collapse buttons do exist, resetting captions, in those hidden sub-menus.
452                .parent().children('a.sf-accordion-button').text(options.expandText);
453              }
454            }
455          });
456        }
457      }
458      else {
459        var
460        // Class names modification.
461        menuClone = menu.clone(), classes = (options.menuClasses) ? ((options.excludeClass_menu && menuClone.hasClass(options.excludeClass_menu)) ? menuClone.removeClass(options.excludeClass_menu).attr('class') : menuClone.attr('class')) : '',
462        classes = (options.includeClass_menu && !menuClone.hasClass(options.includeClass_menu)) ? ((options.menuClasses) ? menuClone.addClass(options.includeClass_menu).attr('class') : options.includeClass_menu) : classes,
463        classes = (classes) ? ' class="' + classes + '"' : '';
464
465        // Making sure the <select> element does not exist already.
466        if ($('#' + menuID + '-select').length == 0){
467          // Creating the <option> elements.
468          var newMenu = toSelect(refinedMenu, 1),
469          // Creating the <select> element and assigning an ID and class name.
470          selectList = $('<select' + classes + ' id="' + menuID + '-select"/>')
471          // Attaching the title and the items to the <select> element.
472          .html('<option>' + options.title + '</option>' + newMenu)
473          // Attaching an event then.
474          .change(function(){
475            // Except for the first option that is the menu title and not a real menu item.
476            if ($('option:selected', this).index()){
477              window.location = selectList.val();
478            }
479          });
480          // Applying the addSelected option to it.
481          if (options.addSelected){
482            selectList.find('.active').attr('selected', !0);
483          }
484          // Finally inserting the <select> element into the document then hiding the original menu.
485          menu.before(selectList).hide();
486        }
487      }
488    }
489
490    // Turn everything back to normal.
491    function turnBack(menu){
492      var
493      id = '#' + menu.attr('id');
494      // Removing the small screen version.
495      $(id + '-' + options.type).remove();
496      // Removing the accordion toggle switch as well.
497      if (options.type == 'accordion'){
498        $(id + '-toggle').parent('div').remove();
499      }
500      // Remove inline CSS display property; less clear than simply using .show(), but respects stylesheet
501      $(id).css('display', '');
502    }
503
504    // Return original object to support chaining.
505    // Although this is unnecessary because of the way the module uses these plugins.
506    for (var s = 0; s < this.length; s++){
507      var
508      menu = $(this).eq(s),
509      mode = options.mode;
510      // The rest is crystal clear, isn't it? :)
511      if (menu.children('li').length == 0){
512        // Skip empty menu which will not be visible and don't want to suddenly make it visible.
513      }
514      else if (mode == 'always_active'){
515        convert(menu);
516      }
517      else if (mode == 'window_width'){
518        var breakpoint = (options.breakpointUnit == 'em') ? (options.breakpoint * parseFloat($('body').css('font-size'))) : options.breakpoint,
519        windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
520        timer;
521        if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){
522          convert(menu);
523        }
524        else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) {
525          convert(menu);
526        }
527        $(window).resize(function(){
528          clearTimeout(timer);
529          timer = setTimeout(function(){
530            var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
531            if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){
532              convert(menu);
533            }
534            else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) {
535              convert(menu);
536            }
537            else {
538              turnBack(menu);
539            }
540          }, 50);
541        });
542      }
543      else if (mode == 'useragent_custom'){
544        if (options.useragent != ''){
545          var ua = RegExp(options.useragent, 'i');
546          if (navigator.userAgent.match(ua)){
547            convert(menu);
548          }
549        }
550      }
551      else if (mode == 'useragent_predefined' && navigator.userAgent.match(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i)){
552        convert(menu);
553      }
554    }
555    return this;
556  }
557})(jQuery);
558;
559/*
560 * Supposition v0.2 - an optional enhancer for Superfish jQuery menu widget.
561 *
562 * Copyright (c) 2008 Joel Birch - based mostly on work by Jesse Klaasse and credit goes largely to him.
563 * Special thanks to Karl Swedberg for valuable input.
564 *
565 * Dual licensed under the MIT and GPL licenses:
566 *  http://www.opensource.org/licenses/mit-license.php
567 *  http://www.gnu.org/licenses/gpl.html
568 */
569/*
570 * This is not the original jQuery Supposition plugin.
571 * Please refer to the README for more information.
572 */
573
574(function($){
575  $.fn.supposition = function(){
576    var $w = $(window), /*do this once instead of every onBeforeShow call*/
577    _offset = function(dir) {
578      return window[dir == 'y' ? 'pageYOffset' : 'pageXOffset']
579      || document.documentElement && document.documentElement[dir=='y' ? 'scrollTop' : 'scrollLeft']
580      || document.body[dir=='y' ? 'scrollTop' : 'scrollLeft'];
581    },
582    onHide = function(){
583      this.css({bottom:''});
584    },
585    onBeforeShow = function(){
586      this.each(function(){
587        var $u = $(this);
588        $u.css('display','block');
589        var $mul = $u.closest('.sf-menu'),
590        level = $u.parents('ul').length,
591        menuWidth = $u.width(),
592        menuParentWidth = $u.closest('li').outerWidth(true),
593        menuParentLeft = $u.closest('li').offset().left,
594        totalRight = $w.width() + _offset('x'),
595        menuRight = $u.offset().left + menuWidth,
596        exactMenuWidth = (menuRight > (menuParentWidth + menuParentLeft)) ? menuWidth - (menuRight - (menuParentWidth + menuParentLeft)) : menuWidth;
597        if ($u.parents('.sf-js-enabled').hasClass('rtl')) {
598          if (menuParentLeft < exactMenuWidth) {
599            if (($mul.hasClass('sf-horizontal') && level == 1) || ($mul.hasClass('sf-navbar') && level == 2)){
600              $u.css({left:0,right:'auto'});
601            }
602            else {
603              $u.css({left:menuParentWidth + 'px',right:'auto'});
604            }
605            $u.parent().addClass('sf-supposition-active');
606          }
607        }
608        else {
609          if (menuRight > totalRight && menuParentLeft > menuWidth) {
610            if (($mul.hasClass('sf-horizontal') && level == 1) || ($mul.hasClass('sf-navbar') && level == 2)){
611              $u.css({right:0,left:'auto'});
612            }
613            else {
614              $u.css({right:menuParentWidth + 'px',left:'auto'});
615            }
616            $u.parent().addClass('sf-supposition-active');
617          }
618        }
619        var windowHeight = $w.height(),
620        offsetTop = $u.offset().top,
621        menuParentShadow = ($mul.hasClass('sf-shadow') && $u.css('padding-bottom').length > 0) ? parseInt($u.css('padding-bottom').slice(0,-2)) : 0,
622        menuParentHeight = ($mul.hasClass('sf-vertical')) ? '-' + menuParentShadow : $u.parent().outerHeight(true) - menuParentShadow,
623        menuHeight = $u.height(),
624        baseline = windowHeight + _offset('y');
625        var expandUp = ((offsetTop + menuHeight > baseline) && (offsetTop > menuHeight));
626        if (expandUp) {
627          $u.css({bottom:menuParentHeight + 'px',top:'auto'});
628        }
629        $u.css('display','none');
630      });
631    };
632
633    return this.each(function() {
634      var o = $.fn.superfish.o[this.serial]; /* get this menu's options */
635
636      /* if callbacks already set, store them */
637      var _onBeforeShow = o.onBeforeShow,
638      _onHide = o.onHide;
639
640      $.extend($.fn.superfish.o[this.serial],{
641        onBeforeShow: function() {
642          onBeforeShow.call(this); /* fire our Supposition callback */
643          _onBeforeShow.call(this); /* fire stored callbacks */
644        },
645        onHide: function() {
646          onHide.call(this); /* fire our Supposition callback */
647          _onHide.call(this); /* fire stored callbacks */
648        }
649      });
650    });
651  };
652})(jQuery);;
653/**
654 * @file
655 * The Superfish Drupal Behavior to apply the Superfish jQuery plugin to lists.
656 */
657
658(function ($, Drupal, drupalSettings) {
659
660  'use strict';
661
662  /**
663   * jQuery Superfish plugin.
664   *
665   * @type {Drupal~behavior}
666   *
667   * @prop {Drupal~behaviorAttach} attach
668   *   Attaches the behavior to an applicable <ul> element.
669   */
670  Drupal.behaviors.superfish = {
671    attach: function (context, drupalSettings) {
672      // Take a look at each menu to apply Superfish to.
673      $.each(drupalSettings.superfish || {}, function (index, options) {
674        var $menu = $('ul#' + options.id, context);
675
676        // Check if we are to apply the Supersubs plug-in to it.
677        if (options.plugins || false) {
678          if (options.plugins.supersubs || false) {
679            $menu.supersubs(options.plugins.supersubs);
680          }
681        }
682
683        // Apply Superfish to the menu.
684        $menu.superfish(options.sf);
685
686        // Check if we are to apply any other plug-in to it.
687        if (options.plugins || false) {
688          if (options.plugins.touchscreen || false) {
689            $menu.sftouchscreen(options.plugins.touchscreen);
690          }
691          if (options.plugins.smallscreen || false) {
692            $menu.sfsmallscreen(options.plugins.smallscreen);
693          }
694          if (options.plugins.supposition || false) {
695            $menu.supposition();
696          }
697        }
698      });
699    }
700  };
701})(jQuery, Drupal, drupalSettings);
702;
703/*
704 * sf-Touchscreen v1.3b - Provides touchscreen compatibility for the jQuery Superfish plugin.
705 *
706 * Developer's note:
707 * Built as a part of the Superfish project for Drupal (http://drupal.org/project/superfish)
708 * Found any bug? have any cool ideas? contact me right away! http://drupal.org/user/619294/contact
709 *
710 * jQuery version: 1.7 or higher.
711 *
712 * Dual licensed under the MIT and GPL licenses:
713 *  http://www.opensource.org/licenses/mit-license.php
714 *  http://www.gnu.org/licenses/gpl.html
715 */
716
717(function($){
718  $.fn.sftouchscreen = function(options){
719    options = $.extend({
720      mode: 'inactive',
721      breakpoint: 768,
722      breakpointUnit: 'px',
723      useragent: '',
724      behaviour: 2,
725      disableHover: false
726    }, options);
727
728    function activate(menu){
729      var eventHandler = (('ontouchstart' in window) || (window.DocumentTouch && document instanceof DocumentTouch)) ? ['click touchstart','mouseup touchend'] : ['click','mouseup'];
730      // Select hyperlinks from parent menu items.
731      menu.find('li:has(ul)').children('a,span.nolink').each(function(){
732        var item = $(this),
733        parent = item.closest('li');
734        if (options.disableHover){
735          parent.off('mouseenter mouseleave');
736        }
737        if (options.behaviour == 2){
738          if (parent.children('a.menuparent,span.nolink.menuparent').length > 0 && parent.children('ul').children('.sf-clone-parent').length == 0){
739            var
740            // Cloning the hyperlink of the parent menu item.
741            cloneLink = parent.children('a.menuparent').clone(),
742            // Wrapping the hyerplinks in <li>.
743            cloneLink = $('<li class="sf-clone-parent" />').html(cloneLink);
744            // Removing unnecessary stuff.
745            cloneLink.find('.sf-sub-indicator').remove(),
746            // Adding a helper class and attaching them to the sub-menus.
747            parent.children('ul').addClass('sf-has-clone-parent').prepend(clone
747Link);
748          }
749        }
750        // No .toggle() here as it's not possible to reset it.
751        item.on(eventHandler[0], function(event){
752          // Already clicked?
753          if (item.hasClass('sf-clicked')){
754            // Depending on the preferred behaviour, either proceed to the URL.
755            if (options.behaviour == 0){
756              url = item.attr('href');
757              if (typeof(url) != 'undefined'){
758                window.location = url;
759              }
760            }
761            // or collapse the sub-menu.
762            else if (options.behaviour == 1 || options.behaviour == 2){
763              event.preventDefault();
764              item.removeClass('sf-clicked');
765              parent.hideSuperfishUl().find('a,span.nolink').removeClass('sf-clicked');
766            }
767          }
768          // Prevent the default action otherwise.
769          else {
770            event.preventDefault();
771            item.addClass('sf-clicked');
772            parent.showSuperfishUl().siblings('li:has(ul)').hideSuperfishUl().find('.sf-clicked').removeClass('sf-clicked');
773          }
774        });
775      });
776
777      $(document).on(eventHandler[1], function(event){
778        if (menu.not(event.target) && menu.has(event.target).length === 0){
779          menu.find('.sf-clicked').removeClass('sf-clicked');
780          menu.find('li:has(ul)').hideSuperfishUl();
781        }
782      });
783    }
784    // Return original object to support chaining.
785    // This is not necessary actually because of the way the module uses these plugins.
786    for (var b = 0; b < this.length; b++) {
787      var menu = $(this).eq(b),
788      mode = options.mode;
789      // The rest is crystal clear, isn't it? :)
790      if (mode == 'always_active'){
791        activate(menu);
792      }
793      else if (mode == 'window_width'){
794        var breakpoint = (options.breakpointUnit == 'em') ? (options.breakpoint * parseFloat($('body').css('font-size'))) : options.breakpoint,
795        windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
796        timer;
797        if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){
798          activate(menu);
799        }
800        else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) {
801          activate(menu);
802        }
803        $(window).resize(function(){
804          clearTimeout(timer);
805          timer = setTimeout(function(){
806            var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
807            if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){
808              activate(menu);
809            }
810            else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) {
811              activate(menu);
812            }
813          }, 50);
814        });
815      }
816      else if (mode == 'useragent_custom'){
817        if (options.useragent != ''){
818          var ua = RegExp(options.useragent, 'i');
819          if (navigator.userAgent.match(ua)){
820            activate(menu);
821          }
822        }
823      }
824      else if (mode == 'useragent_predefined' && navigator.userAgent.match(/(android|bb\d+|meego)|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i)){
825        activate(menu);
826      }
827    }
828    return this;
829  }
830})(jQuery);
831;
832/*
833 * Supersubs v0.4b - jQuery plugin
834 * Copyright (c) 2013 Joel Birch
835 *
836 * Dual licensed under the MIT and GPL licenses:
837 *  http://www.opensource.org/licenses/mit-license.php
838 *  http://www.gnu.org/licenses/gpl.html
839 *
840 * This plugin automatically adjusts submenu widths of suckerfish-style menus to that of
841 * their longest list item children. If you use this, please expect bugs and report them
842 * to the jQuery Google Group with the word 'Superfish' in the subject line.
843 *
844 */
845/*
846 * This is not the original jQuery Supersubs plugin.
847 * Please refer to the README for more information.
848 */
849
850(function($){ // $ will refer to jQuery within this closure
851  $.fn.supersubs = function(options){
852    var opts = $.extend({}, $.fn.supersubs.defaults, options);
853    // return original object to support chaining
854    // Although this is unnecessary due to the way the module uses these plugins.
855    for (var a = 0; a < this.length; a++) {
856      // cache selections
857      var $$ = $(this).eq(a),
858      // support metadata
859      o = $.meta ? $.extend({}, opts, $$.data()) : opts;
860      // Jump one level if it's a "NavBar"
861      if ($$.hasClass('sf-navbar')) {
862        $$ = $$.children('li').children('ul');
863      }
864      // cache all ul elements
865      var $ULs = $$.find('ul');
866      if ($ULs.length) {
867        // get the font size of menu.
868        // .css('fontSize') returns various results cross-browser, so measure an em dash instead
869        var fontsize = $('<li id="menu-fontsize">&#8212;</li>'),
870        size = fontsize.attr('style','padding:0;position:absolute;top:-99999em;width:auto;')
871        .appendTo($$)[0].clientWidth; //clientWidth is faster than width()
872        // remove em dash
873        fontsize.remove();
874
875        // loop through each ul in menu
876        for (var b = 0; b < $ULs.length; b++) {
877          var
878          // cache this ul
879          $ul = $ULs.eq(b);
880          // If a multi-column sub-menu, and only if correctly configured.
881          if (o.multicolumn && $ul.hasClass('sf-multicolumn') && $ul.find('.sf-multicolumn-column').length > 0){
882            // Look through each column.
883            var $column = $ul.find('div.sf-multicolumn-column > ol'),
884            // Overall width.
885            mwWidth = 0;
886            for (var d = 0; d < $column.length; d++){
887              resize($column.eq(d));
888              // New column width, in pixels.
889              var colWidth = Math.ceil($column.width());
890              // Just a trick to convert em unit to px.
891              $column.css({width:colWidth})
892              // Making column parents the same size.
893              .parents('.sf-multicolumn-column').css({width:colWidth});
894              // Overall width.
895              mwWidth += colWidth;
896            }
897            // Resizing the columns container too.
898            $ul.add($ul.find('li.sf-multicolumn-wrapper, li.sf-multicolumn-wrapper > ol')).css({width:mwWidth});
899          }
900          else {
901            resize($ul);
902          }
903        }
904      }
905    }
906    function resize($ul){
907      var
908      // get all (li) children of this ul
909      $LIs = $ul.children(),
910      // get all anchor grand-children
911      $As = $LIs.children('a');
912      // force content to one line and save current float property
913      $LIs.css('white-space','nowrap');
914      // remove width restrictions and floats so elements remain vertically stacked
915      $ul.add($LIs).add($As).css({float:'none',width:'auto'});
916      // this ul will now be shrink-wrapped to longest li due to position:absolute
917      // so save its width as ems.
918      var emWidth = $ul.get(0).clientWidth / size;
919      // add more width to ensure lines don't turn over at certain sizes in various browsers
920      emWidth += o.extraWidth;
921      // restrict to at least minWidth and at most maxWidth
922      if (emWidth > o.maxWidth) {emWidth = o.maxWidth;}
923      else if (emWidth < o.minWidth) {emWidth = o.minWidth;}
924      emWidth += 'em';
925      // set ul to width in ems
926      $ul.css({width:emWidth});
927      // restore li floats to avoid IE bugs
928      // set li width to full width of this ul
929      // revert white-space to normal
930      $LIs.add($As).css({float:'',width:'',whiteSpace:''});
931      // update offset position of descendant ul to reflect new width of parent.
932      // set it to 100% in case it isn't already set to this in the CSS
933      for (var c = 0; c < $LIs.length; c++) {
934        var $childUl = $LIs.eq(c).children('ul');
935        var offsetDirection = $childUl.css('left') !== undefined ? 'left' : 'right';
936        $childUl.css(offsetDirection,'100%');
937      }
938    }
939    return this;
940  };
941  // expose defaults
942  $.fn.supersubs.defaults = {
943    multicolumn: true, // define width for multi-column sub-menus and their columns.
944    minWidth: 12, // requires em unit.
945    maxWidth: 27, // requires em unit.
946    extraWidth: 1 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values
947  };
948})(jQuery); // plugin code ends
949;
950/**
951* DO NOT EDIT THIS FILE.
952* See the following change record for more information,
953* https://www.drupal.org/node/2815083
954* @preserve
955**/
956
957(function ($, Drupal) {
958  Drupal.theme.progressBar = function (id) {
959    return '<div id="' + id + '" class="progress" aria-live="polite">' + '<div class="progress__label">&nbsp;</div>' + '<div class="progress__track"><div class="progress__bar"></div></div>' + '<div class="progress__percentage"></div>' + '<div class="progress__description">&nbsp;</div>' + '</div>';
960  };
961
962  Drupal.ProgressBar = function (id, updateCallback, method, errorCallback) {
963    this.id = id;
964    this.method = method || 'GET';
965    this.updateCallback = updateCallback;
966    this.errorCallback = errorCallback;
967
968    this.element = $(Drupal.theme('progressBar', id));
969  };
970
971  $.extend(Drupal.ProgressBar.prototype, {
972    setProgress: function setProgress(percentage, message, label) {
973      if (percentage >= 0 && percentage <= 100) {
974        $(this.element).find('div.progress__bar').css('width', percentage + '%');
975        $(this.element).find('div.progress__percentage').html(percentage + '%');
976      }
977      $('div.progress__description', this.element).html(message);
978      $('div.progress__label', this.element).html(label);
979      if (this.updateCallback) {
980        this.updateCallback(percentage, message, this);
981      }
982    },
983    startMonitoring: function startMonitoring(uri, delay) {
984      this.delay = delay;
985      this.uri = uri;
986      this.sendPing();
987    },
988    stopMonitoring: function stopMonitoring() {
989      clearTimeout(this.timer);
990
991      this.uri = null;
992    },
993    sendPing: function sendPing() {
994      if (this.timer) {
995        clearTimeout(this.timer);
996      }
997      if (this.uri) {
998        var pb = this;
999
1000        var uri = this.uri;
1001        if (uri.indexOf('?') === -1) {
1002          uri += '?';
1003        } else {
1004          uri += '&';
1005        }
1006        uri += '_format=json';
1007        $.ajax({
1008          type: this.method,
1009          url: uri,
1010          data: '',
1011          dataType: 'json',
1012          success: function success(progress) {
1013            if (progress.status === 0) {
1014              pb.displayError(progress.data);
1015              return;
1016            }
1017
1018            pb.setProgress(progress.percentage, progress.message, progress.label);
1019
1020            pb.timer = setTimeout(function () {
1021              pb.sendPing();
1022            }, pb.delay);
1023          },
1024          error: function error(xmlhttp) {
1025            var e = new Drupal.AjaxError(xmlhttp, pb.uri);
1026            pb.displayError('<pre>' + e.message + '</pre>');
1027          }
1028        });
1029      }
1030    },
1031    displayError: function displayError(string) {
1032      var error = $('<div class="messages messages--error"></div>').html(string);
1033      $(this.element).before(error).hide();
1034
1035      if (this.errorCallback) {
1036        this.errorCallback(this);
1037      }
1038    }
1039  });
1040})(jQuery, Drupal);;
1041/**
1042* DO NOT EDIT THIS FILE.
1043* See the following change record for more information,
1044* https://www.drupal.org/node/2815083
1045* @preserve
1046**/
1047
1048(function (Drupal) {
1049  Drupal.behaviors.responsiveImageAJAX = {
1050    attach: function attach() {
1051      if (window.picturefill) {
1052        window.picturefill();
1053      }
1054    }
1055  };
1056})(Drupal);;
1057/**
1058* DO NOT EDIT THIS FILE.
1059* See the following change record for more information,
1060* https://www.drupal.org/node/2815083
1061* @preserve
1062**/
1063function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
1064
1065(function ($, window, Drupal, drupalSettings) {
1066  Drupal.behaviors.AJAX = {
1067    attach: function attach(context, settings) {
1068      function loadAjaxBehavior(base) {
1069        var elementSettings = settings.ajax[base];
1070        if (typeof elementSettings.selector === 'undefined') {
1071          elementSettings.selector = '#' + base;
1072        }
1073        $(elementSettings.selector).once('drupal-ajax').each(function () {
1074          elementSettings.element = this;
1075          elementSettings.base = base;
1076          Drupal.ajax(elementSettings);
1077        });
1078      }
1079
1080      Object.keys(settings.ajax || {}).forEach(function (base) {
1081        return loadAjaxBehavior(base);
1082      });
1083
1084      Drupal.ajax.bindAjaxLinks(document.body);
1085
1086      $('.use-ajax-submit').once('ajax').each(function () {
1087        var elementSettings = {};
1088
1089        elementSettings.url = $(this.form).attr('action');
1090
1091        elementSettings.setClick = true;
1092
1093        elementSettings.event = 'click';
1094
1095        elementSettings.progress = { type: 'throbber' };
1096        elementSettings.base = $(this).attr('id');
1097        elementSettings.element = this;
1098
1099        Drupal.ajax(elementSettings);
1100      });
1101    },
1102    detach: function detach(context, settings, trigger) {
1103      if (trigger === 'unload') {
1104        Drupal.ajax.expired().forEach(function (instance) {
1105          Drupal.ajax.instances[instance.instanceIndex] = null;
1106        });
1107      }
1108    }
1109  };
1110
1111  Drupal.AjaxError = function (xmlhttp, uri, customMessage) {
1112    var statusCode = void 0;
1113    var statusText = void 0;
1114    var responseText = void 0;
1115    if (xmlhttp.status) {
1116      statusCode = '\n' + Drupal.t('An AJAX HTTP error occurred.') + '\n' + Drupal.t('HTTP Result Code: !status', {
1117        '!status': xmlhttp.status
1118      });
1119    } else {
1120      statusCode = '\n' + Drupal.t('An AJAX HTTP request terminated abnormally.');
1121    }
1122    statusCode += '\n' + Drupal.t('Debugging information follows.');
1123    var pathText = '\n' + Drupal.t('Path: !uri', { '!uri': uri });
1124    statusText = '';
1125
1126    try {
1127      statusText = '\n' + Drupal.t('StatusText: !statusText', {
1128        '!statusText': $.trim(xmlhttp.statusText)
1129      });
1130    } catch (e) {}
1131
1132    responseText = '';
1133
1134    try {
1135      responseText = '\n' + Drupal.t('ResponseText: !responseText', {
1136        '!responseText': $.trim(xmlhttp.responseText)
1137      });
1138    } catch (e) {}
1139
1140    responseText = responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi, '');
1141    responseText = responseText.replace(/[\n]+\s+/g, '\n');
1142
1143    var readyStateText = xmlhttp.status === 0 ? '\n' + Drupal.t('ReadyState: !readyState', {
1144      '!readyState': xmlhttp.readyState
1145    }) : '';
1146
1147    customMessage = customMessage ? '\n' + Drupal.t('CustomMessage: !customMessage', {
1148      '!customMessage': customMessage
1149    }) : '';
1150
1151    this.message = statusCode + pathText + statusText + customMessage + responseText + readyStateText;
1152
1153    this.name = 'AjaxError';
1154  };
1155
1156  Drupal.AjaxError.prototype = new Error();
1157  Drupal.AjaxError.prototype.constructor = Drupal.AjaxError;
1158
1159  Drupal.ajax = function (settings) {
1160    if (arguments.length !== 1) {
1161      throw new Error('Drupal.ajax() function must be called with one configuration object only');
1162    }
1163
1164    var base = settings.base || false;
1165    var element = settings.element || false;
1166    delete settings.base;
1167    delete settings.element;
1168
1169    if (!settings.progress && !element) {
1170      settings.progress = false;
1171    }
1172
1173    var ajax = new Drupal.Ajax(base, element, settings);
1174    ajax.instanceIndex = Drupal.ajax.instances.length;
1175    Drupal.ajax.instances.push(ajax);
1176
1177    return ajax;
1178  };
1179
1180  Drupal.ajax.instances = [];
1181
1182  Drupal.ajax.expired = function () {
1183    return Drupal.ajax.instances.filter(function (instance) {
1184      return instance && instance.element !== false && !document.body.contains(instance.element);
1185    });
1186  };
1187
1188  Drupal.ajax.bindAjaxLinks = function (element) {
1189    $(element).find('.use-ajax').once('ajax').each(function (i, ajaxLink) {
1190      var $linkElement = $(ajaxLink);
1191
1192      var elementSettings = {
1193        progress: { type: 'throbber' },
1194        dialogType: $linkElement.data('dialog-type'),
1195        dialog: $linkElement.data('dialog-options'),
1196        dialogRenderer: $linkElement.data('dialog-renderer'),
1197        base: $linkElement.attr('id'),
1198        element: ajaxLink
1199      };
1200      var href = $linkElement.attr('href');
1201
1202      if (href) {
1203        elementSettings.url = href;
1204        elementSettings.event = 'click';
1205      }
1206      Drupal.ajax(elementSettings);
1207    });
1208  };
1209
1210  Drupal.Ajax = function (base, element, elementSettings) {
1211    var defaults = {
1212      event: element ? 'mousedown' : null,
1213      keypress: true,
1214      selector: base ? '#' + base : null,
1215      effect: 'none',
1216      speed: 'none',
1217      method: 'replaceWith',
1218      progress: {
1219        type: 'throbber',
1220        message: Drupal.t('Please wait...')
1221      },
1222      submit: {
1223        js: true
1224      }
1225    };
1226
1227    $.extend(this, defaults, elementSettings);
1228
1229    this.commands = new Drupal.AjaxCommands();
1230
1231    this.instanceIndex = false;
1232
1233    if (this.wrapper) {
1234      this.wrapper = '#' + this.wrapper;
1235    }
1236
1237    this.element = element;
1238
1239    this.element_settings = elementSettings;
1240
1241    this.elementSettings = elementSettings;
1242
1243    if (this.element && this.element.form) {
1244      this.$form = $(this.element.form);
1245    }
1246
1247    if (!this.url) {
1248      var $element = $(this.element);
1249      if ($element.is('a')) {
1250        this.url = $element.attr('href');
1251      } else if (this.element && element.form) {
1252        this.url = this.$form.attr('action');
1253      }
1254    }
1255
1256    var originalUrl = this.url;
1257
1258    this.url = this.url.replace(/\/nojs(\/|$|\?|#)/, '/ajax$1');
1259
1260    if (drupalSettings.ajaxTrustedUrl[originalUrl]) {
1261      drupalSettings.ajaxTrustedUrl[this.url] = true;
1262    }
1263
1264    var ajax = this;
1265
1266    ajax.options = {
1267      url: ajax.url,
1268      data: ajax.submit,
1269      beforeSerialize: function beforeSerialize(elementSettings, options) {
1270        return ajax.beforeSerialize(elementSettings, options);
1271      },
1272      beforeSubmit: function beforeSubmit(formValues, elementSettings, options) {
1273        ajax.ajaxing = true;
1274        return ajax.beforeSubmit(formValues, elementSettings, options);
1275      },
1276      beforeSend: function beforeSend(xmlhttprequest, options) {
1277        ajax.ajaxing = true;
1278        return ajax.beforeSend(xmlhttprequest, options);
1279      },
1280      success: function success(response, status, xmlhttprequest) {
1281        if (typeof response === 'string') {
1282          response = $.parseJSON(response);
1283        }
1284
1285        if (response !== null && !drupalSettings.ajaxTrustedUrl[ajax.url]) {
1286          if (xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token') !== '1') {
1287            var customMessage = Drupal.t('The response failed verification so will not be processed.');
1288            return ajax.error(xmlhttprequest, ajax.url, customMessage);
1289          }
1290        }
1291
1292        return ajax.success(response, status);
1293      },
1294      complete: function complete(xmlhttprequest, status) {
1295        ajax.ajaxing = false;
1296        if (status === 'error' || status === 'parsererror') {
1297          return ajax.error(xmlhttprequest, ajax.url);
1298        }
1299      },
1300
1301      dataType: 'json',
1302      jsonp: false,
1303      type: 'POST'
1304    };
1305
1306    if (elementSettings.dialog) {
1307      ajax.options.data.dialogOptions = elementSettings.dialog;
1308    }
1309
1310    if (ajax.options.url.indexOf('?') === -1) {
1311      ajax.options.url += '?';
1312    } else {
1313      ajax.options.url += '&';
1314    }
1315
1316    var wrapper = 'drupal_' + (elementSettings.dialogType || 'ajax');
1317    if (elementSettings.dialogRenderer) {
1318      wrapper += '.' + elementSettings.dialogRenderer;
1319    }
1320    ajax.options.url += Drupal.ajax.WRAPPER_FORMAT + '=' + wrapper;
1321
1322    $(ajax.element).on(elementSettings.event, function (event) {
1323      if (!drupalSettings.ajaxTrustedUrl[ajax.url] && !Drupal.url.isLocal(ajax.url)) {
1324        throw new Error(Drupal.t('The callback URL is not local and not trusted: !url', {
1325          '!url': ajax.url
1326        }));
1327      }
1328      return ajax.eventResponse(this, event);
1329    });
1330
1331    if (elementSettings.keypress) {
1332      $(ajax.element).on('keypress', function (event) {
1333        return ajax.keypressResponse(this, event);
1334      });
1335    }
1336
1337    if (elementSettings.prevent) {
1338      $(ajax.element).on(elementSettings.prevent, false);
1339    }
1340  };
1341
1342  Drupal.ajax.WRAPPER_FORMAT = '_wrapper_format';
1343
1344  Drupal.Ajax.AJAX_REQUEST_PARAMETER = '_drupal_ajax';
1345
1346  Drupal.Ajax.prototype.execute = function () {
1347    if (this.ajaxing) {
1348      return;
1349    }
1350
1351    try {
1352      this.beforeSerialize(this.element, this.options);
1353
1354      return $.ajax(this.options);
1355    } catch (e) {
1356      this.ajaxing = false;
1357      window.alert('An error occurred while attempting to process ' + this.options.url + ': ' + e.message);
1358
1359      return $.Deferred().reject();
1360    }
1361  };
1362
1363  Drupal.Ajax.prototype.keypressResponse = function (element, event) {
1364    var ajax = this;
1365
1366    if (event.which === 13 || event.which === 32 && element.type !== 'text' && element.type !== 'textarea' && element.type !== 'tel' && element.type !== 'number') {
1367      event.preventDefault();
1368      event.stopPropagation();
1369      $(element).trigger(ajax.elementSettings.event);
1370    }
1371  };
1372
1373  Drupal.Ajax.prototype.eventResponse = function (element, event) {
1374    event.preventDefault();
1375    event.stopPropagation();
1376
1377    var ajax = this;
1378
1379    if (ajax.ajaxing) {
1380      return;
1381    }
1382
1383    try {
1384      if (ajax.$form) {
1385        if (ajax.setClick) {
1386          element.form.clk = element;
1387        }
1388
1389        ajax.$form.ajaxSubmit(ajax.options);
1390      } else {
1391        ajax.beforeSerialize(ajax.element, ajax.options);
1392        $.ajax(ajax.options);
1393      }
1394    } catch (e) {
1395      ajax.ajaxing = false;
1396      window.alert('An error occurred while attempting to process ' + ajax.options.url + ': ' + e.message);
1397    }
1398  };
1399
1400  Drupal.Ajax.prototype.beforeSerialize = function (element, options) {
1401    if (this.$form && document.body.contains(this.$form.get(0))) {
1402      var settings = this.settings || drupalSettings;
1403      Drupal.detachBehaviors(this.$form.get(0), settings, 'serialize');
1404    }
1405
1406    options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER] = 1;
1407
1408    var pageState = drupalSettings.ajaxPageState;
1409    options.data['ajax_page_state[theme]'] = pageState.theme;
1410    options.data['ajax_page_state[theme_token]'] = pageState.theme_token;
1411    options.data['ajax_page_state[libraries]'] = pageState.libraries;
1412  };
1413
1414  Drupal.Ajax.prototype.beforeSubmit = function (formValues, element, options) {};
1415
1416  Drupal.Ajax.prototype.beforeSend = function (xmlhttprequest, options) {
1417    if (this.$form) {
1418      options.extraData = options.extraData || {};
1419
1420      options.extraData.ajax_iframe_upload = '1';
1421
1422      var v = $.fieldValue(this.element);
1423      if (v !== null) {
1424        options.extraData[this.element.name] = v;
1425      }
1426    }
1427
1428    $(this.element).prop('disabled', true);
1429
1430    if (!this.progress || !this.progress.type) {
1431      return;
1432    }
1433
1434    var progressIndicatorMethod = 'setProgressIndicator' + this.progress.type.slice(0, 1).toUpperCase() + this.progress.type.slice(1).toLowerCase();
1435    if (progressIndicatorMethod in this && typeof this[progressIndicatorMethod] === 'function') {
1436      this[progressIndicatorMethod].call(this);
1437    }
1438  };
1439
1440  Drupal.theme.ajaxProgressThrobber = function (message) {
1441    var messageMarkup = typeof message === 'string' ? Drupal.theme('ajaxProgressMessage', message) : '';
1442    var throbber = '<div class="throbber">&nbsp;</div>';
1443
1444    return '<div class="ajax-progress ajax-progress-throbber">' + throbber + messageMarkup + '</div>';
1445  };
1446
1447  Drupal.theme.ajaxProgressIndicatorFullscreen = function () {
1448    return '<div class="ajax-progress ajax-progress-fullscreen">&nbsp;</div>';
1449  };
1450
1451  Drupal.theme.ajaxProgressMessage = function (message) {
1452    return '<div class="message">' + message + '</div>';
1453  };
1454
1455  Drupal.theme.ajaxProgressBar = function ($element) {
1456    return $('<div class="ajax-progress ajax-progress-bar"></div>').append($element);
1457  };
1458
1459  Drupal.Ajax.prototype.setProgressIndicatorBar = function () {
1460    var progressBar = new Drupal.ProgressBar('ajax-progress-' + this.element.id, $.noop, this.progress.method, $.noop);
1461    if (this.progress.message) {
1462      progressBar.setProgress(-1, this.progress.message);
1463    }
1464    if (this.progress.url) {
1465      progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500);
1466    }
1467    this.progress.element = $(Drupal.theme('ajaxProgressBar', progressBar.element));
1468    this.progress.object = progressBar;
1469    $(this.element).after(this.progress.element);
1470  };
1471
1472  Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () {
1473    this.progress.element = $(Drupal.theme('ajaxProgressThrobber', this.progress.message));
1474    $(this.element).after(this.progress.element);
1475  };
1476
1477  Drupal.Ajax.prototype.setProgressIndicatorFullscreen = function () {
1478    this.progress.element = $(Drupal.theme('ajaxProgressIndicatorFullscreen'));
1479    $('body').append(this.progress.element);
1480  };
1481
1482  Drupal.Ajax.prototype.success = function (response, status) {
1483    var _this = this;
1484
1485    if (this.progress.element) {
1486      $(this.progress.element).remove();
1487    }
1488    if (this.progress.object) {
1489      this.progress.object.stopMonitoring();
1490    }
1491    $(this.element).prop('disabled', false);
1492
1493    var elementParents = $(this.element).parents('[data-drupal-selector]').addBack().toArray();
1494
1495    var focusChanged = false;
1496    Object.keys(response || {}).forEach(function (i) {
1497      if (response[i].command && _this.commands[response[i].command]) {
1498        _this.commands[response[i].command](_this, response[i], status);
1499        if (response[i].command === 'invoke' && response[i].method === 'focus') {
1500          focusChanged = true;
1501        }
1502      }
1503    });
1504
1505    if (!focusChanged && this.element && !$(this.element).data('disable-refocus')) {
1506      var target = false;
1507
1508      for (var n = elementParents.length - 1; !target && n >= 0; n--) {
1509        target = document.querySelector('[data-drupal-selector="' + elementParents[n].getAttribute('data-drupal-selector') + '"]');
1510      }
1511
1512      if (target) {
1513        $(target).trigger('focus');
1514      }
1515    }
1516
1517    if (this.$form && document.body.contains(this.$form.get(0))) {
1518      var settings = this.settings || drupalSettings;
1519      Drupal.attachBehaviors(this.$form.get(0), settings);
1520    }
1521
1522    this.settings = null;
1523  };
1524
1525  Drupal.Ajax.prototype.getEffect = function (response) {
1526    var type = response.effect || this.effect;
1527    var speed = response.speed || this.speed;
1528
1529    var effect = {};
1530    if (type === 'none') {
1531      effect.showEffect = 'show';
1532      effect.hideEffect = 'hide';
1533      effect.showSpeed = '';
1534    } else if (type === 'fade') {
1535      effect.showEffect = 'fadeIn';
1536      effect.hideEffect = 'fadeOut';
1537      effect.showSpeed = speed;
1538    } else {
1539      effect.showEffect = type + 'Toggle';
1540      effect.hideEffect = type + 'Toggle';
1541      effect.showSpeed = speed;
1542    }
1543
1544    return effect;
1545  };
1546
1547  Drupal.Ajax.prototype.error = function (xmlhttprequest, uri, customMessage) {
1548    if (this.progress.element) {
1549      $(this.progress.element).remove();
1550    }
1551    if (this.progress.object) {
1552      this.progress.object.stopMonitoring();
1553    }
1554
1555    $(this.wrapper).show();
1556
1557    $(this.element).prop('disabled', false);
1558
1559    if (this.$form && document.body.contains(this.$form.get(0))) {
1560      var settings = this.settings || drupalSettings;
1561      Drupal.attachBehaviors(this.$form.get(0), settings);
1562    }
1563    throw new Drupal.AjaxError(xmlhttprequest, uri, customMessage);
1564  };
1565
1566  Drupal.theme.ajaxWrapperNewContent = function ($newContent, ajax, response) {
1567    return (response.effect || ajax.effect) !== 'none' && $newContent.filter(function (i) {
1568      return !($newContent[i].nodeName === '#comment' || $newContent[i].nodeName === '#text' && /^(\s|\n|\r)*$/.test($newContent[i].textContent));
1569    }).length > 1 ? Drupal.theme('ajaxWrapperMultipleRootElements', $newContent) : $newContent;
1570  };
1571
1572  Drupal.theme.ajaxWrapperMultipleRootElements = function ($elements) {
1573    return $('<div></div>').append($elements);
1574  };
1575
1576  Drupal.AjaxCommands = function () {};
1577  Drupal.AjaxCommands.prototype = {
1578    insert: function insert(ajax, response) {
1579      var $wrapper = response.selector ? $(response.selector) : $(ajax.wrapper);
1580      var method = response.method || ajax.method;
1581      var effect = ajax.getEffect(response);
1582
1583      var settings = response.settings || ajax.settings || drupalSettings;
1584
1585      var $newContent = $($.parseHTML(response.data, document, true));
1586
1587      $newContent = Drupal.theme('ajaxWrapperNewContent', $newContent, ajax, response);
1588
1589      switch (method) {
1590        case 'html':
1591        case 'replaceWith':
1592        case 'replaceAll':
1593        case 'empty':
1594        case 'remove':
1595          Drupal.detachBehaviors($wrapper.get(0), settings);
1596          break;
1597        default:
1598          break;
1599      }
1600
1601      $wrapper[method]($newContent);
1602
1603      if (effect.showEffect !== 'show') {
1604        $newContent.hide();
1605      }
1606
1607      var $ajaxNewContent = $newContent.find('.ajax-new-content');
1608      if ($ajaxNewContent.length) {
1609        $ajaxNewContent.hide();
1610        $newContent.show();
1611        $ajaxNewContent[effect.showEffect](effect.showSpeed);
1612      } else if (effect.showEffect !== 'show') {
1613        $newContent[effect.showEffect](effect.showSpeed);
1614      }
1615
1616      if ($newContent.parents('html').length) {
1617        $newContent.each(function (index, element) {
1618          if (element.nodeType === Node.ELEMENT_NODE) {
1619            Drupal.attachBehaviors(element, settings);
1620          }
1621        });
1622      }
1623    },
1624    remove: function remove(ajax, response, status) {
1625      var settings = response.settings || ajax.settings || drupalSettings;
1626      $(response.selector).each(function () {
1627        Drupal.detachBehaviors(this, settings);
1628      }).remove();
1629    },
1630    changed: function changed(ajax, response, status) {
1631      var $element = $(response.selector);
1632      if (!$element.hasClass('ajax-changed')) {
1633        $element.addClass('ajax-changed');
1634        if (response.asterisk) {
1635          $element.find(response.asterisk).append(' <abbr class="ajax-changed" title="' + Drupal.t('Changed') + '">*</abbr> ');
1636        }
1637      }
1638    },
1639    alert: function alert(ajax, response, status) {
1640      window.alert(response.text, response.title);
1641    },
1642    announce: function announce(ajax, response) {
1643      if (response.priority) {
1644        Drupal.announce(response.text, response.priority);
1645      } else {
1646        Drupal.announce(response.text);
1647      }
1648    },
1649    redirect: function redirect(ajax, response, status) {
1650      window.location = response.url;
1651    },
1652    css: function css(ajax, response, status) {
1653      $(response.selector).css(response.argument);
1654    },
1655    settings: function settings(ajax, response, status) {
1656      var ajaxSettings = drupalSettings.ajax;
1657
1658      if (ajaxSettings) {
1659        Drupal.ajax.expired().forEach(function (instance) {
1660
1661          if (instance.selector) {
1662            var selector = instance.selector.replace('#', '');
1663            if (selector in ajaxSettings) {
1664              delete ajaxSettings[selector];
1665            }
1666          }
1667        });
1668      }
1669
1670      if (response.merge) {
1671        $.extend(true, drupalSettings, response.settings);
1672      } else {
1673        ajax.settings = response.settings;
1674      }
1675    },
1676    data: function data(ajax, response, status) {
1677      $(response.selector).data(response.name, response.value);
1678    },
1679    invoke: function invoke(ajax, response, status) {
1680      var $element = $(response.selector);
1681      $element[response.method].apply($element, _toConsumableArray(response.args));
1682    },
1683    restripe: function restripe(ajax, response, status) {
1684      $(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');
1685    },
1686    update_build_id: function update_build_id(ajax, response, status) {
1687      $('input[name="form_build_id"][value="' + response.old + '"]').val(response.new);
1688    },
1689    add_css: function add_css(ajax, response, status) {
1690      $('head').prepend(response.data);
1691    },
1692    message: function message(ajax, response) {
1693      var messages = new Drupal.Message(document.querySelector(response.messageWrapperQuerySelector));
1694      if (response.clearPrevious) {
1695        messages.clear();
1696      }
1697      messages.add(response.message, response.messageOptions);
1698    }
1699  };
1700})(jQuery, window, Drupal, drupalSettings);;
1701/**
1702* DO NOT EDIT THIS FILE.
1703* See the following change record for more information,
1704* https://www.drupal.org/node/2815083
1705* @preserve
1706**/
1707
1708(function (Drupal) {
1709  Drupal.theme.ajaxProgressBar = function ($element) {
1710    return $element.addClass('ajax-progress ajax-progress-bar');
1711  };
1712})(Drupal);;
1713/**
1714* DO NOT EDIT THIS FILE.
1715* See the following change record for more information,
1716* https://www.drupal.org/node/2815083
1717* @preserve
1718**/
1719function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
1720
1721(function (Drupal) {
1722  Drupal.behaviors.flagAttach = {
1723    attach: function attach(context) {
1724      var links = [].concat(_toConsumableArray(context.querySelectorAll('.flag a')));
1725      links.forEach(function (link) {
1726        return link.addEventListener('click', function (event) {
1727          return event.target.parentNode.classList.add('flag-waiting');
1728        });
1729      });
1730    }
1731  };
1732
1733  Drupal.AjaxCommands.prototype.actionLinkFlash = function (ajax, response, status) {
1734    if (status === 'success') {
1735      var para = document.createElement('P');
1736      para.innerText = response.message;
1737
1738      para.setAttribute('class', 'js-flag-message');
1739
1740      para.addEventListener('animationend', function (event) {
1741        return event.target.remove();
1742      }, false);
1743
1744      document.querySelector(response.selector).appendChild(para);
1745    } else {
1746      var links = [].concat(_toConsumableArray(document.querySelectAll('.flag-waiting')));
1747      links.forEach(function (link) {
1748        return link.classList.remove('flag-waiting');
1749      });
1750    }
1751  };
1752})(Drupal);;

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.