vendor: 3,609 bytes, lines 1-88
1/******/ (function(modules) { // webpackBootstrap 2/******/ // The module cache 3/******/ var installedModules = {}; 4/******/ 5/******/ // The require function 6/******/ function __webpack_require__(moduleId) { 7/******/ 8/******/ // Check if module is in cache 9/******/ if(installedModules[moduleId]) { 10/******/ return installedModules[moduleId].exports; 11/******/ } 12/******/ // Create a new module (and put it into the cache) 13/******/ var module = installedModules[moduleId] = { 14/******/ i: moduleId, 15/******/ l: false, 16/******/ exports: {} 17/******/ }; 18/******/ 19/******/ // Execute the module function 20/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21/******/ 22/******/ // Flag the module as loaded 23/******/ module.l = true; 24/******/ 25/******/ // Return the exports of the module 26/******/ return module.exports; 27/******/ } 28/******/ 29/******/ 30/******/ // expose the modules object (__webpack_modules__) 31/******/ __webpack_require__.m = modules; 32/******/ 33/******/ // expose the module cache 34/******/ __webpack_require__.c = installedModules; 35/******/ 36/******/ // define getter function for harmony exports 37/******/ __webpack_require__.d = function(exports, name, getter) { 38/******/ if(!__webpack_require__.o(exports, name)) { 39/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 40/******/ } 41/******/ }; 42/******/ 43/******/ // define __esModule on exports 44/******/ __webpack_require__.r = function(exports) { 45/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 46/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 47/******/ } 48/******/ Object.defineProperty(exports, '__esModule', { value: true }); 49/******/ }; 50/******/ 51/******/ // create a fake namespace object 52/******/ // mode & 1: value is a module id, require it 53/******/ // mode & 2: merge all properties of value into the ns 54/******/ // mode & 4: return value when already ns object 55/******/ // mode & 8|1: behave like require 56/******/ __webpack_require__.t = function(value, mode) { 57/******/ if(mode & 1) value = __webpack_require__(value); 58/******/ if(mode & 8) return value; 59/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 60/******/ var ns = Object.create(null); 61/******/ __webpack_require__.r(ns); 62/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 63/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 64/******/ return ns; 65/******/ }; 66/******/ 67/******/ // getDefaultExport function for compatibility with non-harmony modules 68/******/ __webpack_require__.n = function(module) { 69/******/ var getter = module && module.__esModule ? 70/******/ function getDefault() { return module['default']; } : 71/******/ function getModuleExports() { return module; }; 72/******/ __webpack_require__.d(getter, 'a', getter); 73/******/ return getter; 74/******/ }; 75/******/ 76/******/ // Object.prototype.hasOwnProperty.call 77/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 78/******/ 79/******/ // __webpack_public_path__ 80/******/ __webpack_require__.p = ""; 81/******/ 82/******/ 83/******/ // Load entry module and return exports 84/******/ return __webpack_require__(__webpack_require__.s = "./src/index.js"); 85/******/ }) 86/************************************************************************/ 87/******/ ({ 88
vendor: 426 bytes, lines 89-102
89/***/ "./node_modules/normalize.css/normalize.css": 90/*!**************************************************!*\ 91 !*** ./node_modules/normalize.css/normalize.css ***! 92 \**************************************************/ 93/*! no exports provided */ 94/***/ (function(module, __webpack_exports__, __webpack_require__) { 95 96"use strict"; 97__webpack_require__.r(__webpack_exports__); 98// extracted by mini-css-extract-plugin 99 100 101/***/ }), 102
103/***/ "./src/index.js": 104/*!**********************!*\ 105 !*** ./src/index.js ***! 106 \**********************/ 107/*! no exports provided */ 108/***/ (function(module, __webpack_exports__, __webpack_require__) { 109 110"use strict"; 111__webpack_require__.r(__webpack_exports__); 112/* harmony import */ var normalize_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! normalize.css */ "./node_modules/normalize.css/normalize.css"); 113/* harmony import */ var _sass_front_end_bunde_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sass/front-end-bunde.scss */ "./src/sass/front-end-bunde.scss"); 114/* harmony import */ var _js_core_events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./js/core/events */ "./src/js/core/events.js"); 115/* harmony import */ var _js_core_objectfitFallback__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./js/core/objectfitFallback */ "./src/js/core/objectfitFallback.js"); 116/* harmony import */ var _js_core_objectfitFallback__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_js_core_objectfitFallback__WEBPACK_IMPORTED_MODULE_3__); 117/* harmony import */ var _js_core_sidebar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./js/core/sidebar */ "./src/js/core/sidebar.js"); 118/* harmony import */ var _js_core_sidebar__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_js_core_sidebar__WEBPACK_IMPORTED_MODULE_4__); 119/* harmony import */ var _js_core_navigation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./js/core/navigation */ "./src/js/core/navigation.js"); 120/* harmony import */ var _js_core_search__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./js/core/search */ "./src/js/core/search.js"); 121/* harmony import */ var _js_core_search__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_js_core_search__WEBPACK_IMPORTED_MODULE_6__); 122/* harmony import */ var _js_core_panel_left__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./js/core/panel-left */ "./src/js/core/panel-left.js"); 123/* harmony import */ var _js_core_smooth_scroll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./js/core/smooth-scroll */ "./src/js/core/smooth-scroll.js"); 124/* harmony import */ var _js_core_smooth_scroll__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_js_core_smooth_scroll__WEBPACK_IMPORTED_MODULE_8__); 125/* harmony import */ var _js_core_icons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./js/core/icons */ "./src/js/core/icons.js"); 126/* harmony import */ var _js_core_icons__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_js_core_icons__WEBPACK_IMPORTED_MODULE_9__); 127/* harmony import */ var _js_core_responsive_iframe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./js/core/responsive-iframe */ "./src/js/core/responsive-iframe.js"); 128/* harmony import */ var _js_core_browser_update__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./js/core/_browser_update */ "./src/js/core/_browser_update.js"); 129/* harmony import */ var _js_core_browser_update__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_js_core_browser_update__WEBPACK_IMPORTED_MODULE_11__); 130/* harmony import */ var _js_frontend_scaling__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./js/frontend/scaling */ "./src/js/frontend/scaling.js"); 131/* harmony import */ var _js_frontend_scaling__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_js_frontend_scaling__WEBPACK_IMPORTED_MODULE_12__); 132// import * as themeConfig from '../theme.config' 133 //ADDING SASS 134//add your sass files easilt by starting them with an underscore inside the inc or parts folders 135//You can also manually add a regular file to the front end bundle so you have access to all scss variables and classes 136//adding a separate scss here will work, but you wont have access to scss variables or @use, or @extend 137 138 //js from src 139 140 141 142 143 144 145 146 147 148 149 150 //add all underscored js files from inc and parts 151// import "../inc/plugins/mmenu-js/_modules/dragevents/_defaults.js"; 152// import "../inc/plugins/mmenu-js/_modules/dragevents/_helpers.js"; 153// import "../inc/plugins/mmenu-js/_modules/dragevents/_settings.js"; 154// import "../inc/plugins/mmenu-js/_modules/dragevents/_support.js"; 155// import "../inc/plugins/mmenu-js/addons/autoheight/_options.js"; 156// import "../inc/plugins/mmenu-js/addons/backbutton/_options.js"; 157// import "../inc/plugins/mmenu-js/addons/columns/_options.js"; 158// import "../inc/plugins/mmenu-js/addons/counters/_options.js"; 159// import "../inc/plugins/mmenu-js/addons/dividers/_options.js"; 160// import "../inc/plugins/mmenu-js/addons/drag/_drag.open.js";
161// import "../inc/plugins/mmenu-js/addons/drag/_options.js"; 162// import "../inc/plugins/mmenu-js/addons/dropdown/_configs.js"; 163// import "../inc/plugins/mmenu-js/addons/dropdown/_options.js"; 164// import "../inc/plugins/mmenu-js/addons/fixedelements/_configs.js"; 165// import "../inc/plugins/mmenu-js/addons/iconbar/_options.js"; 166// import "../inc/plugins/mmenu-js/addons/iconpanels/_options.js"; 167// import "../inc/plugins/mmenu-js/addons/keyboardnavigation/_options.js"; 168// import "../inc/plugins/mmenu-js/addons/lazysubmenus/_options.js"; 169// import "../inc/plugins/mmenu-js/addons/navbars/_configs.js"; 170// import "../inc/plugins/mmenu-js/addons/navbars/_navbar.breadcrumbs.js"; 171// import "../inc/plugins/mmenu-js/addons/navbars/_navbar.close.js"; 172// import "../inc/plugins/mmenu-js/addons/navbars/_navbar.prev.js"; 173// import "../inc/plugins/mmenu-js/addons/navbars/_navbar.searchfield.js"; 174// import "../inc/plugins/mmenu-js/addons/navbars/_navbar.tabs.js"; 175// import "../inc/plugins/mmenu-js/addons/navbars/_navbar.title.js"; 176// import "../inc/plugins/mmenu-js/addons/navbars/_options.js"; 177// import "../inc/plugins/mmenu-js/addons/pagescroll/_configs.js"; 178// import "../inc/plugins/mmenu-js/addons/pagescroll/_options.js"; 179// import "../inc/plugins/mmenu-js/addons/searchfield/_configs.js"; 180// import "../inc/plugins/mmenu-js/addons/searchfield/_options.js"; 181// import "../inc/plugins/mmenu-js/addons/sectionindexer/_options.js"; 182// import "../inc/plugins/mmenu-js/addons/setselected/_options.js"; 183// import "../inc/plugins/mmenu-js/addons/sidebar/_options.js"; 184// import "../inc/plugins/mmenu-js/core/offcanvas/_configs.js"; 185// import "../inc/plugins/mmenu-js/core/offcanvas/_options.js"; 186// import "../inc/plugins/mmenu-js/core/oncanvas/_configs.js"; 187// import "../inc/plugins/mmenu-js/core/oncanvas/_options.js"; 188// import "../inc/plugins/mmenu-js/core/screenreader/_configs.js"; 189// import "../inc/plugins/mmenu-js/core/screenreader/_options.js"; 190// import "../inc/plugins/mmenu-js/core/scrollbugfix/_options.js"; 191// import "./parts/**/_?*.js"; 192 193/***/ }), 194
195/***/ "./src/js/core/_browser_update.js": 196/*!****************************************!*\ 197 !*** ./src/js/core/_browser_update.js ***! 198 \****************************************/ 199/*! no static exports found */ 200/***/ (function(module, exports) { 201 202var $buoop = { 203 required: { 204 e: -4, 205 f: -3, 206 o: -3, 207 s: -1, 208 c: -3 209 }, 210 insecure: true, 211 api: 2020.04 212}; 213 214function $buo_f() { 215 var e = document.createElement("script"); 216 e.src = "//browser-update.org/update.min.js"; 217 document.body.appendChild(e); 218} 219 220; 221 222try { 223 document.addEventListener("DOMContentLoaded", $buo_f, false); 224} catch (e) { 225 window.attachEvent("onload", $buo_f); 226} 227 228/***/ }), 229
230/***/ "./src/js/core/events.js": 231/*!*******************************!*\ 232 !*** ./src/js/core/events.js ***! 233 \*******************************/ 234/*! no exports provided */ 235/***/ (function(module, __webpack_exports__, __webpack_require__) { 236 237"use strict"; 238__webpack_require__.r(__webpack_exports__); 239/* harmony import */ var _setup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setup */ "./src/js/core/setup.js"); 240 241/*-------------------------------------------------------------- 242# Adding some global events and functions users can use via data attributes 243--------------------------------------------------------------*/ 244 245/** 246 * resize menu buttons on load. also runs on resize. 247 * menu button is not inside site-top for various reasons (we dont want x to be inside or when menu opens the ex is uinderneath. 248 * so we use this function to match the site -top height and center it as if it was inside 249 */ 250 251var menuButtons = ''; 252 253function placeMenuButtons() { 254 var $siteTopHeight = document.querySelector('.site-top'); 255 256 if ($siteTopHeight != null) { 257 $siteTopHeight = $siteTopHeight.clientHeight; 258 } // let adminbar = document.querySelector('#wpadminbar'); 259 // let adminbarHeight = 0; 260 // 261 // if (adminbar !== null) { 262 // adminbarHeight = adminbar.clientHeight; 263 // } 264 265 266 if (menuButtons.length) { 267 menuButtons.forEach(function (button) { 268 button.style.height = $siteTopHeight + 'px'; 269 }); 270 } 271} 272/*-------------------------------------------------------------- 273# IGN Events 274--------------------------------------------------------------*/ 275 276 277document.addEventListener('DOMContentLoaded', function () { 278 /*------- Add touch classes or not --------*/ 279 if (!("ontouchstart" in document.documentElement)) { 280 document.documentElement.className += " no-touch-device"; 281 } else { 282 document.documentElement.className += " touch-device"; 283 } 284 /*------- menu buttons --------*/ 285 //if the menu button is outside site-top. get both buttons for centering both. 286 287 288 if (!document.querySelector('.app-menu')) { 289 menuButtons = document.querySelectorAll('.panel-left-toggle, .panel-right-toggle'); 290 } else { 291 //otherwise the menu button does not need to be centered because its part of the app menu and moves. (moved in navigation.js) 292 menuButtons = document.querySelectorAll('.panel-right-toggle'); 293 } //we run menu button function below in resize event 294 295 /*------- Toggle Buttons --------*/ 296 //trigger optional afterToggle event 297 //adding new custom event for after the element is toggled 298 299 300 var toggleEvent = null; 301 302 if (isIE11) { 303 toggleEvent = document.createEvent('Event'); // Define that the event name is 'build'. 304 305 toggleEvent.initEvent('afterToggle', true, true); 306 } else { 307 toggleEvent = new Event('afterToggle', { 308 bubbles: true 309 }); //bubble allows for delegation on body 310 } //add aria to buttons currently on page 311 312 313 var buttons = document.querySelectorAll('[data-toggle]'); 314 buttons.forEach(function (button) { 315 button.setAttribute('role', 'switch'); 316 button.setAttribute('aria-checked', button.classList.contains('toggled-on') ? 'true' : 'false'); 317 }); // if (!document.querySelector('.multi-level-menu')) { //disable igniton toggle 318 //toggling the buttons with delegation click 319 320 document.body.addEventListener('click', function (e) { 321 var item = e.target.closest('[data-toggle]'); 322 323 if (item) { 324 var $doDefault = item.getAttribute('data-default'); //normally we prevent default unless someone add data-default 325 326 if (null === $doDefault) { 327 e.preventDefault(); 328 e.stopPropagation(); 329 } //if data-radio is found, only one can be selected at a time. 330 // untoggles any other item with same radio value 331 //radio items cannot be untoggled until another item is clicked 332 333 334 var radioSelector = item.getAttribute('data-radio'); 335 336 if (radioSelector !== null) { 337 var radioSelectors = document.querySelectorAll("[data-radio=\"".concat(radioSelector, "\"]")); 338 radioSelectors.forEach(function (radioItem) { 339 if (radioItem !== item && radioItem.classList.contains('toggled-on')) { 340 toggleItem(radioItem); //toggle all other radio items off when this one is being turned on 341 } 342 }); 343 } //if item has data-switch it can only be turned on or off but not both by this button based on value of data-switch (its either on or off) 344 345 346 var switchItem = item.getAttribute('data-switch'); //finally toggle the clicked item. some types of items cannot be untoggled like radio or an on switch 347 348 if (radioSelector !== null) { 349 toggleItem(item, 'on'); //the item clicked on cannot be unclicked until another item is pressed 350 } else if (switchItem !== null) { 351 if (switchItem === 'on') { 352 toggleItem(item, 'on'); 353 } else { 354 toggleItem(item, 'off'); 355 } 356 } else { 357 toggleItem(item); //normal regular toggle can turn itself on or off 358 } 359 } //end if item found 360 361 }); // } 362 //actual toggle of an item and add class toggled-on and any other classes needed. Also do a slide if necessary 363 364 function toggleItem(item) { 365 var forcedState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'none'; 366 367 //toggle item 368 if (forcedState === 'on') { 369 item.classList.add('toggled-on'); //radio or data-switch of on will always toggle-on 370 } else if (forcedState === 'off') { 371 item.classList.remove('toggled-on'); //data-switch of off will always toggle off 372 } else { 373 item.classList.toggle('toggled-on'); //basic data toggle item 374 } //is item toggled? used for the rest of this function to toggle another target if needed. 375 376 377 var isToggled = item.classList.contains('toggled-on'); 378 item.setAttribute('aria-expanded', isToggled ? 'true' : 'false'); //get class to add to this item or another 379 380 var $class = item.getAttribute('data-toggle'), 381 $target = document.querySelectorAll(item.getAttribute('data-target')); 382 383 if ($class === null || !$class) { 384 $class = 'toggled-on'; //default class added is toggled-on 385 } //special class added to another item 386 387 388 if ($target.length) { 389 $target.forEach(function (targetItem) { 390 if (isToggled) { 391 targetItem.classList.add($class); 392 } else { 393 targetItem.classList.remove($class); 394 } 395 396 targetItem.setAttribute('aria-expanded', isToggled ? 'true' : 'false'); //data slide open or closed 397 398 if (targetItem.dataset.slide !== undefined) { 399 var slideTime = targetItem.dataset.slide ? parseFloat(targetItem.dataset.slide) : .5; 400 401 if (isToggled) { 402 Object(_setup__WEBPACK_IMPORTED_MODULE_0__["ignSlideDown"])(targetItem, slideTime); 403 } else { 404 ignSlideUp(targetItem, slideTime); 405 } 406 } //allow event to happen after click for the targeted item 407 408 409 targetItem.dispatchEvent(toggleEvent); 410 }); 411 } else { 412 //applies class to the clicked item, there is no target 413 if ($class !== 'toggled-on') { 414 //add class to clicked item if its not set to be toggled-on 415 if (isToggled) { 416 item.classList.toggle($class); 417 } else { 418 item.classList.remove($class); 419 } 420 } 421 }
421 //trigger optional afterToggle event. continue the click event for customized stuff 422 423 424 item.dispatchEvent(toggleEvent); 425 } 426 /*------- Moving items Event as well as all resizing --------*/ 427 //on Window resize we can move items to and from divs with data-moveto="the destination" 428 //it will move there when the site reaches smaller than a size defaulted to 1030 or set that with data-moveat 429 //the whole div, including the data att moveto moves back and forth 430 431 432 var movedId = 0; 433 var moveEvent = new Event('afterResize', { 434 bubbles: true 435 }); //bubble allows for delegation on body 436 437 function moveItems() { 438 var windowWidth = window.innerWidth; 439 var $moveItems = document.querySelectorAll('[data-moveto]'); 440 $moveItems.forEach(function (item) { 441 var moveAt = item.getAttribute('data-moveat'), 442 destination = document.querySelector(item.getAttribute('data-moveto')), 443 source = item.getAttribute('data-movefrom'); 444 moveAt = moveAt ? moveAt : 1030; 445 446 if (moveAt.startsWith('--')) { 447 if (isIE11) { 448 moveAt = 1030; 449 } else { 450 var cssVars = getComputedStyle(document.body); //get css variables 451 452 moveAt = parseInt(cssVars.getPropertyValue(moveAt), 10); 453 } 454 } 455 456 if (!destination) { 457 return; 458 } //if no data movefrom is found add one to parent so we can move items back in. now they go back and forth 459 460 461 if (!source) { 462 var sourceElem = item.parentElement.id; //if parent has no id attr, add one with a number so its unique 463 464 if (!sourceElem) { 465 item.parentElement.setAttribute('id', 'move-' + movedId); 466 movedId++; 467 sourceElem = item.parentElement.id; 468 } 469 470 item.setAttribute('data-movefrom', '#' + sourceElem); 471 } 472 473 source = document.querySelector(item.getAttribute('data-movefrom')); //if the screen is smaller than moveAt (1030), move to destination 474 475 if (windowWidth < moveAt || moveAt == 0) { 476 //no need to move if its already there... 477 if (!destination.contains(item)) { 478 if (item.hasAttribute('data-moveto-pos')) { 479 destination.insertBefore(item, destination.children[item.getAttribute('data-moveto-pos')]); 480 } else { 481 destination.appendChild(item); 482 } 483 } 484 } else { 485 if (!source.contains(item)) { 486 if (item.hasAttribute('data-movefrom-pos')) { 487 source.insertBefore(item, source.children[item.getAttribute('data-movefrom-pos')]); 488 } else { 489 source.appendChild(item); 490 } 491 } 492 } //show it 493 494 495 item.classList.add('visible'); 496 }); 497 placeMenuButtons(); //running the moving of menu buttons here. nothing to do with moving items. 498 //fix height of fixed holder fixed at top items 499 500 document.querySelectorAll('.fixed-holder').forEach(function (fixed) { 501 fixed.style.height = fixed.firstElementChild.clientHeight + 'px'; 502 }); 503 document.dispatchEvent(moveEvent); 504 } 505 506 window.addEventListener('resize', Object(_setup__WEBPACK_IMPORTED_MODULE_0__["throttle"])(moveItems, 400)); 507 moveItems(); 508 document.documentElement.classList.remove('dom-loading'); //add finished loading ignition events 509 510 var EventFinished = null; 511 512 if (isIE11) { 513 EventFinished = document.createEvent('Event'); // Define that the event name is 'build'. 514 515 EventFinished.initEvent('afterIgnEvents', true, true); 516 } else { 517 EventFinished = new Event('afterIgnEvents'); 518 } 519 520 document.dispatchEvent(EventFinished); 521}); 522/*------- Function for hi red background image swap --------*/ 523//check if device is retina 524 525function isHighDensity() { 526 return window.matchMedia && window.matchMedia('(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi)').matches; 527} //check if file exists on server before using 528 529 530function fileExists(image_url) { 531 var http = new XMLHttpRequest(); 532 http.open('HEAD', image_url, true); 533 http.send(); 534 return http.status != 404; 535} //Add inline retina image if found and on retina device. To use add data-high-res to an inline element with a background-image 536 537 538if (isHighDensity()) { 539 var retinaImage = document.querySelectorAll('[data-high-res]'); 540 retinaImage.forEach(function (item) {
541 var image2x = ''; //if a high res is provided use that, else use background image but add 2x at end. 542 543 if (item.dataset.highRes) { 544 image2x = item.dataset.highRes; 545 } else { 546 //get url for original image 547 var image = item.style.backgroundImage.slice(4, -1).replace(/"/g, ""); //add @2x to it if image exists. 548 549 image2x = image.replace(/(\.[^.]+$)/, '@2x$1'); 550 } 551 552 if (fileExists(image2x)) { 553 item.style.backgroundImage = 'url("' + image2x + '")'; 554 } 555 }); 556} 557 558/***/ }), 559
560/***/ "./src/js/core/icons.js": 561/*!******************************!*\ 562 !*** ./src/js/core/icons.js ***! 563 \******************************/ 564/*! no static exports found */ 565/***/ (function(module, exports) { 566 567//turn icons into svg if using the icons that come with theme folder 568document.addEventListener('DOMContentLoaded', function () { 569 document.querySelectorAll('.svg-icon').forEach(function (icon) { 570 icon.classList.remove('svg-icon'); //classlist.value does not wokr in ie11. use getAttrbiute 571 572 var iconClass = icon.getAttribute('class'); //ie11 does not work well with nodes. needed to add as string. no createelementNS 573 574 var iconString = "<svg class=\"icon ".concat(iconClass, "\" role=\"img\"><use href=\"#").concat(iconClass, "\" xlink:href=\"#").concat(iconClass, "\"></use></svg>"); 575 icon.insertAdjacentHTML('afterend', iconString); 576 icon.remove(); 577 }); 578}); 579 580/***/ }), 581
582/***/ "./src/js/core/navigation.js": 583/*!***********************************!*\ 584 !*** ./src/js/core/navigation.js ***! 585 \***********************************/ 586/*! no exports provided */ 587/***/ (function(module, __webpack_exports__, __webpack_require__) { 588 589"use strict"; 590__webpack_require__.r(__webpack_exports__); 591/* harmony import */ var _setup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setup */ "./src/js/core/setup.js"); 592/* harmony import */ var _navigation_callbacks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./navigation_callbacks */ "./src/js/core/navigation_callbacks.js"); 593/* harmony import */ var _theme_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../theme.config */ "./theme.config.json"); 594var _theme_config__WEBPACK_IMPORTED_MODULE_2___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../../../theme.config */ "./theme.config.json", 1); 595 596 597 598 599if (_theme_config__WEBPACK_IMPORTED_MODULE_2__["menu_type"] != 'multi-level-menu') { 600 //only use when menu_type = '' || 'app-menu' 601 //toggle logic functionality that calls the above functions 602 //use this one to run the opening and closing of a menu item. dont call above functions directly 603 var toggleMenuItem = function toggleMenuItem(menuItem) { 604 var toggleState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; 605 var topLevel = isTopLevel(menuItem); 606 var horizontalMenu = isHorizontalMenu(menuItem); //toplevel horizontal on tablet 607 608 if (topLevel && horizontalMenu) { 609 //also check if menu is offscreen and give it a class 610 //checkOffScreenMenu(menuItem.querySelector('.sub-menu')) 611 Object(_navigation_callbacks__WEBPACK_IMPORTED_MODULE_1__["toggleTopLevelHorizontalMenu"])(menuItem, toggleState); 612 return; 613 } //toplevel vertical on tablet 614 615 616 if (topLevel && !horizontalMenu) { 617 Object(_navigation_callbacks__WEBPACK_IMPORTED_MODULE_1__["toggleTopLevelVerticalMenu"])(menuItem, toggleState); 618 return; 619 } 620 621 Object(_navigation_callbacks__WEBPACK_IMPORTED_MODULE_1__["toggleSubMenu"])(menuItem, toggleState); 622 }; //MAIN MENU EVENT. CAN BE CALLED ON ANY MENU ITEM WITH CHILDREN 623 624 625 //make only one click event once a click is used 626 var createMenuListener = function createMenuListener(menuItem) { 627 menuItem.addEventListener('pointerover', function (e) { 628 e.stopPropagation(); 629 var toggleState = true; //always open unless touch event which changes this below 630 //TOUCH CLICK EVENT 631 632 if (e.pointerType !== 'mouse') { 633 //clicking a real link opens it 634 if (!e.target.closest("a[href^=\"#\"]") && !e.target.closest('.submenu-dropdown-toggle')) { 635 return; 636 } 637 638 if (menuItem.classList.contains('toggled-on')) { 639 toggleState = false; 640 } //if were opening a top level on horizontal with a click, we need a way to close another that may be opened 641 642 643 if (isTopLevel(menuItem) && !menuItem.classList.contains('toggled-on') && isHorizontalMenu(menuItem)) { 644 closeAllTopMenus(); 645 } 646 } //touch device 647 //open close for hover and device touch 648 649 650 toggleMenuItem(menuItem, toggleState); 651 }); //pointerover 652 653 menuItem.addEventListener('pointerleave', function (e) { 654 e.stopPropagation(); //simply close for hover 655 656 if (e.pointerType === 'mouse') { 657 toggleMenuItem(menuItem, false); 658 } //triggers when the lcick on is removed...too fast so we need to add another event for clicking off 659 660 661 if (e.pointerType !== 'mouse') { 662 //clicked up on touch now we want that fi they click elsewhere to close everything 663 if (!menuClickEvent) { 664 menuClickEvent = true; 665 document.addEventListener('click', function (e) { 666 //if were not clicking a menu, close any menus opened 667 if (!e.target.closest('.menu')) { 668 closeAllTopMenus(); 669 } 670 }); 671 } 672 } 673 }); 674 }; //close all top level menus 675 676 677 var closeAllTopMenus = function closeAllTopMenus() { 678 var otherMenuItems = document.querySelectorAll('.top-level-item.toggled-on'); 679 680 if (otherMenuItems) {
681 otherMenuItems.forEach(function (item) { 682 toggleMenuItem(item, false); 683 }); 684 } 685 }; 686 687 var isTopLevel = function isTopLevel(menuItem) { 688 return menuItem.classList.contains('top-level-item'); 689 }; //if the item is inside a submenu inside another submenu 690 691 692 var isNestedSubMenu = function isNestedSubMenu(menuItem) { 693 return menuItem.classList.contains('nested-menu-item'); 694 }; 695 696 var isHorizontalMenu = function isHorizontalMenu(menuItem) { 697 return getComputedStyle(menuItem.closest('.menu')).flexDirection !== 'column'; 698 }; //fix and reset on resize 699 700 701 /*------- move submenus if too close to edge on desktop --------*/ 702 var checkOffScreenMenu = function checkOffScreenMenu(submenu) { 703 var display = window.getComputedStyle(submenu).display; 704 705 if (display !== 'block') { 706 submenu.style.display = 'block'; 707 } //make item visible so we can get left edge 708 709 710 var rightEdge = submenu.getBoundingClientRect().right; 711 var leftEdge = submenu.getBoundingClientRect().left; //set menu back 712 713 if (display !== 'block') { 714 submenu.style.removeProperty('display'); 715 } 716 717 var viewport = document.documentElement.clientWidth; //if the submenu is off the page, pull it back somewhat 718 719 if (rightEdge > viewport) { 720 Object(_navigation_callbacks__WEBPACK_IMPORTED_MODULE_1__["fixOffScreenMenu"])(submenu, 'right'); 721 return; 722 } 723 724 if (leftEdge < 0) { 725 Object(_navigation_callbacks__WEBPACK_IMPORTED_MODULE_1__["fixOffScreenMenu"])(submenu, 'left'); 726 } else { 727 Object(_navigation_callbacks__WEBPACK_IMPORTED_MODULE_1__["fixOffScreenMenu"])(submenu, 'none'); 728 } 729 }; 730 731 var menuClickEvent = false; 732 document.addEventListener('afterResize', function () { 733 document.querySelectorAll('.top-level-item.menu-item-has-children').forEach(function (item) { 734 toggleMenuItem(item, false); 735 item.querySelector('.sub-menu').style.removeProperty('display'); 736 737 if (isHorizontalMenu(item)) { 738 checkOffScreenMenu(item.querySelector('.sub-menu')); 739 } 740 }); 741 }); 742 document.addEventListener('DOMContentLoaded', function () { 743 //adds menu events to all menus. more menus can be added later by passing it through createMenuListener 744 var menus = document.querySelectorAll('.menu-item'); 745 menus.forEach(function (menuItem, index) { 746 createMenuListener(menuItem); 747 }); //on load if its a vertical menu, open the parent dropdown right away 748 749 document.querySelectorAll('.menu .current-menu-item.menu-item-has-children, .menu .current-menu-parent').forEach(function (menu) { 750 //if its a vertical menu. we can know by the flex direction of menu 751 if (getComputedStyle(menu.closest('.menu')).flexDirection === 'column') { 752 toggleMenuItem(menu); 753 } 754 }); 755 }); // FOCUS EVENTS - only for keyboard 756 757 var menuMightBeOpen = false; 758 document.body.addEventListener('focusin', function (e) { 759 var menuItem = e.target.closest('.menu-item'); 760 761 if (menuItem && menuItem.classList.contains('menu-item-has-children')) { 762 window.addEventListener('keyup', function (e) { 763 var code = e.keyCode ? e.keyCode : e.which; 764 765 if (code === 9 || code === 16) { 766 menuMightBeOpen = true; //close other top menus when this one is turned on 767 768 if (isTopLevel(menuItem)) { 769 closeAllTopMenus(); 770 } 771 772 toggleMenuItem(menuItem, true); 773 } 774 }, { 775 once: true 776 }); 777 } 778 779 if (menuMightBeOpen) { 780 closeAllTopMenus(); 781 menuMightBeOpen = false; 782 } 783 }); 784 jQuery(function ($) { 785 //move logo in middle of menu on desktop if logo is middle position 786 if ($('.logo-in-middle').length) { 787 var navigationLi = $('.site-navigation__nav-holder .menu li'); 788 var middle = Math.floor($(navigationLi).length / 2) - 1; //add logo to the middle when page loads 789 790 $('<li class="menu-item li-logo-holder"><div class="menu-item-link"></div></li>').insertAfter(navigationLi.filter(':eq(' + middle + ')')); 791 $('.site-logo').clone().appendTo('.li-logo-holder'); 792 } 793 }); 794} else { 795 document.addEventListener("DOMContentLoaded", function () { 796 var menu = new Mmenu("#navigation__nav", { 797 extensions: ["position-right", "pagedim"], 798 wrappers: ["wordpress"] 799 }, {
800 // configuration 801 offCanvas: { 802 clone: true // page: { 803 // selector: "#site-container" 804 // } 805 806 } 807 }); 808 var api = menu.API; 809 api.bind("close:start", function (panel) { 810 document.getElementById('panel-left-toggle').classList.remove("toggled-on"); 811 }); 812 }); // get ipad menu working 813 814 jQuery(function ($) { 815 $('html.touch-device .multi-level-menu nav#navigation__nav ul > li.menu-item-has-children > a').on('click', function (e) { 816 if (!$(this).hasClass('opened')) { 817 e.preventDefault(); 818 $(this).addClass('opened'); 819 $(this).parent('li').hover(); 820 } 821 }); 822 }); 823} 824 825/***/ }), 826
827/***/ "./src/js/core/navigation_callbacks.js": 828/*!*********************************************!*\ 829 !*** ./src/js/core/navigation_callbacks.js ***! 830 \*********************************************/ 831/*! exports provided: toggleTopLevelHorizontalMenu, toggleTopLevelVerticalMenu, toggleSubMenu, fixOffScreenMenu */ 832/***/ (function(module, __webpack_exports__, __webpack_require__) { 833 834"use strict"; 835__webpack_require__.r(__webpack_exports__); 836/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toggleTopLevelHorizontalMenu", function() { return toggleTopLevelHorizontalMenu; }); 837/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toggleTopLevelVerticalMenu", function() { return toggleTopLevelVerticalMenu; }); 838/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toggleSubMenu", function() { return toggleSubMenu; }); 839/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fixOffScreenMenu", function() { return fixOffScreenMenu; }); 840/* harmony import */ var src_js_core_setup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/js/core/setup */ "./src/js/core/setup.js"); 841 //CHANGE THE FUNCTIONS BELOW TO CHANGE HOW YOUR MENUS OPEN AND CLOSE 842//menuItem is an li that has a .sub-menu, you can decide however you want to open this 843//css for this can be found in menus.scss and menu_layout.scss 844//its better to override the layout file in menu.scss rather than touch that 845//opens a top level item when the menu is horizontal 846 847function toggleTopLevelHorizontalMenu(menuItem) { 848 var open = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; 849 850 if (open) { 851 //change to whatever you want ie: ignSlideDown... 852 menuItem.classList.add('toggled-on'); 853 } else { 854 menuItem.classList.remove('toggled-on'); 855 } 856} //runs when a toplevel vertical menu item is hovered or clicked 857 858function toggleTopLevelVerticalMenu(menuItem) { 859 var open = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; 860 var subMenu = menuItem.querySelector('.sub-menu'); 861 862 if (open) { 863 //change to whatever you want ie: ignSlideDown... 864 menuItem.classList.add('toggled-on'); 865 return Object(src_js_core_setup__WEBPACK_IMPORTED_MODULE_0__["ignSlideDown"])(subMenu); 866 } else { 867 menuItem.classList.remove('toggled-on'); 868 return Object(src_js_core_setup__WEBPACK_IMPORTED_MODULE_0__["ignSlideUp"])(subMenu); 869 } 870} //non on all top level submenus for click and hover 871 872function toggleSubMenu(menuItem) { 873 var open = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; 874 var subMenu = menuItem.querySelector('.sub-menu'); 875 876 if (open) { 877 //change to whatever you want ie: ignSlideDown... 878 menuItem.classList.add('toggled-on'); 879 return Object(src_js_core_setup__WEBPACK_IMPORTED_MODULE_0__["ignSlideDown"])(subMenu); 880 } else { 881 menuItem.classList.remove('toggled-on'); 882 return Object(src_js_core_setup__WEBPACK_IMPORTED_MODULE_0__["ignSlideUp"])(subMenu); 883 } 884} //when a top level horizontal 885 886function fixOffScreenMenu(submenu) { 887 var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'right'; 888 889 if (side === 'right') { 890 submenu.closest('.menu-item').classList.add('offscreen-right'); 891 } 892 893 if (side === 'left') { 894 submenu.closest('.menu-item').classList.add('offscreen-left'); 895 } 896 897 if (side === 'none') { 898 submenu.closest('.menu-item').classList.remove('offscreen-left', 'offscreen-right'); 899 } 900} 901 902/***/ }), 903
904/***/ "./src/js/core/objectfitFallback.js": 905/*!******************************************!*\ 906 !*** ./src/js/core/objectfitFallback.js ***! 907 \******************************************/ 908/*! no static exports found */ 909/***/ (function(module, exports) { 910 911jQuery(function ($) { 912 'use strict'; // the css selector for the container that the image should be attached to as a background-image 913 914 var imgContainer = '.background-image, .cover-image'; 915 916 function getCurrentSrc(element, cb) { 917 var _getSrc; 918 919 if (!window.HTMLPictureElement) { 920 if (window.respimage) { 921 respimage({ 922 elements: [element] 923 }); 924 } else if (window.picturefill) { 925 picturefill({ 926 elements: [element] 927 }); 928 } 929 930 cb(element.src); 931 return; 932 } 933 934 _getSrc = function getSrc() { 935 element.removeEventListener('load', _getSrc); 936 element.removeEventListener('error', _getSrc); 937 cb(element.currentSrc); 938 }; 939 940 element.addEventListener('load', _getSrc); 941 element.addEventListener('error', _getSrc); 942 943 if (element.complete) { 944 _getSrc(); 945 } 946 } 947 948 function setBgImage() { 949 $(imgContainer).each(function () { 950 var $this = $(this), 951 img = $this.find('img').get(0); 952 getCurrentSrc(img, function (elementSource) { 953 $this.css('background-image', 'url(' + elementSource + ')'); 954 }); 955 }); 956 } 957 958 if ('objectFit' in document.documentElement.style === false) { 959 $('html').addClass('no-objectfit'); 960 $(window).resize(function () { 961 setBgImage(); 962 }); 963 setBgImage(); 964 } 965}); 966 967/***/ }), 968
969/***/ "./src/js/core/panel-left.js": 970/*!***********************************!*\ 971 !*** ./src/js/core/panel-left.js ***! 972 \***********************************/ 973/*! no exports provided */ 974/***/ (function(module, __webpack_exports__, __webpack_require__) { 975 976"use strict"; 977__webpack_require__.r(__webpack_exports__); 978/* harmony import */ var _theme_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../theme.config */ "./theme.config.json"); 979var _theme_config__WEBPACK_IMPORTED_MODULE_0___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../../../theme.config */ "./theme.config.json", 1); 980 981 982if (_theme_config__WEBPACK_IMPORTED_MODULE_0__["menu_type"] != 'multi-level-menu') { 983 //only use when menu_type = '' || 'app-menu' 984 document.addEventListener('DOMContentLoaded', function () { 985 //app-menu ability for the top menu 986 var body = document.body; 987 var menuToggle = document.querySelector('.panel-left-toggle'); 988 var topNav = document.querySelector('.site-top'); 989 var page = document.querySelector('#page'); //first move the button into site-top if app-menu is being used cause we dont want it on the outside 990 991 if (body.classList.contains('app-menu')) { 992 topNav.append(menuToggle); 993 } 994 995 function closeAppMenu(e) { 996 e.preventDefault(); 997 menuToggle.click(); 998 } //when button is opened we will lock the body so there is no scrolling and then open the page 999 1000 1001 if (menuToggle) { 1002 menuToggle.addEventListener('afterToggle', function (e) { 1003 //if button has been toggled on 1004 if (menuToggle.classList.contains('toggled-on')) { 1005 if (body.classList.contains('app-menu')) { 1006 body.classList.add('mobile-menu-body-lock'); 1007 } //clicking anywhere outside the menu will close it 1008 1009 1010 document.querySelector('.site-content').addEventListener('click', closeAppMenu, { 1011 once: true 1012 }); 1013 } else { 1014 document.querySelector('.site-content').removeEventListener('click', closeAppMenu); 1015 1016 if (body.classList.contains('app-menu')) { 1017 page.addEventListener('transitionend', function () { 1018 body.classList.remove('mobile-menu-body-lock'); //only remove toggle and hide menu once page holder finishes its transition to cover it. 1019 }, { 1020 once: true 1021 }); 1022 } else {//body.classList.remove('mobile-menu-body-lock'); 1023 } 1024 } 1025 }); 1026 } 1027 }); 1028} 1029 1030/***/ }), 1031
1032/***/ "./src/js/core/responsive-iframe.js": 1033/*!******************************************!*\ 1034 !*** ./src/js/core/responsive-iframe.js ***! 1035 \******************************************/ 1036/*! no exports provided */ 1037/***/ (function(module, __webpack_exports__, __webpack_require__) { 1038 1039"use strict"; 1040__webpack_require__.r(__webpack_exports__); 1041/* harmony import */ var _setup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setup */ "./src/js/core/setup.js"); 1042 //make iframe videos responsive 1043 1044document.addEventListener('DOMContentLoaded', function () { 1045 document.querySelectorAll('iframe[src*="youtube.com"], iframe[data-src*="youtube.com"], iframe[src*="vimeo.com"], iframe[data-src*="vimeo.com"]').forEach(function (iframe) { 1046 if (!iframe.parentElement.classList.contains('videowrapper')) { 1047 Object(_setup__WEBPACK_IMPORTED_MODULE_0__["wrap"])(iframe).classList.add('videowrapper'); 1048 } 1049 }); 1050}); 1051 1052/***/ }), 1053
1054/***/ "./src/js/core/search.js": 1055/*!*******************************!*\ 1056 !*** ./src/js/core/search.js ***! 1057 \*******************************/ 1058/*! no static exports found */ 1059/***/ (function(module, exports) { 1060 1061(function () { 1062 var container = document.querySelector('div.site-container'), 1063 triggerBttn = document.querySelector('button.open-search'), 1064 overlay = document.querySelector('#search-overlay'), 1065 closeBttn = overlay.querySelector('button.overlay-close'); 1066 transEndEventNames = { 1067 'WebkitTransition': 'webkitTransitionEnd', 1068 'MozTransition': 'transitionend', 1069 'OTransition': 'oTransitionEnd', 1070 'msTransition': 'MSTransitionEnd', 1071 'transition': 'transitionend' 1072 }, transEndEventName = transEndEventNames[Modernizr.prefixed('transition')], support = { 1073 transitions: Modernizr.csstransitions 1074 }; 1075 1076 function toggleOverlay() { 1077 if (classie.has(overlay, 'open')) { 1078 classie.remove(overlay, 'open'); 1079 classie.remove(container, 'overlay-open'); 1080 classie.add(overlay, 'close'); 1081 1082 var onEndTransitionFn = function onEndTransitionFn(ev) { 1083 if (support.transitions) { 1084 if (ev.propertyName !== 'visibility') return; 1085 this.removeEventListener(transEndEventName, onEndTransitionFn); 1086 } 1087 1088 classie.remove(overlay, 'close'); 1089 }; 1090 1091 if (support.transitions) { 1092 overlay.addEventListener(transEndEventName, onEndTransitionFn); 1093 } else { 1094 onEndTransitionFn(); 1095 } 1096 } else if (!classie.has(overlay, 'close')) { 1097 classie.add(overlay, 'open'); 1098 classie.add(container, 'overlay-open'); 1099 setTimeout(function () { 1100 $('.overlay-content input.search-field').focus(); 1101 }, 100); 1102 } 1103 } 1104 1105 triggerBttn.addEventListener('click', toggleOverlay); 1106 closeBttn.addEventListener('click', toggleOverlay); 1107})(); 1108 1109/***/ }), 1110
1111/***/ "./src/js/core/setup.js": 1112/*!******************************!*\ 1113 !*** ./src/js/core/setup.js ***! 1114 \******************************/ 1115/*! exports provided: wrap, debounce, throttle, ignSlidePropertyReset, ignSlideUp, ignSlide, ignSlideDown, ignSlideToggle */ 1116/***/ (function(module, __webpack_exports__, __webpack_require__) { 1117 1118"use strict"; 1119__webpack_require__.r(__webpack_exports__); 1120/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return wrap; }); 1121/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; }); 1122/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; }); 1123/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignSlidePropertyReset", function() { return ignSlidePropertyReset; }); 1124/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignSlideUp", function() { return ignSlideUp; }); 1125/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignSlide", function() { return ignSlide; }); 1126/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignSlideDown", function() { return ignSlideDown; }); 1127/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignSlideToggle", function() { return ignSlideToggle; }); 1128/*------- Core Functions --------*/ 1129//wrap function. use in scrollmagic and more 1130function wrap(el, wrapper) { 1131 if (wrapper === undefined) { 1132 wrapper = document.createElement('div'); 1133 } 1134 1135 el.parentNode.insertBefore(wrapper, el); 1136 wrapper.appendChild(el); 1137 return wrapper; 1138} //debounce to slow down an event that users window size or the like 1139//debounce will wait till the window is resized and then run 1140 1141function debounce(func, wait, immediate) { 1142 var timeout; 1143 return function () { 1144 var context = this, 1145 args = arguments; 1146 1147 var later = function later() { 1148 timeout = null; 1149 if (!immediate) func.apply(context, args); 1150 }; 1151 1152 var callNow = immediate && !timeout; 1153 clearTimeout(timeout); 1154 timeout = setTimeout(later, wait); 1155 if (callNow) func.apply(context, args); 1156 }; 1157} //throttle will run every few milliseconds as opposed to every millisecond 1158 1159function throttle(fn, threshhold, scope) { 1160 threshhold || (threshhold = 250); 1161 var last, deferTimer; 1162 return function () { 1163 var context = scope || this; 1164 var now = +new Date(), 1165 args = arguments; 1166 1167 if (last && now < last + threshhold) { 1168 // hold on to it 1169 clearTimeout(deferTimer); 1170 deferTimer = setTimeout(function () { 1171 last = now; 1172 fn.apply(context, args); 1173 }, threshhold); 1174 } else { 1175 last = now; 1176 fn.apply(context, args); 1177 } 1178 }; 1179} ///slide elements 1180 1181var ignSlideTimer = Array; //{} //turn into array nad ad a data-sliding wirth a number use that number as index to clear it 1182//remove inline styling if any found except display 1183 1184function ignSlidePropertyReset(target, direction) { 1185 if (direction === 'up') { 1186 target.style.display = 'none'; 1187 } //clear these properties 1188 1189 1190 target.style.removeProperty('transition-duration'); 1191 target.style.removeProperty('transition-property'); 1192 target.style.removeProperty('height'); 1193 target.style.removeProperty('padding-top'); 1194 target.style.removeProperty('padding-bottom'); 1195 target.style.removeProperty('margin-top'); 1196 target.style.removeProperty('margin-bottom'); 1197 target.style.removeProperty('overflow'); 1198 target.removeAttribute('slideTimer'); 1199} 1200function ignSlideUp(target) { 1201 var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5; 1202 return ignSlide('up', target, duration); 1203} 1204function ignSlide() { 1205 var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'up'; 1206 var target = arguments.length > 1 ? arguments[1] : undefined; 1207 var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : .5; 1208 return new Promise(function (resolve, reject) { 1209 if (target != null) { 1210 clearTimeout(parseInt(target.dataset.slideTimer)); 1211 target.removeAttribute('slide-timer'); 1212 var slideTimer = setTimeout(function () { 1213 ignSlidePropertyReset(target, direction); 1214 resolve(); 1215 }, duration * 1000); 1216 target.dataset.slideTimer = slideTimer + ''; //set transitions and overflow 1217 1218 target.style.transitionProperty = 'height, margin, padding'; 1219 target.style.transitionDuration = duration + 's'; 1220 1221 if (direction === 'up') { 1222 target.style.overflow = 'hidden'; //no point sliding up if its been set to hidden via css 1223 1224 if (window.getComputedStyle(target).display === 'none') { 1225 return; 1226 } //set height just in case there is none. cannot be nothing or auto 1227 1228 1229 target.style.height = "".concat(target.scrollHeight, "px"); //1 split second after: closing the height from wherever it is currently 1230 1231 setTimeout(function () { 1232 target.style.height = 0; //closing item now 1233 1234 target.style.paddingTop = 0; 1235 target.style.paddingBottom = 0; 1236 target.style.marginBottom = 0; 1237 target.style.marginTop = 0; 1238 }, 100); 1239 } else { 1240 //sliding down 1241 // save original margins, and padding, no the inline ones 1242 var height = window.getComputedStyle(target).height; //might be open... or have a set height 1243 1244 var display = window.getComputedStyle(target).display; 1245 var paddingTop = window.getComputedStyle(target).paddingTop || 0; 1246 var paddingBottom = window.getComputedStyle(target).paddingBottom || 0; 1247 var marginBottom = window.getComputedStyle(target).marginBottom || 0; 1248 var marginTop = window.getComputedStyle(target).marginTop || 0; 1249 target.style.removeProperty('overflow'); //cant animate from auto 1250 1251 if (height === 'auto') { 1252 target.style.height = 0; 1253 } //if its not showing now, we will show from 0 on everything 1254 1255 1256 if (display === 'none') { 1257 display = 'block'; //we will be setting this to show 1258 1259 paddingBottom = paddingTop = marginBottom = marginTop = 0; //animating from 0 1260 1261 target.style.height = 0; 1262 } //display must be set before transitioning below 1263 1264 1265 target.style.display = display; //actual transitions 1266 1267 setTimeout(function () { 1268 //animate properties to open and normal 1269 target.style.height = "".concat(target.scrollHeight, "px"); //also animating the padding and margins 1270 1271 target.style.paddingTop = paddingTop; 1272 target.style.paddingBottom = paddingBottom; 1273 target.style.marginTop = marginTop; 1274 target.style.marginBottom = marginBottom; 1275 }, 0); 1276 } 1277 } 1278 }); 1279} 1280/** 1281 * 1282 * @param target 1283 * @param duration 1284 * 1285 * Style element as it should show then set it to display none (or have it get display none from slide up or something else) 1286 */ 1287 1288function ignSlideDown(target) { 1289 var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5; 1290 return ignSlide('down', target, duration); 1291} 1292function ignSlideToggle(target) { 1293 var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5; 1294 1295 if (window.getComputedStyle(target).display === 'none') { 1296 return ignSlideDown(target, duration); 1297 } else { 1298 return ignSlideUp(target, duration); 1299 } 1300} 1301 1302/***/ }), 1303
1304/***/ "./src/js/core/sidebar.js": 1305/*!********************************!*\ 1306 !*** ./src/js/core/sidebar.js ***! 1307 \********************************/ 1308/*! no static exports found */ 1309/***/ (function(module, exports) { 1310 1311document.addEventListener('DOMContentLoaded', function () { 1312 //move the header above the article when header-above is found 1313 var headerAbove = document.querySelector('.header-above'); 1314 1315 if (headerAbove !== null) { 1316 document.querySelectorAll('.entry-header, .page-header').forEach(function (header) { 1317 headerAbove.parentElement.prepend(header); 1318 header.classList.add('header-moved'); //might be useful for someone 1319 }); 1320 } //when a secondary is used, a sidebar is shown, on load we do a few things to smooth the transition of the header 1321 1322 1323 var sidebar = document.querySelector('#secondary'); 1324 1325 if (sidebar !== null) { 1326 sidebar.innerHTML = sidebar.innerHTML.trim(); //if moving stuff in and out its good to remove extra space so :empty works 1327 1328 var sidebarTemplate = document.querySelector('.sidebar-template'); 1329 sidebarTemplate.classList.add('active'); 1330 } 1331}); 1332 1333/***/ }), 1334
1335/***/ "./src/js/core/smooth-scroll.js": 1336/*!**************************************!*\ 1337 !*** ./src/js/core/smooth-scroll.js ***! 1338 \**************************************/ 1339/*! no static exports found */ 1340/***/ (function(module, exports) { 1341 1342var scrollEvent = new Event('afterScroll', { 1343 bubbles: true 1344}); //bubble allows for delegation on body 1345 1346/** 1347 * runs when an anchor is clicked or the page loads with an anchor 1348 * the item we are scrolling to can have an offset 1349 * @param element 1350 */ 1351 1352function scrolltoHash(element) { 1353 if (element) { 1354 var offset = element.dataset.offset || 'start'; //if the offset is a string 'start, center, or end' 1355 1356 if (isNaN(parseInt(offset))) { 1357 element.scrollIntoView({ 1358 behavior: 'smooth', 1359 block: offset 1360 }); 1361 } else { 1362 //from top scroll with offset 1363 var fromTop = window.pageYOffset + element.getBoundingClientRect().top + parseInt(offset); 1364 window.scroll({ 1365 behavior: 'smooth', 1366 top: fromTop 1367 }); 1368 } //fire some more events 1369 1370 1371 setTimeout(function () { 1372 element.dispatchEvent(scrollEvent); 1373 }, 500); 1374 } 1375} 1376 1377document.addEventListener('DOMContentLoaded', function () { 1378 if (location.hash) { 1379 scrolltoHash(document.querySelector(location.hash)); 1380 } 1381 1382 document.body.addEventListener('click', function (e) { 1383 var item = e.target.closest('a[href^="#"]'); 1384 1385 if (item) { 1386 var itemHash = item.getAttribute('href'); 1387 1388 if (itemHash !== '#' && itemHash !== '#0') { 1389 e.preventDefault(); 1390 scrolltoHash(document.querySelector(itemHash)); 1391 } 1392 } 1393 }); 1394 document.addEventListener('afterScroll', function (e) {//run an event after scroll begins 1395 }); 1396}); 1397 1398/***/ }), 1399
1400/***/ "./src/js/frontend/scaling.js": 1401/*!************************************!*\ 1402 !*** ./src/js/frontend/scaling.js ***! 1403 \************************************/ 1404/*! no static exports found */ 1405/***/ (function(module, exports) { 1406 1407jQuery(function ($) { 1408 var vw; 1409 divResize(); 1410 $(window).bind('resize', function () { 1411 divResize(); 1412 }); 1413 1414 function divResize() { 1415 vw = $(window).width(); 1416 if (vw > 1366) vw = 1366; 1417 $('.scale-up-to-container').css('transform', 'scale(' + vw / 1366 + ')'); 1418 } 1419}); 1420 1421/***/ }), 1422
1423/***/ "./src/sass/front-end-bunde.scss": 1424/*!***************************************!*\ 1425 !*** ./src/sass/front-end-bunde.scss ***! 1426 \***************************************/ 1427/*! no exports provided */ 1428/***/ (function(module, __webpack_exports__, __webpack_require__) { 1429 1430"use strict"; 1431__webpack_require__.r(__webpack_exports__); 1432// extracted by mini-css-extract-plugin 1433 1434 1435/***/ }), 1436
1437/***/ "./theme.config.json": 1438/*!***************************!*\ 1439 !*** ./theme.config.json ***! 1440 \***************************/ 1441/*! exports provided: name, slug, server, menu_icon, sidebar_icon, submenu_arrow_icon, comment_icon, search_menu_item, dev_admin_bar_color, admin_access_capability, menu_type, logo_position, site_top_container, use_iconify, admin_styleguide_page, default */ 1442/***/ (function(module) { 1443 1444module.exports = JSON.parse("{\"name\":\"Partizipation.at Theme 2021\",\"slug\":\"partizipation_2021_bmst\",\"server\":\"partizipation.local\",\"menu_icon\":\"\",\"sidebar_icon\":\"\",\"submenu_arrow_icon\":\"\",\"comment_icon\":\"\",\"search_menu_item\":false,\"dev_admin_bar_color\":\"\",\"admin_access_capability\":\"manage_options\",\"menu_type\":\"multi-level-menu\",\"logo_position\":\"logo-left\",\"site_top_container\":\"container\",\"use_iconify\":true,\"admin_styleguide_page\":true}"); 1445 1446/***/ })
1446 1447 1448/******/ }); 1449//# sourceMappingURL=frontEnd_bundle.js.map
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.