PageSourceSearch

https://baldwin2k.com/sites/default/files/js/js_Qj_gucpc54EH2RsxFPrHJAWM5F8sveBSIDPpB_lXC5Q.js

js baldwin2k.com collected 2026-10-02 19:16:15 UTC 57,406 bytes, 1,109 lines download raw bytes

1!function(t,n,o){"use strict";Drupal.behaviors.atdoubleTap={attach:function(){t.fn.doubleTapToGo=function(i){return!!("ontouchstart"in n||navigator.msMaxTouchPoints||navigator.userAgent.toLowerCase().match(/windows phone os 7/i))&&("unbind"===i?this.each(function(){t(this).off(),t(o).off("click touchstart MSPointerDown",handleTouch)}):this.each(function(){var n=!1;t(this).on("click",function(o){var i=t(this);i[0]!=n[0]&&(o.preventDefault(),n=i)}),t(o).on("click touchstart MSPointerDown",function(o){for(var i=!0,a=t(o.target).parents(),c=0;c<a.length;c++)a[c]==n[0]&&(i=!1);i&&(n=!1)})}),this)}}}}(jQuery,window,document);
2
3!function(e,a,r){"use strict";Drupal.behaviors.atrM={attach:function(o,n){function t(a){a.preventDefault(),a.stopPropagation(),e(this).toggleClass("is-open--parent"),"true"==e(this).attr("aria-expanded")?e(this).attr("aria-expanded","false"):"false"==e(this).attr("aria-expanded")&&e(this).attr("aria-expanded","true"),e(this).parent().next(".is-child").toggleClass("is-open--child")}function i(a){var r=e("#rm-accordion-trigger").html();e(a).each(function(){0==e(this).next(".rm-accordion-trigger").length&&e(this).after(r);var a=e(this).parent().parent().attr("id");e(this).next().attr("aria-controls",a+"__child-menu"),e(this).parent().next(".is-child").attr("id",a+"__child-menu")})}if(e(".rm-block").removeClass("js-hide"),r.matchMedia("only screen").matches){var s=n[n.ajaxPageState.theme].at_responsivemenus,c=s.default,l=s.responsive,d=".rm-block .rm-toggle__link",m=s.acd.acd_default,u=s.acd.acd_responsive,p=s.acd.acd_both,_=s.acd.acd_load;e(d,o).on("click",function(r){r.preventDefault(),r.stopPropagation(),e(a.body).toggleClass("rm-is-open"),"true"==e(this).attr("aria-expanded")?(e(this).attr("aria-expanded","false"),e("#rm-toggle__icon--use").attr("xlink:href","#rm-toggle__icon--open")):"false"==e(this).attr("aria-expanded")&&(e(this).attr("aria-expanded","true"),e("#rm-toggle__icon--use").attr("xlink:href","#rm-toggle__icon--close")),e(a).one("click",function(r){0===e(".rm-block").has(r.target).length&&(e(a.body).removeClass("rm-is-open"),e(d).attr("aria-expanded","false"),e("#rm-toggle__icon--use").attr("xlink:href","#rm-toggle__icon--open"))})}),enquire.register(s.bp,{setup:function(){e(a.body).addClass(c),e(".rm-block").parent(".l-r").addClass("rm-region").parent(".l-rw").addClass("rm-row"),"ms-dropmenu"==c&&e(".rm-block__content li:has(ul)").doubleTapToGo(),1==m&&1==_&&(e(".rm-block .menu-level-1").addClass("ms-accordion"),e.ready(i(".ms-accordion .is-parent__wrapper .menu__link")),e(".ms-accordion .rm-accordion-trigger",o).on("click",t))},match:function(){"ms-none"!==l&&l!==c&&(e(a.body).removeClass(c).addClass(l),1==_&&(1==u?0==p&&(e(".rm-block .menu-level-1").addClass("ms-accordion"),e.ready(i(".ms-accordion .is-parent__wrapper .menu__link")),e(".ms-accordion .rm-accordion-trigger",o).on("click",t)):(e(".ms-accordion .rm-accordion-trigger").remove(),e(".rm-block .menu-level-1").removeClass("ms-accordion"),e(".rm-block .menu").removeClass("is-open--child"))),"ms-dropmenu"==l?e(".rm-block__content li:has(ul)").doubleTapToGo():e(".rm-block__content li:has(ul)").doubleTapToGo("unbind"))},unmatch:function(){e(a.body).addClass(c),1==_&&(1==m?0==p&&(e(".rm-block .menu-level-1").addClass("ms-accordion"),e.ready(i(".ms-accordion .is-parent__wrapper .menu__link")),e(".ms-accordion .rm-accordion-trigger",o).on("click",t)):(e(".ms-accordion .rm-accordion-trigger").remove(),e(".rm-block .menu-level-1").removeClass("ms-accordion"),e(".rm-block .menu").removeClass("is-open--child"))),"ms-dropmenu"==c?e(".rm-block__content li:has(ul)").doubleTapToGo():e(".rm-block__content li:has(ul)").doubleTapToGo("unbind"),l!==c&&e(a.body).removeClass(l)}})}}}}(jQuery,document,window);
4
5(function ($) {
6  const autosize = createAutosizer();
7
8  $(document).on('click', '.new-form-item--change-password-btn', onChangePasswordInputView)
9  $(document).on('click', '.new-form--user-registration-step--close-btn', onCloseUserFormClick)
10  $(document).on('click', '.new-alert--close', onAlertClose)
11  $(document).on('change', '.new-form-item input, .new-form-item select, .new-form-item textarea', onInputsChange);
12  $(document).on('mousedown', '.new-form-item-checkbox label', onCheckboxFocusIn);
13  $(document).on('mouseup', '.new-form-item-checkbox label', onCheckboxFocusOut);
14  $(document).on('change', '.new-form-item-checkbox input', onCheckboxChange);
15  $(document).on('keypress', '.new-form-item input', onInputsKeyPress);
16  $(document).on('blur', '.redactor-box', onRedactorBoxBlur)
17
18  checkInputsForEmpty();
19
20  //to catch browser autofill
21  setTimeout(checkInputsForEmpty, 500);
22  setTimeout(checkInputsForEmpty, 1500);
23
24  newDialogsInit();
25
26  mobileMenuInit();
27
28  attachAltToMainImg();
29
30  initArticleResponsiveTables();
31
32  stylePaypalBlock();
33
34  autosize(document.querySelectorAll('.form-textarea'));
35
36  function onRedactorBoxBlur(e) {
37    toggleNotEmptyState($(e.currentTarget));
38  }
39
40  function onCheckboxChange(e) {
41    if ( $(e.target).is(':checked') ) {
42      $(e.target).parent().addClass('new-form-item-checkbox--checked');
43    } else {
44      $(e.target).parent().removeClass('new-form-item-checkbox--checked');
45    }
46
47  }
48  function onCheckboxFocusIn(e) {
49    $(e.currentTarget).addClass('new-form-item-checkbox--focused')
50  }
51  function onCheckboxFocusOut(e) {
52    $(e.currentTarget).removeClass('new-form-item-checkbox--focused')
53  }
54
55  function stylePaypalBlock() {
56    if ($('.new-paypal-form-wrapper').length > 0) {
57      $('.new-paypal-form-wrapper').find('table').wrap($('<div class="new-paypal-form-wrapper--table-wrapper">'))
58    }
59  }
60
61  function onAlertClose(e) {
62    e.preventDefault();
63    $(e.target).parents('.new-alert--closeble').addClass('new-alert--hidden')
64  }
65
66  function onCloseUserFormClick(e) {
67    e.preventDefault();
68    window.history.back()
69  }
70
71  function onChangePasswordInputView(e) {
72    e.preventDefault();
73    const $input = $(e.currentTarget).siblings('input');
74    const input = $input[0];
75    const inputType = $input.attr('type');
76    const value = $input.val();
77    const len = value.length * 2;
78
79    $(e.currentTarget).toggleClass('new-form-item--change-password--visible');
80    $input.focus();
81
82    if (inputType === 'password') {
83      $input.attr('type', 'text')
84    } else {
85      $input.attr('type', 'password')
86    }
87    //move cursor to the end
88    if (input.setSelectionRange) {
89      setTimeout(function () {
90        input.setSelectionRange(len, len);
91      }, 0);
92    } else {
93      $input.val(value);
94    }
95  }
96
97  function onInputsKeyPress(e) {
98    if (e.keyCode === 13) {
99      $(e.target.form).find('.js-form-submit').trigger('mousedown');
100    }
101  }
102
103  function checkInputsForEmpty(e) {
104    const $inputs = $('.new-form-item input, .new-form-item select, .new-form-item textarea, .redactor-box');
105    $inputs.each(function(i, input) {
106      toggleNotEmptyState($(input))
107    })
108  }
109  function onInputsChange(e) {
110    toggleNotEmptyState($(e.target));
111  }
112
113  function toggleNotEmptyState($input){
114    let notEmpty = $input.val().length > 0;
115    if (!notEmpty && $input.find('option').length > 0) {
116      notEmpty = $input.find('option:selected').length > 0;
117    }
118    if ($input.hasClass('redactor-box')) {
119      notEmpty = $input.find('.redactor-styles').text().length > 0
120    }
121    if (notEmpty) {
122      $input.addClass('new-form-item--not-empty');
123    } else {
124      $input.removeClass('new-form-item--not-empty');
125    }
126  }
127
128  function newDialogsInit() {
129    const DIALOG_OVERLAY_CLASS = 'ui-widget-overlay';
130    const DIALOG_WRAPPER_CLASS = 'new-dialog';
131
132    const DIALOG_CREATED_CLASS = 'new-dialog--created';
133    const DIALOG_OPENED_CLASS = 'new-dialog--opened';
134    const DIALOG_OVERLAY_OPENED_CLASS = 'new-dialog-overlay--opened';
135
136    $(document).on("dialogopen", onDialogOpened);
137    $(document).on("dialogbeforeclose", onDialogClose);
138
139    function onDialogClose(e, ui) {
140      const $dialogElement = e.target;
141      const dialogObject = createDialogObject($dialogElement);
142
143      if (!dialogObject.element.closeable) {
144        closeDialog(dialogObject)
145      }
146      return dialogObject.element.closeable;
147    }
148
149    function onDialogOpened(e, ui) {
150      const $dialogElement = e.target;
151      const dialogObject = createDialogObject($dialogElement);
152      const $registerLink = dialogObject.dialog.find('.user-login-form--register-link-wrapper');
153      const $textareas = dialogObject.dialog.find('.form-textarea');
154
155      if (dialogObject.wrapper.length > 0) {
156        dialogObject.element.closeable = false;
157        openDialog(dialogObject)
158      }
159      if ($registerLink.length > 0) {
160        $registerLink.detach();
161        $registerLink.appendTo('.ui-dialog-buttonpane')
162      }
163      if ($textareas.length > 0) {
164        autosize($textareas.get());
165      }
166
167    }
168
169    function createDialogObject($dialogElement) {
170      const $dialog = $($dialogElement);
171      return {
172        element: $dialogElement,
173        dialog: $dialog,
174        wrapper: $dialog.parents('.' + DIALOG_WRAPPER_CLASS),
175        overlay: $('.' + DIALOG_OVERLAY_CLASS)
176      }
177    }
178
179    function openDialog(dialogObject) {
180      dialogObject.wrapper.addClass(DIALOG_CREATED_CLASS);
181      dialogObject.overlay.addClass(DIALOG_OVERLAY_OPENED_CLASS)
182      setTimeout(function () {
183        dialogObject.wrapper.addClass(DIALOG_OPENED_CLASS)
184      }, 200)
185    }
186
187    function closeDialog(dialogObject) {
188      dialogObject.wrapper.removeClass(DIALOG_OPENED_CLASS)
189      dialogObject.overlay.removeClass(DIALOG_OVERLAY_OPENED_CLASS)
190      setTimeout(function () {
191        dialogObject.element.closeable = true;
192        dialogObject.dialog.dialog().dialog('close');
193      }, 1000);
194    }
195  }
196
197  function mobileMenuInit() {
198    const MENU_OPENED_CLASS_NAME = 'mobile-menu-opened';
199    const MENU_MARGIN_LEFT = 24;
200    const MENU_MARGIN_TOP = 16;
201
202    const $mobileMenuOutline = $('.mobile-menu--outline');
203    const $mobileMenuContent = $('.mobile-menu--content');
204    const $leaderboard = $('.l-leaderboard');
205    const $navBar = $('#rid-navbar');
206
207    let menuWidth;
208    let menuHeight;
209
210    $(document).on('click', '.mobile-menu-toggle-btn', toggleMobileMenu);
211    recalculateSizes();
212    $(window).on('resize', recalculateSizes)
213    $(window).on('scroll', checkIfMenuResizeNeeded)
214
215    function toggleMobileMenu(e) {
216      e.preventDefault();
217      $('body').toggleClass(MENU_OPENED_CLASS_NAME);
218      recalculateSizes();
219    }
220
221    function checkIfMenuResizeNeeded() {
222      if ($('body').hasClass(MENU_OPENED_CLASS_NAME) && !$navBar.hasClass('sticky')) {
223        recalculateSizes();
224      }
225    }
226
227    function setSizes() {
228      $mobileMenuOutline.width(menuWidth).height(menuHeight);
229      $mobileMenuContent.outerWidth(menuWidth).outerHeight(menuHeight)
230      if ($('body').hasClass(MENU_OPENED_CLASS_NAME)) {
231        $mobileMenuContent.css({
232          'clip': 'rect(0, ' + menuWidth + 'px, ' + menuHeight + 'px, 0)'
233        })
234      } else {
235        $mobileMenuContent.css({
236          'clip': 'rect(0, ' + menuWidth + 'px, 0, ' + menuWidth + 'px)'
237        })
238      }
239    }
240
241    function recalculateSizes() {
242      leaderboardHeight = 0;
243      menutopmargin = MENU_MARGIN_TOP;
244      if ($leaderboard.length > 0 && !$navBar.hasClass('sticky')) {
245        leaderboardHeight = $leaderboard.height() - $(window).scrollTop()
246      }
247      if ($(window).width() <= 500) {
248        menutopmargin = 0;
249      }
250      menuWidth = $(window).width() - MENU_MARGIN_LEFT;
251      menuHeight = $(window).height() - leaderboardHeight + menutopmargin;
252      setSizes();
253    }
254  }
255
256  function attachAltToMainImg () {
257    //if there's a main img... add alt text from the caption if one exists otherwise from the title
258    const $img = $('.node--view-mode-full').find('.field-node-field-media-main-image').find('img');
259    if ($img.length > 0) {
260      const caption = $('.field-name-field-media-image-caption').find('.field__item').text();
261      const text = caption.length > 0? caption : $('.field-node--node-title').find('h1').text();
262      $img.attr('alt', text);
263    }
264  }
265
266  function initArticleResponsiveTables () {
267    const $tables = $('.node--view-mode-full').find('.field-node--body').find('table');
268
269    if ($tables.length > 0) {
270      // console.log($tables)
271      $tables.each(function (i, table) {
272        $(table).wrap('<div class="new-table-responsive--wrapper">');
273        //console.log($table)
274      })
275    }
276  }
277
278})(jQuery)
279
280function createAutosizer() {
281  const map = (typeof Map === "function") ? new Map() : (function () {
282    const keys = [];
283    const values = [];
284
285    return {
286      has(key) {
287        return keys.indexOf(key) > -1;
288      },
289      get(key) {
290        return values[keys.indexOf(key)];
291      },
292      set(key, value) {
293        if (keys.indexOf(key) === -1) {
294          keys.push(key);
295          values.push(value);
296        }
297      },
298      delete(key) {
299        const index = keys.indexOf(key);
300        if (index > -1) {
301          keys.splice(index, 1);
302          values.splice(index, 1);
303        }
304      },
305    }
306  })();
307
308  let createEvent = (name) => new Event(name, {
309    bubbles: true
310  });
311  try {
312    new Event('test');
313  } catch (e) {
314    // IE does not support `new Event()`
315    createEvent = (name) => {
316      const evt = document.createEvent('Event');
317      evt.initEvent(name, true, false);
318      return evt;
319    };
320  }
321
322  function assign(ta) {
323    if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;
324
325    let heightOffset = null;
326    let clientWidth = null;
327    let cachedHeight = null;
328
329    function init() {
330      const style = window.getComputedStyle(ta, null);
331
332      if (style.resize === 'vertical') {
333        ta.style.resize = 'none';
334      } else if (style.resize === 'both') {
335        ta.style.resize = 'horizontal';
336      }
337
338      if (style.boxSizing === 'content-box') {
339        heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));
340      } else {
341        heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
342      }
343      // Fix when a textarea is not on document body and heightOffset is Not a Number
344      if (isNaN(heightOffset)) {
345        heightOffset = 0;
346      }
347
348      update();
349    }
350
351    function changeOverflow(value) {
352      {
353        // Chrome/Safari-specific fix:
354        // When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space
355        // made available by removing the scrollbar. The following forces the necessary text reflow.
356        const width = ta.style.width;
357        ta.style.width = '0px';
358        // Force reflow:
359        /* jshint ignore:start */
360        ta.offsetWidth;
361        /* jshint ignore:end */
362        ta.style.width = width;
363      }
364
365      ta.style.overflowY = value;
366    }
367
368    function getParentOverflows(el) {
369      const arr = [];
370
371      while (el && el.parentNode && el.parentNode instanceof Element) {
372        if (el.parentNode.scrollTop) {
373          arr.push({
374            node: el.parentNode,
375            scrollTop: el.parentNode.scrollTop,
376          })
377        }
378        el = el.parentNode;
379      }
380
381      return arr;
382    }
383
384    function resize() {
385      if (ta.scrollHeight === 0) {
386        // If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.
387        return;
388      }
389
390      const overflows = getParentOverflows(ta);
391      const docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)
392
393      ta.style.height = '';
394      ta.style.height = (ta.scrollHeight + heightOffset) + 'px';
395
396      // used to check if an update is actually necessary on window.resize
397      clientWidth = ta.clientWidth;
398
399      // prevents scroll-position jumping
400      overflows.forEach(el => {
401        el.node.scrollTop = el.scrollTop
402      });
403
404      if (docTop) {
405        document.documentElement.scrollTop = docTop;
406      }
407    }
408
409    function update() {
410      resize();
411
412      const styleHeight = Math.round(parseFloat(ta.style.height));
413      const computed = window.getComputedStyle(ta, null);
414
415      // Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box
416      var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;
417
418      // The actual height not matching the style height (set via the resize method) indicates that
419      // the max-height has been exceeded, in which case the overflow should be allowed.
420      if (actualHeight < styleHeight) {
421        if (computed.overflowY === 'hidden') {
422          changeOverflow('scroll');
423          resize();
424          actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
425        }
426      } else {
427        // Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
428        if (computed.overflowY !== 'hidden') {
429          changeOverflow('hidden');
430          resize();
431          actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
432        }
433      }
434
435      if (cachedHeight !== actualHeight) {
436        cachedHeight = actualHeight;
437        const evt = createEvent('autosize:resized');
438        try {
439          ta.dispatchEvent(evt);
440        } catch (err) {
441          // Firefox will throw an error on dispatchEvent for a detached element
442          // https://bugzilla.mozilla.org/show_bug.cgi?id=889376
443        }
444      }
445    }
446
447    const pageResize = () => {
448      if (ta.clientWidth !== clientWidth) {
449        update();
450      }
451    };
452
453    const destroy = (style => {
454      window.removeEventListener('resize', pageResize, false);
455      ta.removeEventListener('input', update, false);
456      ta.removeEventListener('keyup', update, false);
457      ta.removeEventListener('autosize:destroy', destroy, false);
458      ta.removeEventListener('autosize:update', update, false);
459
460      Object.keys(style).forEach(key => {
461        ta.style[key] = style[key];
462      });
463
464      map.delete(ta);
465    }).bind(ta, {
466      height: ta.style.height,
467      resize: ta.style.resize,
468      overflowY: ta.style.overflowY,
469      overflowX: ta.style.overflowX,
470      wordWrap: ta.style.wordWrap,
471    });
472
473    ta.addEventListener('autosize:destroy', destroy, false);
474
475    // IE9 does not fire onpropertychange or oninput for deletions,
476    // so binding to onkeyup to catch most of those events.
477    // There is no way that I know of to detect something like 'cut' in IE9.
478    if ('onpropertychange' in ta && 'oninput' in ta) {
479      ta.addEventListener('keyup', update, false);
480    }
481
482    window.addEventListener('resize', pageResize, false);
483    ta.addEventListener('input', update, false);
484    ta.addEventListener('autosize:update', update, false);
485    ta.style.overflowX = 'hidden';
486    ta.style.wordWrap = 'break-word';
487
488    map.set(ta, {
489      destroy,
490      update,
491    });
492
493    init();
494  }
495
496  function destroy(ta) {
497    const methods = map.get(ta);
498    if (methods) {
499      methods.destroy();
500    }
501  }
502
503  function update(ta) {
504    const methods = map.get(ta);
505    if (methods) {
506      methods.update();
507    }
508  }
509
510  let autosize = null;
511
512
513  autosize = (el, options) => {
514    if (el) {
515      Array.prototype.forEach.call(el.length ? el : [el], x => assign(x, options));
516    }
517    return el;
518  };
519  autosize.destroy = el => {
520    if (el) {
521      Array.prototype.forEach.call(el.length ? el : [el], destroy);
522    }
523    return el;
524  };
525  autosize.update = el => {
526    if (el) {
527      Array.prototype.forEach.call(el.length ? el : [el], update);
528    }
529    return el;
530  };
531  return autosize;
532}
533;
534(function ($, Drupal) {
535  //let utility_block_settings = drupalSettings.utility_block_settings;
536
537  if($('#subscribe-wrapper').length > 0) {
538    var subhtml = $('#subscribe-wrapper').html();
539    $('#subscribe-wrapper').html('');
540    if($('#block-labsadssidebarslot1').length > 0) {
541      $('#block-labsadssidebarslot1').before(subhtml);
542    }
543    if($('#rid-content > .slot-index-3').length > 0) {
544      $('#rid-content > .slot-index-3').before(subhtml);
545    }
546    if($('.layout__region--bottom .field-node--field-flags').length > 0) {
547      subhtml = subhtml.replace('new-btn new-btn--secondary', 'new-btn new-btn--primary');
548      $('.layout__region--bottom .field-node--field-flags').before(subhtml);
549    }
550  }
551
552  if($('#paypal-wrapper-wrapper').length > 0 && !$('.paypal-wrapper').is(':visible')) {
553    var pphtml = $('#paypal-wrapper-wrapper').html();
554    if($('.slot-index-7').length > 0 ) {
555      $('.slot-index-4').after(pphtml);
556    }
557  }
558
559  if($('#labsfblike') &&  $('#social-sharing-block')) {
560    var html = $('#labsfblike').html();
561    $('#labsfblike').html('');
562    if($('.field-type-social-media').css('display')== 'none') {
563      $('.field-node--node-title').prepend(html);
564    } else {
565      $('#social-sharing-block').prepend(html);
566    }
567  }
568
569
570  $('.location-viewer a').on('click', function(e){
571    $('.org-locations-nav').toggleClass('hidden');
572  });
573  $('.field-node--body a').each(function(){
574    var a = new RegExp('/' + window.location.host + '/');
575    if (!a.test(this.href)) {
576      $(this).attr("target","_blank");
577    }
578  });
579
580})(jQuery, Drupal);
581
582//defer images
583deferred_images = document.getElementsByClassName('defer-load');
584// deferred_images.forEach(loadDeferredImage);
585  for (var index = 0; index < deferred_images.length; index++) {
586
587    if(deferred_images[index] !== 'undefined' && deferred_images[index].hasAttribute('data-src')){
588    var imgsrc = deferred_images[index].getAttribute('data-src');
589    deferred_images[index].setAttribute('src', imgsrc);
590  }
591}
592
593//console.log(deferred_images);
594;
595var source_url = drupalSettings.labs_ads.source_url;
596var ad_cta_populated = false;
597debug = false;
598if (getParameterByName('debug')) {
599  debug = true;
600}
601if (debug) {
602  console.log('ads');
603  console.log('source_url: ' + source_url);
604}
605var bannerad = document.getElementById('leaderboard-ad-0');
606var leaderboard_div = document.getElementById('rid-leaderboard');
607
608var page_slots_for_normal_ads = document.getElementsByClassName('not-banner-ad'); //@todo change to not-leaderboard ad
609var sidebar_slots_for_normal_ads = document.getElementsByClassName('slot-sidebar-adslot');
610var contentscroll_slots_for_normal_ads = document.getElementsByClassName('slot-adslot-contentscroll');
611var page_slots_for_adpost_ad = document.getElementsByClassName('adpost-ad');
612
613var lb_extraone = document.getElementsByClassName('leaderboard-extra-1');
614var lb_extratwo = document.getElementsByClassName('leaderboard-extra-2');
615var lb_extrathree = document.getElementsByClassName('leaderboard-extra-3');
616var lb_extrafour = document.getElementsByClassName('leaderboard-extra-4');
617
618var cta = document.getElementById('footer-ad-cta').innerHTML;
619
620var total_num_of_normal_ad_divs = 0;
621var total_num_of_normal_ads_populated = 0;
622
623//put all website normal slots in an object sorted by proximity to top of page
624var website_normal_ad_divs = {};
625let n = 0;
626
627var shuffle = function (array) {
628  var currentIndex = array.length;
629  var temporaryValue, randomIndex;
630  // While there remain elements to shuffle...
631  while (0 !== currentIndex) {
632    // Pick a remaining element...
633    randomIndex = Math.floor(Math.random() * currentIndex);
634    currentIndex -= 1;
635
636    // And swap it with the current element.
637    temporaryValue = array[currentIndex];
638    array[currentIndex] = array[randomIndex];
639    array[randomIndex] = temporaryValue;
640  }
641  return array;
642};
643while (n < page_slots_for_normal_ads.length) {
644  rect = page_slots_for_normal_ads[n].getBoundingClientRect();
645  // console.log(rect.top);
646  var rect_top = Math.round(rect.top);
647  website_normal_ad_divs[rect_top + n] = page_slots_for_normal_ads[n];
648  n++;
649}
650
651//
652//check if adslots on the page
653if (bannerad || page_slots_for_normal_ads.length || page_slots_for_adpost_ad.length && source_url.length) {
654  var i = 0;
655  if (bannerad) {
656    leaderboard_div.setAttribute('display', 'block');
657  }
658  var request = new XMLHttpRequest();
659  request.open('GET', source_url, true);
660  request.onload = function () {
661    if (request.status >= 200 && request.status < 400) {
662      var success = true;
663      try {
664        var data = JSON.parse(request.responseText);
665      } catch(e) {
666        success = false;
667        if (debug) {
668          console.log(e);
669          var data = request.responseText;
670        }
671      }
672      if (debug) {
673        console.log('data');
674        console.log(data);
675      }
676      if (success && data.website_leaderboard.length) {
677        let website_leaderboard_ads = data.website_leaderboard;
678        shuffle(website_leaderboard_ads);
679        bannerad.innerHTML = website_leaderboard_ads[0].extra.html;
680
681        //extra slots on the rail
682        if (data.website_leaderboard.length > 1 && lb_extraone) {
683          if (debug) {
684            console.log('placing banner in lbextra1');
685          }
686          lb_extraone = document.getElementById('leaderboard-extra-1');
687          var adhtml = data.website_leaderboard[1].extra.html;
688          var adhtml = adhtml.replace('hide-mobile', 'hidden');
689          var adhtml = adhtml.replace('hide-desktop', 'height-250');
690          lb_extraone.innerHTML = adhtml;
691        }
692        if (data.website_leaderboard.length > 2 && lb_extratwo) {
693          if (debug) {
694            console.log('placing banner in lbextra2');
695          }
696          lb_extratwo = document.getElementById('leaderboard-extra-2');
697          var adhtml = data.website_leaderboard[2].extra.html;
698          var adhtml = adhtml.replace('hide-mobile', 'hidden');
699          var adhtml = adhtml.replace('hide-desktop', 'height-250');
700          lb_extratwo.innerHTML = adhtml;
701        }
702        // if(data.website_leaderboard.length > 3 && lb_extrathree){
703        //   lb_extrathree = document.getElementById('leaderboard-extra-3');
704        //   var adhtml = data.website_leaderboard[3].extra.html;
705        //   var adhtml = adhtml.replace('hide-mobile', 'hidden');
706        //   var adhtml = adhtml.replace('hide-desktop', 'height-250');
707        //   lb_extrathree.innerHTML = adhtml;
708        // }
709        // if(data.website_leaderboard.length > 4 && lb_extrafour){
710        //   lb_extrafour = document.getElementById('leaderboard-extra-4');
711        //   var adhtml = data.website_leaderboard[4].extra.html;
712        //   var adhtml = adhtml.replace('hide-mobile', 'hidden');
713        //   var adhtml = adhtml.replace('hide-desktop', 'height-250');
714        //   lb_extrafour.innerHTML = adhtml;
715        // }
716      }
717
718      if (success && data.adpost_ad.length && page_slots_for_adpost_ad.length) {
719        let adpost_ad = data.adpost_ad;
720        page_slots_for_adpost_ad[0].innerHTML = adpost_ad[0].extra.html;
721      }
722
723      if (success && data.website_normal.length) {
724        let website_normal_ads = data.website_normal;
725        shuffle(website_normal_ads);
726        var ad_keys_filled = [];
727        var ad_items_filled = [];
728        var total_num_of_normal_ads = data.website_normal.length;
729        total_num_of_normal_ad_divs = Object.entries(website_normal_ad_divs).length;
730        var failsafe = 0;
731        failsafe++;
732        if (debug) {
733          console.log('total_num_of_normal_ads');
734          console.log(total_num_of_normal_ads);
735          console.log('ad_keys_filled.length');
736          console.log(ad_keys_filled.length);
737          console.log('total_num_of_normal_ad_divs');
738          console.log(total_num_of_normal_ad_divs);
739          console.log('failsafe');
740          console.log(failsafe);
741        }
742        for (let [key, value] of Object.entries(website_normal_ad_divs)) {
743          if (debug) {
744            console.log('key');
745            console.log(key);
746
747            console.log('website_normal_ads');
748            console.log(website_normal_ads);
749            console.log('website_normal_ads.length');
750            console.log(website_normal_ads.length);
751          }
752          var x = 0;
753          while (x < website_normal_ads.length) {
754
755            var ad = website_normal_ads[x];
756            if (debug) {
757              console.log('while ' + key + ' ------ ad_item' + x + ' --- ' + ad.body_summary);
758              console.log(ad);
759              console.log('ad_keys_filled');
760              console.log(ad_keys_filled);
761            }
762            if (!ad_keys_filled.includes(key) && !ad_items_filled.includes(x)) {
763              if (debug) {
764                console.log('ad_keys_filled does not include ' + key);
765                console.log('populating key' + key + ' with ' + ad.title);
766              }
767
768              if (ad.extra.has_both_images || ad.extra.text_only && website_normal_ad_divs[key].innerHTML == '') {
769                website_normal_ad_divs[key].innerHTML = website_normal_ads[x].extra.html;
770                //website_normal_ads[i] = 'PLACED';
771                total_num_of_normal_ads_populated++;
772                ad_keys_filled.push(key);
773                ad_items_filled.push(x);
774              } else if (ad.extra.mobile_image && website_normal_ad_divs[key].innerHTML == '' && website_normal_ad_divs[key].classList.contains('slot-sidebar-adslot')) {
775                website_normal_ad_divs[key].innerHTML = website_normal_ads[x].extra.html;
776                // website_normal_ads[i] = 'PLACED';
777                total_num_of_normal_ads_populated++;
778                ad_keys_filled.push(key);
779                ad_items_filled.push(x);
780              } else if (ad.extra.website_normal_image && website_normal_ad_divs[key].innerHTML == '' && website_normal_ad_divs[key].classList.contains('slot-adslot-contentscroll')) {
781                website_normal_ad_divs[key].innerHTML = website_normal_ads[x].extra.html;
782                //website_normal_ads[i] = 'PLACED';
783                total_num_of_normal_ads_populated++;
784                ad_keys_filled.push(key);
785                ad_items_filled.push(x);
786              }
787            }
788            x++;
789          }
790        }
791
792        if(total_num_of_normal_ad_divs < total_num_of_normal_ads_populated) {
793          page_slots_for_normal_ads[total_num_of_normal_ads_populated].innerHTML = cta; //put cta in next div
794        }
795
796      } else {
797        page_slots_for_normal_ads[total_num_of_normal_ad_divs].innerHTML = cta; //put cta in last div
798      }
799    }
800  }
801  request.send();
802}
803
804function getParameterByName(name, url) {
805  if (!url) url = window.location.href;
806  name = name.replace(/[\[\]]/g, '\\$&');
807  var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
808    results = regex.exec(url);
809  if (!results) return null;
810  if (!results[2]) return '';
811  return decodeURIComponent(results[2].replace(/\+/g, ' '));
812}
813;
814
815var weather_canvas = document.getElementById("wicon-page-top");
816
817if (weather_canvas && weather_canvas.length !== 0) {
818  var tile_skycons_icon = weather_canvas.getAttribute('data-skycon');
819  var skycons_tile = new Skycons(
820    {
821      "monochrome": false,
822      "strokewidth": '.05'
823    }
824  );
825  skycons_tile.add(weather_canvas, tile_skycons_icon);
826
827  skycons_tile.play();
828}
829
830var wicon_days = document.getElementsByClassName("wicon-page-day");
831
832var skycons_tile = [];
833for (var i = 0; i < wicon_days.length; i++) {
834  var tile_skycons_icon = wicon_days.item(i).getAttribute('data-skycon');
835  var tile_skycons_color = wicon_days.item(i).getAttribute('data-color');
836  var skycons_tile = new Skycons(
837    {
838      "monochrome": true, //could be true for colored icons
839      "strokewidth": '.05',
840      "color": tile_skycons_color
841    }
842  );
843  skycons_tile.add(wicon_days.item(i), tile_skycons_icon);
844  skycons_tile.play();
845}
846;
847if(drupalSettings.hasOwnProperty('geocms_context') && drupalSettings.geocms_context.hasOwnProperty('item_nid') ) {
848  let slot_to_hide = 'slot-id-'+ drupalSettings.geocms_context.item_nid;
849  if(document.getElementById(slot_to_hide)){
850    document.getElementById(slot_to_hide).style.display = "none";
851  }
852}
853;
854
855var recirc_block = document.getElementById('block-labslabsrecirc-blocknavblock');
856var article_node_view = document.getElementsByClassName('node--view-mode-full');
857var tile = document.getElementById('supporter-cta-tile');
858var top_slot = document.getElementsByClassName('slot-index-1');
859if(!recirc_block){
860  if(tile && top_slot[0]){
861      top_slot[0].after(tile);
862  }
863}
864if(article_node_view[0]) {
865  article_node_view[0].before(tile);
866  tile.style.borderColor = null;
867  tile.classList.add('no-shadow');
868}
869
870
871;
872!function(o,m,s){"use strict";var i=s,p="media",l="blazy-"+p,r="b-"+p,f=p+"--player",d="."+f,u=p+"__icon",c="."+u+"--play",h="iframe",v="is-playing",$="data-"+h+"-title",y="data-url";function e(a){var r,d,n,e=o(a),t=e.find(h),a=e.find(c);o.isElm(a)&&(r=o.attr(a,y),d=o.attr(a,$),o.remove(t),e.on("click."+l,c,function(a){if(a.preventDefault(),""===r)return!1;var e=this,t=e.parentNode,i=o.find(s,"."+v),l=o.find(t,h),a=o.find(s,"video");r=o.attr(e,y),d=o.attr(e,$),o.isElm(a)&&!a.paused&&a.pause(),o.isElm(i)&&(a=o.find(s,"."+v+" "+h),o.remove(a),i.className=i.className.replace(/(\S+)playing/,"")),o.addClass(t,v),o.remove(l),n||(n=o.create(h,p+"__iframe "+p+"__element"),o.attr(n,{src:r,allowfullscreen:!0,title:d})),t.appendChild(n)}),e.on("click."+l,".media__icon--close",function(a){a.preventDefault();var e=this.parentNode,a=o.find(e,h);e.className.match(v)&&(e.className=e.className.replace(/(\S+)playing/,"")),o.remove(a)}))}m.theme.blazyMedia=function(a){var e=a.el||a.element,t=o(e),i=t.find("img"),l=o.parse(t.attr("data-"+p)),r=o.isElm(i)?m.checkPlain(o.attr(i,"alt","Video preview",!0)):"",d=l.width?parseInt(l.width,10):640,n=l.height?parseInt(l.height,10):360,s=l?(n/d*100).toFixed(2):100,c=t.attr("data-box-url"),e=t.attr("href"),i=t.attr("data-oembed-url",e,!0),n=p+"__image "+p+"__element",t=a.imgClass?n+" "+a.imgClass:n,e=l.id?" media--"+l.id:"",n="video"===l.type?" "+f:"",l="";return c&&(l+='<img src="$imgUrl" class="$imgClass" alt="$alt" loading="lazy" decoding="async" />'),n&&(l+='<span class="$icon $icon--close"></span>',l+='<span class="$icon $icon--play" data-url="$oembed" data-iframe-title="$alt"></span>'),l='<div class="$md $idClass $md--switch $player $md--ratio $md--ratio--fluid" style="padding-bottom: $pad%">'+l+"</div>",a.unwrap||(l='<div class="$wrapper $wrapper--inline" style="width: $widthpx">'+l+"</div>"),o.template(l,{md:p,icon:u,idClass:e,player:n,pad:s,imgUrl:c,imgClass:t,alt:r,oembed:i,width:d,wrapper:p+"-wrapper"})},m.behaviors.blazyMedia={attach:function(a){i=o.context(a),o.once(e,r,d,i)},detach:function(a,e,t){"unload"===t&&o.once.removeSafely(r,d,i)}}}(dBlazy,Drupal,this.document);
873;
874"use strict";!function(t){var i,n;i=function(){function i(i,n){var o;this.options=n,this.$element=t(i),this.didInit=!1,o=this,this.$element.on("click.slickLightbox",this.options.itemSelector,function(i){var n,e;if(i.preventDefault(),n=t(this),n.blur(),"function"!=typeof o.options.shouldOpen||o.options.shouldOpen(o,n,i))return e=o.$element.find(o.options.itemSelector),o.elementIsSlick()&&(e=o.filterOutSlickClones(e),n=o.handlePossibleCloneClick(n,e)),o.init(e.index(n))})}return i.prototype.init=function(t){return this.didInit=!0,this.detectIE(),this.createModal(),this.bindEvents(),this.initSlick(t),this.open()},i.prototype.createModalItems=function(){var i,n,o,e,s,l;return e=this.options.lazyPlaceholder||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",o=function(t,i,n){return'<div class="slick-lightbox-slick-item">\n  <div class="slick-lightbox-slick-item-inner">\n    <img class="slick-lightbox-slick-img" '+(!0===n?' data-lazy="'+t+'" src="'+e+'" ':' src="'+t+'" ')+" />\n    "+i+"\n  </div>\n</div>"},this.options.images?l=t.map(this.options.images,function(t){return function(i){return o(i,t.options.lazy)}}(this)):(i=this.filterOutSlickClones(this.$element.find(this.options.itemSelector)),s=i.length,n=function(t){return function(i,n){var e,l,r;return l={index:n,length:s},e=t.getElementCaption(i,l),r=t.getElementSrc(i),o(r,e,t.options.lazy)}}(this),l=t.map(i,n)),l},i.prototype.createModal=function(){var i,n;return n=this.createModalItems(),i='<div class="slick-lightbox slick-lightbox-hide-init'+(this.isIE?" slick-lightbox-ie":"")+'" style="background: '+this.options.background+';">\n  <div class="slick-lightbox-inner">\n    <div class="slick-lightbox-slick slick-caption-'+this.options.captionPosition+'">'+n.join("")+"</div>\n  <div>\n<div>",this.$modalElement=t(i),this.$parts={},this.$parts.closeButton=t(this.options.layouts.closeButton),this.$modalElement.find(".slick-lightbox-inner").append(this.$parts.closeButton),t("body").append(this.$modalElement)},i.prototype.initSlick=function(i){var n;return n={initialSlide:i},this.options.lazy&&(n.lazyLoad="ondemand"),null!=this.options.slick?"function"==typeof this.options.slick?this.slick=this.options.slick(this.$modalElement):this.slick=this.$modalElement.find(".slick-lightbox-slick").slick(t.extend({},this.options.slick,n)):this.slick=this.$modalElement.find(".slick-lightbox-slick").slick(n),this.$modalElement.trigger("init.slickLightbox")},i.prototype.open=function(){return this.options.useHistoryApi&&this.writeHistory(),this.$element.trigger("show.slickLightbox"),setTimeout(function(t){return function(){return t.$element.trigger("shown.slickLightbox")}}(this),this.getTransitionDuration()),this.$modalElement.removeClass("slick-lightbox-hide-init")},i.prototype.close=function(){return this.$element.trigger("hide.slickLightbox"),setTimeout(function(t){return function(){return t.$element.trigger("hidden.slickLightbox")}}(this),this.getTransitionDuration()),this.$modalElement.addClass("slick-lightbox-hide"),this.destroy()},i.prototype.bindEvents=function(){var i;if(i=function(t){return function(){var i;return i=t.$modalElement.find(".slick-lightbox-inner").height(),t.$modalElement.find(".slick-lightbox-slick-item").height(i),t.$modalElement.find(".slick-lightbox-slick-img, .slick-lightbox-slick-item-inner").css("max-height",Math.round(t.options.imageMaxHeight*i))}}(this),t(window).on("orientationchange.slickLightbox resize.slickLightbox",i),this.options.useHistoryApi&&t(window).on("popstate.slickLightbox",function(t){return function(){return t.close()}}(this)),this.$modalElement.on("init.slickLightbox",i),this.$modalElement.on("destroy.slickLightbox",function(t){return function(){return t.destroy()}}(this)),this.$element.on("destroy.slickLightbox",function(t){return function(){return t.destroy(!0)}}(this)),this.$parts.closeButton.on("click.slickLightbox touchstart.slickLightbox",function(t){return function(i){return i.preventDefault(),t.close()}}(this)),(this.options.closeOnEscape||this.options.navigateByKeyboard)&&t(document).on("keydown.slickLightbox",function(t){return function(i){var n;if(n=i.keyCode?i.keyCode:i.which,t.options.navigateByKeyboard&&(37===n?t.slideSlick("left"):39===n&&t.slideSlick("right")),t.options.closeOnEscape&&27===n)return t.close()}}(this)),this.options.closeOnBackdropClick)return this.$modalElement.on("click.slickLightbox touchstart.slickLightbox",".slick-lightbox-slick-img",function(t){return t.stopPropagation()}),this.$modalElement.on("click.slickLightbox",".slick-lightbox-slick-item",function(t){return function(i){return i.preventDefault(),t.close()}}(this))},i.prototype.slideSlick=function(t){return"left"===t?this.slick.slick("slickPrev"):this.slick.slick("slickNext")},i.prototype.detectIE=function(){if(this.isIE=!1,/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&new Number(RegExp.$1)<9)return this.isIE=!0},i.prototype.getElementCaption=function(i,n){return this.options.caption?'<span class="slick-lightbox-slick-caption">'+function(){switch(typeof this.options.caption){case"function":return this.options.caption(i,n);case"string":return t(i).data(this.options.caption)}}.call(this)+"</span>":""},i.prototype.getElementSrc=function(i){switch(typeof this.options.src){case"function":return this.options.src(i);case"string":return t(i).attr(this.options.src);default:return i.href}},i.prototype.unbindEvents=function(){return t(window).off(".slickLightbox"),t(document).off(".slickLightbox"),this.$modalElement.off(".slickLightbox")},i.prototype.destroy=function(t){if(null==t&&(t=!1),this.didInit&&(this.unbindEvents(),setTimeout(function(t){return function(){return t.$modalElement.remove()}}(this),this.options.destroyTimeout)),t)return this.$element.off(".slickLightbox"),this.$element.off(".slickLightbox",this.options.itemSelector)},i.prototype.destroyPrevious=function(){return t("body").children(".slick-lightbox").trigger("destroy.slickLightbox")},i.prototype.getTransitionDuration=function(){var t;return this.transitionDuration?this.transitionDuration:(t=this.$modalElement.css("transition-duration"),this.transitionDuration=void 0===t?500:t.indexOf("ms")>-1?parseFloat(t):1e3*parseFloat(t))},i.prototype.writeHistory=function(){return"undefined"!=typeof history&&null!==history&&"function"==typeof history.pushState?history.pushState(null,null,""):void 0},i.prototype.filterOutSlickClones=function(i){return this.elementIsSlick()?i=i.filter(function(){var i;return i=t(this),!i.hasClass("slick-cloned")&&0===i.parents(".slick-cloned").length}):i},i.prototype.handlePossibleCloneClick=function(i,n){var o;return this.elementIsSlick()&&i.closest(".slick-slide").hasClass("slick-cloned")?(o=i.attr("href"),n.filter(function(){return t(this).attr("href")===o}).first()):i},i.prototype.elementIsSlick=function(){return this.$element.hasClass("slick-slider")},i}(),n={background:"rgba(0,0,0,.8)",closeOnEscape:!0,closeOnBackdropClick:!0,destroyTimeout:500,itemSelector:"a",navigateByKeyboard:!0,src:!1,caption:!1,captionPosition:"dynamic",images:!1,slick:{},useHistoryApi:!1,layouts:{closeButton:'<button type="button" class="slick-lightbox-close"></button>'},shouldOpen:null,imageMaxHeight:.9,lazy:!1},t.fn.slickLightbox=function(o){return o=t.extend({},n,o),t(this).each(function(){return this.slickLightbox=new i(this,o)}),this},t.fn.unslickLightbox=function(){return t(this).trigger("destroy.slickLightbox").each(function(){return this.slickLightbox=null})}}(jQuery);
875
876!function(p,k,m,n){"use strict";var v="slick",y="unslick",C=v+"--initialized",b=".slick__slider",w=".slick__arrow",z=".b-lazy:not(.b-loaded)",_=".media__icon--close",P
876="is-playing",$="is-paused",x=k.blazy||{};function s(e){var i,l=p("> "+b,e).length?p("> "+b,e):p(e),a=p("> "+w,e),n=l.data(v)?p.extend({},m.slick,l.data(v)):p.extend({},m.slick),s=!("array"!==p.type(n.responsive)||!n.responsive.length)&&n.responsive,t=n.appendDots,o="blazy"===n.lazyLoad&&x,d=l.find(".media--player").length,c=l.hasClass(y);if(c||(n.appendDots=t===w?a:t||p(l)),s)for(i in s)Object.prototype.hasOwnProperty.call(s,i)&&s[i].settings!==y&&(s[i].settings=p.extend({},m.slick,g(n),s[i].settings));function r(i){l.find(z).length&&((i=l.find(i?".slide:not(.slick-cloned) "+z:".slick-active "+z)).length||(i=l.find(".slick-cloned "+z)),i.length&&x.init.load(i))}function u(){d&&f(),o&&r(!1)}function f(){l.removeClass($);var i=l.find("."+P);i.length&&i.removeClass(P).find(_).click()}function h(){l.addClass($).slick("slickPause")}function g(e){return c?{}:{slide:e.slide,lazyLoad:e.lazyLoad,dotsClass:e.dotsClass,rtl:e.rtl,prevArrow:p(".slick-prev",a),nextArrow:p(".slick-next",a),appendArrows:a,customPaging:function(i,n){var s=i.$slides.eq(n).find("[data-thumb]")||null,t='<img alt="'+k.t(s.find("img").attr("alt"))+'" src="'+s.data("thumb")+'">',t=s.length&&0<e.dotsClass.indexOf("thumbnail")?'<div class="slick-dots__thumbnail">'+t+"</div>":"",n=i.defaults.customPaging(i,n);return t?n.add(t):n}}}l.data(v,n),(n=l.data(v)).randomize&&!l.hasClass("slick-initiliazed")&&l.children().sort(function(){return.5-Math.random()}).each(function(){l.append(this)}),c||l.on("init.sl",function(i,n){t===w&&p(n.$dots).insertAfter(n.$prevArrow);n=l.find(".slick-cloned.slick-active "+z);o&&n.length&&x.init.load(n)}),o?l.on("beforeChange.sl",function(){r(!0)}):p(".media",l).closest(".slide__content").addClass("is-loading"),l.on("setPosition.sl",function(i,n){var s,t;t=(s=n).slideCount<=s.options.slidesToShow,n=t||!1===s.options.arrows,l.attr("id")===s.$slider.attr("id")&&(s.options.centerPadding&&"0"!==s.options.centerPadding||s.$list.css("padding",""),t&&(s.$slideTrack.width()<=s.$slider.width()||p(e).hasClass("slick--thumbnail"))&&s.$slideTrack.css({left:"",transform:""}),(s=l.find(".b-loaded ~ .b-loader")).length&&s.remove(),a[n?"addClass":"removeClass"]("visually-hidden"))}),l.slick(g(n)),l.parent().on("click.sl",".slick-down",function(i){i.preventDefault();i=p(this);p("html, body").stop().animate({scrollTop:p(i.data("target")).offset().top-(i.data("offset")||0)},800,"easeOutQuad"in p.easing&&n.easing?n.easing:"swing")}),n.mouseWheel&&l.on("mousewheel.sl",function(i,n){return i.preventDefault(),l.slick(n<0?"slickNext":"slickPrev")}),o||l.on("lazyLoaded lazyLoadError",function(i,n,s){var t;t=(s=p(t=s)).closest(".slide")||s.closest("."+y),s.parentsUntil(t).removeClass(function(i,n){return(n.match(/(\S+)loading/g)||[]).join(" ")})}),l.on("afterChange.sl",u),d&&(l.on("click.sl",_,f),l.on("click.sl",".media__icon--play",h)),c&&l.slick(y),p(e).addClass(C)}k.behaviors.slick={attach:function(i){i=(i=(i="length"in(i=i||document)?i[0]:i)instanceof HTMLDocument?i:document).querySelectorAll(".slick:not(.slick--initialized)");i.length&&n.once(n.forEach(i,s))}}}(jQuery,Drupal,drupalSettings,dBlazy);
877;
878(function(g,b,c,f){var d=false;var e="slick-lightbox-gallery--on";function a(p){var o;var q=g("> .slick__slider",p);var s=q.length?q:g(p);var t=c.slickLightbox.lightbox||{};var h=c.slickLightbox.slick||{};t.itemSelector=t.itemSelector+",[data-slick-lightbox-trigger]";var j=t.itemSelector;var k=g(j,p);function i(w){var v=0;if(d){k=s.find(j);d=false}k.each(function(x,y){if(y===w){v=x;return false}});return v}function n(x){var z;var v;var y;var C;var w;var B;var D=g(".slick-lightbox-slick",x);var F=D.children();var A;function I(){var K=D.find(".is-playing");w=D.find("video");D.removeClass("is-paused");if(K.length){K.removeClass("is-playing").find(".media__icon--close").click()}if(w.length){w[0].pause()}}function J(){D.addClass("is-paused").slick("slickPause")}function G(){var L=g(this);var K=L.width();var M=L.closest(".media-wrapper--inline");var O=M.next(".slick-lightbox-slick-caption");var N=M.parent().height();if(O.length){N=N-(O.height()+parseInt(O.css("margin-top").replace("px","")))}L.css("max-height",N);M.css({width:K})}function H(N,O){var M;v=g(O);B=g(F[N]);C=g(".media--player",B);w=g("video",B);z=v.data("media");g("img",B).attr("loading","lazy");if(z){B.addClass("slick-slide--"+z.type);var K=z.html||v.data("bRich")||false;if(z.type==="rich"&&K&&!w.length){try{M="html" in z?K:JSON.parse(K);y=b.theme("slickLightbox",{html:M,media:z});B.find(".slick-lightbox-slick-img").replaceWith(y);var L=B.find("img");if(L.length){L.addClass("slick-lightbox-slick-img");if(B.find(".slick-lightbox-slick-caption").length){window.setTimeout(function(){L.each(function(){if(this.complete){G.call(this)}else{g(this).one("load",G)}})},10)}}}catch(P){}b.attachBehaviors(w[0])}else{if(v.data("boxUrl")&&!C.length){y=b.theme("slickLightboxMedia",{el:v});B.find(".slick-lightbox-slick-img").replaceWith(y);b.attachBehaviors(C[0])}}}}if(!D.hasClass("slick-initialized")){k.each(H);A=D.slick(h);D.on("afterChange.slbox",I);D.on("click.slbox",".media__icon--close",I);D.on("click.slbox",".media__icon--play",J);if(F.length===1){var E=D.slick("getSlick");D.addClass("slight-lightbox-slick--unslick");E.$slideTrack.css({left:"",transform:""})}}return A}var u={closeOnBackdropClick:false,itemSelector:j,caption:function(w,v){var x=g(w).next(".litebox-caption");return x.length?x.html():""},src:function(w){var v=g(w);return v.data("boxUrl")||v.attr("href")},slick:n};var r={"show.slickLightbox":function(){g(".slick-slide--video .slick-lightbox-slick-item-inner").removeAttr("style");g(s[0].slickLightbox.$modalElement).on("click.slbox",".slick-lightbox-slick-item",function(v){if(v.target===this){g(".slick-lightbox-close").click()}})}};var l=t?g.extend({},u,t):u;function m(){var A=g(this);var B=0;var z=false;var y=t.itemContainers;if(y){var v=y.length;for(var x=0;x<v;x++){var w=A.closest(y[x]);if(w.length){B=w.index();z=true;break}}}if(!z){B=i(A[0])}o=s[0].slickLightbox;if(o&&o.slick){o.slick.slick("slickGoTo",B,true)}}s.slickLightbox(l).on(r);s.off("click.slbox").on("click.slbox",j,m);g(p).addClass(e)}b.theme.slickLightbox=function(i){var j=i.media;var h;h='<div class="media-wrapper media-wrapper--inline" style="width:'+j.width+'px">';h+=i.html;h+="</div>";return h};b.theme.slickLightboxMedia=function(k){var i=k.el;var o=i.data("media");var n=g("img",i).length?g("img",i).attr("alt"):"";var m=((o.height/o.width)*100).toFixed(2);var h=i.data("boxUrl");var l=i.data("oembedUrl")?i.data("oembedUrl"):i.attr("href");var j;j='<div class="media-wrapper media-wrapper--inline" style="width:'+o.width+'px">';j+='<div class="media media--switch media--player media--ratio media--ratio--fluid" style="padding-bottom: '+m+'%">';j+='<img src="'+h+'" class="media__image media__element" alt="'+b.t(n)+'"/>';j+='<span class="media__icon media__icon--close"></span>';j+='<span class="media__icon media__icon--play" data-url="'+l+'"></span>';
878j+="</div></div>";return j};b.behaviors.slickLightbox={attach:function(k){k=k instanceof HTMLDocument?k:document;var h="[data-slick-lightbox-gallery]:not(."+e+"), .slick-lightbox-gallery:not(."+e+")";var i=k.querySelector(h);var j=i===null?[]:k.querySelectorAll(h);if(j.length){f.once(f.forEach(j,a,k))}},detach:function(i,j,h){d=h==="unload"}}})(jQuery,Drupal,drupalSettings,dBlazy);
879;
880!function(t,a,e){"use strict";Drupal.behaviors.atBP={attach:function(t,n){if(a.matchMedia("only screen").matches){var i=n[n.ajaxPageState.theme].at_breakpoints;for(var o in i)i.hasOwnProperty(o)&&function(t,a){enquire.register(a,{match:function(){e.body.classList.add("bp--"+t)},unmatch:function(){e.body.classList.remove("bp--"+t)}})}(o.split("_").join("-"),i[o].mediaquery)}}}}(jQuery,window,document);
881
882window.matchMedia||(window.matchMedia=function(){"use strict";var e=window.styleMedia||window.media;if(!e){var t=document.createElement("style"),i=document.getElementsByTagName("script")[0],n=null;t.type="text/css";t.id="matchmediajs-test";i.parentNode.insertBefore(t,i);n="getComputedStyle"in window&&window.getComputedStyle(t,null)||t.currentStyle;e={matchMedium:function(e){var i="@media "+e+"{ #matchmediajs-test { width: 1px; } }";if(t.styleSheet){t.styleSheet.cssText=i}else{t.textContent=i}return n.width==="1px"}}}return function(t){return{matches:e.matchMedium(t||"all"),media:t||"all"}}}());
883;
884(function(){if(window.matchMedia&&window.matchMedia("all").addListener){return false}var e=window.matchMedia,i=e("only all").matches,n=false,t=0,a=[],r=function(i){clearTimeout(t);t=setTimeout(function(){for(var i=0,n=a.length;i<n;i++){var t=a[i].mql,r=a[i].listeners||[],o=e(t.media).matches;if(o!==t.matches){t.matches=o;for(var s=0,l=r.length;s<l;s++){r[s].call(window,t)}}}},30)};window.matchMedia=function(t){var o=e(t),s=[],l=0;o.addListener=function(e){if(!i){return}if(!n){n=true;window.addEventListener("resize",r,true)}if(l===0){l=a.push({mql:o,listeners:s})}s.push(e)};o.removeListener=function(e){for(var i=0,n=s.length;i<n;i++){if(s[i]===e){s.splice(i,1)}}};return o}})();
885;
886let dashboardNavSettings = drupalSettings.nav_settings;
887//console.info(dashboardNavSettings);
888
889// Get the .click-me element
890// Listen to all click events on the document
891// const locbutton = document.querySelector('.location-viewer-new');
892// const locdiv = document.querySelector('.org-locations-nav-new');
893
894(function () {
895
896  var addEvent = function (el, type, fn) {
897    if (el.addEventListener)
898      el.addEventListener(type, fn, false);
899    else
900      el.attachEvent('on' + type, fn);
901  };
902
903  var extend = function (obj, ext) {
904    for (var key in ext)
905      if (ext.hasOwnProperty(key))
906        obj[key] = ext[key];
907    return obj;
908  };
909
910  window.fitText = function (el, kompressor, options) {
911
912    var settings = extend({
913      'minFontSize': -1 / 0,
914      'maxFontSize': 1 / 0
915    }, options);
916
917    var fit = function (el) {
918      var compressor = kompressor || 1;
919
920      var resizer = function () {
921        el.style.fontSize = Math.max(Math.min(el.clientWidth / (compressor * 10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize)) + 'px';
922      };
923
924      // Call once to set.
925      resizer();
926
927      // Bind events
928      // If you have any js library which support Events, replace this part
929      // and remove addEvent function (or use original jQuery version)
930      addEvent(window, 'resize', resizer);
931      addEvent(window, 'orientationchange', resizer);
932    };
933
934    if (el && el.length)
935      for (var i = 0; i < el.length; i++)
936        fit(el[i]);
937    else if (el) {
938      fit(el);
939    }
940
941    // return set of elements
942    return el;
943  };
944})();
945
946
947//
948// window.quasarConfig = {
949//   // your config here
950//   loadingBar: { //this takes QAjaxBar Props
951//     skipHijack: true // set this
952//   },
953//   framework: {
954//     cssAddon:true
955//   },
956//   iconSet: 'fontawesomeV5'
957// }
958//
959// var NavApp = new Vue({
960//   el: '#labs-quasar-nav',
961//   data: function () {
962//     return {
963//     }
964//   },
965//   computed: {
966//     showSomething: function (){
967//     }
968//   },
969//   watch : {
970//     subscriberCount: function () {
971//     }
972//   },
973//   methods : {
974//     something: function() {
975//
976//     }
977//   },
978//   mounted() {
979//     //alert('mount');
980//   }
981// })
982
983
984var weather_canvas = document.getElementById("labs-weather-icon-quasar-nav");
985
986if (weather_canvas && weather_canvas.length !== 0) {
987  var tile_skycons_icon = weather_canvas.getAttribute('data-skycon');
988  var skycons_tile = new Skycons(
989    {
990      "monochrome": false,
991      "strokewidth": '.1'
992    }
993  );
994  skycons_tile.add(weather_canvas, tile_skycons_icon);
995  // start animation!
996  skycons_tile.play();
997}
998
999
1000var locviewer = document.getElementById('location-viewer-new');
1001if (locviewer) {
1002  locviewer.onclick = function () {
1003    var locdiv = document.getElementById('org-locations-nav-new');
1004    locdiv.classList.toggle('hidden');
1005  }
1006}
1007
1008var locviewerMobile = document.getElementById('location-viewer-new-mobile');
1009if (locviewerMobile) {
1010  locviewerMobile.onclick = function () {
1011    var locdiv = document.getElementById('org-locations-nav-new');
1012    locdiv.classList.toggle('hidden');
1013  }
1014}
1015var mobilemenuviewer = document.getElementById('q-mobile-menu-toggle');
1016mobilemenuviewer.onclick = function () {
1017  var mobilemenu = document.getElementById('q-mobile-menu');
1018  // console.log("here it is --->", mobilemenu.childElementCount);
1019  if (mobilemenu.classList.contains('box-shadow')) {
1020    mobilemenu.style.height = 0 + "px";
1021    mobilemenu.classList.toggle('box-shadow');
1022  } else {
1023    mobilemenu.style.height = "auto";
1024    mobilemenu.classList.toggle('box-shadow');
1025  }
1026
1027  mobilemenuviewer.classList.toggle('rotate-90');
1028  mobilemenuviewer.classList.toggle('fa-times');
1029  mobilemenuviewer.classList.toggle('fa-bars');
1030}
1031
1032var searchLinkDesktop = document.getElementById('search-link-toggle-desktop');
1033var searchTextDesktop = document.getElementById('desktop-search-string');
1034var searchDesktopGoButton = document.getElementById('desktop-search-go-button');
1035
1036var searchLinkMobile = document.getElementById('search-link-toggle-mobile');
1037var searchTextMobile = document.getElementById('mobile-search-string');
1038var searchMobileGoButton = document.getElementById('mobile-search-go-button');
1039
1040if ((searchLinkDesktop && searchTextDesktop) || (searchLinkDesktop && searchTextDesktop)) {
1041  searchLinkDesktop.onclick = function (event) {
1042    searchToggle();
1043    searchTextDesktop.focus();
1044  }
1045  searchLinkMobile.onclick = function (event) {
1046    searchToggle();
1047    searchTextMobile.focus();
1048  }
1049  searchTextMobile.addEventListener("keydown", function (e) {
1050    var key = e.which && e.which || e.keyCode();
1051    if (key === 13) {
1052      (function OnKeyEnterPressDoThis() {
1053        if (searchTextDesktop.value.length > 3) {
1054          goToSearch(searchTextDesktop.value);
1055        }
1056      }());
1057    }
1058  });
1059  searchTextDesktop.addEventListener("keydown", function (e) {
1060    var key = e.which && e.which || e.keyCode();
1061    if (key === 13) {
1062      (function OnKeyEnterPressDoThis() {
1063        if (searchTextDesktop.value.length > 3) {
1064          goToSearch(searchTextDesktop.value);
1065        }
1066      }());
1067    }
1068  });
1069
1070  searchDesktopGoButton.onclick = function (event) {
1071    if (searchTextDesktop.value.length > 3) {
1072      goToSearch(searchTextDesktop.value);
1073    }
1074  }
1075  searchMobileGoButton.onclick = function (event) {
1076    if (searchTextMobile.value.length > 3) {
1077      goToSearch(searchTextMobile.value);
1078    }
1079  }
1080}
1081
1082
1083function searchToggle(){
1084  const searchHide = document.querySelectorAll('.search-hide');
1085  for (const box of searchHide) {
1086    box.classList.toggle('hidden');
1087  }
1088}
1089function goToSearch(str) {
1090  window.location = '/search/' + str;
1091}
1092
1093fitText(document.getElementById("q-site-title"), 1.2, {minFontSize: '1px', maxFontSize: '40px'});
1094;
1095var weather_canvas = document.getElementById("labs-weather-icon");
1096
1097if (weather_canvas && weather_canvas.length !== 0) {
1098  var tile_skycons_icon = weather_canvas.getAttribute('data-skycon');
1099  var skycons_tile = new Skycons(
1100    {
1101      "monochrome": false,
1102      "strokewidth": '.1'
1103    }
1104  );
1105  skycons_tile.add(weather_canvas, tile_skycons_icon);
1106  // start animation!
1107  skycons_tile.play();
1108}
1109;

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.