https://wavemachinelabs.com/sites/default/files/js/js_b3sYDk4Xr4FI2PwjVkQb7ut2asFNZ2fe6aTVfcCPI_s.js
1/** 2 * @file 3 * Initializes Affirm API. 4 */ 5 6(function ($, Drupal) { 7 /** 8 * The promo line renders directly under the visible product price, so 9 * Affirm's "4 interest-free payments" lead-in is redundant â trim the 10 * message to start at "or as low as". Affirm rewrites the element several 11 * times while it initializes, and each rewrite briefly restores the full 12 * text before the trim reapplies â visible as a few seconds of flicker. 13 * So the element stays invisible until its mutations go quiet, and only 14 * the settled, trimmed message is ever shown. 15 */ 16 var wmlTrimAffirmPromo = function (el) { 17 var walker = document.createTreeWalker(el, NodeFilter.SHOW_TEXT); 18 var node = walker.nextNode(); 19 if (!node) { 20 return; 21 } 22 var trimmed = node.nodeValue.replace(/^[\s\S]*?\bor as low as\b/i, 'or as low as'); 23 if (trimmed !== node.nodeValue) { 24 node.nodeValue = trimmed; 25 } 26 }; 27 28 var wmlTameAffirmPromo = function (el) { 29 var revealTimer = null; 30 var reveal = function () { 31 el.style.visibility = ''; 32 }; 33 el.style.visibility = 'hidden'; 34 var settle = function () { 35 wmlTrimAffirmPromo(el); 36 clearTimeout(revealTimer); 37 revealTimer = setTimeout(reveal, 400); 38 }; 39 settle(); 40 // Backstop: never keep the line hidden longer than this, even if Affirm 41 // keeps mutating (the message shows trimmed either way). 42 setTimeout(reveal, 6000); 43 new MutationObserver(settle).observe(el, { childList: true, subtree: true, characterData: true }); 44 }; 45 46 /** 47 * Allows Affirm to include their javascript. 48 */ 49 Drupal.behaviors.commerce_affirm = { 50 attach: function (context, settings) { 51 document.querySelectorAll('.affirm-as-low-as').forEach(function (el) { 52 if (el.dataset.wmlTrimBound) { 53 return; 54 } 55 el.dataset.wmlTrimBound = '1'; 56 wmlTameAffirmPromo(el); 57 }); 58 var config = settings.commerce_affirm || {}; 59 var url = (config.ApiMode === 'live') 60 ? 'https://cdn1.affirm.com/js/v2/affirm.js' 61 : 'https://cdn1-sandbox.affirm.com/js/v2/affirm.js'; 62 var _affirm_config = { 63 public_api_key: config.hasOwnProperty('PublicKey') ? config.PublicKey : '', 64 script: url, 65 locale: config.Locale, 66 country_code: config.CountryCode, 67 }; 68 if (config.hasOwnProperty('SessionId')) { 69 _affirm_config.session_id = config.SessionId; 70 } 71 (function(l,g,m,e,a,f,b){var d,c=l[m]||{},h=document.createElement(f),n=document.getElementsByTagName(f)[0],k=function(a,b,c){return function(){a[b]._.push([c,arguments])}};c[e]=k(c,e,"set");d=c[e];c[a]={};c[a]._=[];d._=[];c[a][b]=k(c,a,b);a=0;for(b="set add save post open empty reset on off trigger ready setProduct".split(" ");a<b.length;a++)d[b[a]]=k(c,e,b[a]);a=0;for(b=["get","token","url","items"];a<b.length;a++)d[b[a]]=function(){};h.async=!0;h.src=g[f];n.parentNode.insertBefore(h,n);delete g[f];d(g);l[m]=c})(window,_affirm_config,"affirm","checkout","ui","script","ready"); 72 } 73 } 74})(jQuery, Drupal); 75; 76/** 77 * @file 78 * Attaches several event listener to a web page. 79 */ 80 81(function ($, Drupal, drupalSettings) { 82 83 /* eslint max-nested-callbacks: ["error", 4] */ 84 85 'use strict'; 86 87 Drupal.google_analytics = {}; 88 89 $(document).ready(function () { 90 91 // Attach mousedown, keyup, touchstart events to document only and catch 92 // clicks on all elements. 93 $(document.body).on('mousedown keyup touchstart', function (event) { 94 95 // Catch the closest surrounding link of a clicked element. 96 $(event.target).closest('a,area').each(function () { 97 98 // Is the clicked URL internal? 99 if (Drupal.google_analytics.isInternal(this.href)) { 100 // Skip 'click' tracking, if custom tracking events are bound. 101 if ($(this).is('.colorbox') && (drupalSettings.google_analytics.trackColorbox)) { 102 // Do nothing here. The custom event will handle all tracking. 103 // console.info('Click on .colorbox item has been detected.'); 104 } 105 // Is download tracking activated and the file extension configured 106 // for download tracking? 107 else if (drupalSettings.google_analytics.trackDownload && Drupal.google_analytics.isDownload(this.href)) { 108 // Download link clicked. 109 gtag('event', Drupal.google_analytics.getDownloadExtension(this.href).toUpperCase(), { 110 event_category: 'Downloads', 111 event_label: Drupal.google_analytics.getPageUrl(this.href), 112 transport_type: 'beacon' 113 }); 114 } 115 else if (Drupal.google_analytics.isInternalSpecial(this.href)) { 116 // Keep the internal URL for Google Analytics website overlay intact. 117 // @todo: May require tracking ID 118 gtag('config', drupalSettings.google_analytics.account, { 119 page_path: Drupal.google_analytics.getPageUrl(this.href), 120 transport_type: 'beacon' 121 }); 122 } 123 } 124 else { 125 if (drupalSettings.google_analytics.trackMailto && $(this).is("a[href^='mailto:'],area[href^='mailto:']")) { 126 // Mailto link clicked. 127 gtag('event', 'Click', { 128 event_category: 'Mails', 129 event_label: this.href.substring(7), 130 transport_type: 'beacon' 131 }); 132 } 133 else if (drupalSettings.google_analytics.trackTel && $(this).is("a[href^='tel:'],area[href^='tel:']")) { 134 // Tel link clicked. 135 gtag('event', 'Click', { 136 event_category: 'Telephone calls', 137 event_label: this.href.substring(4), 138 transport_type: 'beacon' 139 }); 140 } 141 else if (drupalSettings.google_analytics.trackOutbound && this.href.match(/^\w+:\/\//i)) { 142 if (drupalSettings.google_analytics.trackDomainMode !== 2 || (drupalSettings.google_analytics.trackDomainMode === 2 && !Drupal.google_analytics.isCrossDomain(this.hostname, drupalSettings.google_analytics.trackCrossDomains))) { 143 // External link clicked / No top-level cross domain clicked. 144 gtag('event', 'Click', { 145 event_category: 'Outbound links', 146 event_label: this.href, 147 transport_type: 'beacon' 148 }); 149 } 150 } 151 } 152 }); 153 }); 154 155 // Track hash changes as unique pageviews, if this option has been enabled. 156 if (drupalSettings.google_analytics.trackUrlFragments) { 157 window.onhashchange = function () { 158 gtag('config', drupalSettings.google_analytics.account, { 159 page_path: location.pathname + location.search + location.hash 160 }); 161 }; 162 } 163 164 // Colorbox: This event triggers when the transition has completed and the 165 // newly loaded content has been revealed. 166 if (drupalSettings.google_analytics.trackColorbox) { 167 $(document).on('cbox_complete', function () {
168 var href = $.colorbox.element().attr('href'); 169 if (href) { 170 gtag('config', drupalSettings.google_analytics.account, { 171 page_path: Drupal.google_analytics.getPageUrl(href) 172 }); 173 } 174 }); 175 } 176 177 }); 178 179 /** 180 * Check whether the hostname is part of the cross domains or not. 181 * 182 * @param {string} hostname 183 * The hostname of the clicked URL. 184 * @param {array} crossDomains 185 * All cross domain hostnames as JS array. 186 * 187 * @return {boolean} isCrossDomain 188 */ 189 Drupal.google_analytics.isCrossDomain = function (hostname, crossDomains) { 190 return $.inArray(hostname, crossDomains) > -1 ? true : false; 191 }; 192 193 /** 194 * Check whether this is a download URL or not. 195 * 196 * @param {string} url 197 * The web url to check. 198 * 199 * @return {boolean} isDownload 200 */ 201 Drupal.google_analytics.isDownload = function (url) { 202 var isDownload = new RegExp('\\.(' + drupalSettings.google_analytics.trackDownloadExtensions + ')([\?#].*)?$', 'i'); 203 return isDownload.test(url); 204 }; 205 206 /** 207 * Check whether this is an absolute internal URL or not. 208 * 209 * @param {string} url 210 * The web url to check. 211 * 212 * @return {boolean} isInternal 213 */ 214 Drupal.google_analytics.isInternal = function (url) { 215 var isInternal = new RegExp('^(https?):\/\/' + window.location.host, 'i'); 216 return isInternal.test(url); 217 }; 218 219 /** 220 * Check whether this is a special URL or not. 221 * 222 * URL types: 223 * - gotwo.module /go/* links. 224 * 225 * @param {string} url 226 * The web url to check. 227 * 228 * @return {boolean} isInternalSpecial 229 */ 230 Drupal.google_analytics.isInternalSpecial = function (url) { 231 var isInternalSpecial = new RegExp('(\/go\/.*)$', 'i'); 232 return isInternalSpecial.test(url); 233 }; 234 235 /** 236 * Extract the relative internal URL from an absolute internal URL. 237 * 238 * Examples: 239 * - https://mydomain.com/node/1 -> /node/1 240 * - https://example.com/foo/bar -> https://example.com/foo/bar 241 * 242 * @param {string} url 243 * The web url to check. 244 * 245 * @return {string} getPageUrl 246 * Internal website URL. 247 */ 248 Drupal.google_analytics.getPageUrl = function (url) { 249 var extractInternalUrl = new RegExp('^(https?):\/\/' + window.location.host, 'i'); 250 return url.replace(extractInternalUrl, ''); 251 }; 252 253 /** 254 * Extract the download file extension from the URL. 255 * 256 * @param {string} url 257 * The web url to check. 258 * 259 * @return {string} getDownloadExtension 260 * The file extension of the passed url. e.g. 'zip', 'txt' 261 */ 262 Drupal.google_analytics.getDownloadExtension = function (url) { 263 var extractDownloadextension = new RegExp('\\.(' + drupalSettings.google_analytics.trackDownloadExtensions + ')([\?#].*)?$', 'i'); 264 var extension = extractDownloadextension.exec(url); 265 return (extension === null) ? '' : extension[1]; 266 }; 267 268})(jQuery, Drupal, drupalSettings); 269; 270(function () { 271 'use strict'; 272 const allowed = new Set([6,8,9,10,11,12,13,14,15,16,17,18,19]); 273 function send(id) { 274 if (!allowed.has(id) || /^(\/partners|\/admin)/.test(location.pathname)) return; 275 try { 276 const key = 'library-interest-' + id; 277 if (Date.now() - Number(sessionStorage.getItem(key) || 0) < 1800000) return; 278 sessionStorage.setItem(key, String(Date.now())); 279 } catch (e) { /* The server also deduplicates when browser storage is off. */ } 280 fetch('/library-interest', {method:'POST',credentials:'same-origin',keepalive:true,headers:{'Content-Type':'application/x-www-form-urlencoded','X-Library-Interest':'1'},body:'product='+id}).catch(function () {}); 281 } 282 function product(url) { 283 try { const u=new URL(url,location.href); if(u.origin!==location.origin)return 0; const m=u.pathname.match(/^\/product\/(\d+)\/?$/); return m?Number(m[1]):0; } catch(e){ return 0; } 284 } 285 document.addEventListener('click', function(e){ const link=e.target.closest('a[href]'); if(link)send(product(link.href)); }); 286 // Count a direct library-page visit too; a click and its arrival count once. 287 send(product(location.href)); 288})(); 289; 290/** 291* DO NOT EDIT THIS FILE. 292* See the following change record for more information, 293* https://www.drupal.org/node/2815083 294* @preserve 295**/ 296 297(function ($, once) {
298 var deprecatedMessageSuffix = "is deprecated in Drupal 9.3.0 and will be removed in Drupal 10.0.0. Use the core/once library instead. See https://www.drupal.org/node/3158256"; 299 var originalJQOnce = $.fn.once; 300 var originalJQRemoveOnce = $.fn.removeOnce; 301 302 $.fn.once = function jQueryOnce(id) { 303 Drupal.deprecationError({ 304 message: "jQuery.once() ".concat(deprecatedMessageSuffix) 305 }); 306 return originalJQOnce.apply(this, [id]); 307 }; 308 309 $.fn.removeOnce = function jQueryRemoveOnce(id) { 310 Drupal.deprecationError({ 311 message: "jQuery.removeOnce() ".concat(deprecatedMessageSuffix) 312 }); 313 return originalJQRemoveOnce.apply(this, [id]); 314 }; 315 316 var drupalOnce = once; 317 318 function augmentedOnce(id, selector, context) { 319 originalJQOnce.apply($(selector, context), [id]); 320 return drupalOnce(id, selector, context); 321 } 322 323 function remove(id, selector, context) { 324 originalJQRemoveOnce.apply($(selector, context), [id]); 325 return drupalOnce.remove(id, selector, context); 326 } 327 328 window.once = Object.assign(augmentedOnce, drupalOnce, { 329 remove: remove 330 }); 331})(jQuery, once);; 332(()=>{var o,e={349:()=>{!function(o,e,i){"use strict";e.behaviors.belgradeToast={attach:function(e,i){o(".toast",e).once("initToast").each((function(){o(this).toast("show")}))}},e.behaviors.accordionButtonLinks={attach:function(e,i){o(".fieldset-legend.accordion-button a",e).once().on("click",(function(e){window.location=o(this).attr("href"),e.preventDefault()}))}},e.behaviors.focusRequired={attach:function(e,i){var t=document.querySelectorAll("form .accordion input");[].forEach.call(t,(function(e){e.addEventListener("invalid",(function(i){var t=e.closest(".collapse");o(t).collapse("show")}))}))}},e.behaviors.collapseAccordionMob={attach:function(){var e=i.responsive.breakpoints["belgrade.sm-max"];if(window.matchMedia(e).matches){var t=document.querySelectorAll(".bef-exposed-form .collapse");t.length&&[].forEach.call(t,(function(e){o(e).collapse("hide")}))}}}}(jQuery,Drupal,drupalSettings)},154:()=>{},642:()=>{},590:()=>{},287:()=>{},653:()=>{},981:()=>{},842:()=>{},223:()=>{},301:()=>{},411:()=>{},780:()=>{},388:()=>{},755:()=>{},54:()=>{},410:()=>{},505:()=>{},87:()=>{},805:()=>{},754:()=>{}},i={};function t(o){var r=i[o];if(void 0!==r)return r.exports;var a=i[o]={exports:{}};return e[o](a,a.exports,t),a.exports}t.m=e,o=[],t.O=(e,i,r,a)=>{if(!i){var n=1/0;for(v=0;v<o.length;v++){for(var[i,r,a]=o[v],c=!0,l=0;l<i.length;l++)(!1&a||n>=a)&&Object.keys(t.O).every((o=>t.O[o](i[l])))?i.splice(l--,1):(c=!1,a<n&&(n=a));if(c){o.splice(v--,1);var d=r();void 0!==d&&(e=d)}}return e}a=a||0;for(var v=o.length;v>0&&o[v-1][2]>a;v--)o[v]=o[v-1];o[v]=[i,r,a]},t.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e),(()=>{var o={787:0,911:0,375:0,647:0,234:0,254:0,588:0,58:0,864:0,536:0,893:0,521:0,629:0,236:0,313:0,378:0,210:0,206:0,286:0,256:0};t.O.j=e=>0===o[e];var e=(e,i)=>{var r,a,[n,c,l]=i,d=0;if(n.some((e=>0!==o[e]))){for(r in c)t.o(c,r)&&(t.m[r]=c[r]);if(l)var v=l(t)}for(e&&e(i);d<n.length;d++)a=n[d],t.o(o,a)&&o[a]&&o[a][0](),o[a]=0;return t.O(v)},i=self.webpackChunkbelgrade=self.webpackChunkbelgrade||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})(),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(349))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(410))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(505))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(87))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(805))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(754))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(154))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(642))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(590))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(287))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(653))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(981))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(842))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(223))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(301))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(411))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(780))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(388))),t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(755)));var r=t.O(void 0,[911,375,647,234,254,588,58,864,536,893,521,629,236,313,378,210,206,286,256],(()=>t(54)));r=t.O(r)})();; 333/** 334 * @file 335 * Global utilities. 336 * 337 */ 338 (function ($, Drupal) { 339 340 'use strict'; 341 Drupal.behaviors.amabank = { 342 attach: function (context, settings) { 343 344 //Main Navigation: 345 346 //Desktop Hover Dropdown effect for main Navigation Target parent so submenu stays open 347 $('#block-belgrade-main-menu-header .dropdown-toggle').parent().mouseenter(function(){ 348 349 var expanded = $(this).hasClass('collapsed'); 350 $('.dropdown-toggle').siblings('ul').removeClass('show'); 351 $('.dropdown-toggle').attr('aria-expanded','false'); 352 $(this).find('ul').addClass('show'); 353 $(this).find('.dropdown-toggle').attr('aria-expanded','true'); 354 if(expanded) { 355 $(this).find('ul').removeClass('show'); 356 $(this).find('.dropdown-toggle').attr('aria-expanded','false'); 357 } 358 }); 359 360 //Mouseleave to close the menu when mouse moves out of the div 361 $('#block-belgrade-main-menu-header .dropdown-toggle').parent().mouseleave(function(){ 362 $(this).find('ul').removeClass('show'); 363 $(this).find('.dropdown-toggle').attr('aria-expanded','false'); 364 }); 365 366 367 //Offcanvas menu Click dropdown for main 368 $('#block-belgrade-main-menu .dropdown-toggle').on('click', function(){ 369 var expanded = $(this).hasClass('collapsed'); 370 $('.dropdown-toggle').siblings('ul').removeClass('show'); 371 $('.dropdown-toggle').attr('aria-expanded','false'); 372 $(this).siblings('ul').addClass('show'); 373 $(this).attr('aria-expanded','true'); 374 if(expanded) { 375 $(this).siblings('ul').removeClass('show'); 376 $(this).attr('aria-expanded','false'); 377 } 378 }); 379 380 381 382 //Drumagog navigation: 383 384 //Desktop Hover Dropdown effect for drumago Navigation Target parent so submenu stays open 385 $('#block-drumagognavigation .dropdown-toggle').parent().mouseenter(function(){ 386 // $(this).find('.dropdown-toggle').trigger('click'); 387 var expanded = $(this).hasClass('collapsed'); 388 $('.dropdown-toggle').siblings('ul').removeClass('show'); 389 $('.dropdown-toggle').attr('aria-expanded','false'); 390 $(this).find('ul').addClass('show'); 391 $(this).find('.dropdown-toggle').attr('aria-expanded','true'); 392 if(expanded) { 393 $(this).find('ul').removeClass('show'); 394 $(this).find('.dropdown-toggle').attr('aria-expanded','false'); 395 } 396 }); 397 //Mouseleave to close the menu when mouse moves out of the div 398 $('#block-drumagognavigation .dropdown-toggle').parent().mouseleave(function(){ 399 $(this).find('ul').removeClass('show'); 400 $(this).find('.dropdown-toggle').attr('aria-expanded','false'); 401 }); 402 403 //If a toggle has link it should redirect to the location. 404 $('#block-drumagognavigation a.dropdown-toggle').click(function(e){ 405 window.open(this.href, '_self'); 406 return false;
407 }); 408 409 //Offcanvas menu Click dropdown for drumago 410 $('#block-drumagognavigation-2 .dropdown-toggle').on('click', function(){ 411 var expanded = $(this).hasClass('collapsed'); 412 $('.dropdown-toggle').siblings('ul').removeClass('show'); 413 $('.dropdown-toggle').attr('aria-expanded','false'); 414 $(this).siblings('ul').addClass('show'); 415 $(this).attr('aria-expanded','true'); 416 if(expanded) { 417 $(this).siblings('ul').removeClass('show'); 418 $(this).attr('aria-expanded','false'); 419 } 420 }); 421 422 423 424 //Auria Navigation: 425 426 //Desktop Hover Dropdown effect for Auria Navigation Target parent so submenu stays open 427 $('#block-aurianavigation-2 .dropdown-toggle').parent().mouseenter(function(){ 428 // $(this).find('.dropdown-toggle').trigger('click'); 429 var expanded = $(this).hasClass('collapsed'); 430 $('.dropdown-toggle').siblings('ul').removeClass('show'); 431 $('.dropdown-toggle').attr('aria-expanded','false'); 432 $(this).find('ul').addClass('show'); 433 $(this).find('.dropdown-toggle').attr('aria-expanded','true'); 434 if(expanded) { 435 $(this).find('ul').removeClass('show'); 436 $(this).find('.dropdown-toggle').attr('aria-expanded','false'); 437 } 438 }); 439 //Mouseleave to close the menu when mouse moves out of the div 440 $('#block-aurianavigation-2 .dropdown-toggle').parent().mouseleave(function(){ 441 $(this).find('ul').removeClass('show'); 442 $(this).find('.dropdown-toggle').attr('aria-expanded','false'); 443 }); 444 445 //If a toggle has link it should redirect to the location. 446 $('#block-aurianavigation-2 a.dropdown-toggle').click(function(e){ 447 window.open(this.href, '_self'); 448 return false; 449 }); 450 451 //Offcanvas menu Click dropdown for Auria 452 $('#block-aurianavigation .dropdown-toggle').on('click', function(){ 453 var expanded = $(this).hasClass('collapsed'); 454 $('.dropdown-toggle').siblings('ul').removeClass('show'); 455 $('.dropdown-toggle').attr('aria-expanded','false'); 456 $(this).siblings('ul').addClass('show'); 457 $(this).attr('aria-expanded','true'); 458 if(expanded) { 459 $(this).siblings('ul').removeClass('show'); 460 $(this).attr('aria-expanded','false'); 461 } 462 }); 463 } 464 } 465 466})(jQuery, Drupal);; 467/** 468 * @file 469 * Behaviors of Boostrap Layout Builder local video background. 470 */ 471 472(function ($, _, Drupal, drupalSettings) { 473 "use strict"; 474 475 Drupal.behaviors.scrollEffectsInit = { 476 attach: function (context, settings) { 477 AOS.init(); 478 } 479 } 480 481})(window.jQuery, window._, window.Drupal, window.drupalSettings); 482; 483/** 484* DO NOT EDIT THIS FILE. 485* See the following change record for more information, 486* https://www.drupal.org/node/2815083 487* @preserve 488**/ 489 490Drupal.debounce = function (func, wait, immediate) { 491 var timeout; 492 var result; 493 return function () { 494 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 495 args[_key] = arguments[_key]; 496 } 497 498 var context = this; 499 500 var later = function later() { 501 timeout = null; 502 503 if (!immediate) { 504 result = func.apply(context, args); 505 } 506 }; 507 508 var callNow = immediate && !timeout; 509 clearTimeout(timeout); 510 timeout = setTimeout(later, wait); 511 512 if (callNow) { 513 result = func.apply(context, args); 514 } 515 516 return result; 517 }; 518};; 519/** 520* DO NOT EDIT THIS FILE. 521* See the following change record for more information, 522* https://www.drupal.org/node/2815083 523* @preserve 524**/ 525 526(function ($, Drupal, debounce) { 527 $.fn.drupalGetSummary = function () { 528 var callback = this.data('summaryCallback'); 529 return this[0] && callback ? callback(this[0]).trim() : ''; 530 }; 531 532 $.fn.drupalSetSummary = function (callback) { 533 var self = this; 534 535 if (typeof callback !== 'function') { 536 var val = callback; 537 538 callback = function callback() { 539 return val; 540 }; 541 } 542 543 return this.data('summaryCallback', callback).off('formUpdated.summary').on('formUpdated.summary', function () { 544 self.trigger('summaryUpdated'); 545 }).trigger('summaryUpdated'); 546 }; 547 548 Drupal.behaviors.formSingleSubmit = { 549 attach: function attach() { 550 function onFormSubmit(e) { 551 var $form = $(e.currentTarget); 552 var formValues = $form.serialize(); 553 var previousValues = $form.attr('data-drupal-form-submit-last'); 554 555 if (previousValues === formValues) { 556 e.preventDefault(); 557 } else { 558 $form.attr('data-drupal-form-submit-last', formValues); 559 } 560 } 561 562 $(once('form-single-submit', 'body')).on('submit.singleSubmit', 'form:not([method~="GET"])', onFormSubmit); 563 } 564 }; 565 566 function triggerFormUpdated(element) { 567 $(element).trigger('formUpdated'); 568 } 569 570 function fieldsList(form) { 571 return [].map.call(form.querySelectorAll('[name][id]'), function (el) { 572 return el.id; 573 }); 574 } 575 576 Drupal.behaviors.formUpdated = { 577 attach: function attach(context) { 578 var $context = $(context);
579 var contextIsForm = $context.is('form'); 580 var $forms = $(once('form-updated', contextIsForm ? $context : $context.find('form'))); 581 var formFields; 582 583 if ($forms.length) { 584 $.makeArray($forms).forEach(function (form) { 585 var events = 'change.formUpdated input.formUpdated '; 586 var eventHandler = debounce(function (event) { 587 triggerFormUpdated(event.target); 588 }, 300); 589 formFields = fieldsList(form).join(','); 590 form.setAttribute('data-drupal-form-fields', formFields); 591 $(form).on(events, eventHandler); 592 }); 593 } 594 595 if (contextIsForm) { 596 formFields = fieldsList(context).join(','); 597 var currentFields = $(context).attr('data-drupal-form-fields'); 598 599 if (formFields !== currentFields) { 600 triggerFormUpdated(context); 601 } 602 } 603 }, 604 detach: function detach(context, settings, trigger) { 605 var $context = $(context); 606 var contextIsForm = $context.is('form'); 607 608 if (trigger === 'unload') { 609 once.remove('form-updated', contextIsForm ? $context : $context.find('form')).forEac
609h(function (form) { 610 form.removeAttribute('data-drupal-form-fields'); 611 $(form).off('.formUpdated'); 612 }); 613 } 614 } 615 }; 616 Drupal.behaviors.fillUserInfoFromBrowser = { 617 attach: function attach(context, settings) { 618 var userInfo = ['name', 'mail', 'homepage']; 619 var $forms = $(once('user-info-from-browser', '[data-user-info-from-browser]')); 620 621 if ($forms.length) { 622 userInfo.forEach(function (info) { 623 var $element = $forms.find("[name=".concat(info, "]")); 624 var browserData = localStorage.getItem("Drupal.visitor.".concat(info)); 625 626 if (!$element.length) { 627 return; 628 } 629 630 var emptyValue = $element[0].value === ''; 631 var defaultValue = $element.attr('data-drupal-default-value') === $element[0].value; 632 633 if (browserData && (emptyValue || defaultValue)) { 634 $element.each(function (index, item) { 635 item.value = browserData; 636 }); 637 } 638 }); 639 } 640 641 $forms.on('submit', function () { 642 userInfo.forEach(function (info) { 643 var $element = $forms.find("[name=".concat(info, "]")); 644 645 if ($element.length) { 646 localStorage.setItem("Drupal.visitor.".concat(info), $element[0].value); 647 } 648 }); 649 }); 650 } 651 }; 652 653 var handleFragmentLinkClickOrHashChange = function handleFragmentLinkClickOrHashChange(e) { 654 var url; 655 656 if (e.type === 'click') { 657 url = e.currentTarget.location ? e.currentTarget.location : e.currentTarget; 658 } else { 659 url = window.location; 660 } 661 662 var hash = url.hash.substr(1); 663 664 if (hash) { 665 var $target = $("#".concat(hash)); 666 $('body').trigger('formFragmentLinkClickOrHashChange', [$target]); 667 setTimeout(function () { 668 return $target.trigger('focus'); 669 }, 300); 670 } 671 }; 672 673 var debouncedHandleFragmentLinkClickOrHashChange = debounce(handleFragmentLinkClickOrHashChange, 300, true); 674 $(window).on('hashchange.form-fragment', debouncedHandleFragmentLinkClickOrHashChange); 675 $(document).on('click.form-fragment', 'a[href*="#"]', debouncedHandleFragmentLinkClickOrHashChange); 676})(jQuery, Drupal, Drupal.debounce);; 677/** 678 * @file 679 * Defines Javascript behaviors for the commerce cart module. 680 */ 681 682(function ($, Drupal, drupalSettings) { 683 'use strict'; 684 685 Drupal.behaviors.commerceCartBlock = { 686 attach: function (context) { 687 var $context = $(context); 688 var $cart = $context.find('.cart--cart-block'); 689 var $cartButton = $context.find('.cart-block--link__expand'); 690 var $cartContents = $cart.find('.cart-block--contents'); 691 692 if ($cartContents.length > 0) { 693 // Expand the block when the link is clicked. 694 $cartButton.once('cart-button-processed').on('click', function (e) { 695 // Prevent it from going to the cart. 696 e.preventDefault(); 697 // Get the shopping cart width + the offset to the left. 698 var windowWidth = $(window).width(); 699 var cartWidth = $cartContents.width() + $cart.offset().left; 700 // If the cart goes out of the viewport we should align it right. 701 if (cartWidth > windowWidth) { 702 $cartContents.addClass('is-outside-horizontal'); 703 } 704 // Toggle the expanded class. 705 $cartContents 706 .toggleClass('cart-block--contents__expanded') 707 .slideToggle(); 708 }); 709 } 710 } 711 }; 712})(jQuery, Drupal, drupalSettings); 713;
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.