vendor: 25,082 bytes, lines 1-589
1(function webpackUniversalModuleDefinition(root, factory) { 2 if(typeof exports === 'object' && typeof module === 'object') 3 module.exports = factory(require("jquery")); 4 else if(typeof define === 'function' && define.amd) 5 define(["jquery"], factory); 6 else if(typeof exports === 'object') 7 exports["__FOUNDATION_EXTERNAL__"] = factory(require("jquery")); 8 else 9 root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.core"] = factory(root["jQuery"]); 10})(self, function(__WEBPACK_EXTERNAL_MODULE_jquery__) { 11return /******/ (function() { // webpackBootstrap 12/******/ "use strict"; 13/******/ var __webpack_modules__ = ({ 14 15/***/ "./js/foundation.core.js": 16/*!*******************************!*\ 17 !*** ./js/foundation.core.js ***! 18 \*******************************/ 19/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 20 21__webpack_require__.r(__webpack_exports__); 22/* harmony export */ __webpack_require__.d(__webpack_exports__, { 23/* harmony export */ Foundation: function() { return /* binding */ Foundation; } 24/* harmony export */ }); 25/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 26/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 27/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ "./js/foundation.core.utils.js"); 28/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./js/foundation.util.mediaQuery.js"); 29function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 30 31 32 33var FOUNDATION_VERSION = '6.9.0'; 34 35// Global Foundation object 36// This is attached to the window, or used as a module for AMD/Browserify 37var Foundation = { 38 version: FOUNDATION_VERSION, 39 /** 40 * Stores initialized plugins. 41 */ 42 _plugins: {}, 43 /** 44 * Stores generated unique ids for plugin instances 45 */ 46 _uuids: [], 47 /** 48 * Defines a Foundation plugin, adding it to the `Foundation` namespace and the list of plugins to initialize when reflowing. 49 * @param {Object} plugin - The constructor of the plugin. 50 */ 51 plugin: function plugin(_plugin, name) { 52 // Object key to use when adding to global Foundation object 53 // Examples: Foundation.Reveal, Foundation.OffCanvas 54 var className = name || functionName(_plugin); 55 // Object key to use when storing the plugin, also used to create the identifying data attribute for the plugin 56 // Examples: data-reveal, data-off-canvas 57 var attrName = hyphenate(className); 58 59 // Add to the Foundation object and the plugins list (for reflowing) 60 this._plugins[attrName] = this[className] = _plugin; 61 }, 62 /** 63 * @function 64 * Populates the _uuids array with pointers to each individual plugin instance. 65 * Adds the `zfPlugin` data-attribute to programmatically created plugins to allow use of $(selector).foundation(method) calls. 66 * Also fires the initialization event for each plugin, consolidating repetitive code. 67 * @param {Object} plugin - an instance of a plugin, usually `this` in context. 68 * @param {String} name - the name of the plugin, passed as a camelCased string. 69 * @fires Plugin#init 70 */ 71 registerPlugin: function registerPlugin(plugin, name) { 72 var pluginName = name ? hyphenate(name) : functionName(plugin.constructor).toLowerCase(); 73 plugin.uuid = (0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__.GetYoDigits)(6, pluginName); 74 if (!plugin.$element.attr("data-".concat(pluginName))) { 75 plugin.$element.attr("data-".concat(pluginName), plugin.uuid); 76 } 77 if (!plugin.$element.data('zfPlugin')) { 78 plugin.$element.data('zfPlugin', plugin); 79 } 80 /** 81 * Fires when the plugin has initialized. 82 * @event Plugin#init 83 */ 84 plugin.$element.trigger("init.zf.".concat(pluginName)); 85 this._uuids.push(plugin.uuid); 86 return; 87 }, 88 /** 89 * @function 90 * Removes the plugins uuid from the _uuids array. 91 * Removes the zfPlugin data attribute, as well as the data-plugin-name attribute. 92 * Also fires the destroyed event for the plugin, consolidating repetitive code. 93 * @param {Object} plugin - an instance of a plugin, usually `this` in context. 94 * @fires Plugin#destroyed 95 */ 96 unregisterPlugin: function unregisterPlugin(plugin) { 97 var pluginName = hyphenate(functionName(plugin.$element.data('zfPlugin').constructor)); 98 this._uuids.splice(this._uuids.indexOf(plugin.uuid), 1); 99 plugin.$element.removeAttr("data-".concat(pluginName)).removeData('zfPlugin') 100 /** 101 * Fires when the plugin has been destroyed. 102 * @event Plugin#destroyed 103 */.trigger("destroyed.zf.".concat(pluginName)); 104 for (var prop in plugin) { 105 if (typeof plugin[prop] === 'function') { 106 plugin[prop] = null; //clean up script to prep for garbage collection. 107 } 108 } 109 return; 110 }, 111 /** 112 * @function 113 * Causes one or more active plugins to re-initialize, resetting event listeners, recalculating positions, etc. 114 * @param {String} plugins - optional string of an individual plugin key, attained by calling `$(element).data('pluginName')`, or string of a plugin class i.e. `'dropdown'` 115 * @default If no argument is passed, reflow all currently active plugins. 116 */ 117 reInit: function reInit(plugins) { 118 var isJQ = plugins instanceof (jquery__WEBPACK_IMPORTED_MODULE_0___default()); 119 try { 120 if (isJQ) { 121 plugins.each(function () { 122 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('zfPlugin')._init(); 123 }); 124 } else { 125 var type = _typeof(plugins), 126 _this = this, 127 fns = { 128 'object': function object(plgs) { 129 plgs.forEach(function (p) { 130 p = hyphenate(p); 131 jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-' + p + ']').foundation('_init'); 132 }); 133 }, 134 'string': function string() { 135 plugins = hyphenate(plugins); 136 jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-' + plugins + ']').foundation('_init'); 137 }, 138 'undefined': function undefined() { 139 this.object(Object.keys(_this._plugins)); 140 } 141 }; 142 fns[type](plugins); 143 } 144 } catch (err) { 145 console.error(err); 146 } finally { 147 return plugins; 148 } 149 }, 150 /** 151 * Initialize plugins on any elements within `elem` (and `elem` itself) that aren't already initialized. 152 * @param {Object} elem - jQuery object containing the element to check inside. Also checks the element itself, unless it's the `document` object. 153 * @param {String|Array} plugins - A list of plugins to initialize. Leave this out to initialize everything. 154 */ 155 reflow: function reflow(elem, plugins) { 156 // If plugins is undefined, just grab everything 157 if (typeof plugins === 'undefined') { 158 plugins = Object.keys(this._plugins); 159 } 160 // If plugins is a string, convert it to an array with one item 161 else if (typeof plugins === 'string') { 162 plugins = [plugins]; 163 } 164 var _this = this; 165 166 // Iterate through each plugin 167 jquery__WEBPACK_IMPORTED_MODULE_0___default().each(plugins, function (i, name) { 168 // Get the current plugin 169 var plugin = _this._plugins[name]; 170 171 // Localize the search to all elements inside elem, as well as elem itself, unless elem === document 172 var $elem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(elem).find('[data-' + name + ']').addBack('[data-' + name + ']').filter(function () { 173 return typeof jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data("zfPlugin") === 'undefined'; 174 }); 175 176 // For each plugin found, initialize it 177 $elem.each(function () { 178 var $el = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 179 opts = { 180 reflow: true 181 }; 182 if ($el.attr('data-options')) { 183 $el.attr('data-options').split(';').forEach(function (option) { 184 var opt = option.split(':').map(function (el) { 185 return el.trim(); 186 }); 187 if (opt[0]) opts[opt[0]] = parseValue(opt[1]); 188 }); 189 } 190 try { 191 $el.data('zfPlugin', new plugin(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), opts)); 192 } catch (er) { 193 console.error(er); 194 } finally { 195 return; 196 } 197 }); 198 }); 199 }, 200 getFnName: functionName, 201 addToJquery: function addToJquery() { 202 // TODO: consider not making this a jQuery function 203 // TODO: need way to reflow vs. re-initialize 204 /** 205 * The Foundation jQuery method. 206 * @param {String|Array} method - An action to perform on the current jQuery object. 207 */ 208 var foundation = function foundation(method) { 209 var type = _typeof(method), 210 $noJS = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.no-js'); 211 if ($noJS.length) { 212 $noJS.removeClass('no-js'); 213 } 214 if (type === 'undefined') { 215 //needs to initialize the Foundation object, or an individual plugin. 216 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__.MediaQuery._init(); 217 Foundation.reflow(this); 218 } else if (type === 'string') { 219 //an individual method to invoke on a plugin or group of plugins 220 var args = Array.prototype.slice.call(arguments, 1); //collect all the arguments, if necessary 221 var plugClass = this.data('zfPlugin'); //determine the class of plugin 222 223 if (typeof plugClass !== 'undefined' && typeof plugClass[method] !== 'undefined') { 224 //make sure both the class and method exist 225 if (this.length === 1) { 226 //if there's only one, call it directly. 227 plugClass[method].apply(plugClass, args); 228 } else { 229 this.each(function (i, el) { 230 //otherwise loop through the jQuery collection and invoke the method on each 231 plugClass[method].apply(jquery__WEBPACK_IMPORTED_MODULE_0___default()(el).data('zfPlugin'), args); 232 }); 233 } 234 } else { 235 //error for no class or no method 236 throw new ReferenceError("We're sorry, '" + method + "' is not an available method for " + (plugClass ? functionName(plugClass) : 'this element') + '.'); 237 } 238 } else { 239 //error for invalid argument type 240 throw new TypeError("We're sorry, ".concat(type, " is not a valid parameter. You must use a string representing the method you wish to invoke.")); 241 } 242 return this; 243 }; 244 (jquery__WEBPACK_IMPORTED_MODULE_0___default().fn).foundation = foundation; 245 return (jquery__WEBPACK_IMPORTED_MODULE_0___default()); 246 } 247}; 248Foundation.util = { 249 /** 250 * Function for applying a debounce effect to a function call. 251 * @function 252 * @param {Function} func - Function to be called at end of timeout. 253 * @param {Number} delay - Time in ms to delay the call of `func`. 254 * @returns function 255 */ 256 throttle: function throttle(func, delay) { 257 var timer = null; 258 return function () { 259 var context = this, 260 args = arguments; 261 if (timer === null) { 262 timer = setTimeout(function () { 263 func.apply(context, args); 264 timer = null; 265 }, delay); 266 } 267 }; 268 } 269}; 270window.Foundation = Foundation; 271 272// Polyfill for requestAnimationFrame 273(function () { 274 if (!Date.now || !window.Date.now) window.Date.now = Date.now = function () { 275 return new Date().getTime(); 276 }; 277 var vendors = ['webkit', 'moz']; 278 for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) { 279 var vp = vendors[i]; 280 window.requestAnimationFrame = window[vp + 'RequestAnimationFrame']; 281 window.cancelAnimationFrame = window[vp + 'CancelAnimationFrame'] || window[vp + 'CancelRequestAnimationFrame']; 282 } 283 if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) || !window.requestAnimationFrame || !window.cancelAnimationFrame) { 284 var lastTime = 0; 285 window.requestAnimationFrame = function (callback) { 286 var now = Date.now(); 287 var nextTime = Math.max(lastTime + 16, now); 288 return setTimeout(function () { 289 callback(lastTime = nextTime); 290 }, nextTime - now); 291 }; 292 window.cancelAnimationFrame = clearTimeout; 293 } 294 /** 295 * Polyfill for performance.now, required by rAF 296 */ 297 if (!window.performance || !window.performance.now) { 298 window.performance = { 299 start: Date.now(), 300 now: function now() { 301 return Date.now() - this.start; 302 } 303 }; 304 } 305})(); 306if (!Function.prototype.bind) { 307 /* eslint-disable no-extend-native */ 308 Function.prototype.bind = function (oThis) { 309 if (typeof this !== 'function') { 310 // closest thing possible to the ECMAScript 5 311 // internal IsCallable function 312 throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); 313 } 314 var aArgs = Array.prototype.slice.call(arguments, 1), 315 fToBind = this, 316 fNOP = function fNOP() {}, 317 fBound = function fBound() { 318 return fToBind.apply(this instanceof fNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); 319 }; 320 if (this.prototype) { 321 // native functions don't have a prototype 322 fNOP.prototype = this.prototype; 323 } 324 fBound.prototype = new fNOP(); 325 return fBound; 326 }; 327} 328// Polyfill to get the name of a function in IE9 329function functionName(fn) { 330 if (typeof Function.prototype.name === 'undefined') { 331 var funcNameRegex = /function\s([^(]{1,})\(/; 332 var results = funcNameRegex.exec(fn.toString()); 333 return results && results.length > 1 ? results[1].trim() : ""; 334 } else if (typeof fn.prototype === 'undefined') { 335 return fn.constructor.name; 336 } else { 337 return fn.prototype.constructor.name; 338 } 339} 340function parseValue(str) { 341 if ('true' === str) return true;else if ('false' === str) return false;else if (!isNaN(str * 1)) return parseFloat(str); 342 return str; 343} 344// Convert PascalCase to kebab-case 345// Thank you: http://stackoverflow.com/a/8955580 346function hyphenate(str) { 347 return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); 348} 349 350 351/***/ }), 352 353/***/ "./js/foundation.core.plugin.js": 354/*!**************************************!*\ 355 !*** ./js/foundation.core.plugin.js ***! 356 \**************************************/ 357/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 358 359__webpack_require__.r(__webpack_exports__); 360/* harmony export */ __webpack_require__.d(__webpack_exports__, { 361/* harmony export */ Plugin: function() { return /* binding */ Plugin; } 362/* harmony export */ }); 363/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core.utils */ "./js/foundation.core.utils.js"); 364function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 365function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } 366function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } 367function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } 368function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 369function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 370 371 372// Abstract class for providing lifecycle hooks. Expect plugins to define AT LEAST 373// {function} _setup (replaces previous constructor), 374// {function} _destroy (replaces previous destroy) 375var Plugin = /*#__PURE__*/function () { 376 function Plugin(element, options) { 377 _classCallCheck(this, Plugin); 378 this._setup(element, options); 379 var pluginName = getPluginName(this); 380 this.uuid = (0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_0__.GetYoDigits)(6, pluginName); 381 if (!this.$element.attr("data-".concat(pluginName))) { 382 this.$element.attr("data-".concat(pluginName), this.uuid); 383 } 384 if (!this.$element.data('zfPlugin')) { 385 this.$element.data('zfPlugin', this); 386 } 387 /** 388 * Fires when the plugin has initialized. 389 * @event Plugin#init 390 */ 391 this.$element.trigger("init.zf.".concat(pluginName)); 392 } 393 return _createClass(Plugin, [{ 394 key: "destroy", 395 value: function destroy() { 396 this._destroy(); 397 var pluginName = getPluginName(this); 398 this.$element.removeAttr("data-".concat(pluginName)).removeData('zfPlugin') 399 /** 400 * Fires when the plugin has been destroyed. 401 * @event Plugin#destroyed 402 */.trigger("destroyed.zf.".concat(pluginName)); 403 for (var prop in this) { 404 if (this.hasOwnProperty(prop)) { 405 this[prop] = null; //clean up script to prep for garbage collection. 406 } 407 } 408 } 409 }]); 410}(); // Convert PascalCase to kebab-case 411// Thank you: http://stackoverflow.com/a/8955580 412function hyphenate(str) { 413 return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); 414} 415function getPluginName(obj) { 416 return hyphenate(obj.className); 417} 418 419 420/***/ }), 421 422/***/ "./js/foundation.core.utils.js": 423/*!*************************************!*\ 424 !*** ./js/foundation.core.utils.js ***! 425 \*************************************/ 426/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 427 428__webpack_require__.r(__webpack_exports__); 429/* harmony export */ __webpack_require__.d(__webpack_exports__, { 430/* harmony export */ GetYoDigits: function() { return /* binding */ GetYoDigits; }, 431/* harmony export */ RegExpEscape: function() { return /* binding */ RegExpEscape; }, 432/* harmony export */ ignoreMousedisappear: function() { return /* binding */ ignoreMousedisappear; }, 433/* harmony export */ onLoad: function() { return /* binding */ onLoad; }, 434/* harmony export */ rtl: function() { return /* binding */ rtl; }, 435/* harmony export */ transitionend: function() { return /* binding */ transitionend; } 436/* harmony export */ }); 437/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 438/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 439 440 441// Core Foundation Utilities, utilized in a number of places. 442 443/** 444 * Returns a boolean for RTL support 445 */ 446function rtl() { 447 return jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').attr('dir') === 'rtl'; 448} 449 450/** 451 * returns a random base-36 uid with namespacing 452 * @function 453 * @param {Number} length - number of random base-36 digits desired. Increase for more random strings. 454 * @param {String} namespace - name of plugin to be incorporated in uid, optional. 455 * @default {String} '' - if no plugin name is provided, nothing is appended to the uid. 456 * @returns {String} - unique id 457 */ 458function GetYoDigits() { 459 var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 6; 460 var namespace = arguments.length > 1 ? arguments[1] : undefined; 461 var str = ''; 462 var chars = '0123456789abcdefghijklmnopqrstuvwxyz'; 463 var charsLength = chars.length; 464 for (var i = 0; i < length; i++) { 465 str += chars[Math.floor(Math.random() * charsLength)]; 466 } 467 return namespace ? "".concat(str, "-").concat(namespace) : str; 468} 469 470/** 471 * Escape a string so it can be used as a regexp pattern 472 * @function 473 * @see https://stackoverflow.com/a/9310752/4317384 474 * 475 * @param {String} str - string to escape. 476 * @returns {String} - escaped string 477 */ 478function RegExpEscape(str) { 479 return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); 480} 481function transitionend($elem) { 482 var transitions = { 483 'transition': 'transitionend', 484 'WebkitTransition': 'webkitTransitionEnd', 485 'MozTransition': 'transitionend', 486 'OTransition': 'otransitionend' 487 }; 488 var elem = document.createElement('div'), 489 end; 490 for (var transition in transitions) { 491 if (typeof elem.style[transition] !== 'undefined') { 492 end = transitions[transition]; 493 } 494 } 495 if (end) { 496 return end; 497 } else { 498 setTimeout(function () { 499 $elem.triggerHandler('transitionend', [$elem]); 500 }, 1); 501 return 'transitionend'; 502 } 503} 504 505/** 506 * Return an event type to listen for window load. 507 * 508 * If `$elem` is passed, an event will be triggered on `$elem`. If window is already loaded, the event will still be triggered. 509 * If `handler` is passed, attach it to the event on `$elem`. 510 * Calling `onLoad` without handler allows you to get the event type that will be triggered before attaching the handler by yourself. 511 * @function 512 * 513 * @param {Object} [] $elem - jQuery element on which the event will be triggered if passed. 514 * @param {Function} [] handler - function to attach to the event. 515 * @returns {String} - event type that should or will be triggered. 516 */ 517function onLoad($elem, handler) { 518 var didLoad = document.readyState === 'complete'; 519 var eventType = (didLoad ? '_didLoad' : 'load') + '.zf.util.onLoad'; 520 var cb = function cb() { 521 return $elem.triggerHandler(eventType); 522 }; 523 if ($elem) { 524 if (handler) $elem.one(eventType, handler); 525 if (didLoad) setTimeout(cb);else jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).one('load', cb); 526 } 527 return eventType; 528} 529 530/** 531 * Retuns an handler for the `mouseleave` that ignore disappeared mouses. 532 * 533 * If the mouse "disappeared" from the document (like when going on a browser UI element, See https://git.io/zf-11410), 534 * the event is ignored. 535 * - If the `ignoreLeaveWindow` is `true`, the event is ignored when the user actually left the window 536 * (like by switching to an other window with [Alt]+[Tab]). 537 * - If the `ignoreReappear` is `true`, the event will be ignored when the mouse will reappear later on the document 538 * outside of the element it left. 539 * 540 * @function 541 * 542 * @param {Function} [] handler - handler for the filtered `mouseleave` event to watch. 543 * @param {Object} [] options - object of options: 544 * - {Boolean} [false] ignoreLeaveWindow - also ignore when the user switched windows. 545 * - {Boolean} [false] ignoreReappear - also ignore when the mouse reappeared outside of the element it left. 546 * @returns {Function} - filtered handler to use to listen on the `mouseleave` event. 547 */ 548function ignoreMousedisappear(handler) { 549 var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, 550 _ref$ignoreLeaveWindo = _ref.ignoreLeaveWindow, 551 ignoreLeaveWindow = _ref$ignoreLeaveWindo === void 0 ? false : _ref$ignoreLeaveWindo, 552 _ref$ignoreReappear = _ref.ignoreReappear, 553 ignoreReappear = _ref$ignoreReappear === void 0 ? false : _ref$ignoreReappear; 554 return function leaveEventHandler(eLeave) { 555 for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 556 rest[_key - 1] = arguments[_key]; 557 } 558 var callback = handler.bind.apply(handler, [this, eLeave].concat(rest)); 559 560 // The mouse left: call the given callback if the mouse entered elsewhere 561 if (eLeave.relatedTarget !== null) { 562 return callback(); 563 } 564 565 // Otherwise, check if the mouse actually left the window. 566 // In firefox if the user switched between windows, the window sill have the focus by the time 567 // the event is triggered. We have to debounce the event to test this case. 568 setTimeout(function leaveEventDebouncer() { 569 if (!ignoreLeaveWindow && document.hasFocus && !document.hasFocus()) { 570 return callback(); 571 } 572 573 // Otherwise, wait for the mouse to reeapear outside of the element, 574 if (!ignoreReappear) { 575 jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).one('mouseenter', function reenterEventHandler(eReenter) { 576 if (!jquery__WEBPACK_IMPORTED_MODULE_0___default()(eLeave.currentTarget).has(eReenter.target).length) { 577 // Fill where the mouse finally entered. 578 eLeave.relatedTarget = eReenter.target; 579 callback(); 580 } 581 }); 582 } 583 }, 0); 584 }; 585} 586 587 588/***/ }), 589
vendor: 12,751 bytes, lines 590-906
590/***/ "./js/foundation.util.mediaQuery.js": 591/*!******************************************!*\ 592 !*** ./js/foundation.util.mediaQuery.js ***! 593 \******************************************/ 594/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 595 596__webpack_require__.r(__webpack_exports__); 597/* harmony export */ __webpack_require__.d(__webpack_exports__, { 598/* harmony export */ MediaQuery: function() { return /* binding */ MediaQuery; } 599/* harmony export */ }); 600/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 601/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 602function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 603function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } 604function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 605function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } 606function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } 607function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } 608function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } 609 610 611// Default set of media queries 612// const defaultQueries = { 613// 'default' : 'only screen', 614// landscape : 'only screen and (orientation: landscape)', 615// portrait : 'only screen and (orientation: portrait)', 616// retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' + 617// 'only screen and (min--moz-device-pixel-ratio: 2),' + 618// 'only screen and (-o-min-device-pixel-ratio: 2/1),' + 619// 'only screen and (min-device-pixel-ratio: 2),' + 620// 'only screen and (min-resolution: 192dpi),' + 621// 'only screen and (min-resolution: 2dppx)' 622// }; 623 624// matchMedia() polyfill - Test a CSS media type/query in JS. 625// Authors & copyright © 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. MIT license 626/* eslint-disable */ 627window.matchMedia || (window.matchMedia = function () { 628 "use strict"; 629 630 // For browsers that support matchMedium api such as IE 9 and webkit 631 var styleMedia = window.styleMedia || window.media; 632 633 // For those that don't support matchMedium 634 if (!styleMedia) { 635 var style = document.createElement('style'), 636 script = document.getElementsByTagName('script')[0], 637 info = null; 638 style.type = 'text/css'; 639 style.id = 'matchmediajs-test'; 640 if (!script) { 641 document.head.appendChild(style); 642 } else { 643 script.parentNode.insertBefore(style, script); 644 } 645 646 // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers 647 info = 'getComputedStyle' in window && window.getComputedStyle(style, null) || style.currentStyle; 648 styleMedia = { 649 matchMedium: function matchMedium(media) { 650 var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }'; 651 652 // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers 653 if (style.styleSheet) { 654 style.styleSheet.cssText = text; 655 } else { 656 style.textContent = text; 657 } 658 659 // Test if media query is true or false 660 return info.width === '1px'; 661 } 662 }; 663 } 664 return function (media) { 665 return { 666 matches: styleMedia.matchMedium(media || 'all'), 667 media: media || 'all' 668 }; 669 }; 670}()); 671/* eslint-enable */ 672 673var MediaQuery = { 674 queries: [], 675 current: '', 676 /** 677 * Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher. 678 * @function 679 * @private 680 */ 681 _init: function _init() { 682 // make sure the initialization is only done once when calling _init() several times 683 if (this.isInitialized === true) { 684 return this; 685 } else { 686 this.isInitialized = true; 687 } 688 var self = this; 689 var $meta = jquery__WEBPACK_IMPORTED_MODULE_0___default()('meta.foundation-mq'); 690 if (!$meta.length) { 691 jquery__WEBPACK_IMPORTED_MODULE_0___default()('<meta class="foundation-mq" name="foundation-mq" content>').appendTo(document.head); 692 } 693 var extractedStyles = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.foundation-mq').css('font-family'); 694 var namedQueries; 695 namedQueries = parseStyleToObject(extractedStyles); 696 self.queries = []; // reset 697 698 for (var key in namedQueries) { 699 if (namedQueries.hasOwnProperty(key)) { 700 self.queries.push({ 701 name: key, 702 value: "only screen and (min-width: ".concat(namedQueries[key], ")") 703 }); 704 } 705 } 706 this.current = this._getCurrentSize(); 707 this._watcher(); 708 }, 709 /** 710 * Reinitializes the media query helper. 711 * Useful if your CSS breakpoint configuration has just been loaded or has changed since the initialization. 712 * @function 713 * @private 714 */ 715 _reInit: function _reInit() { 716 this.isInitialized = false; 717 this._init(); 718 }, 719 /** 720 * Checks if the screen is at least as wide as a breakpoint. 721 * @function 722 * @param {String} size - Name of the breakpoint to check. 723 * @returns {Boolean} `true` if the breakpoint matches, `false` if it's smaller. 724 */ 725 atLeast: function atLeast(size) { 726 var query = this.get(size); 727 if (query) { 728 return window.matchMedia(query).matches; 729 } 730 return false; 731 }, 732 /** 733 * Checks if the screen is within the given breakpoint. 734 * If smaller than the breakpoint of larger than its upper limit it returns false. 735 * @function 736 * @param {String} size - Name of the breakpoint to check. 737 * @returns {Boolean} `true` if the breakpoint matches, `false` otherwise. 738 */ 739 only: function only(size) { 740 return size === this._getCurrentSize(); 741 }, 742 /** 743 * Checks if the screen is within a breakpoint or smaller. 744 * @function 745 * @param {String} size - Name of the breakpoint to check. 746 * @returns {Boolean} `true` if the breakpoint matches, `false` if it's larger. 747 */ 748 upTo: function upTo(size) { 749 var nextSize = this.next(size); 750 751 // If the next breakpoint does not match, the screen is smaller than 752 // the upper limit of this breakpoint. 753 if (nextSize) { 754 return !this.atLeast(nextSize); 755 } 756 757 // If there is no next breakpoint, the "size" breakpoint does not have 758 // an upper limit and the screen will always be within it or smaller. 759 return true; 760 }, 761 /** 762 * Checks if the screen matches to a breakpoint. 763 * @function 764 * @param {String} size - Name of the breakpoint to check, either 'small only' or 'small'. Omitting 'only' falls back to using atLeast() method. 765 * @returns {Boolean} `true` if the breakpoint matches, `false` if it does not. 766 */ 767 is: function is(size) { 768 var parts = size.trim().split(' ').filter(function (p) { 769 return !!p.length; 770 }); 771 var _parts = _slicedToArray(parts, 2), 772 bpSize = _parts[0], 773 _parts$ = _parts[1], 774 bpModifier = _parts$ === void 0 ? '' : _parts$; 775 776 // Only the breakpont 777 if (bpModifier === 'only') { 778 return this.only(bpSize); 779 } 780 // At least the breakpoint (included) 781 if (!bpModifier || bpModifier === 'up') { 782 return this.atLeast(bpSize); 783 } 784 // Up to the breakpoint (included) 785 if (bpModifier === 'down') { 786 return this.upTo(bpSize); 787 } 788 throw new Error("\n Invalid breakpoint passed to MediaQuery.is().\n Expected a breakpoint name formatted like \"<size> <modifier>\", got \"".concat(size, "\".\n ")); 789 }, 790 /** 791 * Gets the media query of a breakpoint. 792 * @function 793 * @param {String} size - Name of the breakpoint to get. 794 * @returns {String|null} - The media query of the breakpoint, or `null` if the breakpoint doesn't exist. 795 */ 796 get: function get(size) { 797 for (var i in this.queries) { 798 if (this.queries.hasOwnProperty(i)) { 799 var query = this.queries[i]; 800 if (size === query.name) return query.value; 801 } 802 } 803 return null; 804 }, 805 /** 806 * Get the breakpoint following the given breakpoint. 807 * @function 808 * @param {String} size - Name of the breakpoint. 809 * @returns {String|null} - The name of the following breakpoint, or `null` if the passed breakpoint was the last one. 810 */ 811 next: function next(size) { 812 var _this = this; 813 var queryIndex = this.queries.findIndex(function (q) { 814 return _this._getQueryName(q) === size; 815 }); 816 if (queryIndex === -1) { 817 throw new Error("\n Unknown breakpoint \"".concat(size, "\" passed to MediaQuery.next().\n Ensure it is present in your Sass \"$breakpoints\" setting.\n ")); 818 } 819 var nextQuery = this.queries[queryIndex + 1]; 820 return nextQuery ? nextQuery.name : null; 821 }, 822 /** 823 * Returns the name of the breakpoint related to the given value. 824 * @function 825 * @private 826 * @param {String|Object} value - Breakpoint name or query object. 827 * @returns {String} Name of the breakpoint. 828 */ 829 _getQueryName: function _getQueryName(value) { 830 if (typeof value === 'string') return value; 831 if (_typeof(value) === 'object') return value.name; 832 throw new TypeError("\n Invalid value passed to MediaQuery._getQueryName().\n Expected a breakpoint name (String) or a breakpoint query (Object), got \"".concat(value, "\" (").concat(_typeof(value), ")\n ")); 833 }, 834 /** 835 * Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one). 836 * @function 837 * @private 838 * @returns {String} Name of the current breakpoint. 839 */ 840 _getCurrentSize: function _getCurrentSize() { 841 var matched; 842 for (var i = 0; i < this.queries.length; i++) { 843 var query = this.queries[i]; 844 if (window.matchMedia(query.value).matches) { 845 matched = query; 846 } 847 } 848 return matched && this._getQueryName(matched); 849 }, 850 /** 851 * Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes. 852 * @function 853 * @private 854 */ 855 _watcher: function _watcher() { 856 var _this2 = this; 857 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('resize.zf.trigger', function () { 858 var newSize = _this2._getCurrentSize(), 859 currentSize = _this2.current; 860 if (newSize !== currentSize) { 861 // Change the current media query 862 _this2.current = newSize; 863 864 // Broadcast the media query change on the window 865 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).trigger('changed.zf.mediaquery', [newSize, currentSize]); 866 } 867 }); 868 } 869}; 870 871// Thank you: https://github.com/sindresorhus/query-string 872function parseStyleToObject(str) { 873 var styleObject = {}; 874 if (typeof str !== 'string') { 875 return styleObject; 876 } 877 str = str.trim().slice(1, -1); // browsers re-quote string style values 878 879 if (!str) { 880 return styleObject; 881 } 882 styleObject = str.split('&').reduce(function (ret, param) { 883 var parts = param.replace(/\+/g, ' ').split('='); 884 var key = parts[0]; 885 var val = parts[1]; 886 key = decodeURIComponent(key); 887 888 // missing `=` should be `null`: 889 // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters 890 val = typeof val === 'undefined' ? null : decodeURIComponent(val); 891 if (!ret.hasOwnProperty(key)) { 892 ret[key] = val; 893 } else if (Array.isArray(ret[key])) { 894 ret[key].push(val); 895 } else { 896 ret[key] = [ret[key], val]; 897 } 898 return ret; 899 }, {}); 900 return styleObject; 901} 902 903 904/***/ }), 905 906/***/ "
906jquery": 907/*!********************************************************************************************!*\ 908 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 909 \********************************************************************************************/ 910/***/ (function(module) { 911 912module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 913 914/***/ }) 915 916/******/ }); 917/************************************************************************/ 918/******/ // The module cache 919/******/ var __webpack_module_cache__ = {}; 920/******/ 921/******/ // The require function 922/******/ function __webpack_require__(moduleId) { 923/******/ // Check if module is in cache 924/******/ var cachedModule = __webpack_module_cache__[moduleId]; 925/******/ if (cachedModule !== undefined) { 926/******/ return cachedModule.exports; 927/******/ } 928/******/ // Create a new module (and put it into the cache) 929/******/ var module = __webpack_module_cache__[moduleId] = { 930/******/ // no module.id needed 931/******/ // no module.loaded needed 932/******/ exports: {} 933/******/ }; 934/******/ 935/******/ // Execute the module function 936/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 937/******/ 938/******/ // Return the exports of the module 939/******/ return module.exports; 940/******/ } 941/******/ 942/************************************************************************/ 943/******/ /* webpack/runtime/compat get default export */ 944/******/ !function() { 945/******/ // getDefaultExport function for compatibility with non-harmony modules 946/******/ __webpack_require__.n = function(module) {
vendor: 5,552 bytes, lines 947-1041
947/******/ var getter = module && module.__esModule ? 948/******/ function() { return module['default']; } : 949/******/ function() { return module; }; 950/******/ __webpack_require__.d(getter, { a: getter }); 951/******/ return getter; 952/******/ }; 953/******/ }(); 954/******/ 955/******/ /* webpack/runtime/define property getters */ 956/******/ !function() { 957/******/ // define getter functions for harmony exports 958/******/ __webpack_require__.d = function(exports, definition) { 959/******/ for(var key in definition) { 960/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 961/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 962/******/ } 963/******/ } 964/******/ }; 965/******/ }(); 966/******/ 967/******/ /* webpack/runtime/hasOwnProperty shorthand */ 968/******/ !function() { 969/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 970/******/ }(); 971/******/ 972/******/ /* webpack/runtime/make namespace object */ 973/******/ !function() { 974/******/ // define __esModule on exports 975/******/ __webpack_require__.r = function(exports) { 976/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 977/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 978/******/ } 979/******/ Object.defineProperty(exports, '__esModule', { value: true }); 980/******/ }; 981/******/ }(); 982/******/ 983/************************************************************************/ 984var __webpack_exports__ = {}; 985// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 986!function() { 987/*!***********************************************!*\ 988 !*** ./js/entries/plugins/foundation.core.js ***! 989 \***********************************************/ 990__webpack_require__.r(__webpack_exports__); 991/* harmony export */ __webpack_require__.d(__webpack_exports__, { 992/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation; }, 993/* harmony export */ GetYoDigits: function() { return /* reexport safe */ _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.GetYoDigits; }, 994/* harmony export */ Plugin: function() { return /* reexport safe */ _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__.Plugin; }, 995/* harmony export */ RegExpEscape: function() { return /* reexport safe */ _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.RegExpEscape; }, 996/* harmony export */ ignoreMousedisappear: function() { return /* reexport safe */ _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.ignoreMousedisappear; }, 997/* harmony export */ onLoad: function() { return /* reexport safe */ _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.onLoad; }, 998/* harmony export */ rtl: function() { return /* reexport safe */ _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.rtl; }, 999/* harmony export */ transitionend: function() { return /* reexport safe */ _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.transitionend; } 1000/* harmony export */ }); 1001/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 1002/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 1003/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.core */ "./js/foundation.core.js"); 1004/* harmony import */ var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../foundation.core.plugin */ "./js/foundation.core.plugin.js"); 1005/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../foundation.core.utils */ "./js/foundation.core.utils.js"); 1006// --- Foundation Core API --- 1007// Initialize Foundation and add some utilities to its public API for backward compatibility. 1008// Please note that every utility do not have to be added to the core API. 1009 1010 1011 1012 1013_foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation.addToJquery((jquery__WEBPACK_IMPORTED_MODULE_0___default())); 1014 1015// Every plugin depends on plugin now, we can include that on the core for the 1016// script inclusion path. 1017_foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation.Plugin = _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__.Plugin; 1018 1019// These are now separated out, but historically were a part of this module, 1020// and since this is here for backwards compatibility we include them in 1021// this entry. 1022_foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation.rtl = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.rtl; 1023_foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation.GetYoDigits = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.GetYoDigits; 1024_foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation.transitionend = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.transitionend; 1025_foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation.RegExpEscape = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.RegExpEscape; 1026_foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation.onLoad = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.onLoad; 1027window.Foundation = _foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation; 1028 1029// --- Foundation Core exports --- 1030// Export "Plugin" and all core utilities, since the `foundation.core` entry plays the role of 1031// all core source files. 1032 1033 1034 1035 1036}(); 1037/******/ return __webpack_exports__; 1038/******/ })() 1039; 1040}); 1041
vendor: 12,338 bytes, lines 1042-1338
1042(function webpackUniversalModuleDefinition(root, factory) { 1043 if(typeof exports === 'object' && typeof module === 'object') 1044 module.exports = factory(require("./foundation.core")); 1045 else if(typeof define === 'function' && define.amd) 1046 define(["./foundation.core"], factory); 1047 else if(typeof exports === 'object') 1048 exports["__FOUNDATION_EXTERNAL__"] = factory(require("./foundation.core")); 1049 else 1050 root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.box"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"]); 1051})(self, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__) { 1052return /******/ (function() { // webpackBootstrap 1053/******/ "use strict"; 1054/******/ var __webpack_modules__ = ({ 1055 1056/***/ "./js/foundation.util.box.js": 1057/*!***********************************!*\ 1058 !*** ./js/foundation.util.box.js ***! 1059 \***********************************/ 1060/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 1061 1062__webpack_require__.r(__webpack_exports__); 1063/* harmony export */ __webpack_require__.d(__webpack_exports__, { 1064/* harmony export */ Box: function() { return /* binding */ Box; } 1065/* harmony export */ }); 1066var Box = { 1067 ImNotTouchingYou: ImNotTouchingYou, 1068 OverlapArea: OverlapArea, 1069 GetDimensions: GetDimensions, 1070 GetExplicitOffsets: GetExplicitOffsets 1071}; 1072 1073/** 1074 * Compares the dimensions of an element to a container and determines collision events with container. 1075 * @function 1076 * @param {jQuery} element - jQuery object to test for collisions. 1077 * @param {jQuery} parent - jQuery object to use as bounding container. 1078 * @param {Boolean} lrOnly - set to true to check left and right values only. 1079 * @param {Boolean} tbOnly - set to true to check top and bottom values only. 1080 * @default if no parent object passed, detects collisions with `window`. 1081 * @returns {Boolean} - true if collision free, false if a collision in any direction. 1082 */ 1083function ImNotTouchingYou(element, parent, lrOnly, tbOnly, ignoreBottom) { 1084 return OverlapArea(element, parent, lrOnly, tbOnly, ignoreBottom) === 0; 1085} 1086function OverlapArea(element, parent, lrOnly, tbOnly, ignoreBottom) { 1087 var eleDims = GetDimensions(element), 1088 topOver, 1089 bottomOver, 1090 leftOver, 1091 rightOver; 1092 if (parent) { 1093 var parDims = GetDimensions(parent); 1094 bottomOver = parDims.height + parDims.offset.top - (eleDims.offset.top + eleDims.height); 1095 topOver = eleDims.offset.top - parDims.offset.top; 1096 leftOver = eleDims.offset.left - parDims.offset.left; 1097 rightOver = parDims.width + parDims.offset.left - (eleDims.offset.left + eleDims.width); 1098 } else { 1099 bottomOver = eleDims.windowDims.height + eleDims.windowDims.offset.top - (eleDims.offset.top + eleDims.height); 1100 topOver = eleDims.offset.top - eleDims.windowDims.offset.top; 1101 leftOver = eleDims.offset.left - eleDims.windowDims.offset.left; 1102 rightOver = eleDims.windowDims.width - (eleDims.offset.left + eleDims.width); 1103 } 1104 bottomOver = ignoreBottom ? 0 : Math.min(bottomOver, 0); 1105 topOver = Math.min(topOver, 0); 1106 leftOver = Math.min(leftOver, 0); 1107 rightOver = Math.min(rightOver, 0); 1108 if (lrOnly) { 1109 return leftOver + rightOver; 1110 } 1111 if (tbOnly) { 1112 return topOver + bottomOver; 1113 } 1114 1115 // use sum of squares b/c we care about overlap area. 1116 return Math.sqrt(topOver * topOver + bottomOver * bottomOver + leftOver * leftOver + rightOver * rightOver); 1117} 1118 1119/** 1120 * Uses native methods to return an object of dimension values. 1121 * @function 1122 * @param {jQuery || HTML} element - jQuery object or DOM element for which to get the dimensions. Can be any element other that document or window. 1123 * @returns {Object} - nested object of integer pixel values 1124 * TODO - if element is window, return only those values. 1125 */ 1126function GetDimensions(elem) { 1127 elem = elem.length ? elem[0] : elem; 1128 if (elem === window || elem === document) { 1129 throw new Error("I'm sorry, Dave. I'm afraid I can't do that."); 1130 } 1131 var rect = elem.getBoundingClientRect(), 1132 parRect = elem.parentNode.getBoundingClientRect(), 1133 winRect = document.body.getBoundingClientRect(), 1134 winY = window.pageYOffset, 1135 winX = window.pageXOffset; 1136 return { 1137 width: rect.width, 1138 height: rect.height, 1139 offset: { 1140 top: rect.top + winY, 1141 left: rect.left + winX 1142 }, 1143 parentDims: { 1144 width: parRect.width, 1145 height: parRect.height, 1146 offset: { 1147 top: parRect.top + winY, 1148 left: parRect.left + winX 1149 } 1150 }, 1151 windowDims: { 1152 width: winRect.width, 1153 height: winRect.height, 1154 offset: { 1155 top: winY, 1156 left: winX 1157 } 1158 } 1159 }; 1160} 1161 1162/** 1163 * Returns an object of top and left integer pixel values for dynamically rendered elements, 1164 * such as: Tooltip, Reveal, and Dropdown. Maintained for backwards compatibility, and where 1165 * you don't know alignment, but generally from 1166 * 6.4 forward you should use GetExplicitOffsets, as GetOffsets conflates position and alignment. 1167 * @function 1168 * @param {jQuery} element - jQuery object for the element being positioned. 1169 * @param {jQuery} anchor - jQuery object for the element's anchor point. 1170 * @param {String} position - a string relating to the desired position of the element, relative to it's anchor 1171 * @param {Number} vOffset - integer pixel value of desired vertical separation between anchor and element. 1172 * @param {Number} hOffset - integer pixel value of desired horizontal separation between anchor and element. 1173 * @param {Boolean} isOverflow - if a collision event is detected, sets to true to default the element to full width - any desired offset. 1174 * TODO alter/rewrite to work with `em` values as well/instead of pixels 1175 */ 1176function GetExplicitOffsets(element, anchor, position, alignment, vOffset, hOffset, isOverflow) { 1177 var $eleDims = GetDimensions(element), 1178 $anchorDims = anchor ? GetDimensions(anchor) : null; 1179 var topVal, leftVal; 1180 if ($anchorDims !== null) { 1181 // set position related attribute 1182 switch (position) { 1183 case 'top': 1184 topVal = $anchorDims.offset.top - ($eleDims.height + vOffset); 1185 break; 1186 case 'bottom': 1187 topVal = $anchorDims.offset.top + $anchorDims.height + vOffset; 1188 break; 1189 case 'left': 1190 leftVal = $anchorDims.offset.left - ($eleDims.width + hOffset); 1191 break; 1192 case 'right': 1193 leftVal = $anchorDims.offset.left + $anchorDims.width + hOffset; 1194 break; 1195 } 1196 1197 // set alignment related attribute 1198 switch (position) { 1199 case 'top': 1200 case 'bottom': 1201 switch (alignment) { 1202 case 'left': 1203 leftVal = $anchorDims.offset.left + hOffset; 1204 break; 1205 case 'right': 1206 leftVal = $anchorDims.offset.left - $eleDims.width + $anchorDims.width - hOffset; 1207 break; 1208 case 'center': 1209 leftVal = isOverflow ? hOffset : $anchorDims.offset.left + $anchorDims.width / 2 - $eleDims.width / 2 + hOffset; 1210 break; 1211 } 1212 break; 1213 case 'right': 1214 case 'left': 1215 switch (alignment) { 1216 case 'bottom': 1217 topVal = $anchorDims.offset.top - vOffset + $anchorDims.height - $eleDims.height; 1218 break; 1219 case 'top': 1220 topVal = $anchorDims.offset.top + vOffset; 1221 break; 1222 case 'center': 1223 topVal = $anchorDims.offset.top + vOffset + $anchorDims.height / 2 - $eleDims.height / 2; 1224 break; 1225 } 1226 break; 1227 } 1228 } 1229 return { 1230 top: topVal, 1231 left: leftVal 1232 }; 1233} 1234 1235 1236/***/ }), 1237 1238/***/ "./foundation.core": 1239/*!****************************************************************************************************************************************************************!*\ 1240 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 1241 \****************************************************************************************************************************************************************/ 1242/***/ (function(module) { 1243 1244module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 1245 1246/***/ }) 1247 1248/******/ }); 1249/************************************************************************/ 1250/******/ // The module cache 1251/******/ var __webpack_module_cache__ = {}; 1252/******/ 1253/******/ // The require function 1254/******/ function __webpack_require__(moduleId) { 1255/******/ // Check if module is in cache 1256/******/ var cachedModule = __webpack_module_cache__[moduleId]; 1257/******/ if (cachedModule !== undefined) { 1258/******/ return cachedModule.exports; 1259/******/ } 1260/******/ // Create a new module (and put it into the cache) 1261/******/ var module = __webpack_module_cache__[moduleId] = { 1262/******/ // no module.id needed 1263/******/ // no module.loaded needed 1264/******/ exports: {} 1265/******/ }; 1266/******/ 1267/******/ // Execute the module function 1268/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 1269/******/ 1270/******/ // Return the exports of the module 1271/******/ return module.exports; 1272/******/ } 1273/******/ 1274/************************************************************************/ 1275/******/ /* webpack/runtime/compat get default export */ 1276/******/ !function() { 1277/******/ // getDefaultExport function for compatibility with non-harmony modules 1278/******/ __webpack_require__.n = function(module) { 1279/******/ var getter = module && module.__esModule ? 1280/******/ function() { return module['default']; } : 1281/******/ function() { return module; }; 1282/******/ __webpack_require__.d(getter, { a: getter }); 1283/******/ return getter; 1284/******/ }; 1285/******/ }(); 1286/******/ 1287/******/ /* webpack/runtime/define property getters */ 1288/******/ !function() { 1289/******/ // define getter functions for harmony exports 1290/******/ __webpack_require__.d = function(exports, definition) { 1291/******/ for(var key in definition) { 1292/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 1293/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 1294/******/ } 1295/******/ } 1296/******/ }; 1297/******/ }(); 1298/******/ 1299/******/ /* webpack/runtime/hasOwnProperty shorthand */ 1300/******/ !function() { 1301/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 1302/******/ }(); 1303/******/ 1304/******/ /* webpack/runtime/make namespace object */ 1305/******/ !function() { 1306/******/ // define __esModule on exports 1307/******/ __webpack_require__.r = function(exports) { 1308/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 1309/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 1310/******/ } 1311/******/ Object.defineProperty(exports, '__esModule', { value: true }); 1312/******/ }; 1313/******/ }(); 1314/******/ 1315/************************************************************************/ 1316var __webpack_exports__ = {}; 1317// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 1318!function() { 1319/*!***************************************************!*\ 1320 !*** ./js/entries/plugins/foundation.util.box.js ***! 1321 \***************************************************/ 1322__webpack_require__.r(__webpack_exports__); 1323/* harmony export */ __webpack_require__.d(__webpack_exports__, { 1324/* harmony export */ Box: function() { return /* reexport safe */ _foundation_util_box__WEBPACK_IMPORTED_MODULE_1__.Box; }, 1325/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation; } 1326/* harmony export */ }); 1327/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core"); 1328/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 1329/* harmony import */ var _foundation_util_box__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.box */ "./js/foundation.util.box.js"); 1330 1331 1332_foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation.Box = _foundation_util_box__WEBPACK_IMPORTED_MODULE_1__.Box; 1333 1334}(); 1335/******/ return __webpack_exports__; 1336/******/ })() 1337; 1338});
1339 1340((t,e)=>{"object"==typeof exports&&"object"==typeof module?module.exports=e(require("./foundation.core")):"function"==typeof define&&define.amd?define(["./foundation.core"],e):"object"==typeof exports?exports.__FOUNDATION_EXTERNAL__=e(require("./foundation.core")):(t.__FOUNDATION_EXTERNAL__=t.__FOUNDATION_EXTERNAL__||{},t.__FOUNDATION_EXTERNAL__["foundation.util.box"]=e(t.__FOUNDATION_EXTERNAL__["foundation.core"]))})(self,function(e){return o={
vendor: 3,531 bytes, lines 1340-1356
1340"./js/foundation.util.box.js":function(t,e,o){o.r(e),o.d(e,{Box:function(){return f}});var f={ImNotTouchingYou:function(t,e,o,f,n){return 0===i(t,e,o,f,n)},OverlapArea:i,GetDimensions:h,GetExplicitOffsets:function(t,e,o,f,n,i,r){var s,a,u=h(t),d=e?h(e):null;if(null!==d){switch(o){case"top":s=d.offset.top-(u.height+n);break;case"bottom":s=d.offset.top+d.height+n;break;case"left":a=d.offset.left-(u.width+i);break;case"right":a=d.offset.left+d.width+i}switch(o){case"top":case"bottom":switch(f){case"left":a=d.offset.left+i;break;case"right":a=d.offset.left-u.width+d.width-i;break;case"center":a=r?i:d.offset.left+d.width/2-u.width/2+i}break;case"right":case"left":switch(f){case"bottom":s=d.offset.top-n+d.height-u.height;break;case"top":s=d.offset.top+n;break;case"center":s=d.offset.top+n+d.height/2-u.height/2}}}return{top:s,left:a}}};function i(t,e,o,f,n){var i,r,s,t=h(t);return e=e?(i=(e=h(e)).height+e.offset.top-(t.offset.top+t.height),r=t.offset.top-e.offset.top,s=t.offset.left-e.offset.left,e.width+e.offset.left-(t.offset.left+t.width)):(i=t.windowDims.height+t.windowDims.offset.top-(t.offset.top+t.height),r=t.offset.top-t.windowDims.offset.top,s=t.offset.left-t.windowDims.offset.left,t.windowDims.width-(t.offset.left+t.width)),i=n?0:Math.min(i,0),r=Math.min(r,0),s=Math.min(s,0),e=Math.min(e,0),o?s+e:f?r+i:Math.sqrt(r*r+i*i+s*s+e*e)}function h(t){if((t=t.length?t[0]:t)===window||t===document)throw new Error("I'm sorry, Dave. I'm afraid I can't do that.");var e=t.getBoundingClientRect(),t=t.parentNode.getBoundingClientRect(),o=document.body.getBoundingClientRect(),f=window.pageYOffset,n=window.pageXOffset;return{width:e.width,height:e.height,offset:{top:e.top+f,left:e.left+n},parentDims:{width:t.width,height:t.height,offset:{top:t.top+f,left:t.left+n}},windowDims:{width:o.width,height:o.height,offset:{top:f,left:n}}}}},"./foundation.core":function(t){t.exports=e}},n={},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,{a:e}),e},f.d=function(t,e){for(var o in e)f.o(e,o)&&!f.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r={},(f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(r),f.d(r,{Box:function(){return i.Box},Foundation:function(){return t.Foundation}}),t=f("./foundation.core"),i=f("./js/foundation.util.box.js"),t.Foundation.Box=i.Box,r;function f(t){var e=n[t];return void 0!==e||(e=n[t]={exports:{}},o[t](e,e.exports,f)),e.exports}var o,n,t,i,r}); 1341 1342 1343(function webpackUniversalModuleDefinition(root, factory) { 1344 if(typeof exports === 'object' && typeof module === 'object') 1345 module.exports = factory(require("./foundation.core"), require("jquery")); 1346 else if(typeof define === 'function' && define.amd) 1347 define(["./foundation.core", "jquery"], factory); 1348 else if(typeof exports === 'object') 1349 exports["__FOUNDATION_EXTERNAL__"] = factory(require("./foundation.core"), require("jquery")); 1350 else 1351 root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.imageLoader"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]); 1352})(self, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) { 1353return /******/ (function() { // webpackBootstrap 1354/******/ "use strict"; 1355/******/ var __webpack_modules__ = ({ 1356
vendor: 4,271 bytes, lines 1357-1459
1357/***/ "./js/foundation.util.imageLoader.js": 1358/*!*******************************************!*\ 1359 !*** ./js/foundation.util.imageLoader.js ***! 1360 \*******************************************/ 1361/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 1362 1363__webpack_require__.r(__webpack_exports__); 1364/* harmony export */ __webpack_require__.d(__webpack_exports__, { 1365/* harmony export */ onImagesLoaded: function() { return /* binding */ onImagesLoaded; } 1366/* harmony export */ }); 1367/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 1368/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 1369 1370 1371/** 1372 * Runs a callback function when images are fully loaded. 1373 * @param {Object} images - Image(s) to check if loaded. 1374 * @param {Func} callback - Function to execute when image is fully loaded. 1375 */ 1376function onImagesLoaded(images, callback) { 1377 var unloaded = images.length; 1378 if (unloaded === 0) { 1379 callback(); 1380 } 1381 images.each(function () { 1382 // Check if image is loaded 1383 if (this.complete && typeof this.naturalWidth !== 'undefined') { 1384 singleImageLoaded(); 1385 } else { 1386 // If the above check failed, simulate loading on detached element. 1387 var image = new Image(); 1388 // Still count image as loaded if it finalizes with an error. 1389 var events = "load.zf.images error.zf.images"; 1390 jquery__WEBPACK_IMPORTED_MODULE_0___default()(image).one(events, function me() { 1391 // Unbind the event listeners. We're using 'one' but only one of the two events will have fired. 1392 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).off(events, me); 1393 singleImageLoaded(); 1394 }); 1395 image.src = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr('src'); 1396 } 1397 }); 1398 function singleImageLoaded() { 1399 unloaded--; 1400 if (unloaded === 0) { 1401 callback(); 1402 } 1403 } 1404} 1405 1406 1407/***/ }), 1408 1409/***/ "./foundation.core": 1410/*!****************************************************************************************************************************************************************!*\ 1411 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 1412 \****************************************************************************************************************************************************************/ 1413/***/ (function(module) { 1414 1415module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 1416 1417/***/ }), 1418 1419/***/ "jquery": 1420/*!********************************************************************************************!*\ 1421 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 1422 \********************************************************************************************/ 1423/***/ (function(module) { 1424 1425module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 1426 1427/***/ }) 1428 1429/******/ }); 1430/************************************************************************/ 1431/******/ // The module cache 1432/******/ var __webpack_module_cache__ = {}; 1433/******/ 1434/******/ // The require function 1435/******/ function __webpack_require__(moduleId) { 1436/******/ // Check if module is in cache 1437/******/ var cachedModule = __webpack_module_cache__[moduleId]; 1438/******/ if (cachedModule !== undefined) { 1439/******/ return cachedModule.exports; 1440/******/ } 1441/******/ // Create a new module (and put it into the cache) 1442/******/ var module = __webpack_module_cache__[moduleId] = { 1443/******/ // no module.id needed 1444/******/ // no module.loaded needed 1445/******/ exports: {} 1446/******/ }; 1447/******/ 1448/******/ // Execute the module function 1449/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 1450/******/ 1451/******/ // Return the exports of the module 1452/******/ return module.exports; 1453/******/ } 1454/******/ 1455/************************************************************************/ 1456/******/ /* webpack/runtime/compat get default export */ 1457/******/ !function() { 1458/******/ // getDefaultExport function for compatibility with non-harmony modules 1459/******/ __webpack_require__.n = function(module) {
1460/******/ var getter = module && module.__esModule ? 1461/******/ function() { return module['default']; } : 1462/******/ function() { return module; }; 1463/******/ __webpack_require__.d(getter, { a: getter }); 1464/******/ return getter; 1465/******/ }; 1466/******/ }(); 1467/******/ 1468/******/ /* webpack/runtime/define property getters */ 1469/******/ !function() { 1470/******/ // define getter functions for harmony exports 1471/******/ __webpack_require__.d = function(exports, definition) { 1472/******/ for(var key in definition) { 1473/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 1474/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 1475/******/ } 1476/******/ } 1477/******/ }; 1478/******/ }(); 1479/******/ 1480/******/ /* webpack/runtime/hasOwnProperty shorthand */ 1481/******/ !function() { 1482/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 1483/******/ }(); 1484/******/ 1485/******/ /* webpack/runtime/make namespace object */ 1486/******/ !function() { 1487/******/ // define __esModule on exports 1488/******/ __webpack_require__.r = function(exports) { 1489/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 1490/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 1491/******/ } 1492/******/ Object.defineProperty(exports, '__esModule', { value: true }); 1493/******/ }; 1494/******/ }(); 1495/******/ 1496/************************************************************************/ 1497var __webpack_exports__ = {}; 1498// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 1499!function() { 1500/*!***********************************************************!*\ 1501 !*** ./js/entries/plugins/foundation.util.imageLoader.js ***! 1502 \***********************************************************/ 1503__webpack_require__.r(__webpack_exports__); 1504/* harmony export */ __webpack_require__.d(__webpack_exports__, { 1505/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation; }, 1506/* harmony export */ onImagesLoaded: function() { return /* reexport safe */ _foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_1__.onImagesLoaded; } 1507/* harmony export */ }); 1508/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core"); 1509/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 1510/* harmony import */ var _foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.imageLoader */ "./js/foundation.util.imageLoader.js"); 1511 1512 1513_foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation.onImagesLoaded = _foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_1__.onImagesLoaded; 1514 1515}(); 1516/******/ return __webpack_exports__; 1517/******/ })() 1518; 1519}); 1520 1521((e,o)=>{"object"==typeof exports&&"object"==typeof module?module.exports=o(require("./foundation.core"),require("jquery")):"function"==typeof define&&define.amd?define(["./foundation.core","jquery"],o):"object"==typeof exports?exports.__FOUNDATION_EXTERNAL__=o(require("./foundation.core"),require("jquery")):(e.__FOUNDATION_EXTERNAL__=e.__FOUNDATION_EXTERNAL__||{},e.__FOUNDATION_EXTERNAL__["foundation.util.imageLoader"]=o(e.__FOUNDATION_EXTERNAL__["foundation.core"],e.jQuery))})(self,function(o,n){return r={
vendor: 1,292 bytes, lines 1521-1523
1521"./js/foundation.util.imageLoader.js":function(e,o,n){n.r(o),n.d(o,{onImagesLoaded:function(){return t}});var o=n("jquery"),r=n.n(o);function t(e,o){var n=e.length;function t(){0===--n&&o()}0===n&&o(),e.each(function(){var e,o;this.complete&&void 0!==this.naturalWidth?t():(e=new Image,o="load.zf.images error.zf.images",r()(e).one(o,function e(){r()(this).off(o,e),t()}),e.src=r()(this).attr("src"))})}},"./foundation.core":function(e){e.exports=o},jquery:function(e){e.exports=n}},u={},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,{a:o}),o},t.d=function(e,o){for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},t.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},a={},(t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(a),t.d(a,{Foundation:function(){return e.Foundation},onImagesLoaded:function(){return i.onImagesLoaded}}),e=t("./foundation.core"),i=t("./js/foundation.util.imageLoader.js"),e.Foundation.onImagesLoaded=i.onImagesLoaded,a;function t(e){var o=u[e];return void 0!==o||(o=u[e]={exports:{}},r[e](o,o.exports,t)),o.exports}var r,u,e,i,a}); 1522 1523
vendor: 13,817 bytes, lines 1524-1848
1524(function webpackUniversalModuleDefinition(root, factory) { 1525 if(typeof exports === 'object' && typeof module === 'object') 1526 module.exports = factory(require("./foundation.core"), require("jquery")); 1527 else if(typeof define === 'function' && define.amd) 1528 define(["./foundation.core", "jquery"], factory); 1529 else if(typeof exports === 'object') 1530 exports["__FOUNDATION_EXTERNAL__"] = factory(require("./foundation.core"), require("jquery")); 1531 else 1532 root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.keyboard"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]); 1533})(self, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) { 1534return /******/ (function() { // webpackBootstrap 1535/******/ "use strict"; 1536/******/ var __webpack_modules__ = ({ 1537 1538/***/ "./js/foundation.util.keyboard.js": 1539/*!****************************************!*\ 1540 !*** ./js/foundation.util.keyboard.js ***! 1541 \****************************************/ 1542/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 1543 1544__webpack_require__.r(__webpack_exports__); 1545/* harmony export */ __webpack_require__.d(__webpack_exports__, { 1546/* harmony export */ Keyboard: function() { return /* binding */ Keyboard; } 1547/* harmony export */ }); 1548/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 1549/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 1550/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ "./foundation.core"); 1551/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__); 1552/******************************************* 1553 * * 1554 * This util was created by Marius Olbertz * 1555 * Please thank Marius on GitHub /owlbertz * 1556 * or the web http://www.mariusolbertz.de/ * 1557 * * 1558 ******************************************/ 1559 1560 1561 1562var keyCodes = { 1563 9: 'TAB', 1564 13: 'ENTER', 1565 27: 'ESCAPE', 1566 32: 'SPACE', 1567 35: 'END', 1568 36: 'HOME', 1569 37: 'ARROW_LEFT', 1570 38: 'ARROW_UP', 1571 39: 'ARROW_RIGHT', 1572 40: 'ARROW_DOWN' 1573}; 1574var commands = {}; 1575 1576// Functions pulled out to be referenceable from internals 1577function findFocusable($element) { 1578 if (!$element) { 1579 return false; 1580 } 1581 return $element.find('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]').filter(function () { 1582 if (!jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).is(':visible') || jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr('tabindex') < 0) { 1583 return false; 1584 } //only have visible elements and those that have a tabindex greater or equal 0 1585 return true; 1586 }).sort(function (a, b) { 1587 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(a).attr('tabindex') === jquery__WEBPACK_IMPORTED_MODULE_0___default()(b).attr('tabindex')) { 1588 return 0; 1589 } 1590 var aTabIndex = parseInt(jquery__WEBPACK_IMPORTED_MODULE_0___default()(a).attr('tabindex'), 10), 1591 bTabIndex = parseInt(jquery__WEBPACK_IMPORTED_MODULE_0___default()(b).attr('tabindex'), 10); 1592 // Undefined is treated the same as 0 1593 if (typeof jquery__WEBPACK_IMPORTED_MODULE_0___default()(a).attr('tabindex') === 'undefined' && bTabIndex > 0) { 1594 return 1; 1595 } 1596 if (typeof jquery__WEBPACK_IMPORTED_MODULE_0___default()(b).attr('tabindex') === 'undefined' && aTabIndex > 0) { 1597 return -1; 1598 } 1599 if (aTabIndex === 0 && bTabIndex > 0) { 1600 return 1; 1601 } 1602 if (bTabIndex === 0 && aTabIndex > 0) { 1603 return -1; 1604 } 1605 if (aTabIndex < bTabIndex) { 1606 return -1; 1607 } 1608 if (aTabIndex > bTabIndex) { 1609 return 1; 1610 } 1611 }); 1612} 1613function parseKey(event) { 1614 var key = keyCodes[event.which || event.keyCode] || String.fromCharCode(event.which).toUpperCase(); 1615 1616 // Remove un-printable characters, e.g. for `fromCharCode` calls for CTRL only events 1617 key = key.replace(/\W+/, ''); 1618 if (event.shiftKey) key = "SHIFT_".concat(key); 1619 if (event.ctrlKey) key = "CTRL_".concat(key); 1620 if (event.altKey) key = "ALT_".concat(key); 1621 1622 // Remove trailing underscore, in case only modifiers were used (e.g. only `CTRL_ALT`) 1623 key = key.replace(/_$/, ''); 1624 return key; 1625} 1626var Keyboard = { 1627 keys: getKeyCodes(keyCodes), 1628 /** 1629 * Parses the (keyboard) event and returns a String that represents its key 1630 * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE 1631 * @param {Event} event - the event generated by the event handler 1632 * @return String key - String that represents the key pressed 1633 */ 1634 parseKey: parseKey, 1635 /** 1636 * Handles the given (keyboard) event 1637 * @param {Event} event - the event generated by the event handler 1638 * @param {String} component - Foundation component's name, e.g. Slider or Reveal 1639 * @param {Objects} functions - collection of functions that are to be executed 1640 */ 1641 handleKey: function handleKey(event, component, functions) { 1642 var commandList = commands[component], 1643 keyCode = this.parseKey(event), 1644 cmds, 1645 command, 1646 fn; 1647 if (!commandList) return console.warn('Component not defined!'); 1648 1649 // Ignore the event if it was already handled 1650 if (event.zfIsKeyHandled === true) return; 1651 1652 // This component does not differentiate between ltr and rtl 1653 if (typeof commandList.ltr === 'undefined') { 1654 cmds = commandList; // use plain list 1655 } else { 1656 // merge ltr and rtl: if document is rtl, rtl overwrites ltr and vice versa 1657 if ((0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__.rtl)()) cmds = jquery__WEBPACK_IMPORTED_MODULE_0___default().extend({}, commandList.ltr, commandList.rtl);else cmds = jquery__WEBPACK_IMPORTED_MODULE_0___default().extend({}, commandList.rtl, commandList.ltr); 1658 } 1659 command = cmds[keyCode]; 1660 fn = functions[command]; 1661 // Execute the handler if found 1662 if (fn && typeof fn === 'function') { 1663 var returnValue = fn.apply(); 1664 1665 // Mark the event as "handled" to prevent future handlings 1666 event.zfIsKeyHandled = true; 1667 1668 // Execute function when event was handled 1669 if (functions.handled || typeof functions.handled === 'function') { 1670 functions.handled(returnValue); 1671 } 1672 } else { 1673 // Execute function when event was not handled 1674 if (functions.unhandled || typeof functions.unhandled === 'function') { 1675 functions.unhandled(); 1676 } 1677 } 1678 }, 1679 /** 1680 * Finds all focusable elements within the given `$element` 1681 * @param {jQuery} $element - jQuery object to search within 1682 * @return {jQuery} $focusable - all focusable elements within `$element` 1683 */ 1684 1685 findFocusable: findFocusable, 1686 /** 1687 * Returns the component name name 1688 * @param {Object} component - Foundation component, e.g. Slider or Reveal 1689 * @return String componentName 1690 */ 1691 register: function register(componentName, cmds) { 1692 commands[componentName] = cmds; 1693 }, 1694 // TODO9438: These references to Keyboard need to not require global. Will 'this' work in this context? 1695 // 1696 /** 1697 * Traps the focus in the given element. 1698 * @param {jQuery} $element jQuery object to trap the foucs into. 1699 */ 1700 trapFocus: function trapFocus($element) { 1701 var $focusable = findFocusable($element), 1702 $firstFocusable = $focusable.eq(0), 1703 $lastFocusable = $focusable.eq(-1); 1704 $element.on('keydown.zf.trapfocus', function (event) { 1705 if (event.target === $lastFocusable[0] && parseKey(event) === 'TAB') { 1706 event.preventDefault(); 1707 $firstFocusable.focus(); 1708 } else if (event.target === $firstFocusable[0] && parseKey(event) === 'SHIFT_TAB') { 1709 event.preventDefault(); 1710 $lastFocusable.focus(); 1711 } 1712 }); 1713 }, 1714 /** 1715 * Releases the trapped focus from the given element. 1716 * @param {jQuery} $element jQuery object to release the focus for. 1717 */ 1718 releaseFocus: function releaseFocus($element) { 1719 $element.off('keydown.zf.trapfocus'); 1720 } 1721}; 1722 1723/* 1724 * Constants for easier comparing. 1725 * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE 1726 */ 1727function getKeyCodes(kcs) { 1728 var k = {}; 1729 for (var kc in kcs) { 1730 if (kcs.hasOwnProperty(kc)) k[kcs[kc]] = kcs[kc]; 1731 } 1732 return k; 1733} 1734 1735 1736/***/ }), 1737 1738/***/ "./foundation.core": 1739/*!****************************************************************************************************************************************************************!*\ 1740 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 1741 \****************************************************************************************************************************************************************/ 1742/***/ (function(module) { 1743 1744module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 1745 1746/***/ }), 1747 1748/***/ "jquery": 1749/*!********************************************************************************************!*\ 1750 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 1751 \********************************************************************************************/ 1752/***/ (function(module) { 1753 1754module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 1755 1756/***/ }) 1757 1758/******/ }); 1759/************************************************************************/ 1760/******/ // The module cache 1761/******/ var __webpack_module_cache__ = {}; 1762/******/ 1763/******/ // The require function 1764/******/ function __webpack_require__(moduleId) { 1765/******/ // Check if module is in cache 1766/******/ var cachedModule = __webpack_module_cache__[moduleId]; 1767/******/ if (cachedModule !== undefined) { 1768/******/ return cachedModule.exports; 1769/******/ } 1770/******/ // Create a new module (and put it into the cache) 1771/******/ var module = __webpack_module_cache__[moduleId] = { 1772/******/ // no module.id needed 1773/******/ // no module.loaded needed 1774/******/ exports: {} 1775/******/ }; 1776/******/ 1777/******/ // Execute the module function 1778/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 1779/******/ 1780/******/ // Return the exports of the module 1781/******/ return module.exports; 1782/******/ } 1783/******/ 1784/************************************************************************/ 1785/******/ /* webpack/runtime/compat get default export */ 1786/******/ !function() { 1787/******/ // getDefaultExport function for compatibility with non-harmony modules 1788/******/ __webpack_require__.n = function(module) { 1789/******/ var getter = module && module.__esModule ? 1790/******/ function() { return module['default']; } : 1791/******/ function() { return module; }; 1792/******/ __webpack_require__.d(getter, { a: getter }); 1793/******/ return getter; 1794/******/ }; 1795/******/ }(); 1796/******/ 1797/******/ /* webpack/runtime/define property getters */ 1798/******/ !function() { 1799/******/ // define getter functions for harmony exports 1800/******/ __webpack_require__.d = function(exports, definition) { 1801/******/ for(var key in definition) { 1802/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 1803/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 1804/******/ } 1805/******/ } 1806/******/ }; 1807/******/ }(); 1808/******/ 1809/******/ /* webpack/runtime/hasOwnProperty shorthand */ 1810/******/ !function() { 1811/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 1812/******/ }(); 1813/******/ 1814/******/ /* webpack/runtime/make namespace object */ 1815/******/ !function() { 1816/******/ // define __esModule on exports 1817/******/ __webpack_require__.r = function(exports) { 1818/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 1819/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 1820/******/ } 1821/******/ Object.defineProperty(exports, '__esModule', { value: true }); 1822/******/ }; 1823/******/ }(); 1824/******/ 1825/************************************************************************/ 1826var __webpack_exports__ = {}; 1827// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 1828!function() { 1829/*!********************************************************!*\ 1830 !*** ./js/entries/plugins/foundation.util.keyboard.js ***! 1831 \********************************************************/ 1832__webpack_require__.r(__webpack_exports__); 1833/* harmony export */ __webpack_require__.d(__webpack_exports__, { 1834/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation; }, 1835/* harmony export */ Keyboard: function() { return /* reexport safe */ _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__.Keyboard; } 1836/* harmony export */ }); 1837/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core"); 1838/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 1839/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.keyboard */ "./js/foundation.util.keyboard.js"); 1840 1841 1842_foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation.Keyboard = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__.Keyboard; 1843 1844}(); 1845/******/ return __webpack_exports__; 1846/******/ })() 1847; 1848});
1849 1850((e,t)=>{"object"==typeof exports&&"object"==typeof module?module.exports=t(require("./foundation.core"),require("jquery")):"function"==typeof define&&define.amd?define(["./foundation.core","jquery"],t):"object"==typeof exports?exports.__FOUNDATION_EXTERNAL__=t(require("./foundation.core"),require("jquery")):(e.__FOUNDATION_EXTERNAL__=e.__FOUNDATION_EXTERNAL__||{},e.__FOUNDATION_EXTERNAL__["foundation.util.keyboard"]=t(e.__FOUNDATION_EXTERNAL__["foundation.core"],e.jQuery))})(self,function(t,n){return r={
vendor: 2,794 bytes, lines 1850-1852
1850"./js/foundation.util.keyboard.js":function(e,t,n){n.r(t),n.d(t,{Keyboard:function(){return f}});var t=n("jquery"),r=n.n(t),a=n("./foundation.core"),o={9:"TAB",13:"ENTER",27:"ESCAPE",32:"SPACE",35:"END",36:"HOME",37:"ARROW_LEFT",38:"ARROW_UP",39:"ARROW_RIGHT",40:"ARROW_DOWN"},i={};function u(e){return!!e&&e.find("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]").filter(function(){return!(!r()(this).is(":visible")||r()(this).attr("tabindex")<0)}).sort(function(e,t){var n,o;return r()(e).attr("tabindex")===r()(t).attr("tabindex")?0:(n=parseInt(r()(e).attr("tabindex"),10),o=parseInt(r()(t).attr("tabindex"),10),void 0===r()(e).attr("tabindex")&&0<o?1:void 0===r()(t).attr("tabindex")&&0<n?-1:0===n&&0<o?1:0===o&&0<n||n<o?-1:o<n?1:void 0)})}function d(e){var t=(t=o[e.which||e.keyCode]||String.fromCharCode(e.which).toUpperCase()).replace(/\W+/,"");return e.shiftKey&&(t="SHIFT_".concat(t)),e.ctrlKey&&(t="CTRL_".concat(t)),t=(t=e.altKey?"ALT_".concat(t):t).replace(/_$/,"")}var f={keys:(e=>{var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[e[t]]=e[t]);return n})(o),parseKey:d,handleKey:function(e,t,n){var t=i[t],o=this.parseKey(e);if(!t)return console.warn("Component not defined!");!0!==e.zfIsKeyHandled&&((t=n[(void 0===t.ltr?t:(0,a.rtl)()?r().extend({},t.ltr,t.rtl):r().extend({},t.rtl,t.ltr))[o]])&&"function"==typeof t?(o=t.apply(),e.zfIsKeyHandled=!0,!n.handled&&"function"!=typeof n.handled||n.handled(o)):!n.unhandled&&"function"!=typeof n.unhandled||n.unhandled())},findFocusable:u,register:function(e,t){i[e]=t},trapFocus:function(e){var t=u(e),n=t.eq(0),o=t.eq(-1);e.on("keydown.zf.trapfocus",function(e){e.target===o[0]&&"TAB"===d(e)?(e.preventDefault(),n.focus()):e.target===n[0]&&"SHIFT_TAB"===d(e)&&(e.preventDefault(),o.focus())})},releaseFocus:function(e){e.off("keydown.zf.trapfocus")}}},"./foundation.core":function(e){e.exports=t},jquery:function(e){e.exports=n}},a={},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u={},(o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(u),o.d(u,{Foundation:function(){return e.Foundation},Keyboard:function(){return i.Keyboard}}),e=o("./foundation.core"),i=o("./js/foundation.util.keyboard.js"),e.Foundation.Keyboard=i.Keyboard,u;function o(e){var t=a[e];return void 0!==t||(t=a[e]={exports:{}},r[e](t,t.exports,o)),t.exports}var r,a,e,i,u}); 1851 1852
vendor: 18,979 bytes, lines 1853-2294
1853(function webpackUniversalModuleDefinition(root, factory) { 1854 if(typeof exports === 'object' && typeof module === 'object') 1855 module.exports = factory(require("./foundation.core"), require("jquery")); 1856 else if(typeof define === 'function' && define.amd) 1857 define(["./foundation.core", "jquery"], factory); 1858 else if(typeof exports === 'object') 1859 exports["__FOUNDATION_EXTERNAL__"] = factory(require("./foundation.core"), require("jquery")); 1860 else 1861 root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.mediaQuery"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]); 1862})(self, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) { 1863return /******/ (function() { // webpackBootstrap 1864/******/ "use strict"; 1865/******/ var __webpack_modules__ = ({ 1866 1867/***/ "./js/foundation.util.mediaQuery.js": 1868/*!******************************************!*\ 1869 !*** ./js/foundation.util.mediaQuery.js ***! 1870 \******************************************/ 1871/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 1872 1873__webpack_require__.r(__webpack_exports__); 1874/* harmony export */ __webpack_require__.d(__webpack_exports__, { 1875/* harmony export */ MediaQuery: function() { return /* binding */ MediaQuery; } 1876/* harmony export */ }); 1877/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 1878/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 1879function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 1880function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } 1881function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 1882function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } 1883function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } 1884function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } 1885function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } 1886 1887 1888// Default set of media queries 1889// const defaultQueries = { 1890// 'default' : 'only screen', 1891// landscape : 'only screen and (orientation: landscape)', 1892// portrait : 'only screen and (orientation: portrait)', 1893// retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' + 1894// 'only screen and (min--moz-device-pixel-ratio: 2),' + 1895// 'only screen and (-o-min-device-pixel-ratio: 2/1),' + 1896// 'only screen and (min-device-pixel-ratio: 2),' + 1897// 'only screen and (min-resolution: 192dpi),' + 1898// 'only screen and (min-resolution: 2dppx)' 1899// }; 1900 1901// matchMedia() polyfill - Test a CSS media type/query in JS. 1902// Authors & copyright © 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. MIT license 1903/* eslint-disable */ 1904window.matchMedia || (window.matchMedia = function () { 1905 "use strict"; 1906 1907 // For browsers that support matchMedium api such as IE 9 and webkit 1908 var styleMedia = window.styleMedia || window.media; 1909 1910 // For those that don't support matchMedium 1911 if (!styleMedia) { 1912 var style = document.createElement('style'), 1913 script = document.getElementsByTagName('script')[0], 1914 info = null; 1915 style.type = 'text/css'; 1916 style.id = 'matchmediajs-test'; 1917 if (!script) { 1918 document.head.appendChild(style); 1919 } else { 1920 script.parentNode.insertBefore(style, script); 1921 } 1922 1923 // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers 1924 info = 'getComputedStyle' in window && window.getComputedStyle(style, null) || style.currentStyle; 1925 styleMedia = { 1926 matchMedium: function matchMedium(media) { 1927 var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }'; 1928 1929 // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers 1930 if (style.styleSheet) { 1931 style.styleSheet.cssText = text; 1932 } else { 1933 style.textContent = text; 1934 } 1935 1936 // Test if media query is true or false 1937 return info.width === '1px'; 1938 } 1939 }; 1940 } 1941 return function (media) { 1942 return { 1943 matches: styleMedia.matchMedium(media || 'all'), 1944 media: media || 'all' 1945 }; 1946 }; 1947}()); 1948/* eslint-enable */ 1949 1950var MediaQuery = { 1951 queries: [], 1952 current: '', 1953 /** 1954 * Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher. 1955 * @function 1956 * @private 1957 */ 1958 _init: function _init() { 1959 // make sure the initialization is only done once when calling _init() several times 1960 if (this.isInitialized === true) { 1961 return this; 1962 } else { 1963 this.isInitialized = true; 1964 } 1965 var self = this; 1966 var $meta = jquery__WEBPACK_IMPORTED_MODULE_0___default()('meta.foundation-mq'); 1967 if (!$meta.length) { 1968 jquery__WEBPACK_IMPORTED_MODULE_0___default()('<meta class="foundation-mq" name="foundation-mq" content>').appendTo(document.head); 1969 } 1970 var extractedStyles = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.foundation-mq').css('font-family'); 1971 var namedQueries; 1972 namedQueries = parseStyleToObject(extractedStyles); 1973 self.queries = []; // reset 1974 1975 for (var key in namedQueries) { 1976 if (namedQueries.hasOwnProperty(key)) { 1977 self.queries.push({ 1978 name: key, 1979 value: "only screen and (min-width: ".concat(namedQueries[key], ")") 1980 }); 1981 } 1982 } 1983 this.current = this._getCurrentSize(); 1984 this._watcher(); 1985 }, 1986 /** 1987 * Reinitializes the media query helper. 1988 * Useful if your CSS breakpoint configuration has just been loaded or has changed since the initialization. 1989 * @function 1990 * @private 1991 */ 1992 _reInit: function _reInit() { 1993 this.isInitialized = false; 1994 this._init(); 1995 }, 1996 /** 1997 * Checks if the screen is at least as wide as a breakpoint. 1998 * @function 1999 * @param {String} size - Name of the breakpoint to check. 2000 * @returns {Boolean} `true` if the breakpoint matches, `false` if it's smaller. 2001 */ 2002 atLeast: function atLeast(size) { 2003 var query = this.get(size); 2004 if (query) { 2005 return window.matchMedia(query).matches; 2006 } 2007 return false; 2008 }, 2009 /** 2010 * Checks if the screen is within the given breakpoint. 2011 * If smaller than the breakpoint of larger than its upper limit it returns false. 2012 * @function 2013 * @param {String} size - Name of the breakpoint to check. 2014 * @returns {Boolean} `true` if the breakpoint matches, `false` otherwise. 2015 */ 2016 only: function only(size) { 2017 return size === this._getCurrentSize(); 2018 }, 2019 /** 2020 * Checks if the screen is within a breakpoint or smaller. 2021 * @function 2022 * @param {String} size - Name of the breakpoint to check. 2023 * @returns {Boolean} `true` if the breakpoint matches, `false` if it's larger. 2024 */ 2025 upTo: function upTo(size) { 2026 var nextSize = this.next(size); 2027 2028 // If the next breakpoint does not match, the screen is smaller than 2029 // the upper limit of this breakpoint. 2030 if (nextSize) { 2031 return !this.atLeast(nextSize); 2032 } 2033 2034 // If there is no next breakpoint, the "size" breakpoint does not have 2035 // an upper limit and the screen will always be within it or smaller. 2036 return true; 2037 }, 2038 /** 2039 * Checks if the screen matches to a breakpoint. 2040 * @function 2041 * @param {String} size - Name of the breakpoint to check, either 'small only' or 'small'. Omitting 'only' falls back to using atLeast() method. 2042 * @returns {Boolean} `true` if the breakpoint matches, `false` if it does not. 2043 */ 2044 is: function is(size) { 2045 var parts = size.trim().split(' ').filter(function (p) { 2046 return !!p.length; 2047 }); 2048 var _parts = _slicedToArray(parts, 2), 2049 bpSize = _parts[0], 2050 _parts$ = _parts[1], 2051 bpModifier = _parts$ === void 0 ? '' : _parts$; 2052 2053 // Only the breakpont 2054 if (bpModifier === 'only') { 2055 return this.only(bpSize); 2056 } 2057 // At least the breakpoint (included) 2058 if (!bpModifier || bpModifier === 'up') { 2059 return this.atLeast(bpSize); 2060 } 2061 // Up to the breakpoint (included) 2062 if (bpModifier === 'down') { 2063 return this.upTo(bpSize); 2064 } 2065 throw new Error("\n Invalid breakpoint passed to MediaQuery.is().\n Expected a breakpoint name formatted like \"<size> <modifier>\", got \"".concat(size, "\".\n ")); 2066 }, 2067 /** 2068 * Gets the media query of a breakpoint. 2069 * @function 2070 * @param {String} size - Name of the breakpoint to get. 2071 * @returns {String|null} - The media query of the breakpoint, or `null` if the breakpoint doesn't exist. 2072 */ 2073 get: function get(size) { 2074 for (var i in this.queries) { 2075 if (this.queries.hasOwnProperty(i)) { 2076 var query = this.queries[i]; 2077 if (size === query.name) return query.value; 2078 } 2079 } 2080 return null; 2081 }, 2082 /** 2083 * Get the breakpoint following the given breakpoint. 2084 * @function 2085 * @param {String} size - Name of the breakpoint. 2086 * @returns {String|null} - The name of the following breakpoint, or `null` if the passed breakpoint was the last one. 2087 */ 2088 next: function next(size) { 2089 var _this = this; 2090 var queryIndex = this.queries.findIndex(function (q) { 2091 return _this._getQueryName(q) === size; 2092 }); 2093 if (queryIndex === -1) { 2094 throw new Error("\n Unknown breakpoint \"".concat(size, "\" passed to MediaQuery.next().\n Ensure it is present in your Sass \"$breakpoints\" setting.\n ")); 2095 } 2096 var nextQuery = this.queries[queryIndex + 1]; 2097 return nextQuery ? nextQuery.name : null; 2098 }, 2099 /** 2100 * Returns the name of the breakpoint related to the given value. 2101 * @function 2102 * @private 2103 * @param {String|Object} value - Breakpoint name or query object. 2104 * @returns {String} Name of the breakpoint. 2105 */ 2106 _getQueryName: function _getQueryName(value) { 2107 if (typeof value === 'string') return value; 2108 if (_typeof(value) === 'object') return value.name; 2109 throw new TypeError("\n Invalid value passed to MediaQuery._getQueryName().\n Expected a breakpoint name (String) or a breakpoint query (Object), got \"".concat(value, "\" (").concat(_typeof(value), ")\n ")); 2110 }, 2111 /** 2112 * Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one). 2113 * @function 2114 * @private 2115 * @returns {String} Name of the current breakpoint. 2116 */ 2117 _getCurrentSize: function _getCurrentSize() { 2118 var matched; 2119 for (var i = 0; i < this.queries.length; i++) { 2120 var query = this.queries[i]; 2121 if (window.matchMedia(query.value).matches) { 2122 matched = query; 2123 } 2124 } 2125 return matched && this._getQueryName(matched); 2126 }, 2127 /** 2128 * Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes. 2129 * @function 2130 * @private 2131 */ 2132 _watcher: function _watcher() { 2133 var _this2 = this; 2134 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('resize.zf.trigger', function () { 2135 var newSize = _this2._getCurrentSize(), 2136 currentSize = _this2.current; 2137 if (newSize !== currentSize) { 2138 // Change the current media query 2139 _this2.current = newSize; 2140 2141 // Broadcast the media query change on the window 2142 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).trigger('changed.zf.mediaquery', [newSize, currentSize]); 2143 } 2144 }); 2145 } 2146}; 2147 2148// Thank you: https://github.com/sindresorhus/query-string 2149function parseStyleToObject(str) { 2150 var styleObject = {}; 2151 if (typeof str !== 'string') { 2152 return styleObject; 2153 } 2154 str = str.trim().slice(1, -1); // browsers re-quote string style values 2155 2156 if (!str) { 2157 return styleObject; 2158 } 2159 styleObject = str.split('&').reduce(function (ret, param) { 2160 var parts = param.replace(/\+/g, ' ').split('='); 2161 var key = parts[0]; 2162 var val = parts[1]; 2163 key = decodeURIComponent(key); 2164 2165 // missing `=` should be `null`: 2166 // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters 2167 val = typeof val === 'undefined' ? null : decodeURIComponent(val); 2168 if (!ret.hasOwnProperty(key)) { 2169 ret[key] = val; 2170 } else if (Array.isArray(ret[key])) { 2171 ret[key].push(val); 2172 } else { 2173 ret[key] = [ret[key], val]; 2174 } 2175 return ret; 2176 }, {}); 2177 return styleObject; 2178} 2179 2180 2181/***/ }), 2182 2183/***/ "./foundation.core": 2184/*!****************************************************************************************************************************************************************!*\ 2185 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 2186 \****************************************************************************************************************************************************************/ 2187/***/ (function(module) { 2188 2189module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 2190 2191/***/ }), 2192 2193/***/ "jquery": 2194/*!********************************************************************************************!*\ 2195 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 2196 \********************************************************************************************/ 2197/***/ (function(module) { 2198 2199module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 2200 2201/***/ }) 2202 2203/******/ }); 2204/************************************************************************/ 2205/******/ // The module cache 2206/******/ var __webpack_module_cache__ = {}; 2207/******/ 2208/******/ // The require function 2209/******/ function __webpack_require__(moduleId) { 2210/******/ // Check if module is in cache 2211/******/ var cachedModule = __webpack_module_cache__[moduleId]; 2212/******/ if (cachedModule !== undefined) { 2213/******/ return cachedModule.exports; 2214/******/ } 2215/******/ // Create a new module (and put it into the cache) 2216/******/ var module = __webpack_module_cache__[moduleId] = { 2217/******/ // no module.id needed 2218/******/ // no module.loaded needed 2219/******/ exports: {} 2220/******/ }; 2221/******/ 2222/******/ // Execute the module function 2223/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 2224/******/ 2225/******/ // Return the exports of the module 2226/******/ return module.exports; 2227/******/ } 2228/******/ 2229/************************************************************************/ 2230/******/ /* webpack/runtime/compat get default export */ 2231/******/ !function() { 2232/******/ // getDefaultExport function for compatibility with non-harmony modules 2233/******/ __webpack_require__.n = function(module) { 2234/******/ var getter = module && module.__esModule ? 2235/******/ function() { return module['default']; } : 2236/******/ function() { return module; }; 2237/******/ __webpack_require__.d(getter, { a: getter }); 2238/******/ return getter; 2239/******/ }; 2240/******/ }(); 2241/******/ 2242/******/ /* webpack/runtime/define property getters */ 2243/******/ !function() { 2244/******/ // define getter functions for harmony exports 2245/******/ __webpack_require__.d = function(exports, definition) { 2246/******/ for(var key in definition) { 2247/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 2248/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 2249/******/ } 2250/******/ } 2251/******/ }; 2252/******/ }(); 2253/******/ 2254/******/ /* webpack/runtime/hasOwnProperty shorthand */ 2255/******/ !function() { 2256/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 2257/******/ }(); 2258/******/ 2259/******/ /* webpack/runtime/make namespace object */ 2260/******/ !function() { 2261/******/ // define __esModule on exports 2262/******/ __webpack_require__.r = function(exports) { 2263/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 2264/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 2265/******/ } 2266/******/ Object.defineProperty(exports, '__esModule', { value: true }); 2267/******/ }; 2268/******/ }(); 2269/******/ 2270/************************************************************************/ 2271var __webpack_exports__ = {}; 2272// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 2273!function() { 2274/*!**********************************************************!*\ 2275 !*** ./js/entries/plugins/foundation.util.mediaQuery.js ***! 2276 \**********************************************************/ 2277__webpack_require__.r(__webpack_exports__); 2278/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2279/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation; }, 2280/* harmony export */ MediaQuery: function() { return /* reexport safe */ _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__.MediaQuery; } 2281/* harmony export */ }); 2282/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core"); 2283/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 2284/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.mediaQuery */ "./js/foundation.util.mediaQuery.js"); 2285 2286 2287_foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation.MediaQuery = _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__.MediaQuery; 2288_foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation.MediaQuery._init(); 2289 2290}(); 2291/******/ return __webpack_exports__; 2292/******/ })() 2293; 2294});
2295 2296((e,t)=>{"object"==typeof exports&&"object"==typeof module?module.exports=t(require("./foundation.core"),require("jquery")):"function"==typeof define&&define.amd?define(["./foundation.core","jquery"],t):"object"==typeof exports?exports.__FOUNDATION_EXTERNAL__=t(require("./foundation.core"),require("jquery")):(e.__FOUNDATION_EXTERNAL__=e.__FOUNDATION_EXTERNAL__||{},e.__FOUNDATION_EXTERNAL__["foundation.util.mediaQuery"]=t(e.__FOUNDATION_EXTERNAL__["foundation.core"],e.jQuery))})(self,function(t,n){return i={
vendor: 4,520 bytes, line 2296
2296"./js/foundation.util.mediaQuery.js":function(e,t,n){n.r(t),n.d(t,{MediaQuery:function(){return d}});var r,i,o,t=n("jquery"),u=n.n(t);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){return(e=>{if(Array.isArray(e))return e})(e)||((e,t)=>{var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,u,a=[],s=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw i}}return a}})(e,t)||((e,t)=>{var n;if(e)return"string"==typeof e?c(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0})(e,t)||(()=>{throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}window.matchMedia||(window.matchMedia=((o=window.styleMedia||window.media)||(r=document.createElement("style"),n=document.getElementsByTagName("script")[0],i=null,r.type="text/css",r.id="matchmediajs-test",n?n.parentNode.insertBefore(r,n):document.head.appendChild(r),i="getComputedStyle"in window&&window.getComputedStyle(r,null)||r.currentStyle,o={matchMedium:function(e){e="@media "+e+"{ #matchmediajs-test { width: 1px; } }";return r.styleSheet?r.styleSheet.cssText=e:r.textContent=e,"1px"===i.width}}),function(e){return{matches:o.matchMedium(e||"all"),media:e||"all"}}));var d={queries:[],current:"",_init:function(){if(!0===this.isInitialized)return this;this.isInitialized=!0;u()("meta.foundation-mq").length||u()('<meta class="foundation-mq" name="foundation-mq" content>').appendTo(document.head);var e,t,n,r=u()(".foundation-mq").css("font-family");for(n in t={},e=t="string"==typeof(r=r)&&(r=r.trim().slice(1,-1))?r.split("&").reduce(function(e,t){var t=t.replace(/\+/g," ").split("="),n=t[0],t=t[1],n=decodeURIComponent(n),t=void 0===t?null:decodeURIComponent(t);return e.hasOwnProperty(n)?Array.isArray(e[n])?e[n].push(t):e[n]=[e[n],t]:e[n]=t,e},{}):t,this.queries=[],e)e.hasOwnProperty(n)&&this.queries.push({name:n,value:"only screen and (min-width: ".concat(e[n],")")});this.current=this._getCurrentSize(),this._watcher()},_reInit:function(){this.isInitialized=!1,this._init()},atLeast:function(e){e=this.get(e);return!!e&&window.matchMedia(e).matches},only:function(e){return e===this._getCurrentSize()},upTo:function(e){e=this.next(e);return!e||!this.atLeast(e)},is:function(e){var t=s(e.trim().split(" ").filter(function(e){return!!e.length}),2),n=t[0],t=t[1],t=void 0===t?"":t;if("only"===t)return this.only(n);if(!t||"up"===t)return this.atLeast(n);if("down"===t)return this.upTo(n);throw new Error('\n Invalid breakpoint passed to MediaQuery.is().\n Expected a breakpoint name formatted like "<size> <modifier>", got "'.concat(e,'".\n '))},get:function(e){for(var t in this.queries)if(this.queries.hasOwnProperty(t)){t=this.queries[t];if(e===t.name)return t.value}return null},next:function(t){var n=this,e=this.queries.findIndex(function(e){return n._getQueryName(e)===t});if(-1===e)throw new Error('\n Unknown breakpoint "'.concat(t,'" passed to MediaQuery.next().\n Ensure it is present in your Sass "$breakpoints" setting.\n '));e=this.queries[e+1];return e?e.name:null},_getQueryName:function(e){if("string"==typeof e)return e;if("object"===a(e))return e.name;throw new TypeError('\n Invalid value passed to MediaQuery._getQueryName().\n Expected a breakpoint name (String) or a breakpoint query (Object), got "'.concat(e,'" (').concat(a(e),")\n "))},_getCurrentSize:function(){for(var e,t=0;t<this.queries.length;t++){var n=this.queries[t];window.matchMedia(n.value).matches&&(e=n)}return e&&this._getQueryName(e)},_watcher:function(){var n=this;u()(window).on("resize.zf.trigger",function(){var e=n._getCurrentSize(),t=n.current;e!==t&&(n.current=e,u()(window).trigger("changed.zf.mediaquery",[e,t]))})}}},"./foundation.core":function(e){e.exports=t},jquery:function(e){e.exports=n}},o={}
2296,r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a={},(r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(a),r.d(a,{Foundation:function(){return e.Foundation},MediaQuery:function(){return u.MediaQuery}}),e=r("./foundation.core"),u=r("./js/foundation.util.mediaQuery.js"),e.Foundation.MediaQuery=u.MediaQuery,e.Foundation.MediaQuery._init(),a;function r(e){var t=o[e];return void 0!==t||(t=o[e]={exports:{}},i[e](t,t.exports,r)),t.exports}var i,o,e,u,a}); 2297 2298 2299(function webpackUniversalModuleDefinition(root, factory) { 2300 if(typeof exports === 'object' && typeof module === 'object') 2301 module.exports = factory(require("./foundation.core"), require("jquery")); 2302 else if(typeof define === 'function' && define.amd) 2303 define(["./foundation.core", "jquery"], factory); 2304 else if(typeof exports === 'object') 2305 exports["__FOUNDATION_EXTERNAL__"] = factory(require("./foundation.core"), require("jquery")); 2306 else 2307 root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.motion"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]); 2308})(self, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) { 2309return /******/ (function() { // webpackBootstrap 2310/******/ "use strict"; 2311/******/ var __webpack_modules__ = ({ 2312
vendor: 6,158 bytes, lines 2313-2471
2313/***/ "./js/foundation.util.motion.js": 2314/*!**************************************!*\ 2315 !*** ./js/foundation.util.motion.js ***! 2316 \**************************************/ 2317/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 2318 2319__webpack_require__.r(__webpack_exports__); 2320/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2321/* harmony export */ Motion: function() { return /* binding */ Motion; }, 2322/* harmony export */ Move: function() { return /* binding */ Move; } 2323/* harmony export */ }); 2324/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 2325/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 2326/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ "./foundation.core"); 2327/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__); 2328 2329 2330 2331/** 2332 * Motion module. 2333 * @module foundation.motion 2334 */ 2335 2336var initClasses = ['mui-enter', 'mui-leave']; 2337var activeClasses = ['mui-enter-active', 'mui-leave-active']; 2338var Motion = { 2339 animateIn: function animateIn(element, animation, cb) { 2340 animate(true, element, animation, cb); 2341 }, 2342 animateOut: function animateOut(element, animation, cb) { 2343 animate(false, element, animation, cb); 2344 } 2345}; 2346function Move(duration, elem, fn) { 2347 var anim, 2348 prog, 2349 start = null; 2350 if (duration === 0) { 2351 fn.apply(elem); 2352 elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]); 2353 return; 2354 } 2355 function move(ts) { 2356 if (!start) start = ts; 2357 prog = ts - start; 2358 fn.apply(elem); 2359 if (prog < duration) { 2360 anim = window.requestAnimationFrame(move, elem); 2361 } else { 2362 window.cancelAnimationFrame(anim); 2363 elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]); 2364 } 2365 } 2366 anim = window.requestAnimationFrame(move); 2367} 2368 2369/** 2370 * Animates an element in or out using a CSS transition class. 2371 * @function 2372 * @private 2373 * @param {Boolean} isIn - Defines if the animation is in or out. 2374 * @param {Object} element - jQuery or HTML object to animate. 2375 * @param {String} animation - CSS class to use. 2376 * @param {Function} cb - Callback to run when animation is finished. 2377 */ 2378function animate(isIn, element, animation, cb) { 2379 element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(element).eq(0); 2380 if (!element.length) return; 2381 var initClass = isIn ? initClasses[0] : initClasses[1]; 2382 var activeClass = isIn ? activeClasses[0] : activeClasses[1]; 2383 2384 // Set up the animation 2385 reset(); 2386 element.addClass(animation).css('transition', 'none'); 2387 requestAnimationFrame(function () { 2388 element.addClass(initClass); 2389 if (isIn) element.show(); 2390 }); 2391 2392 // Start the animation 2393 requestAnimationFrame(function () { 2394 // will trigger the browser to synchronously calculate the style and layout 2395 // also called reflow or layout thrashing 2396 // see https://gist.github.com/paulirish/5d52fb081b3570c81e3a 2397 element[0].offsetWidth; 2398 element.css('transition', '').addClass(activeClass); 2399 }); 2400 2401 // Clean up the animation when it finishes 2402 element.one((0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__.transitionend)(element), finish); 2403 2404 // Hides the element (for out animations), resets the element, and runs a callback 2405 function finish() { 2406 if (!isIn) element.hide(); 2407 reset(); 2408 if (cb) cb.apply(element); 2409 } 2410 2411 // Resets transitions and removes motion-specific classes 2412 function reset() { 2413 element[0].style.transitionDuration = 0; 2414 element.removeClass("".concat(initClass, " ").concat(activeClass, " ").concat(animation)); 2415 } 2416} 2417 2418 2419/***/ }), 2420 2421/***/ "./foundation.core": 2422/*!****************************************************************************************************************************************************************!*\ 2423 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 2424 \****************************************************************************************************************************************************************/ 2425/***/ (function(module) { 2426 2427module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 2428 2429/***/ }), 2430 2431/***/ "jquery": 2432/*!********************************************************************************************!*\ 2433 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 2434 \********************************************************************************************/ 2435/***/ (function(module) { 2436 2437module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 2438 2439/***/ }) 2440 2441/******/ }); 2442/************************************************************************/ 2443/******/ // The module cache 2444/******/ var __webpack_module_cache__ = {}; 2445/******/ 2446/******/ // The require function 2447/******/ function __webpack_require__(moduleId) { 2448/******/ // Check if module is in cache 2449/******/ var cachedModule = __webpack_module_cache__[moduleId]; 2450/******/ if (cachedModule !== undefined) { 2451/******/ return cachedModule.exports; 2452/******/ } 2453/******/ // Create a new module (and put it into the cache) 2454/******/ var module = __webpack_module_cache__[moduleId] = { 2455/******/ // no module.id needed 2456/******/ // no module.loaded needed 2457/******/ exports: {} 2458/******/ }; 2459/******/ 2460/******/ // Execute the module function 2461/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 2462/******/ 2463/******/ // Return the exports of the module 2464/******/ return module.exports; 2465/******/ } 2466/******/ 2467/************************************************************************/ 2468/******/ /* webpack/runtime/compat get default export */ 2469/******/ !function() { 2470/******/ // getDefaultExport function for compatibility with non-harmony modules 2471/******/ __webpack_require__.n = function(module) {
2472/******/ var getter = module && module.__esModule ? 2473/******/ function() { return module['default']; } : 2474/******/ function() { return module; }; 2475/******/ __webpack_require__.d(getter, { a: getter }); 2476/******/ return getter; 2477/******/ }; 2478/******/ }(); 2479/******/ 2480/******/ /* webpack/runtime/define property getters */ 2481/******/ !function() { 2482/******/ // define getter functions for harmony exports 2483/******/ __webpack_require__.d = function(exports, definition) { 2484/******/ for(var key in definition) { 2485/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 2486/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 2487/******/ } 2488/******/ } 2489/******/ }; 2490/******/ }(); 2491/******/ 2492/******/ /* webpack/runtime/hasOwnProperty shorthand */ 2493/******/ !function() { 2494/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 2495/******/ }(); 2496/******/ 2497/******/ /* webpack/runtime/make namespace object */ 2498/******/ !function() { 2499/******/ // define __esModule on exports 2500/******/ __webpack_require__.r = function(exports) { 2501/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 2502/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 2503/******/ } 2504/******/ Object.defineProperty(exports, '__esModule', { value: true }); 2505/******/ }; 2506/******/ }(); 2507/******/ 2508/************************************************************************/ 2509var __webpack_exports__ = {}; 2510// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 2511!function() { 2512/*!******************************************************!*\ 2513 !*** ./js/entries/plugins/foundation.util.motion.js ***! 2514 \******************************************************/ 2515__webpack_require__.r(__webpack_exports__); 2516/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2517/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation; }, 2518/* harmony export */ Motion: function() { return /* reexport safe */ _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__.Motion; }, 2519/* harmony export */ Move: function() { return /* reexport safe */ _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__.Move; } 2520/* harmony export */ }); 2521/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core"); 2522/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 2523/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.motion */ "./js/foundation.util.motion.js"); 2524 2525 2526_foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation.Motion = _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__.Motion; 2527_foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation.Move = _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__.Move; 2528 2529}(); 2530/******/ return __webpack_exports__; 2531/******/ })() 2532; 2533}); 2534 2535((n,e)=>{"object"==typeof exports&&"object"==typeof module?module.exports=e(require("./foundation.core"),require("jquery")):"function"==typeof define&&define.amd?define(["./foundation.core","jquery"],e):"object"==typeof exports?exports.__FOUNDATION_EXTERNAL__=e(require("./foundation.core"),require("jquery")):(n.__FOUNDATION_EXTERNAL__=n.__FOUNDATION_EXTERNAL__||{},n.__FOUNDATION_EXTERNAL__["foundation.util.motion"]=e(n.__FOUNDATION_EXTERNAL__["foundation.core"],n.jQuery))})(self,function(e,o){return i={
vendor: 2,905 bytes, lines 2535-2551
2535"./js/foundation.util.motion.js":function(n,e,o){o.r(e),o.d(e,{Motion:function(){return t},Move:function(){return i}});var e=o("jquery"),a=o.n(e),f=o("./foundation.core"),c=["mui-enter","mui-leave"],d=["mui-enter-active","mui-leave-active"],t={animateIn:function(n,e,o){r(!0,n,e,o)},animateOut:function(n,e,o){r(!1,n,e,o)}};function i(o,t,i){var r,u,a=null;0===o?(i.apply(t),t.trigger("finished.zf.animate",[t]).triggerHandler("finished.zf.animate",[t])):r=window.requestAnimationFrame(function n(e){u=e-(a=a||e),i.apply(t),u<o?r=window.requestAnimationFrame(n,t):(window.cancelAnimationFrame(r),t.trigger("finished.zf.animate",[t]).triggerHandler("finished.zf.animate",[t]))})}function r(n,e,o,t){var i,r;function u(){e[0].style.transitionDuration=0,e.removeClass("".concat(i," ").concat(r," ").concat(o))}(e=a()(e).eq(0)).length&&(i=n?c[0]:c[1],r=n?d[0]:d[1],u(),e.addClass(o).css("transition","none"),requestAnimationFrame(function(){e.addClass(i),n&&e.show()}),requestAnimationFrame(function(){e[0].offsetWidth,e.css("transition","").addClass(r)}),e.one((0,f.transitionend)(e),function(){n||e.hide();u(),t&&t.apply(e)}))}},"./foundation.core":function(n){n.exports=e},jquery:function(n){n.exports=o}},r={},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,{a:e}),e},t.d=function(n,e){for(var o in e)t.o(e,o)&&!t.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:e[o]})},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},a={},(t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})})(a),t.d(a,{Foundation:function(){return n.Foundation},Motion:function(){return u.Motion},Move:function(){return u.Move}}),n=t("./foundation.core"),u=t("./js/foundation.util.motion.js"),n.Foundation.Motion=u.Motion,n.Foundation.Move=u.Move,a;function t(n){var e=r[n];return void 0!==e||(e=r[n]={exports:{}},i[n](e,e.exports,t)),e.exports}var i,r,n,u,a}); 2536 2537 2538(function webpackUniversalModuleDefinition(root, factory) { 2539 if(typeof exports === 'object' && typeof module === 'object') 2540 module.exports = factory(require("./foundation.core"), require("jquery")); 2541 else if(typeof define === 'function' && define.amd) 2542 define(["./foundation.core", "jquery"], factory); 2543 else if(typeof exports === 'object') 2544 exports["__FOUNDATION_EXTERNAL__"] = factory(require("./foundation.core"), require("jquery")); 2545 else 2546 root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.nest"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]); 2547})(self, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) { 2548return /******/ (function() { // webpackBootstrap 2549/******/ "use strict"; 2550/******/ var __webpack_modules__ = ({ 2551
vendor: 5,260 bytes, lines 2552-2679
2552/***/ "./js/foundation.util.nest.js": 2553/*!************************************!*\ 2554 !*** ./js/foundation.util.nest.js ***! 2555 \************************************/ 2556/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 2557 2558__webpack_require__.r(__webpack_exports__); 2559/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2560/* harmony export */ Nest: function() { return /* binding */ Nest; } 2561/* harmony export */ }); 2562/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 2563/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 2564 2565var Nest = { 2566 Feather: function Feather(menu) { 2567 var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'zf'; 2568 menu.attr('role', 'menubar'); 2569 menu.find('a').attr({ 2570 'role': 'menuitem' 2571 }); 2572 var items = menu.find('li').attr({ 2573 'role': 'none' 2574 }), 2575 subMenuClass = "is-".concat(type, "-submenu"), 2576 subItemClass = "".concat(subMenuClass, "-item"), 2577 hasSubClass = "is-".concat(type, "-submenu-parent"), 2578 applyAria = type !== 'accordion'; // Accordions handle their own ARIA attriutes. 2579 2580 items.each(function () { 2581 var $item = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 2582 $sub = $item.children('ul'); 2583 if ($sub.length) { 2584 $item.addClass(hasSubClass); 2585 if (applyAria) { 2586 var firstItem = $item.children('a:first'); 2587 firstItem.attr({ 2588 'aria-haspopup': true, 2589 'aria-label': firstItem.attr('aria-label') || firstItem.text() 2590 }); 2591 // Note: Drilldowns behave differently in how they hide, and so need 2592 // additional attributes. We should look if this possibly over-generalized 2593 // utility (Nest) is appropriate when we rework menus in 6.4 2594 if (type === 'drilldown') { 2595 $item.attr({ 2596 'aria-expanded': false 2597 }); 2598 } 2599 } 2600 $sub.addClass("submenu ".concat(subMenuClass)).attr({ 2601 'data-submenu': '', 2602 'role': 'menubar' 2603 }); 2604 if (type === 'drilldown') { 2605 $sub.attr({ 2606 'aria-hidden': true 2607 }); 2608 } 2609 } 2610 if ($item.parent('[data-submenu]').length) { 2611 $item.addClass("is-submenu-item ".concat(subItemClass)); 2612 } 2613 }); 2614 return; 2615 }, 2616 Burn: function Burn(menu, type) { 2617 var 2618 //items = menu.find('li'), 2619 subMenuClass = "is-".concat(type, "-submenu"), 2620 subItemClass = "".concat(subMenuClass, "-item"), 2621 hasSubClass = "is-".concat(type, "-submenu-parent"); 2622 menu.find('>li, > li > ul, .menu, .menu > li, [data-submenu] > li').removeClass("".concat(subMenuClass, " ").concat(subItemClass, " ").concat(hasSubClass, " is-submenu-item submenu is-active")).removeAttr('data-submenu').css('display', ''); 2623 } 2624}; 2625 2626 2627/***/ }), 2628 2629/***/ "./foundation.core": 2630/*!****************************************************************************************************************************************************************!*\ 2631 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 2632 \****************************************************************************************************************************************************************/ 2633/***/ (function(module) { 2634 2635module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 2636 2637/***/ }), 2638 2639/***/ "jquery": 2640/*!********************************************************************************************!*\ 2641 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 2642 \********************************************************************************************/ 2643/***/ (function(module) { 2644 2645module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 2646 2647/***/ }) 2648 2649/******/ }); 2650/************************************************************************/ 2651/******/ // The module cache 2652/******/ var __webpack_module_cache__ = {}; 2653/******/ 2654/******/ // The require function 2655/******/ function __webpack_require__(moduleId) { 2656/******/ // Check if module is in cache 2657/******/ var cachedModule = __webpack_module_cache__[moduleId]; 2658/******/ if (cachedModule !== undefined) { 2659/******/ return cachedModule.exports; 2660/******/ } 2661/******/ // Create a new module (and put it into the cache) 2662/******/ var module = __webpack_module_cache__[moduleId] = { 2663/******/ // no module.id needed 2664/******/ // no module.loaded needed 2665/******/ exports: {} 2666/******/ }; 2667/******/ 2668/******/ // Execute the module function 2669/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 2670/******/ 2671/******/ // Return the exports of the module 2672/******/ return module.exports; 2673/******/ } 2674/******/ 2675/************************************************************************/ 2676/******/ /* webpack/runtime/compat get default export */ 2677/******/ !function() { 2678/******/ // getDefaultExport function for compatibility with non-harmony modules 2679/******/ __webpack_require__.n = function(module) {
2680/******/ var getter = module && module.__esModule ? 2681/******/ function() { return module['default']; } : 2682/******/ function() { return module; }; 2683/******/ __webpack_require__.d(getter, { a: getter }); 2684/******/ return getter; 2685/******/ }; 2686/******/ }(); 2687/******/ 2688/******/ /* webpack/runtime/define property getters */ 2689/******/ !function() { 2690/******/ // define getter functions for harmony exports 2691/******/ __webpack_require__.d = function(exports, definition) { 2692/******/ for(var key in definition) { 2693/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 2694/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 2695/******/ } 2696/******/ } 2697/******/ }; 2698/******/ }(); 2699/******/ 2700/******/ /* webpack/runtime/hasOwnProperty shorthand */ 2701/******/ !function() { 2702/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 2703/******/ }(); 2704/******/ 2705/******/ /* webpack/runtime/make namespace object */ 2706/******/ !function() { 2707/******/ // define __esModule on exports 2708/******/ __webpack_require__.r = function(exports) { 2709/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 2710/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 2711/******/ } 2712/******/ Object.defineProperty(exports, '__esModule', { value: true }); 2713/******/ }; 2714/******/ }(); 2715/******/ 2716/************************************************************************/ 2717var __webpack_exports__ = {}; 2718// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 2719!function() { 2720/*!****************************************************!*\ 2721 !*** ./js/entries/plugins/foundation.util.nest.js ***! 2722 \****************************************************/ 2723__webpack_require__.r(__webpack_exports__); 2724/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2725/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation; }, 2726/* harmony export */ Nest: function() { return /* reexport safe */ _foundation_util_nest__WEBPACK_IMPORTED_MODULE_1__.Nest; } 2727/* harmony export */ }); 2728/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core"); 2729/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 2730/* harmony import */ var _foundation_util_nest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.nest */ "./js/foundation.util.nest.js"); 2731 2732 2733_foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation.Nest = _foundation_util_nest__WEBPACK_IMPORTED_MODULE_1__.Nest; 2734 2735}(); 2736/******/ return __webpack_exports__; 2737/******/ })() 2738; 2739}); 2740 2741((e,n)=>{"object"==typeof exports&&"object"==typeof module?module.exports=n(require("./foundation.core"),require("jquery")):"function"==typeof define&&define.amd?define(["./foundation.core","jquery"],n):"object"==typeof exports?exports.__FOUNDATION_EXTERNAL__=n(require("./foundation.core"),require("jquery")):(e.__FOUNDATION_EXTERNAL__=e.__FOUNDATION_EXTERNAL__||{},e.__FOUNDATION_EXTERNAL__["foundation.util.nest"]=n(e.__FOUNDATION_EXTERNAL__["foundation.core"],e.jQuery))})(self,function(n,t){return r={
vendor: 2,763 bytes, lines 2741-2757
2741"./js/foundation.util.nest.js":function(e,n,t){t.r(n),t.d(n,{Nest:function(){return o}});var n=t("jquery"),c=t.n(n),o={Feather:function(e){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"zf",e=(e.attr("role","menubar"),e.find("a").attr({role:"menuitem"}),e.find("li").attr({role:"none"})),r="is-".concat(o,"-submenu"),u="".concat(r,"-item"),a="is-".concat(o,"-submenu-parent"),i="accordion"!==o;e.each(function(){var e,n=c()(this),t=n.children("ul");t.length&&(n.addClass(a),i&&((e=n.children("a:first")).attr({"aria-haspopup":!0,"aria-label":e.attr("aria-label")||e.text()}),"drilldown"===o)&&n.attr({"aria-expanded":!1}),t.addClass("submenu ".concat(r)).attr({"data-submenu":"",role:"menubar"}),"drilldown"===o)&&t.attr({"aria-hidden":!0}),n.parent("[data-submenu]").length&&n.addClass("is-submenu-item ".concat(u))})},Burn:function(e,n){var t="is-".concat(n,"-submenu"),o="".concat(t,"-item"),n="is-".concat(n,"-submenu-parent");e.find(">li, > li > ul, .menu, .menu > li, [data-submenu] > li").removeClass("".concat(t," ").concat(o," ").concat(n," is-submenu-item submenu is-active")).removeAttr("data-submenu").css("display","")}}},"./foundation.core":function(e){e.exports=n},jquery:function(e){e.exports=t}},u={},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,{a:n}),n},o.d=function(e,n){for(var t in n)o.o(n,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},i={},(o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(i),o.d(i,{Foundation:function(){return e.Foundation},Nest:function(){return a.Nest}}),e=o("./foundation.core"),a=o("./js/foundation.util.nest.js"),e.Foundation.Nest=a.Nest,i;function o(e){var n=u[e];return void 0!==n||(n=u[e]={exports:{}},r[e](n,n.exports,o)),n.exports}var r,u,e,a,i}); 2742 2743 2744(function webpackUniversalModuleDefinition(root, factory) { 2745 if(typeof exports === 'object' && typeof module === 'object') 2746 module.exports = factory(require("./foundation.core")); 2747 else if(typeof define === 'function' && define.amd) 2748 define(["./foundation.core"], factory); 2749 else if(typeof exports === 'object') 2750 exports["__FOUNDATION_EXTERNAL__"] = factory(require("./foundation.core")); 2751 else 2752 root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.timer"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"]); 2753})(self, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__) { 2754return /******/ (function() { // webpackBootstrap 2755/******/ "use strict"; 2756/******/ var __webpack_modules__ = ({ 2757
vendor: 6,761 bytes, lines 2758-2915
2758/***/ "./js/foundation.util.timer.js": 2759/*!*************************************!*\ 2760 !*** ./js/foundation.util.timer.js ***! 2761 \*************************************/ 2762/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 2763 2764__webpack_require__.r(__webpack_exports__); 2765/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2766/* harmony export */ Timer: function() { return /* binding */ Timer; } 2767/* harmony export */ }); 2768function Timer(elem, options, cb) { 2769 var _this = this, 2770 duration = options.duration, 2771 //options is an object for easily adding features later. 2772 nameSpace = Object.keys(elem.data())[0] || 'timer', 2773 remain = -1, 2774 start, 2775 timer; 2776 this.isPaused = false; 2777 this.restart = function () { 2778 remain = -1; 2779 clearTimeout(timer); 2780 this.start(); 2781 }; 2782 this.start = function () { 2783 this.isPaused = false; 2784 // if(!elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things. 2785 clearTimeout(timer); 2786 remain = remain <= 0 ? duration : remain; 2787 elem.data('paused', false); 2788 start = Date.now(); 2789 timer = setTimeout(function () { 2790 if (options.infinite) { 2791 _this.restart(); //rerun the timer. 2792 } 2793 if (cb && typeof cb === 'function') { 2794 cb(); 2795 } 2796 }, remain); 2797 elem.trigger("timerstart.zf.".concat(nameSpace)); 2798 }; 2799 this.pause = function () { 2800 this.isPaused = true; 2801 //if(elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things. 2802 clearTimeout(timer); 2803 elem.data('paused', true); 2804 var end = Date.now(); 2805 remain = remain - (end - start); 2806 elem.trigger("timerpaused.zf.".concat(nameSpace)); 2807 }; 2808} 2809 2810 2811/***/ }), 2812 2813/***/ "./foundation.core": 2814/*!****************************************************************************************************************************************************************!*\ 2815 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 2816 \****************************************************************************************************************************************************************/ 2817/***/ (function(module) { 2818 2819module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 2820 2821/***/ }) 2822 2823/******/ }); 2824/************************************************************************/ 2825/******/ // The module cache 2826/******/ var __webpack_module_cache__ = {}; 2827/******/ 2828/******/ // The require function 2829/******/ function __webpack_require__(moduleId) { 2830/******/ // Check if module is in cache 2831/******/ var cachedModule = __webpack_module_cache__[moduleId]; 2832/******/ if (cachedModule !== undefined) { 2833/******/ return cachedModule.exports; 2834/******/ } 2835/******/ // Create a new module (and put it into the cache) 2836/******/ var module = __webpack_module_cache__[moduleId] = { 2837/******/ // no module.id needed 2838/******/ // no module.loaded needed 2839/******/ exports: {} 2840/******/ }; 2841/******/ 2842/******/ // Execute the module function 2843/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 2844/******/ 2845/******/ // Return the exports of the module 2846/******/ return module.exports; 2847/******/ } 2848/******/ 2849/************************************************************************/ 2850/******/ /* webpack/runtime/compat get default export */ 2851/******/ !function() { 2852/******/ // getDefaultExport function for compatibility with non-harmony modules 2853/******/ __webpack_require__.n = function(module) { 2854/******/ var getter = module && module.__esModule ? 2855/******/ function() { return module['default']; } : 2856/******/ function() { return module; }; 2857/******/ __webpack_require__.d(getter, { a: getter }); 2858/******/ return getter; 2859/******/ }; 2860/******/ }(); 2861/******/ 2862/******/ /* webpack/runtime/define property getters */ 2863/******/ !function() { 2864/******/ // define getter functions for harmony exports 2865/******/ __webpack_require__.d = function(exports, definition) { 2866/******/ for(var key in definition) { 2867/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 2868/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 2869/******/ } 2870/******/ } 2871/******/ }; 2872/******/ }(); 2873/******/ 2874/******/ /* webpack/runtime/hasOwnProperty shorthand */ 2875/******/ !function() { 2876/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 2877/******/ }(); 2878/******/ 2879/******/ /* webpack/runtime/make namespace object */ 2880/******/ !function() { 2881/******/ // define __esModule on exports 2882/******/ __webpack_require__.r = function(exports) { 2883/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 2884/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 2885/******/ } 2886/******/ Object.defineProperty(exports, '__esModule', { value: true }); 2887/******/ }; 2888/******/ }(); 2889/******/ 2890/************************************************************************/ 2891var __webpack_exports__ = {}; 2892// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 2893!function() { 2894/*!*****************************************************!*\ 2895 !*** ./js/entries/plugins/foundation.util.timer.js ***! 2896 \*****************************************************/ 2897__webpack_require__.r(__webpack_exports__); 2898/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2899/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation; }, 2900/* harmony export */ Timer: function() { return /* reexport safe */ _foundation_util_timer__WEBPACK_IMPORTED_MODULE_1__.Timer; } 2901/* harmony export */ }); 2902/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core"); 2903/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 2904/* harmony import */ var _foundation_util_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.timer */ "./js/foundation.util.timer.js"); 2905 2906 2907_foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation.Timer = _foundation_util_timer__WEBPACK_IMPORTED_MODULE_1__.Timer; 2908 2909}(); 2910/******/ return __webpack_exports__; 2911/******/ })() 2912; 2913}); 2914 2915((t,e)=>{"object"==typeof exports&&"object"==typeof module?module.exports=e(require("./foundation.core")):"function"==typeof define&&define.amd?define(["./foundation.core"],e):"object"==typeof exports?exp
2915orts.__FOUNDATION_EXTERNAL__=e(require("./foundation.core")):(t.__FOUNDATION_EXTERNAL__=t.__FOUNDATION_EXTERNAL__||{},t.__FOUNDATION_EXTERNAL__["foundation.util.timer"]=e(t.__FOUNDATION_EXTERNAL__["foundation.core"]))})(self,function(e){return o={
vendor: 1,426 bytes, lines 2915-2917
2915"./js/foundation.util.timer.js":function(t,e,o){function n(e,t,o){var n,r,i=this,u=t.duration,a=Object.keys(e.data())[0]||"timer",f=-1;this.isPaused=!1,this.restart=function(){f=-1,clearTimeout(r),this.start()},this.start=function(){this.isPaused=!1,clearTimeout(r),f=f<=0?u:f,e.data("paused",!1),n=Date.now(),r=setTimeout(function(){t.infinite&&i.restart(),o&&"function"==typeof o&&o()},f),e.trigger("timerstart.zf.".concat(a))},this.pause=function(){this.isPaused=!0,clearTimeout(r),e.data("paused",!0);var t=Date.now();f-=t-n,e.trigger("timerpaused.zf.".concat(a))}}o.r(e),o.d(e,{Timer:function(){return n}})},"./foundation.core":function(t){t.exports=e}},r={},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},u={},(n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(u),n.d(u,{Foundation:function(){return t.Foundation},Timer:function(){return i.Timer}}),t=n("./foundation.core"),i=n("./js/foundation.util.timer.js"),t.Foundation.Timer=i.Timer,u;function n(t){var e=r[t];return void 0!==e||(e=r[t]={exports:{}},o[t](e,e.exports,n)),e.exports}var o,r,t,i,u}); 2916 2917
vendor: 14,344 bytes, lines 2918-3225
2918(function webpackUniversalModuleDefinition(root, factory) { 2919 if(typeof exports === 'object' && typeof module === 'object') 2920 module.exports = factory(require("jquery"), require("./foundation.core")); 2921 else if(typeof define === 'function' && define.amd) 2922 define(["jquery", "./foundation.core"], factory); 2923 else if(typeof exports === 'object') 2924 exports["__FOUNDATION_EXTERNAL__"] = factory(require("jquery"), require("./foundation.core")); 2925 else 2926 root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.touch"] = factory(root["jQuery"], root["__FOUNDATION_EXTERNAL__"]["foundation.core"]); 2927})(self, function(__WEBPACK_EXTERNAL_MODULE_jquery__, __WEBPACK_EXTERNAL_MODULE__foundation_core__) { 2928return /******/ (function() { // webpackBootstrap 2929/******/ "use strict"; 2930/******/ var __webpack_modules__ = ({ 2931 2932/***/ "./js/foundation.util.touch.js": 2933/*!*************************************!*\ 2934 !*** ./js/foundation.util.touch.js ***! 2935 \*************************************/ 2936/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 2937 2938__webpack_require__.r(__webpack_exports__); 2939/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2940/* harmony export */ Touch: function() { return /* binding */ Touch; } 2941/* harmony export */ }); 2942/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 2943/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 2944function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 2945function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } 2946function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } 2947function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } 2948function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 2949function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 2950//************************************************** 2951//**Work inspired by multiple jquery swipe plugins** 2952//**Done by Yohai Ararat *************************** 2953//************************************************** 2954 2955 2956var Touch = {}; 2957var startPosX, 2958 startTime, 2959 elapsedTime, 2960 startEvent, 2961 isMoving = false, 2962 didMoved = false; 2963function onTouchEnd(e) { 2964 this.removeEventListener('touchmove', onTouchMove); 2965 this.removeEventListener('touchend', onTouchEnd); 2966 2967 // If the touch did not move, consider it as a "tap" 2968 if (!didMoved) { 2969 var tapEvent = jquery__WEBPACK_IMPORTED_MODULE_0___default().Event('tap', startEvent || e); 2970 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger(tapEvent); 2971 } 2972 startEvent = null; 2973 isMoving = false; 2974 didMoved = false; 2975} 2976function onTouchMove(e) { 2977 if (true === (jquery__WEBPACK_IMPORTED_MODULE_0___default().spotSwipe).preventDefault) { 2978 e.preventDefault(); 2979 } 2980 if (isMoving) { 2981 var x = e.touches[0].pageX; 2982 // var y = e.touches[0].pageY; 2983 var dx = startPosX - x; 2984 // var dy = startPosY - y; 2985 var dir; 2986 didMoved = true; 2987 elapsedTime = new Date().getTime() - startTime; 2988 if (Math.abs(dx) >= (jquery__WEBPACK_IMPORTED_MODULE_0___default().spotSwipe).moveThreshold && elapsedTime <= (jquery__WEBPACK_IMPORTED_MODULE_0___default().spotSwipe).timeThreshold) { 2989 dir = dx > 0 ? 'left' : 'right'; 2990 } 2991 // else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) { 2992 // dir = dy > 0 ? 'down' : 'up'; 2993 // } 2994 if (dir) { 2995 e.preventDefault(); 2996 onTouchEnd.apply(this, arguments); 2997 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger(jquery__WEBPACK_IMPORTED_MODULE_0___default().Event('swipe', Object.assign({}, e)), dir).trigger(jquery__WEBPACK_IMPORTED_MODULE_0___default().Event("swipe".concat(dir), Object.assign({}, e))); 2998 } 2999 } 3000} 3001function onTouchStart(e) { 3002 if (e.touches.length === 1) { 3003 startPosX = e.touches[0].pageX; 3004 startEvent = e; 3005 isMoving = true; 3006 didMoved = false; 3007 startTime = new Date().getTime(); 3008 this.addEventListener('touchmove', onTouchMove, { 3009 passive: true === (jquery__WEBPACK_IMPORTED_MODULE_0___default().spotSwipe).preventDefault 3010 }); 3011 this.addEventListener('touchend', onTouchEnd, false); 3012 } 3013} 3014function init() { 3015 this.addEventListener && this.addEventListener('touchstart', onTouchStart, { 3016 passive: true 3017 }); 3018} 3019 3020// function teardown() { 3021// this.removeEventListener('touchstart', onTouchStart); 3022// } 3023var SpotSwipe = /*#__PURE__*/function () { 3024 function SpotSwipe() { 3025 _classCallCheck(this, SpotSwipe); 3026 this.version = '1.0.0'; 3027 this.enabled = 'ontouchstart' in document.documentElement; 3028 this.preventDefault = false; 3029 this.moveThreshold = 75; 3030 this.timeThreshold = 200; 3031 this._init(); 3032 } 3033 return _createClass(SpotSwipe, [{ 3034 key: "_init", 3035 value: function _init() { 3036 (jquery__WEBPACK_IMPORTED_MODULE_0___default().event).special.swipe = { 3037 setup: init 3038 }; 3039 (jquery__WEBPACK_IMPORTED_MODULE_0___default().event).special.tap = { 3040 setup: init 3041 }; 3042 jquery__WEBPACK_IMPORTED_MODULE_0___default().each(['left', 'up', 'down', 'right'], function () { 3043 (jquery__WEBPACK_IMPORTED_MODULE_0___default().event).special["swipe".concat(this)] = { 3044 setup: function setup() { 3045 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).on('swipe', (jquery__WEBPACK_IMPORTED_MODULE_0___default().noop)); 3046 } 3047 }; 3048 }); 3049 } 3050 }]); 3051}(); 3052/**************************************************** 3053 * As far as I can tell, both setupSpotSwipe and * 3054 * setupTouchHandler should be idempotent, * 3055 * because they directly replace functions & * 3056 * values, and do not add event handlers directly. * 3057 ****************************************************/ 3058Touch.setupSpotSwipe = function () { 3059 (jquery__WEBPACK_IMPORTED_MODULE_0___default().spotSwipe) = new SpotSwipe((jquery__WEBPACK_IMPORTED_MODULE_0___default())); 3060}; 3061 3062/**************************************************** 3063 * Method for adding pseudo drag events to elements * 3064 ***************************************************/ 3065Touch.setupTouchHandler = function () { 3066 (jquery__WEBPACK_IMPORTED_MODULE_0___default().fn).addTouch = function () { 3067 this.each(function (i, el) { 3068 jquery__WEBPACK_IMPORTED_MODULE_0___default()(el).bind('touchstart touchmove touchend touchcancel', function (event) { 3069 //we pass the original event object because the jQuery event 3070 //object is normalized to w3c specs and does not provide the TouchList 3071 handleTouch(event); 3072 }); 3073 }); 3074 var handleTouch = function handleTouch(event) { 3075 var touches = event.changedTouches, 3076 first = touches[0], 3077 eventTypes = { 3078 touchstart: 'mousedown', 3079 touchmove: 'mousemove', 3080 touchend: 'mouseup' 3081 }, 3082 type = eventTypes[event.type], 3083 simulatedEvent; 3084 if ('MouseEvent' in window && typeof window.MouseEvent === 'function') { 3085 simulatedEvent = new window.MouseEvent(type, { 3086 'bubbles': true, 3087 'cancelable': true, 3088 'screenX': first.screenX, 3089 'screenY': first.screenY, 3090 'clientX': first.clientX, 3091 'clientY': first.clientY 3092 }); 3093 } else { 3094 simulatedEvent = document.createEvent('MouseEvent'); 3095 simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0 /*left*/, null); 3096 } 3097 first.target.dispatchEvent(simulatedEvent); 3098 }; 3099 }; 3100}; 3101Touch.init = function () { 3102 if (typeof (jquery__WEBPACK_IMPORTED_MODULE_0___default().spotSwipe) === 'undefined') { 3103 Touch.setupSpotSwipe((jquery__WEBPACK_IMPORTED_MODULE_0___default())); 3104 Touch.setupTouchHandler((jquery__WEBPACK_IMPORTED_MODULE_0___default())); 3105 } 3106}; 3107 3108 3109/***/ }), 3110 3111/***/ "./foundation.core": 3112/*!****************************************************************************************************************************************************************!*\ 3113 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 3114 \****************************************************************************************************************************************************************/ 3115/***/ (function(module) { 3116 3117module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 3118 3119/***/ }), 3120 3121/***/ "jquery": 3122/*!********************************************************************************************!*\ 3123 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 3124 \********************************************************************************************/ 3125/***/ (function(module) { 3126 3127module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 3128 3129/***/ }) 3130 3131/******/ }); 3132/************************************************************************/ 3133/******/ // The module cache 3134/******/ var __webpack_module_cache__ = {}; 3135/******/ 3136/******/ // The require function 3137/******/ function __webpack_require__(moduleId) { 3138/******/ // Check if module is in cache 3139/******/ var cachedModule = __webpack_module_cache__[moduleId]; 3140/******/ if (cachedModule !== undefined) { 3141/******/ return cachedModule.exports; 3142/******/ } 3143/******/ // Create a new module (and put it into the cache) 3144/******/ var module = __webpack_module_cache__[moduleId] = { 3145/******/ // no module.id needed 3146/******/ // no module.loaded needed 3147/******/ exports: {} 3148/******/ }; 3149/******/ 3150/******/ // Execute the module function 3151/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 3152/******/ 3153/******/ // Return the exports of the module 3154/******/ return module.exports; 3155/******/ } 3156/******/ 3157/************************************************************************/ 3158/******/ /* webpack/runtime/compat get default export */ 3159/******/ !function() { 3160/******/ // getDefaultExport function for compatibility with non-harmony modules 3161/******/ __webpack_require__.n = function(module) { 3162/******/ var getter = module && module.__esModule ? 3163/******/ function() { return module['default']; } : 3164/******/ function() { return module; }; 3165/******/ __webpack_require__.d(getter, { a: getter }); 3166/******/ return getter; 3167/******/ }; 3168/******/ }(); 3169/******/ 3170/******/ /* webpack/runtime/define property getters */ 3171/******/ !function() { 3172/******/ // define getter functions for harmony exports 3173/******/ __webpack_require__.d = function(exports, definition) { 3174/******/ for(var key in definition) { 3175/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 3176/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 3177/******/ } 3178/******/ } 3179/******/ }; 3180/******/ }(); 3181/******/ 3182/******/ /* webpack/runtime/hasOwnProperty shorthand */ 3183/******/ !function() { 3184/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 3185/******/ }(); 3186/******/ 3187/******/ /* webpack/runtime/make namespace object */ 3188/******/ !function() { 3189/******/ // define __esModule on exports 3190/******/ __webpack_require__.r = function(exports) { 3191/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 3192/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 3193/******/ } 3194/******/ Object.defineProperty(exports, '__esModule', { value: true }); 3195/******/ }; 3196/******/ }(); 3197/******/ 3198/************************************************************************/ 3199var __webpack_exports__ = {}; 3200// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 3201!function() { 3202/*!*****************************************************!*\ 3203 !*** ./js/entries/plugins/foundation.util.touch.js ***! 3204 \*****************************************************/ 3205__webpack_require__.r(__webpack_exports__); 3206/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3207/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_2__.Foundation; }, 3208/* harmony export */ Touch: function() { return /* reexport safe */ _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__.Touch; } 3209/* harmony export */ }); 3210/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 3211/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 3212/* harmony import */ var _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.touch */ "./js/foundation.util.touch.js"); 3213/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core"); 3214/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_2__); 3215 3216 3217_foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__.Touch.init((jquery__WEBPACK_IMPORTED_MODULE_0___default())); 3218window.Foundation.Touch = _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__.Touch; 3219 3220 3221}(); 3222/******/ return __webpack_exports__; 3223/******/ })() 3224; 3225});
3226 3227((e,t)=>{"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jquery"),require("./foundation.core")):"function"==typeof define&&define.amd?define(["jquery","./foundation.core"],t):"object"==typeof exports?exports.__FOUNDATION_EXTERNAL__=t(require("jquery"),require("./foundation.core")):(e.__FOUNDATION_EXTERNAL__=e.__FOUNDATION_EXTERNAL__||{},e.__FOUNDATION_EXTERNAL__["foundation.util.touch"]=t(e.jQuery,e.__FOUNDATION_EXTERNAL__["foundation.core"]))})(self,function(t,n){return i={
vendor: 3,964 bytes, lines 3227-3229
3227"./js/foundation.util.touch.js":function(e,t,n){n.r(t),n.d(t,{Touch:function(){return f}});var t=n("jquery"),i=n.n(t);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(e=>(e=((e,t)=>{if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=r(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==r(e)?e:e+""))(o.key),o)}}var o,c,s,a,f={},p=!1,l=!1;function d(e){this.removeEventListener("touchmove",h),this.removeEventListener("touchend",d),l||(e=i().Event("tap",a||e),i()(this).trigger(e)),a=null,l=p=!1}function h(e){var t,n;!0===i().spotSwipe.preventDefault&&e.preventDefault(),p&&(t=e.touches[0].pageX,t=o-t,l=!0,s=(new Date).getTime()-c,n=Math.abs(t)>=i().spotSwipe.moveThreshold&&s<=i().spotSwipe.timeThreshold?0<t?"left":"right":n)&&(e.preventDefault(),d.apply(this,arguments),i()(this).trigger(i().Event("swipe",Object.assign({},e)),n).trigger(i().Event("swipe".concat(n),Object.assign({},e))))}function v(e){1===e.touches.length&&(o=e.touches[0].pageX,a=e,l=!(p=!0),c=(new Date).getTime(),this.addEventListener("touchmove",h,{passive:!0===i().spotSwipe.preventDefault}),this.addEventListener("touchend",d,!1))}function y(){this.addEventListener&&this.addEventListener("touchstart",v,{passive:!0})}var m=(()=>{function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.version="1.0.0",this.enabled="ontouchstart"in document.documentElement,this.preventDefault=!1,this.moveThreshold=75,this.timeThreshold=200,this._init()}return t=e,(n=[{key:"_init",value:function(){i().event.special.swipe={setup:y},i().event.special.tap={setup:y},i().each(["left","up","down","right"],function(){i().event.special["swipe".concat(this)]={setup:function(){i()(this).on("swipe",i().noop)}}})}}])&&u(t.prototype,n),o&&u(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,o})();f.setupSpotSwipe=function(){i().spotSwipe=new m(i())},f.setupTouchHandler=function(){i().fn.addTouch=function(){this.each(function(e,t){i()(t).bind("touchstart touchmove touchend touchcancel",function(e){n(e)})});var n=function(e){var t,n=e.changedTouches[0],e={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"}[e.type];"MouseEvent"in window&&"function"==typeof window.MouseEvent?t=new window.MouseEvent(e,{bubbles:!0,cancelable:!0,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY}):(t=document.createEvent("MouseEvent")).initMouseEvent(e,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(t)}}},f.init=function(){void 0===i().spotSwipe&&(f.setupSpotSwipe(i()),f.setupTouchHandler(i()))}},"./foundation.core":function(e){e.exports=n},jquery:function(e){e.exports=t}},r={},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s={},(o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(s),o.d(s,{Foundation:function(){return c.Foundation},Touch:function(){return u.Touch}}),e=o("jquery"),e=o.n(e),u=o("./js/foundation.util.touch.js"),c=o("./foundation.core"),u.Touch.init(e()),window.Foundation.Touch=u.Touch,s;function o(e){var t=r[e];return void 0!==t||(t=r[e]={exports:{}},i[e](t,t.exports,o)),t.exports}var i,r,e,u,c,s}); 3228 3229
vendor: 19,606 bytes, lines 3230-3634
3230(function webpackUniversalModuleDefinition(root, factory) { 3231 if(typeof exports === 'object' && typeof module === 'object') 3232 module.exports = factory(require("./foundation.core"), require("jquery"), require("./foundation.util.motion")); 3233 else if(typeof define === 'function' && define.amd) 3234 define(["./foundation.core", "jquery", "./foundation.util.motion"], factory); 3235 else if(typeof exports === 'object') 3236 exports["__FOUNDATION_EXTERNAL__"] = factory(require("./foundation.core"), require("jquery"), require("./foundation.util.motion")); 3237 else 3238 root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.triggers"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.motion"]); 3239})(self, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__) { 3240return /******/ (function() { // webpackBootstrap 3241/******/ "use strict"; 3242/******/ var __webpack_modules__ = ({ 3243 3244/***/ "./js/foundation.util.triggers.js": 3245/*!****************************************!*\ 3246 !*** ./js/foundation.util.triggers.js ***! 3247 \****************************************/ 3248/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 3249 3250__webpack_require__.r(__webpack_exports__); 3251/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3252/* harmony export */ Triggers: function() { return /* binding */ Triggers; } 3253/* harmony export */ }); 3254/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 3255/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 3256/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ "./foundation.core"); 3257/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__); 3258/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.motion */ "./foundation.util.motion"); 3259/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__); 3260function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 3261 3262 3263 3264var MutationObserver = function () { 3265 var prefixes = ['WebKit', 'Moz', 'O', 'Ms', '']; 3266 for (var i = 0; i < prefixes.length; i++) { 3267 if ("".concat(prefixes[i], "MutationObserver") in window) { 3268 return window["".concat(prefixes[i], "MutationObserver")]; 3269 } 3270 } 3271 return false; 3272}(); 3273var triggers = function triggers(el, type) { 3274 el.data(type).split(' ').forEach(function (id) { 3275 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id))[type === 'close' ? 'trigger' : 'triggerHandler']("".concat(type, ".zf.trigger"), [el]); 3276 }); 3277}; 3278var Triggers = { 3279 Listeners: { 3280 Basic: {}, 3281 Global: {} 3282 }, 3283 Initializers: {} 3284}; 3285Triggers.Listeners.Basic = { 3286 openListener: function openListener() { 3287 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'open'); 3288 }, 3289 closeListener: function closeListener() { 3290 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('close'); 3291 if (id) { 3292 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'close'); 3293 } else { 3294 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('close.zf.trigger'); 3295 } 3296 }, 3297 toggleListener: function toggleListener() { 3298 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle'); 3299 if (id) { 3300 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'toggle'); 3301 } else { 3302 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('toggle.zf.trigger'); 3303 } 3304 }, 3305 closeableListener: function closeableListener(e) { 3306 var animation = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('closable'); 3307 3308 // Only close the first closable element. See https://git.io/zf-7833 3309 e.stopPropagation(); 3310 if (animation !== '') { 3311 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__.Motion.animateOut(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), animation, function () { 3312 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('closed.zf'); 3313 }); 3314 } else { 3315 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).fadeOut().trigger('closed.zf'); 3316 } 3317 }, 3318 toggleFocusListener: function toggleFocusListener() { 3319 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle-focus'); 3320 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id)).triggerHandler('toggle.zf.trigger', [jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)]); 3321 } 3322}; 3323 3324// Elements with [data-open] will reveal a plugin that supports it when clicked. 3325Triggers.Initializers.addOpenListener = function ($elem) { 3326 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener); 3327 $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener); 3328}; 3329 3330// Elements with [data-close] will close a plugin that supports it when clicked. 3331// If used without a value on [data-close], the event will bubble, allowing it to close a parent component. 3332Triggers.Initializers.addCloseListener = function ($elem) { 3333 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener); 3334 $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener); 3335}; 3336 3337// Elements with [data-toggle] will toggle a plugin that supports it when clicked. 3338Triggers.Initializers.addToggleListener = function ($elem) { 3339 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener); 3340 $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener); 3341}; 3342 3343// Elements with [data-closable] will respond to close.zf.trigger events. 3344Triggers.Initializers.addCloseableListener = function ($elem) { 3345 $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener); 3346 $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener); 3347}; 3348 3349// Elements with [data-toggle-focus] will respond to coming in and out of focus 3350Triggers.Initializers.addToggleFocusListener = function ($elem) { 3351 $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener); 3352 $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener); 3353}; 3354 3355// More Global/complex listeners and triggers 3356Triggers.Listeners.Global = { 3357 resizeListener: function resizeListener($nodes) { 3358 if (!MutationObserver) { 3359 //fallback for IE 9 3360 $nodes.each(function () { 3361 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('resizeme.zf.trigger'); 3362 }); 3363 } 3364 //trigger all listening elements and signal a resize event 3365 $nodes.attr('data-events', "resize"); 3366 }, 3367 scrollListener: function scrollListener($nodes) { 3368 if (!MutationObserver) { 3369 //fallback for IE 9 3370 $nodes.each(function () { 3371 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('scrollme.zf.trigger'); 3372 }); 3373 } 3374 //trigger all listening elements and signal a scroll event 3375 $nodes.attr('data-events', "scroll"); 3376 }, 3377 closeMeListener: function closeMeListener(e, pluginId) { 3378 var plugin = e.namespace.split('.')[0]; 3379 var plugins = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-".concat(plugin, "]")).not("[data-yeti-box=\"".concat(pluginId, "\"]")); 3380 plugins.each(function () { 3381 var _this = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 3382 _this.triggerHandler('close.zf.trigger', [_this]); 3383 }); 3384 } 3385}; 3386 3387// Global, parses whole document. 3388Triggers.Initializers.addClosemeListener = function (pluginName) { 3389 var yetiBoxes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-yeti-box]'), 3390 plugNames = ['dropdown', 'tooltip', 'reveal']; 3391 if (pluginName) { 3392 if (typeof pluginName === 'string') { 3393 plugNames.push(pluginName); 3394 } else if (_typeof(pluginName) === 'object' && typeof pluginName[0] === 'string') { 3395 plugNames = plugNames.concat(pluginName); 3396 } else { 3397 console.error('Plugin names must be strings'); 3398 } 3399 } 3400 if (yetiBoxes.length) { 3401 var listeners = plugNames.map(function (name) { 3402 return "closeme.zf.".concat(name); 3403 }).join(' '); 3404 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener); 3405 } 3406}; 3407function debounceGlobalListener(debounce, trigger, listener) { 3408 var timer, 3409 args = Array.prototype.slice.call(arguments, 3); 3410 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on(trigger, function () { 3411 if (timer) { 3412 clearTimeout(timer); 3413 } 3414 timer = setTimeout(function () { 3415 listener.apply(null, args); 3416 }, debounce || 10); //default time to emit scroll event 3417 }); 3418} 3419Triggers.Initializers.addResizeListener = function (debounce) { 3420 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-resize]'); 3421 if ($nodes.length) { 3422 debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes); 3423 } 3424}; 3425Triggers.Initializers.addScrollListener = function (debounce) { 3426 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-scroll]'); 3427 if ($nodes.length) { 3428 debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes); 3429 } 3430}; 3431Triggers.Initializers.addMutationEventsListener = function ($elem) { 3432 if (!MutationObserver) { 3433 return false; 3434 } 3435 var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]'); 3436 3437 //element callback 3438 var listeningElementsMutation = function listeningElementsMutation(mutationRecordsList) { 3439 var $target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(mutationRecordsList[0].target); 3440 3441 //trigger the event handler for the element depending on type 3442 switch (mutationRecordsList[0].type) { 3443 case "attributes": 3444 if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") { 3445 $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]); 3446 } 3447 if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") { 3448 $target.triggerHandler('resizeme.zf.trigger', [$target]); 3449 } 3450 if (mutationRecordsList[0].attributeName === "style") { 3451 $target.closest("[data-mutate]").attr("data-events", "mutate"); 3452 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 3453 } 3454 break; 3455 case "childList": 3456 $target.closest("[data-mutate]").attr("data-events", "mutate"); 3457 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 3458 break; 3459 default: 3460 return false; 3461 //nothing 3462 } 3463 }; 3464 if ($nodes.length) { 3465 //for each element that needs to listen for resizing, scrolling, or mutation add a single observer 3466 for (var i = 0; i <= $nodes.length - 1; i++) { 3467 var elementObserver = new MutationObserver(listeningElementsMutation); 3468 elementObserver.observe($nodes[i], { 3469 attributes: true, 3470 childList: true, 3471 characterData: false, 3472 subtree: true, 3473 attributeFilter: ["data-events", "style"] 3474 }); 3475 } 3476 } 3477}; 3478Triggers.Initializers.addSimpleListeners = function () { 3479 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 3480 Triggers.Initializers.addOpenListener($document); 3481 Triggers.Initializers.addCloseListener($document); 3482 Triggers.Initializers.addToggleListener($document); 3483 Triggers.Initializers.addCloseableListener($document); 3484 Triggers.Initializers.addToggleFocusListener($document); 3485}; 3486Triggers.Initializers.addGlobalListeners = function () { 3487 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 3488 Triggers.Initializers.addMutationEventsListener($document); 3489 Triggers.Initializers.addResizeListener(250); 3490 Triggers.Initializers.addScrollListener(); 3491 Triggers.Initializers.addClosemeListener(); 3492}; 3493Triggers.init = function (__, Foundation) { 3494 (0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__.onLoad)(jquery__WEBPACK_IMPORTED_MODULE_0___default()(window), function () { 3495 if ((jquery__WEBPACK_IMPORTED_MODULE_0___default().triggersInitialized) !== true) { 3496 Triggers.Initializers.addSimpleListeners(); 3497 Triggers.Initializers.addGlobalListeners(); 3498 (jquery__WEBPACK_IMPORTED_MODULE_0___default().triggersInitialized) = true; 3499 } 3500 }); 3501 if (Foundation) { 3502 Foundation.Triggers = Triggers; 3503 // Legacy included to be backwards compatible for now. 3504 Foundation.IHearYou = Triggers.Initializers.addGlobalListeners; 3505 } 3506}; 3507 3508 3509/***/ }), 3510 3511/***/ "./foundation.core": 3512/*!****************************************************************************************************************************************************************!*\ 3513 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 3514 \****************************************************************************************************************************************************************/ 3515/***/ (function(module) { 3516 3517module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 3518 3519/***/ }), 3520 3521/***/ "./foundation.util.motion": 3522/*!********************************************************************************************************************************************************************************************!*\ 3523 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.motion"],"amd":"./foundation.util.motion","commonjs":"./foundation.util.motion","commonjs2":"./foundation.util.motion"} ***! 3524 \********************************************************************************************************************************************************************************************/ 3525/***/ (function(module) { 3526 3527module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__; 3528 3529/***/ }), 3530 3531/***/ "jquery": 3532/*!********************************************************************************************!*\ 3533 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 3534 \********************************************************************************************/ 3535/***/ (function(module) { 3536 3537module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 3538 3539/***/ }) 3540 3541/******/ }); 3542/************************************************************************/ 3543/******/ // The module cache 3544/******/ var __webpack_module_cache__ = {}; 3545/******/ 3546/******/ // The require function 3547/******/ function __webpack_require__(moduleId) { 3548/******/ // Check if module is in cache 3549/******/ var cachedModule = __webpack_module_cache__[moduleId]; 3550/******/ if (cachedModule !== undefined) { 3551/******/ return cachedModule.exports; 3552/******/ } 3553/******/ // Create a new module (and put it into the cache) 3554/******/ var module = __webpack_module_cache__[moduleId] = { 3555/******/ // no module.id needed 3556/******/ // no module.loaded needed 3557/******/ exports: {} 3558/******/ }; 3559/******/ 3560/******/ // Execute the module function 3561/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 3562/******/ 3563/******/ // Return the exports of the module 3564/******/ return module.exports; 3565/******/ } 3566/******/ 3567/************************************************************************/ 3568/******/ /* webpack/runtime/compat get default export */ 3569/******/ !function() { 3570/******/ // getDefaultExport function for compatibility with non-harmony modules 3571/******/ __webpack_require__.n = function(module) { 3572/******/ var getter = module && module.__esModule ? 3573/******/ function() { return module['default']; } : 3574/******/ function() { return module; }; 3575/******/ __webpack_require__.d(getter, { a: getter }); 3576/******/ return getter; 3577/******/ }; 3578/******/ }(); 3579/******/ 3580/******/ /* webpack/runtime/define property getters */ 3581/******/ !function() { 3582/******/ // define getter functions for harmony exports 3583/******/ __webpack_require__.d = function(exports, definition) { 3584/******/ for(var key in definition) { 3585/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 3586/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 3587/******/ } 3588/******/ } 3589/******/ }; 3590/******/ }(); 3591/******/ 3592/******/ /* webpack/runtime/hasOwnProperty shorthand */ 3593/******/ !function() { 3594/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 3595/******/ }(); 3596/******/ 3597/******/ /* webpack/runtime/make namespace object */ 3598/******/ !function() { 3599/******/ // define __esModule on exports 3600/******/ __webpack_require__.r = function(exports) { 3601/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 3602/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 3603/******/ } 3604/******/ Object.defineProperty(exports, '__esModule', { value: true }); 3605/******/ }; 3606/******/ }(); 3607/******/ 3608/************************************************************************/ 3609var __webpack_exports__ = {}; 3610// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 3611!function() { 3612/*!********************************************************!*\ 3613 !*** ./js/entries/plugins/foundation.util.triggers.js ***! 3614 \********************************************************/ 3615__webpack_require__.r(__webpack_exports__); 3616/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3617/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation; }, 3618/* harmony export */ Triggers: function() { return /* reexport safe */ _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_2__.Triggers; } 3619/* harmony export */ }); 3620/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core"); 3621/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 3622/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! jquery */ "jquery"); 3623/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_1__); 3624/* harmony import */ var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../foundation.util.triggers */ "./js/foundation.util.triggers.js"); 3625 3626 3627 3628_foundation_util_triggers__WEBPACK_IMPORTED_MODULE_2__.Triggers.init((jquery__WEBPACK_IMPORTED_MODULE_1___default()), _foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation); 3629 3630}(); 3631/******/ return __webpack_exports__; 3632/******/ })() 3633; 3634});
3635
vendor: 7,009 bytes, line 3636
3636((e,t)=>{"object"==typeof exports&&"object"==typeof module?module.exports=t(require("./foundation.core"),require("jquery"),require("./foundation.util.motion")):"function"==typeof define&&define.amd?define(["./foundation.core","jquery","./foundation.util.motion"],t):"object"==typeof exports?exports.__FOUNDATION_EXTERNAL__=t(require("./foundation.core"),require("jquery"),require("./foundation.util.motion")):(e.__FOUNDATION_EXTERNAL__=e.__FOUNDATION_EXTERNAL__||{},e.__FOUNDATION_EXTERNAL__["foundation.util.triggers"]=t(e.__FOUNDATION_EXTERNAL__["foundation.core"],e.jQuery,e.__FOUNDATION_EXTERNAL__["foundation.util.motion"]))})(self,function(t,i,r){return o={"./js/foundation.util.triggers.js":function(e,t,i){i.r(t),i.d(t,{Triggers:function(){return c}});var t=i("jquery"),o=i.n(t),r=i("./foundation.core"),n=i("./foundation.util.motion");function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(t,i){t.data(i).split(" ").forEach(function(e){o()("#".concat(e))["close"===i?"trigger":"triggerHandler"]("".concat(i,".zf.trigger"),[t])})}var l=(()=>{for(var e=["WebKit","Moz","O","Ms",""],t=0;t<e.length;t++)if("".concat(e[t],"MutationObserver")in window)return window["".concat(e[t],"MutationObserver")];return!1})(),c={Listeners:{Basic:{},Global:{}},Initializers:{}};function u(e,t,i){var r,n=Array.prototype.slice.call(arguments,3);o()(window).on(t,function(){r&&clearTimeout(r),r=setTimeout(function(){i.apply(null,n)},e||10)})}c.Listeners.Basic={openListener:function(){s(o()(this),"open")},closeListener:function(){o()(this).data("close")?s(o()(this),"close"):o()(this).trigger("close.zf.trigger")},toggleListener:function(){o()(this).data("toggle")?s(o()(this),"toggle"):o()(this).trigger("toggle.zf.trigger")},closeableListener:function(e){var t=o()(this).data("closable");e.stopPropagation(),""!==t?n.Motion.animateOut(o()(this),t,function(){o()(this).trigger("closed.zf")}):o()(this).fadeOut().trigger("closed.zf")},toggleFocusListener:function(){var e=o()(this).data("toggle-focus");o()("#".concat(e)).triggerHandler("toggle.zf.trigger",[o()(this)])}},c.Initializers.addOpenListener=function(e){e.off("click.zf.trigger",c.Listeners.Basic.openListener),e.on("click.zf.trigger","[data-open]",c.Listeners.Basic.openListener)},c.Initializers.addCloseListener=function(e){e.off("click.zf.trigger",c.Listeners.Basic.closeListener),e.on("click.zf.trigger","[data-close]",c.Listeners.Basic.closeListener)},c.Initializers.addToggleListener=function(e){e.off("click.zf.trigger",c.Listeners.Basic.toggleListener),e.on("click.zf.trigger","[data-toggle]",c.Listeners.Basic.toggleListener)},c.Initializers.addCloseableListener=function(e){e.off("close.zf.trigger",c.Listeners.Basic.closeableListener),e.on("close.zf.trigger","[data-closeable], [data-closable]",c.Listeners.Basic.closeableListener)},c.Initializers.addToggleFocusListener=function(e){e.off("focus.zf.trigger blur.zf.trigger",c.Listeners.Basic.toggleFocusListener),e.on("focus.zf.trigger blur.zf.trigger","[data-toggle-focus]",c.Listeners.Basic.toggleFocusListener)},c.Listeners.Global={resizeListener:function(e){l||e.each(function(){o()(this).triggerHandler("resizeme.zf.trigger")}),e.attr("data-events","resize")},scrollListener:function(e){l||e.each(function(){o()(this).triggerHandler("scrollme.zf.trigger")}),e.attr("data-events","scroll")},closeMeListener:function(e,t){e=e.namespace.split(".")[0];o()("[data-".concat(e,"]")).not('[data-yeti-box="'.concat(t,'"]')).each(function(){var e=o()(this);e.triggerHandler("close.zf.trigger",[e])})}},c.Initializers.addClosemeListener=function(e){var t=o()("[data-yeti-box]"),i=["dropdown","tooltip","reveal"];e&&("string"==typeof e?i.push(e):"object"===a(e)&&"string"==typeof e[0]?i=i.concat(e):console.error("Plugin names must be strings")),t.length&&(e=i.map(function(e){return"closeme.zf.".concat(e)}).join(" "),o()(window).off(e).on(e,c.Listeners.Global.closeMeListener))},c.Initializers.addResizeListener=function(e){var t=o()("[data-resize]");t.length&&u(e,"resize.zf.trigger",c.Listeners.Global.resizeListener,t)},c.Initializers.addScrollListener=function(e){var t=o()("[data-scroll]");t.length&&u(e,"scroll.zf.trigger",c.Listeners.Global.scrollListener,t)},c.Initializers.addMutationEventsListener=function(e){if(!l)return!1;function t(e){var t=o()(e[0].target);switch(e[0].type){case"attributes":"scroll"===t.attr("data-events")&&"data-events"===e[0].attributeName&&t.triggerHandler("scrollme.zf.trigger",[t,window.pageYOffset]),"resize"===t.attr("data-events")&&"data-events"===e[0].attributeName&&t.triggerHandler("resizeme.zf.trigger",[t]),"style"===e[0].attributeName&&(t.closest("[data-mutate]").attr("data-events","mutate"),t.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[t.closest("[data-mutate]")]));break;case"childList":t.closest("[data-mutate]").attr("data-events","mutate"),t.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[t.closest("[data-mutate]")]);break;default:return!1}}var i=e.find("[data-resize], [data-scroll], [data-mutate]");if(i.length)for(var r=0;r<=i.length-1;r++)new l(t).observe(i[r],{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeFilter:["data-events","style"]})},c.Initializers.addSimpleListeners=function(){var e=o()(document);c.Initializers.addOpenListener(e),c.Initializers.addCloseListener(e),c.Initializers.addToggleListener(e),c.Initializers.addCloseableListener(e),c.Initializers.addToggleFocusListener(e)},c.Initializers.addGlobalListeners=function(){var e=o()(document);c.Initializers.addMutationEventsListener(e),c.Initializers.addResizeListener(250),c.Initializers.addScrollListener(),c.Initializers.addClosemeListener()},c.init=function(e,t){(0,r.onLoad)(o()(window),function(){!0!==o().triggersInitialized&&(c.Initializers.addSimpleListeners(),c.Initializers.addGlobalListeners(),o().triggersInitialized=!0)}),t&&(t.Triggers=c,t.IHearYou=c.Initializers.addGlobalListeners)}},"./foundation.core":function(e){e.exports=t},"./foundation.util.motion":function(e){e.exports=r},jquery:function(e){e.exports=i}},a={},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c={},(n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(c),n.d(c,{Foundation:function(){return e.Foundation},Triggers:function(){return l.Triggers}}),e=n("./foundation.core"),s=n("jquery"),s=n.n(s),(l=n("./js/foundation.util.triggers.js")).Triggers.init(s(),e.Foundation),c;function n(e){var t=a[e];return void 0!==t||(t=a[e]={exports:{}},o[e](t,t.exports,n)),t.exports}var o,a,e,s,l,c});
3637 3638
vendor: 32,729 bytes, lines 3639-4402
3639(function webpackUniversalModuleDefinition(root, factory) { 3640 if(typeof exports === 'object' && typeof module === 'object') 3641 module.exports = factory(require("./foundation.core"), require("jquery"), require("./foundation.util.keyboard"), require("./foundation.util.mediaQuery"), require("./foundation.util.motion")); 3642 else if(typeof define === 'function' && define.amd) 3643 define(["./foundation.core", "jquery", "./foundation.util.keyboard", "./foundation.util.mediaQuery", "./foundation.util.motion"], factory); 3644 else if(typeof exports === 'object') 3645 exports["__FOUNDATION_EXTERNAL__"] = factory(require("./foundation.core"), require("jquery"), require("./foundation.util.keyboard"), require("./foundation.util.mediaQuery"), require("./foundation.util.motion")); 3646 else 3647 root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.offcanvas"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.keyboard"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.mediaQuery"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.motion"]); 3648})(self, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__, __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__) { 3649return /******/ (function() { // webpackBootstrap 3650/******/ "use strict"; 3651/******/ var __webpack_modules__ = ({ 3652 3653/***/ "./js/foundation.offcanvas.js": 3654/*!************************************!*\ 3655 !*** ./js/foundation.offcanvas.js ***! 3656 \************************************/ 3657/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 3658 3659__webpack_require__.r(__webpack_exports__); 3660/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3661/* harmony export */ OffCanvas: function() { return /* binding */ OffCanvas; } 3662/* harmony export */ }); 3663/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 3664/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 3665/* harmony import */ var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ "./foundation.core"); 3666/* harmony import */ var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__); 3667/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.keyboard */ "./foundation.util.keyboard"); 3668/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__); 3669/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./foundation.util.mediaQuery"); 3670/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__); 3671/* harmony import */ var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.util.triggers */ "./js/foundation.util.triggers.js"); 3672function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 3673function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } 3674function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } 3675function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } 3676function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 3677function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 3678function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } 3679function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } 3680function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } 3681function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } 3682function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } 3683function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } 3684function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } 3685 3686 3687 3688 3689 3690 3691 3692/** 3693 * OffCanvas module. 3694 * @module foundation.offCanvas 3695 * @requires foundation.util.keyboard 3696 * @requires foundation.util.mediaQuery 3697 * @requires foundation.util.triggers 3698 */ 3699var OffCanvas = /*#__PURE__*/function (_Plugin) { 3700 function OffCanvas() { 3701 _classCallCheck(this, OffCanvas); 3702 return _callSuper(this, OffCanvas, arguments); 3703 } 3704 _inherits(OffCanvas, _Plugin); 3705 return _createClass(OffCanvas, [{ 3706 key: "_setup", 3707 value: 3708 /** 3709 * Creates a new instance of an off-canvas wrapper. 3710 * @class 3711 * @name OffCanvas 3712 * @fires OffCanvas#init 3713 * @param {Object} element - jQuery object to initialize. 3714 * @param {Object} options - Overrides to the default plugin settings. 3715 */ 3716 function _setup(element, options) { 3717 var _this2 = this; 3718 this.className = 'OffCanvas'; // ie9 back compat 3719 this.$element = element; 3720 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default().extend({}, OffCanvas.defaults, this.$element.data(), options); 3721 this.contentClasses = { 3722 base: [], 3723 reveal: [] 3724 }; 3725 this.$lastTrigger = jquery__WEBPACK_IMPORTED_MODULE_0___default()(); 3726 this.$triggers = jquery__WEBPACK_IMPORTED_MODULE_0___default()(); 3727 this.position = 'left'; 3728 this.$content = jquery__WEBPACK_IMPORTED_MODULE_0___default()(); 3729 this.nested = !!this.options.nested; 3730 this.$sticky = jquery__WEBPACK_IMPORTED_MODULE_0___default()(); 3731 this.isInCanvas = false; 3732 3733 // Defines the CSS transition/position classes of the off-canvas content container. 3734 jquery__WEBPACK_IMPORTED_MODULE_0___default()(['push', 'overlap']).each(function (index, val) { 3735 _this2.contentClasses.base.push('has-transition-' + val); 3736 }); 3737 jquery__WEBPACK_IMPORTED_MODULE_0___default()(['left', 'right', 'top', 'bottom']).each(function (index, val) { 3738 _this2.contentClasses.base.push('has-position-' + val); 3739 _this2.contentClasses.reveal.push('has-reveal-' + val); 3740 }); 3741 3742 // Triggers init is idempotent, just need to make sure it is initialized 3743 _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_4__.Triggers.init((jquery__WEBPACK_IMPORTED_MODULE_0___default())); 3744 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__.MediaQuery._init(); 3745 this._init(); 3746 this._events(); 3747 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__.Keyboard.register('OffCanvas', { 3748 'ESCAPE': 'close' 3749 }); 3750 } 3751 3752 /** 3753 * Initializes the off-canvas wrapper by adding the exit overlay (if needed). 3754 * @function 3755 * @private 3756 */ 3757 }, { 3758 key: "_init", 3759 value: function _init() { 3760 var id = this.$element.attr('id'); 3761 this.$element.attr('aria-hidden', 'true'); 3762 3763 // Find off-canvas content, either by ID (if specified), by siblings or by closest selector (fallback) 3764 if (this.options.contentId) { 3765 this.$content = jquery__WEBPACK_IMPORTED_MODULE_0___default()('#' + this.options.contentId); 3766 } else if (this.$element.siblings('[data-off-canvas-content]').length) { 3767 this.$content = this.$element.siblings('[data-off-canvas-content]').first(); 3768 } else { 3769 this.$content = this.$element.closest('[data-off-canvas-content]').first(); 3770 } 3771 if (!this.options.contentId) { 3772 // Assume that the off-canvas element is nested if it isn't a sibling of the content 3773 this.nested = this.$element.siblings('[data-off-canvas-content]').length === 0; 3774 } else if (this.options.contentId && this.options.nested === null) { 3775 // Warning if using content ID without setting the nested option 3776 // Once the element is nested it is required to work properly in this case 3777 console.warn('Remember to use the nested option if using the content ID option!'); 3778 } 3779 if (this.nested === true) { 3780 // Force transition overlap if nested 3781 this.options.transition = 'overlap'; 3782 // Remove appropriate classes if already assigned in markup 3783 this.$element.removeClass('is-transition-push'); 3784 } 3785 this.$element.addClass("is-transition-".concat(this.options.transition, " is-closed")); 3786 3787 // Find triggers that affect this element and add aria-expanded to them 3788 this.$triggers = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).find('[data-open="' + id + '"], [data-close="' + id + '"], [data-toggle="' + id + '"]').attr('aria-expanded', 'false').attr('aria-controls', id); 3789 3790 // Get position by checking for related CSS class 3791 this.position = this.$element.is('.position-left, .position-top, .position-right, .position-bottom') ? this.$element.attr('class').match(/position\-(left|top|right|bottom)/)[1] : this.position; 3792 3793 // Add an overlay over the content if necessary 3794 if (this.options.contentOverlay === true) { 3795 var overlay = document.createElement('div'); 3796 var overlayPosition = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.$element).css("position") === 'fixed' ? 'is-overlay-fixed' : 'is-overlay-absolute'; 3797 overlay.setAttribute('class', 'js-off-canvas-overlay ' + overlayPosition); 3798 this.$overlay = jquery__WEBPACK_IMPORTED_MODULE_0___default()(overlay); 3799 if (overlayPosition === 'is-overlay-fixed') { 3800 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.$overlay).insertAfter(this.$element); 3801 } else { 3802 this.$content.append(this.$overlay); 3803 } 3804 } 3805 3806 // Get the revealOn option from the class. 3807 var revealOnRegExp = new RegExp((0,_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__.RegExpEscape)(this.options.revealClass) + '([^\\s]+)', 'g'); 3808 var revealOnClass = revealOnRegExp.exec(this.$element[0].className); 3809 if (revealOnClass) { 3810 this.options.isRevealed = true; 3811 this.options.revealOn = this.options.revealOn || revealOnClass[1]; 3812 } 3813 3814 // Ensure the `reveal-on-*` class is set. 3815 if (this.options.isRevealed === true && this.options.revealOn) { 3816 this.$element.first().addClass("".concat(this.options.revealClass).concat(this.options.revealOn)); 3817 this._setMQChecker(); 3818 } 3819 if (this.options.transitionTime) { 3820 this.$element.css('transition-duration', this.options.transitionTime); 3821 } 3822 3823 // Find fixed elements that should stay fixed while off-canvas is opened 3824 this.$sticky = this.$content.find('[data-off-canvas-sticky]'); 3825 if (this.$sticky.length > 0 && this.options.transition === 'push') { 3826 // If there's at least one match force contentScroll:false because the absolute top value doesn't get recalculated on scroll 3827 // Limit to push transition since there's no transform scope for overlap 3828 this.options.contentScroll = false; 3829 } 3830 var inCanvasFor = this.$element.attr('class').match(/\bin-canvas-for-(\w+)/); 3831 if (inCanvasFor && inCanvasFor.length === 2) { 3832 // Set `inCanvasOn` option if found in-canvas-for-[BREAKPONT] CSS class 3833 this.options.inCanvasOn = inCanvasFor[1]; 3834 } else if (this.options.inCanvasOn) { 3835 // Ensure the CSS class is set 3836 this.$element.addClass("in-canvas-for-".concat(this.options.inCanvasOn)); 3837 } 3838 if (this.options.inCanvasOn) { 3839 this._checkInCanvas(); 3840 } 3841 3842 // Initally remove all transition/position CSS classes from off-canvas content container. 3843 this._removeContentClasses(); 3844 } 3845 3846 /** 3847 * Adds event handlers to the off-canvas wrapper and the exit overlay. 3848 * @function 3849 * @private 3850 */ 3851 }, { 3852 key: "_events", 3853 value: function _events() { 3854 var _this3 = this; 3855 this.$element.off('.zf.trigger .zf.offCanvas').on({ 3856 'open.zf.trigger': this.open.bind(this), 3857 'close.zf.trigger': this.close.bind(this), 3858 'toggle.zf.trigger': this.toggle.bind(this), 3859 'keydown.zf.offCanvas': this._handleKeyboard.bind(this) 3860 }); 3861 if (this.options.closeOnClick === true) { 3862 var $target = this.options.contentOverlay ? this.$overlay : this.$content; 3863 $target.on({ 3864 'click.zf.offCanvas': this.close.bind(this) 3865 }); 3866 } 3867 if (this.options.inCanvasOn) { 3868 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('changed.zf.mediaquery', function () { 3869 _this3._checkInCanvas(); 3870 }); 3871 } 3872 } 3873 3874 /** 3875 * Applies event listener for elements that will reveal at certain breakpoints. 3876 * @private 3877 */ 3878 }, { 3879 key: "_setMQChecker", 3880 value: function _setMQChecker() { 3881 var _this = this; 3882 this.onLoadListener = (0,_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__.onLoad)(jquery__WEBPACK_IMPORTED_MODULE_0___default()(window), function () { 3883 if (_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__.MediaQuery.atLeast(_this.options.revealOn)) { 3884 _this.reveal(true); 3885 } 3886 }); 3887 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('changed.zf.mediaquery', function () { 3888 if (_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__.MediaQuery.atLeast(_this.options.revealOn)) { 3889 _this.reveal(true); 3890 } else { 3891 _this.reveal(false); 3892 } 3893 }); 3894 } 3895 3896 /** 3897 * Checks if InCanvas on current breakpoint and adjust off-canvas accordingly 3898 * @private 3899 */ 3900 }, { 3901 key: "_checkInCanvas", 3902 value: function _checkInCanvas() { 3903 this.isInCanvas = _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__.MediaQuery.atLeast(this.options.inCanvasOn); 3904 if (this.isInCanvas === true) { 3905 this.close(); 3906 } 3907 } 3908 3909 /** 3910 * Removes the CSS transition/position classes of the off-canvas content container. 3911 * Removing the classes is important when another off-canvas gets opened that uses the same content container. 3912 * @param {Boolean} hasReveal - true if related off-canvas element is revealed. 3913 * @private 3914 */ 3915 }, { 3916 key: "_removeContentClasses", 3917 value: function _removeContentClasses(hasReveal) { 3918 if (typeof hasReveal !== 'boolean') { 3919 this.$content.removeClass(this.contentClasses.base.join(' ')); 3920 } else if (hasReveal === false) { 3921 this.$content.removeClass("has-reveal-".concat(this.position)); 3922 } 3923 } 3924 3925 /** 3926 * Adds the CSS transition/position classes of the off-canvas content container, based on the opening off-canvas element. 3927 * Beforehand any transition/position class gets removed. 3928 * @param {Boolean} hasReveal - true if related off-canvas element is revealed. 3929 * @private 3930 */ 3931 }, { 3932 key: "_addContentClasses", 3933 value: function _addContentClasses(hasReveal) { 3934 this._removeContentClasses(hasReveal); 3935 if (typeof hasReveal !== 'boolean') { 3936 this.$content.addClass("has-transition-".concat(this.options.transition, " has-position-").concat(this.position)); 3937 } else if (hasReveal === true) { 3938 this.$content.addClass("has-reveal-".concat(this.position)); 3939 } 3940 } 3941 3942 /** 3943 * Preserves the fixed behavior of sticky elements on opening an off-canvas with push transition. 3944 * Since the off-canvas container has got a transform scope in such a case, it is done by calculating position absolute values. 3945 * @private 3946 */ 3947 }, { 3948 key: "_fixStickyElements", 3949 value: function _fixStickyElements() { 3950 this.$sticky.each(function (_, el) { 3951 var $el = jquery__WEBPACK_IMPORTED_MODULE_0___default()(el); 3952 3953 // If sticky element is currently fixed, adjust its top value to match absolute position due to transform scope 3954 // Limit to push transition because postion:fixed works without problems for overlap (no transform scope) 3955 if ($el.css('position') === 'fixed') { 3956 // Save current inline styling to restore it if undoing the absolute fixing 3957 var topVal = parseInt($el.css('top'), 10); 3958 $el.data('offCanvasSticky', { 3959 top: topVal 3960 }); 3961 var absoluteTopVal = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).scrollTop() + topVal; 3962 $el.css({ 3963 top: "".concat(absoluteTopVal, "px"), 3964 width: '100%', 3965 transition: 'none' 3966 }); 3967 } 3968 }); 3969 } 3970 3971 /** 3972 * Restores the original fixed styling of sticky elements after having closed an off-canvas that got pseudo fixed beforehand. 3973 * This reverts the changes of _fixStickyElements() 3974 * @private 3975 */ 3976 }, { 3977 key: "_unfixStickyElements", 3978 value: function _unfixStickyElements() { 3979 this.$sticky.each(function (_, el) { 3980 var $el = jquery__WEBPACK_IMPORTED_MODULE_0___default()(el); 3981 var stickyData = $el.data('offCanvasSticky'); 3982 3983 // If sticky element has got data object with prior values (meaning it was originally fixed) restore these values once off-canvas is closed 3984 if (_typeof(stickyData) === 'object') { 3985 $el.css({ 3986 top: "".concat(stickyData.top, "px"), 3987 width: '', 3988 transition: '' 3989 }); 3990 $el.data('offCanvasSticky', ''); 3991 } 3992 }); 3993 } 3994 3995 /** 3996 * Handles the revealing/hiding the off-canvas at breakpoints, not the same as open. 3997 * @param {Boolean} isRevealed - true if element should be revealed. 3998 * @function 3999 */ 4000 }, { 4001 key: "reveal", 4002 value: function reveal(isRevealed) { 4003 if (isRevealed) { 4004 this.close(); 4005 this.isRevealed = true; 4006 this.$element.attr('aria-hidden', 'false'); 4007 this.$element.off('open.zf.trigger toggle.zf.trigger'); 4008 this.$element.removeClass('is-closed'); 4009 } else { 4010 this.isRevealed = false; 4011 this.$element.attr('aria-hidden', 'true'); 4012 this.$element.off('open.zf.trigger toggle.zf.trigger').on({ 4013 'open.zf.trigger': this.open.bind(this), 4014 'toggle.zf.trigger': this.toggle.bind(this) 4015 }); 4016 this.$element.addClass('is-closed'); 4017 } 4018 this._addContentClasses(isRevealed); 4019 } 4020 4021 /** 4022 * Stops scrolling of the body when OffCanvas is open on mobile Safari and other troublesome browsers. 4023 * @function 4024 * @private 4025 */ 4026 }, { 4027 key: "_stopScrolling", 4028 value: function _stopScrolling() { 4029 return false; 4030 } 4031 4032 /** 4033 * Save current finger y-position 4034 * @param event 4035 * @private 4036 */ 4037 }, { 4038 key: "_recordScrollable", 4039 value: function _recordScrollable(event) { 4040 var elem = this; 4041 elem.lastY = event.touches[0].pageY; 4042 } 4043 4044 /** 4045 * Prevent further scrolling when it hits the edges 4046 * @param event 4047 * @private 4048 */ 4049 }, { 4050 key: "_preventDefaultAtEdges", 4051 value: function _preventDefaultAtEdges(event) { 4052 var elem = this; 4053 var _this = event.data; 4054 var delta = elem.lastY - event.touches[0].pageY; 4055 elem.lastY = event.touches[0].pageY; 4056 if (!_this._canScroll(delta, elem)) { 4057 event.preventDefault(); 4058 } 4059 } 4060 4061 /** 4062 * Handle continuous scrolling of scrollbox 4063 * Don't bubble up to _preventDefaultAtEdges 4064 * @param event 4065 * @private 4066 */ 4067 }, { 4068 key: "_scrollboxTouchMoved", 4069 value: function _scrollboxTouchMoved(event) { 4070 var elem = this; 4071 var _this = event.data; 4072 var parent = elem.closest('[data-off-canvas], [data-off-canvas-scrollbox-outer]'); 4073 var delta = elem.lastY - event.touches[0].pageY; 4074 parent.lastY = elem.lastY = event.touches[0].pageY; 4075 event.stopPropagation(); 4076 if (!_this._canScroll(delta, elem)) { 4077 if (!_this._canScroll(delta, parent)) { 4078 event.preventDefault(); 4079 } else { 4080 parent.scrollTop += delta; 4081 } 4082 } 4083 } 4084 4085 /** 4086 * Detect possibility of scrolling 4087 * @param delta 4088 * @param elem 4089 * @returns boolean 4090 * @private 4091 */ 4092 }, { 4093 key: "_canScroll", 4094 value: function _canScroll(delta, elem) { 4095 var up = delta < 0; 4096 var down = delta > 0; 4097 var allowUp = elem.scrollTop > 0; 4098 var allowDown = elem.scrollTop < elem.scrollHeight - elem.clientHeight; 4099 return up && allowUp || down && allowDown; 4100 } 4101 4102 /** 4103 * Opens the off-canvas menu. 4104 * @function 4105 * @param {Object} event - Event object passed from listener. 4106 * @param {jQuery} trigger - element that triggered the off-canvas to open. 4107 * @fires OffCanvas#opened 4108 * @todo also trigger 'open' event? 4109 */ 4110 }, { 4111 key: "open", 4112 value: function open(event, trigger) { 4113 var _this4 = this; 4114 if (this.$element.hasClass('is-open') || this.isRevealed || this.isInCanvas) { 4115 return; 4116 } 4117 var _this = this; 4118 if (trigger) { 4119 this.$lastTrigger = trigger; 4120 } 4121 if (this.options.forceTo === 'top') { 4122 window.scrollTo(0, 0); 4123 } else if (this.options.forceTo === 'bottom') { 4124 window.scrollTo(0, document.body.scrollHeight); 4125 } 4126 if (this.options.transitionTime && this.options.transition !== 'overlap') { 4127 this.$element.siblings('[data-off-canvas-content]').css('transition-duration', this.options.transitionTime); 4128 } else { 4129 this.$element.siblings('[data-off-canvas-content]').css('transition-duration', ''); 4130 } 4131 this.$element.addClass('is-open').removeClass('is-closed'); 4132 this.$triggers.attr('aria-expanded', 'true'); 4133 this.$element.attr('aria-hidden', 'false'); 4134 this.$content.addClass('is-open-' + this.position); 4135 4136 // If `contentScroll` is set to false, add class and disable scrolling on touch devices. 4137 if (this.options.contentScroll === false) { 4138 jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').addClass('is-off-canvas-open').on('touchmove', this._stopScrolling); 4139 this.$element.on('touchstart', this._recordScrollable); 4140 this.$element.on('touchmove', this, this._preventDefaultAtEdges); 4141 this.$element.on('touchstart', '[data-off-canvas-scrollbox]', this._recordScrollable); 4142 this.$element.on('touchmove', '[data-off-canvas-scrollbox]', this, this._scrollboxTouchMoved); 4143 } 4144 if (this.options.contentOverlay === true) { 4145 this.$overlay.addClass('is-visible'); 4146 } 4147 if (this.options.closeOnClick === true && this.options.contentOverlay === true) { 4148 this.$overlay.addClass('is-closable'); 4149 } 4150 if (this.options.autoFocus === true) { 4151 this.$element.one((0,_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__.transitionend)(this.$element), function () { 4152 if (!_this.$element.hasClass('is-open')) { 4153 return; // exit if prematurely closed 4154 } 4155 var canvasFocus = _this.$element.find('[data-autofocus]'); 4156 if (canvasFocus.length) { 4157 canvasFocus.eq(0).focus(); 4158 } else { 4159 _this.$element.find('a, button').eq(0).focus(); 4160 } 4161 }); 4162 } 4163 if (this.options.trapFocus === true) { 4164 this.$content.attr('tabindex', '-1'); 4165 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__.Keyboard.trapFocus(this.$element); 4166 } 4167 if (this.options.transition === 'push') { 4168 this._fixStickyElements(); 4169 } 4170 this._addContentClasses(); 4171 4172 /** 4173 * Fires when the off-canvas menu opens. 4174 * @event OffCanvas#opened 4175 */ 4176 this.$element.trigger('opened.zf.offCanvas'); 4177 4178 /** 4179 * Fires when the off-canvas menu open transition is done. 4180 * @event OffCanvas#openedEnd 4181 */ 4182 this.$element.one((0,_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__.transitionend)(this.$element), function () { 4183 _this4.$element.trigger('openedEnd.zf.offCanvas'); 4184 }); 4185 } 4186 4187 /** 4188 * Closes the off-canvas menu. 4189 * @function 4190 * @param {Function} cb - optional cb to fire after closure. 4191 * @fires OffCanvas#close 4192 * @fires OffCanvas#closed 4193 */ 4194 }, { 4195 key: "close", 4196 value: function close() { 4197 var _this5 = this; 4198 if (!this.$element.hasClass('is-open') || this.isRevealed) { 4199 return; 4200 } 4201 4202 /** 4203 * Fires when the off-canvas menu closes. 4204 * @event OffCanvas#close 4205 */ 4206 this.$element.trigger('close.zf.offCanvas'); 4207 this.$element.removeClass('is-open'); 4208 this.$element.attr('aria-hidden', 'true'); 4209 this.$content.removeClass('is-open-left is-open-top is-open-right is-open-bottom'); 4210 if (this.options.contentOverlay === true) { 4211 this.$overlay.removeClass('is-visible'); 4212 } 4213 if (this.options.closeOnClick === true && this.options.contentOverlay === true) { 4214 this.$overlay.removeClass('is-closable'); 4215 } 4216 this.$triggers.attr('aria-expanded', 'false'); 4217 4218 // Listen to transitionEnd: add class, re-enable scrolling and release focus when done. 4219 this.$element.one((0,_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__.transitionend)(this.$element), function () { 4220 _this5.$element.addClass('is-closed'); 4221 _this5._removeContentClasses(); 4222 if (_this5.options.transition === 'push') { 4223 _this5._unfixStickyElements(); 4224 } 4225 4226 // If `contentScroll` is set to false, remove class and re-enable scrolling on touch devices. 4227 if (_this5.options.contentScroll === false) { 4228 jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').removeClass('is-off-canvas-open').off('touchmove', _this5._stopScrolling); 4229 _this5.$element.off('touchstart', _this5._recordScrollable); 4230 _this5.$element.off('touchmove', _this5._preventDefaultAtEdges); 4231 _this5.$element.off('touchstart', '[data-off-canvas-scrollbox]', _this5._recordScrollable); 4232 _this5.$element.off('touchmove', '[data-off-canvas-scrollbox]', _this5._scrollboxTouchMoved); 4233 } 4234 if (_this5.options.trapFocus === true) { 4235 _this5.$content.removeAttr('tabindex'); 4236 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__.Keyboard.releaseFocus(_this5.$element); 4237 } 4238 4239 /** 4240 * Fires when the off-canvas menu close transition is done. 4241 * @event OffCanvas#closed 4242 */ 4243 _this5.$element.trigger('closed.zf.offCanvas'); 4244 }); 4245 } 4246 4247 /** 4248 * Toggles the off-canvas menu open or closed. 4249 * @function 4250 * @param {Object} event - Event object passed from listener. 4251 * @param {jQuery} trigger - element that triggered the off-canvas to open. 4252 */ 4253 }, { 4254 key: "toggle", 4255 value: function toggle(event, trigger) { 4256 if (this.$element.hasClass('is-open')) { 4257 this.close(event, trigger); 4258 } else { 4259 this.open(event, trigger); 4260 } 4261 } 4262 4263 /** 4264 * Handles keyboard input when detected. When the escape key is pressed, the off-canvas menu closes, and focus is restored to the element that opened the menu. 4265 * @function 4266 * @private 4267 */ 4268 }, { 4269 key: "_handleKeyboard", 4270 value: function _handleKeyboard(e) { 4271 var _this6 = this; 4272 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__.Keyboard.handleKey(e, 'OffCanvas', { 4273 close: function close() { 4274 _this6.close(); 4275 _this6.$lastTrigger.focus(); 4276 return true; 4277 }, 4278 handled: function handled() { 4279 e.preventDefault(); 4280 } 4281 }); 4282 } 4283 4284 /** 4285 * Destroys the OffCanvas plugin. 4286 * @function 4287 */ 4288 }, { 4289 key: "_destroy", 4290 value: function _destroy() { 4291 this.close(); 4292 this.$element.off('.zf.trigger .zf.offCanvas'); 4293 this.$overlay.off('.zf.offCanvas'); 4294 if (this.onLoadListener) jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(this.onLoadListener); 4295 } 4296 }]); 4297}(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__.Plugin); 4298OffCanvas.defaults = { 4299 /** 4300 * Allow the user to click outside of the menu to close it. 4301 * @option 4302 * @type {boolean} 4303 * @default true 4304 */ 4305 closeOnClick: true, 4306 /** 4307 * Adds an overlay on top of `[data-off-canvas-content]`. 4308 * @option 4309 * @type {boolean} 4310 * @default true 4311 */ 4312 contentOverlay: true, 4313 /** 4314 * Target an off-canvas content container by ID that may be placed anywhere. If null the closest content container will be taken. 4315 * @option 4316 * @type {?string} 4317 * @default null 4318 */ 4319 contentId: null, 4320 /** 4321 * Define the off-canvas element is nested in an off-canvas content. This is required when using the contentId option for a nested element. 4322 * @option 4323 * @type {boolean} 4324 * @default null 4325 */ 4326 nested: null, 4327 /** 4328 * Enable/disable scrolling of the main content when an off canvas panel is open. 4329 * @option 4330 * @type {boolean} 4331 * @default true 4332 */ 4333 contentScroll: true, 4334 /** 4335 * Amount of time the open and close transition requires, including the appropriate milliseconds (`ms`) or seconds (`s`) unit (e.g. `500ms`, `.75s`) If none selected, pulls from body style. 4336 * @option 4337 * @type {string} 4338 * @default null 4339 */ 4340 transitionTime: null, 4341 /** 4342 * Type of transition for the OffCanvas menu. Options are 'push', 'detached' or 'slide'. 4343 * @option 4344 * @type {string} 4345 * @default push 4346 */ 4347 transition: 'push', 4348 /** 4349 * Force the page to scroll to top or bottom on open. 4350 * @option 4351 * @type {?string} 4352 * @default null 4353 */ 4354 forceTo: null, 4355 /** 4356 * Allow the OffCanvas to remain open for certain breakpoints. 4357 * @option 4358 * @type {boolean} 4359 * @default false 4360 */ 4361 isRevealed: false, 4362 /** 4363 * Breakpoint at which to reveal. JS will use a RegExp to target standard classes, if changing classnames, pass your class with the `revealClass` option. 4364 * @option 4365 * @type {?string} 4366 * @default null 4367 */ 4368 revealOn: null, 4369 /** 4370 * Breakpoint at which the off-canvas gets moved into canvas content and acts as regular page element. 4371 * @option 4372 * @type {?string} 4373 * @default null 4374 */ 4375 inCanvasOn: null, 4376 /** 4377 * Force focus to the offcanvas on open. If true, will focus the opening trigger on close. 4378 * @option 4379 * @type {boolean} 4380 * @default true 4381 */ 4382 autoFocus: true, 4383 /** 4384 * Class used to force an OffCanvas to remain open. Foundation defaults for this are `reveal-for-large` & `reveal-for-medium`. 4385 * @option 4386 * @type {string} 4387 * @default reveal-for- 4388 * @todo improve the regex testing for this. 4389 */ 4390 revealClass: 'reveal-for-', 4391 /** 4392 * Triggers optional focus trapping when opening an OffCanvas. Sets tabindex of [data-off-canvas-content] to -1 for accessibility purposes. 4393 * @option 4394 * @type {boolean} 4395 * @default false 4396 */ 4397 trapFocus: false 4398}; 4399 4400 4401/***/ }), 4402
vendor: 12,890 bytes, lines 4403-4680
4403/***/ "./js/foundation.util.triggers.js": 4404/*!****************************************!*\ 4405 !*** ./js/foundation.util.triggers.js ***! 4406 \****************************************/ 4407/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 4408 4409__webpack_require__.r(__webpack_exports__); 4410/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4411/* harmony export */ Triggers: function() { return /* binding */ Triggers; } 4412/* harmony export */ }); 4413/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 4414/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 4415/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ "./foundation.core"); 4416/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__); 4417/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.motion */ "./foundation.util.motion"); 4418/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__); 4419function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 4420 4421 4422 4423var MutationObserver = function () { 4424 var prefixes = ['WebKit', 'Moz', 'O', 'Ms', '']; 4425 for (var i = 0; i < prefixes.length; i++) { 4426 if ("".concat(prefixes[i], "MutationObserver") in window) { 4427 return window["".concat(prefixes[i], "MutationObserver")]; 4428 } 4429 } 4430 return false; 4431}(); 4432var triggers = function triggers(el, type) { 4433 el.data(type).split(' ').forEach(function (id) { 4434 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id))[type === 'close' ? 'trigger' : 'triggerHandler']("".concat(type, ".zf.trigger"), [el]); 4435 }); 4436}; 4437var Triggers = { 4438 Listeners: { 4439 Basic: {}, 4440 Global: {} 4441 }, 4442 Initializers: {} 4443}; 4444Triggers.Listeners.Basic = { 4445 openListener: function openListener() { 4446 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'open'); 4447 }, 4448 closeListener: function closeListener() { 4449 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('close'); 4450 if (id) { 4451 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'close'); 4452 } else { 4453 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('close.zf.trigger'); 4454 } 4455 }, 4456 toggleListener: function toggleListener() { 4457 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle'); 4458 if (id) { 4459 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'toggle'); 4460 } else { 4461 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('toggle.zf.trigger'); 4462 } 4463 }, 4464 closeableListener: function closeableListener(e) { 4465 var animation = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('closable'); 4466 4467 // Only close the first closable element. See https://git.io/zf-7833 4468 e.stopPropagation(); 4469 if (animation !== '') { 4470 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__.Motion.animateOut(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), animation, function () { 4471 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('closed.zf'); 4472 }); 4473 } else { 4474 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).fadeOut().trigger('closed.zf'); 4475 } 4476 }, 4477 toggleFocusListener: function toggleFocusListener() { 4478 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle-focus'); 4479 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id)).triggerHandler('toggle.zf.trigger', [jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)]); 4480 } 4481}; 4482 4483// Elements with [data-open] will reveal a plugin that supports it when clicked. 4484Triggers.Initializers.addOpenListener = function ($elem) { 4485 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener); 4486 $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener); 4487}; 4488 4489// Elements with [data-close] will close a plugin that supports it when clicked. 4490// If used without a value on [data-close], the event will bubble, allowing it to close a parent component. 4491Triggers.Initializers.addCloseListener = function ($elem) { 4492 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener); 4493 $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener); 4494}; 4495 4496// Elements with [data-toggle] will toggle a plugin that supports it when clicked. 4497Triggers.Initializers.addToggleListener = function ($elem) { 4498 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener); 4499 $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener); 4500}; 4501 4502// Elements with [data-closable] will respond to close.zf.trigger events. 4503Triggers.Initializers.addCloseableListener = function ($elem) { 4504 $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener); 4505 $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener); 4506}; 4507 4508// Elements with [data-toggle-focus] will respond to coming in and out of focus 4509Triggers.Initializers.addToggleFocusListener = function ($elem) { 4510 $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener); 4511 $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener); 4512}; 4513 4514// More Global/complex listeners and triggers 4515Triggers.Listeners.Global = { 4516 resizeListener: function resizeListener($nodes) { 4517 if (!MutationObserver) { 4518 //fallback for IE 9 4519 $nodes.each(function () { 4520 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('resizeme.zf.trigger'); 4521 }); 4522 } 4523 //trigger all listening elements and signal a resize event 4524 $nodes.attr('data-events', "resize"); 4525 }, 4526 scrollListener: function scrollListener($nodes) { 4527 if (!MutationObserver) { 4528 //fallback for IE 9 4529 $nodes.each(function () { 4530 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('scrollme.zf.trigger'); 4531 }); 4532 } 4533 //trigger all listening elements and signal a scroll event 4534 $nodes.attr('data-events', "scroll"); 4535 }, 4536 closeMeListener: function closeMeListener(e, pluginId) { 4537 var plugin = e.namespace.split('.')[0]; 4538 var plugins = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-".concat(plugin, "]")).not("[data-yeti-box=\"".concat(pluginId, "\"]")); 4539 plugins.each(function () { 4540 var _this = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 4541 _this.triggerHandler('close.zf.trigger', [_this]); 4542 }); 4543 } 4544}; 4545 4546// Global, parses whole document. 4547Triggers.Initializers.addClosemeListener = function (pluginName) { 4548 var yetiBoxes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-yeti-box]'), 4549 plugNames = ['dropdown', 'tooltip', 'reveal']; 4550 if (pluginName) { 4551 if (typeof pluginName === 'string') { 4552 plugNames.push(pluginName); 4553 } else if (_typeof(pluginName) === 'object' && typeof pluginName[0] === 'string') { 4554 plugNames = plugNames.concat(pluginName); 4555 } else { 4556 console.error('Plugin names must be strings'); 4557 } 4558 } 4559 if (yetiBoxes.length) { 4560 var listeners = plugNames.map(function (name) { 4561 return "closeme.zf.".concat(name); 4562 }).join(' '); 4563 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener); 4564 } 4565}; 4566function debounceGlobalListener(debounce, trigger, listener) { 4567 var timer, 4568 args = Array.prototype.slice.call(arguments, 3); 4569 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on(trigger, function () { 4570 if (timer) { 4571 clearTimeout(timer); 4572 } 4573 timer = setTimeout(function () { 4574 listener.apply(null, args); 4575 }, debounce || 10); //default time to emit scroll event 4576 }); 4577} 4578Triggers.Initializers.addResizeListener = function (debounce) { 4579 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-resize]'); 4580 if ($nodes.length) { 4581 debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes); 4582 } 4583}; 4584Triggers.Initializers.addScrollListener = function (debounce) { 4585 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-scroll]'); 4586 if ($nodes.length) { 4587 debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes); 4588 } 4589}; 4590Triggers.Initializers.addMutationEventsListener = function ($elem) { 4591 if (!MutationObserver) { 4592 return false; 4593 } 4594 var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]'); 4595 4596 //element callback 4597 var listeningElementsMutation = function listeningElementsMutation(mutationRecordsList) { 4598 var $target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(mutationRecordsList[0].target); 4599 4600 //trigger the event handler for the element depending on type 4601 switch (mutationRecordsList[0].type) { 4602 case "attributes": 4603 if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") { 4604 $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]); 4605 } 4606 if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") { 4607 $target.triggerHandler('resizeme.zf.trigger', [$target]); 4608 } 4609 if (mutationRecordsList[0].attributeName === "style") { 4610 $target.closest("[data-mutate]").attr("data-events", "mutate"); 4611 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 4612 } 4613 break; 4614 case "childList": 4615 $target.closest("[data-mutate]").attr("data-events", "mutate"); 4616 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 4617 break; 4618 default: 4619 return false; 4620 //nothing 4621 } 4622 }; 4623 if ($nodes.length) { 4624 //for each element that needs to listen for resizing, scrolling, or mutation add a single observer 4625 for (var i = 0; i <= $nodes.length - 1; i++) { 4626 var elementObserver = new MutationObserver(listeningElementsMutation); 4627 elementObserver.observe($nodes[i], { 4628 attributes: true, 4629 childList: true, 4630 characterData: false, 4631 subtree: true, 4632 attributeFilter: ["data-events", "style"] 4633 }); 4634 } 4635 } 4636}; 4637Triggers.Initializers.addSimpleListeners = function () { 4638 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 4639 Triggers.Initializers.addOpenListener($document); 4640 Triggers.Initializers.addCloseListener($document); 4641 Triggers.Initializers.addToggleListener($document); 4642 Triggers.Initializers.addCloseableListener($document); 4643 Triggers.Initializers.addToggleFocusListener($document); 4644}; 4645Triggers.Initializers.addGlobalListeners = function () { 4646 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 4647 Triggers.Initializers.addMutationEventsListener($document); 4648 Triggers.Initializers.addResizeListener(250); 4649 Triggers.Initializers.addScrollListener(); 4650 Triggers.Initializers.addClosemeListener(); 4651}; 4652Triggers.init = function (__, Foundation) { 4653 (0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__.onLoad)(jquery__WEBPACK_IMPORTED_MODULE_0___default()(window), function () { 4654 if ((jquery__WEBPACK_IMPORTED_MODULE_0___default().triggersInitialized) !== true) { 4655 Triggers.Initializers.addSimpleListeners(); 4656 Triggers.Initializers.addGlobalListeners(); 4657 (jquery__WEBPACK_IMPORTED_MODULE_0___default().triggersInitialized) = true; 4658 } 4659 }); 4660 if (Foundation) { 4661 Foundation.Triggers = Triggers; 4662 // Legacy included to be backwards compatible for now. 4663 Foundation.IHearYou = Triggers.Initializers.addGlobalListeners; 4664 } 4665}; 4666 4667 4668/***/ }), 4669 4670/***/ "./foundation.core": 4671/*!****************************************************************************************************************************************************************!*\ 4672 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 4673 \****************************************************************************************************************************************************************/ 4674/***/ (function(module) { 4675 4676module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 4677 4678/***/ }), 4679 4680/***/ "./foundation.util.
4680keyboard": 4681/*!****************************************************************************************************************************************************************************************************!*\ 4682 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.keyboard"],"amd":"./foundation.util.keyboard","commonjs":"./foundation.util.keyboard","commonjs2":"./foundation.util.keyboard"} ***! 4683 \****************************************************************************************************************************************************************************************************/ 4684/***/ (function(module) { 4685 4686module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__; 4687 4688/***/ }), 4689 4690/***/ "./foundation.util.mediaQuery": 4691/*!************************************************************************************************************************************************************************************************************!*\ 4692 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.mediaQuery"],"amd":"./foundation.util.mediaQuery","commonjs":"./foundation.util.mediaQuery","commonjs2":"./foundation.util.mediaQuery"} ***! 4693 \************************************************************************************************************************************************************************************************************/ 4694/***/ (function(module) { 4695 4696module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__; 4697 4698/***/ }), 4699 4700/***/ "./foundation.util.motion": 4701/*!********************************************************************************************************************************************************************************************!*\ 4702 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.motion"],"amd":"./foundation.util.motion","commonjs":"./foundation.util.motion","commonjs2":"./foundation.util.motion"} ***! 4703 \********************************************************************************************************************************************************************************************/ 4704/***/ (function(module) { 4705 4706module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__; 4707 4708/***/ }), 4709 4710/***/ "jquery": 4711/*!********************************************************************************************!*\ 4712 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 4713 \********************************************************************************************/ 4714/***/ (function(module) { 4715 4716module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 4717 4718/***/ }) 4719 4720/******/ }); 4721/************************************************************************/ 4722/******/ // The module cache 4723/******/ var __webpack_module_cache__ = {}; 4724/******/ 4725/******/ // The require function 4726/******/ function __webpack_require__(moduleId) { 4727/******/ // Check if module is in cache 4728/******/ var cachedModule = __webpack_module_cache__[moduleId]; 4729/******/ if (cachedModule !== undefined) { 4730/******/ return cachedModule.exports; 4731/******/ } 4732/******/ // Create a new module (and put it into the cache) 4733/******/ var module = __webpack_module_cache__[moduleId] = { 4734/******/ // no module.id needed 4735/******/ // no module.loaded needed 4736/******/ exports: {} 4737/******/ }; 4738/******/ 4739/******/ // Execute the module function 4740/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 4741/******/ 4742/******/ // Return the exports of the module 4743/******/ return module.exports; 4744/******/ } 4745/******/ 4746/************************************************************************/ 4747/******/ /* webpack/runtime/compat get default export */ 4748/******/ !function() { 4749/******/ // getDefaultExport function for compatibility with non-harmony modules 4750/******/ __webpack_require__.n = function(module) {
vendor: 2,959 bytes, lines 4751-4811
4751/******/ var getter = module && module.__esModule ? 4752/******/ function() { return module['default']; } : 4753/******/ function() { return module; }; 4754/******/ __webpack_require__.d(getter, { a: getter }); 4755/******/ return getter; 4756/******/ }; 4757/******/ }(); 4758/******/ 4759/******/ /* webpack/runtime/define property getters */ 4760/******/ !function() { 4761/******/ // define getter functions for harmony exports 4762/******/ __webpack_require__.d = function(exports, definition) { 4763/******/ for(var key in definition) { 4764/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 4765/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 4766/******/ } 4767/******/ } 4768/******/ }; 4769/******/ }(); 4770/******/ 4771/******/ /* webpack/runtime/hasOwnProperty shorthand */ 4772/******/ !function() { 4773/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 4774/******/ }(); 4775/******/ 4776/******/ /* webpack/runtime/make namespace object */ 4777/******/ !function() { 4778/******/ // define __esModule on exports 4779/******/ __webpack_require__.r = function(exports) { 4780/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 4781/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 4782/******/ } 4783/******/ Object.defineProperty(exports, '__esModule', { value: true }); 4784/******/ }; 4785/******/ }(); 4786/******/ 4787/************************************************************************/ 4788var __webpack_exports__ = {}; 4789// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 4790!function() { 4791/*!****************************************************!*\ 4792 !*** ./js/entries/plugins/foundation.offcanvas.js ***! 4793 \****************************************************/ 4794__webpack_require__.r(__webpack_exports__); 4795/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4796/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation; }, 4797/* harmony export */ OffCanvas: function() { return /* reexport safe */ _foundation_offcanvas__WEBPACK_IMPORTED_MODULE_1__.OffCanvas; } 4798/* harmony export */ }); 4799/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core"); 4800/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 4801/* harmony import */ var _foundation_offcanvas__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.offcanvas */ "./js/foundation.offcanvas.js"); 4802 4803 4804_foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation.plugin(_foundation_offcanvas__WEBPACK_IMPORTED_MODULE_1__.OffCanvas, 'OffCanvas'); 4805 4806}(); 4807/******/ return __webpack_exports__; 4808/******/ })() 4809; 4810}); 4811
vendor: 29,670 bytes, lines 4812-5507
4812(function webpackUniversalModuleDefinition(root, factory) { 4813 if(typeof exports === 'object' && typeof module === 'object') 4814 module.exports = factory(require("./foundation.core"), require("jquery"), require("./foundation.util.keyboard"), require("./foundation.util.mediaQuery"), require("./foundation.util.motion"), require("./foundation.util.touch")); 4815 else if(typeof define === 'function' && define.amd) 4816 define(["./foundation.core", "jquery", "./foundation.util.keyboard", "./foundation.util.mediaQuery", "./foundation.util.motion", "./foundation.util.touch"], factory); 4817 else if(typeof exports === 'object') 4818 exports["__FOUNDATION_EXTERNAL__"] = factory(require("./foundation.core"), require("jquery"), require("./foundation.util.keyboard"), require("./foundation.util.mediaQuery"), require("./foundation.util.motion"), require("./foundation.util.touch")); 4819 else 4820 root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.reveal"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.keyboard"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.mediaQuery"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.motion"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.touch"]); 4821})(self, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__, __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__, __WEBPACK_EXTERNAL_MODULE__foundation_util_touch__) { 4822return /******/ (function() { // webpackBootstrap 4823/******/ "use strict"; 4824/******/ var __webpack_modules__ = ({ 4825 4826/***/ "./js/foundation.reveal.js": 4827/*!*********************************!*\ 4828 !*** ./js/foundation.reveal.js ***! 4829 \*********************************/ 4830/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 4831 4832__webpack_require__.r(__webpack_exports__); 4833/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4834/* harmony export */ Reveal: function() { return /* binding */ Reveal; } 4835/* harmony export */ }); 4836/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 4837/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 4838/* harmony import */ var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ "./foundation.core"); 4839/* harmony import */ var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__); 4840/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.keyboard */ "./foundation.util.keyboard"); 4841/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__); 4842/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./foundation.util.mediaQuery"); 4843/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__); 4844/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.util.motion */ "./foundation.util.motion"); 4845/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__); 4846/* harmony import */ var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./foundation.util.triggers */ "./js/foundation.util.triggers.js"); 4847/* harmony import */ var _foundation_util_touch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./foundation.util.touch */ "./foundation.util.touch"); 4848/* harmony import */ var _foundation_util_touch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_touch__WEBPACK_IMPORTED_MODULE_6__); 4849function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 4850function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } 4851function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } 4852function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } 4853function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 4854function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 4855function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } 4856function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } 4857function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } 4858function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } 4859function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } 4860function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } 4861function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871/** 4872 * Reveal module. 4873 * @module foundation.reveal 4874 * @requires foundation.util.keyboard 4875 * @requires foundation.util.touch 4876 * @requires foundation.util.triggers 4877 * @requires foundation.util.mediaQuery 4878 * @requires foundation.util.motion if using animations 4879 */ 4880var Reveal = /*#__PURE__*/function (_Plugin) { 4881 function Reveal() { 4882 _classCallCheck(this, Reveal); 4883 return _callSuper(this, Reveal, arguments); 4884 } 4885 _inherits(Reveal, _Plugin); 4886 return _createClass(Reveal, [{ 4887 key: "_setup", 4888 value: 4889 /** 4890 * Creates a new instance of Reveal. 4891 * @class 4892 * @name Reveal 4893 * @param {jQuery} element - jQuery object to use for the modal. 4894 * @param {Object} options - optional parameters. 4895 */ 4896 function _setup(element, options) { 4897 this.$element = element; 4898 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default().extend({}, Reveal.defaults, this.$element.data(), options); 4899 this.className = 'Reveal'; // ie9 back compat 4900 this._init(); 4901 4902 // Touch and Triggers init are idempotent, just need to make sure they are initialized 4903 _foundation_util_touch__WEBPACK_IMPORTED_MODULE_6__.Touch.init((jquery__WEBPACK_IMPORTED_MODULE_0___default())); 4904 _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_5__.Triggers.init((jquery__WEBPACK_IMPORTED_MODULE_0___default())); 4905 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__.Keyboard.register('Reveal', { 4906 'ESCAPE': 'close' 4907 }); 4908 } 4909 4910 /** 4911 * Initializes the modal by adding the overlay and close buttons, (if selected). 4912 * @private 4913 */ 4914 }, { 4915 key: "_init", 4916 value: function _init() { 4917 var _this2 = this; 4918 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__.MediaQuery._init(); 4919 this.id = this.$element.attr('id'); 4920 this.isActive = false; 4921 this.cached = { 4922 mq: _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__.MediaQuery.current 4923 }; 4924 this.$anchor = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-open=\"".concat(this.id, "\"]")).length ? jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-open=\"".concat(this.id, "\"]")) : jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-toggle=\"".concat(this.id, "\"]")); 4925 this.$anchor.attr({ 4926 'aria-controls': this.id, 4927 'aria-haspopup': 'dialog', 4928 'tabindex': 0 4929 }); 4930 if (this.options.fullScreen || this.$element.hasClass('full')) { 4931 this.options.fullScreen = true; 4932 this.options.overlay = false; 4933 } 4934 if (this.options.overlay && !this.$overlay) { 4935 this.$overlay = this._makeOverlay(this.id); 4936 } 4937 this.$element.attr({ 4938 'role': 'dialog', 4939 'aria-hidden': true, 4940 'data-yeti-box': this.id, 4941 'data-resize': this.id 4942 }); 4943 if (this.$overlay) { 4944 this.$element.detach().appendTo(this.$overlay); 4945 } else { 4946 this.$element.detach().appendTo(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.options.appendTo)); 4947 this.$element.addClass('without-overlay'); 4948 } 4949 this._events(); 4950 if (this.options.deepLink && window.location.hash === "#".concat(this.id)) { 4951 this.onLoadListener = (0,_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__.onLoad)(jquery__WEBPACK_IMPORTED_MODULE_0___default()(window), function () { 4952 return _this2.open(); 4953 }); 4954 } 4955 } 4956 4957 /** 4958 * Creates an overlay div to display behind the modal. 4959 * @private 4960 */ 4961 }, { 4962 key: "_makeOverlay", 4963 value: function _makeOverlay() { 4964 var additionalOverlayClasses = ''; 4965 if (this.options.additionalOverlayClasses) { 4966 additionalOverlayClasses = ' ' + this.options.additionalOverlayClasses; 4967 } 4968 return jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div></div>').addClass('reveal-overlay' + additionalOverlayClasses).appendTo(this.options.appendTo); 4969 } 4970 4971 /** 4972 * Updates position of modal 4973 * TODO: Figure out if we actually need to cache these values or if it doesn't matter 4974 * @private 4975 */ 4976 }, { 4977 key: "_updatePosition", 4978 value: function _updatePosition() { 4979 var width = this.$element.outerWidth(); 4980 var outerWidth = jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).width(); 4981 var height = this.$element.outerHeight(); 4982 var outerHeight = jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).height(); 4983 var left, 4984 top = null; 4985 if (this.options.hOffset === 'auto') { 4986 left = parseInt((outerWidth - width) / 2, 10); 4987 } else { 4988 left = parseInt(this.options.hOffset, 10); 4989 } 4990 if (this.options.vOffset === 'auto') { 4991 if (height > outerHeight) { 4992 top = parseInt(Math.min(100, outerHeight / 10), 10); 4993 } else { 4994 top = parseInt((outerHeight - height) / 4, 10); 4995 } 4996 } else if (this.options.vOffset !== null) { 4997 top = parseInt(this.options.vOffset, 10); 4998 } 4999 if (top !== null) { 5000 this.$element.css({ 5001 top: top + 'px' 5002 }); 5003 } 5004 5005 // only worry about left if we don't have an overlay or we have a horizontal offset, 5006 // otherwise we're perfectly in the middle 5007 if (!this.$overlay || this.options.hOffset !== 'auto') { 5008 this.$element.css({ 5009 left: left + 'px' 5010 }); 5011 this.$element.css({ 5012 margin: '0px' 5013 }); 5014 } 5015 } 5016 5017 /** 5018 * Adds event handlers for the modal. 5019 * @private 5020 */ 5021 }, { 5022 key: "_events", 5023 value: function _events() { 5024 var _this3 = this; 5025 var _this = this; 5026 this.$element.on({ 5027 'open.zf.trigger': this.open.bind(this), 5028 'close.zf.trigger': function closeZfTrigger(event, $element) { 5029 if (event.target === _this.$element[0] || jquery__WEBPACK_IMPORTED_MODULE_0___default()(event.target).parents('[data-closable]')[0] === $element) { 5030 // only close reveal when it's explicitly called 5031 return _this3.close.apply(_this3); 5032 } 5033 }, 5034 'toggle.zf.trigger': this.toggle.bind(this), 5035 'resizeme.zf.trigger': function resizemeZfTrigger() { 5036 _this._updatePosition(); 5037 } 5038 }); 5039 if (this.options.closeOnClick && this.options.overlay) { 5040 this.$overlay.off('.zf.reveal').on('click.zf.dropdown tap.zf.dropdown', function (e) { 5041 if (e.target === _this.$element[0] || jquery__WEBPACK_IMPORTED_MODULE_0___default().contains(_this.$element[0], e.target) || !jquery__WEBPACK_IMPORTED_MODULE_0___default().contains(document, e.target)) { 5042 return; 5043 } 5044 _this.close(); 5045 }); 5046 } 5047 if (this.options.deepLink) { 5048 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on("hashchange.zf.reveal:".concat(this.id), this._handleState.bind(this)); 5049 } 5050 } 5051 5052 /** 5053 * Handles modal methods on back/forward button clicks or any other event that triggers hashchange. 5054 * @private 5055 */ 5056 }, { 5057 key: "_handleState", 5058 value: function _handleState() { 5059 if (window.location.hash === '#' + this.id && !this.isActive) { 5060 this.open(); 5061 } else { 5062 this.close(); 5063 } 5064 } 5065 5066 /** 5067 * Disables the scroll when Reveal is shown to prevent the background from shifting 5068 * @param {number} scrollTop - Scroll to visually apply, window current scroll by default 5069 */ 5070 }, { 5071 key: "_disableScroll", 5072 value: function _disableScroll(scrollTop) { 5073 scrollTop = scrollTop || jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).scrollTop(); 5074 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).height() > jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).height()) { 5075 jquery__WEBPACK_IMPORTED_MODULE_0___default()("html").css("top", -scrollTop); 5076 } 5077 } 5078 5079 /** 5080 * Reenables the scroll when Reveal closes 5081 * @param {number} scrollTop - Scroll to restore, html "top" property by default (as set by `_disableScroll`) 5082 */ 5083 }, { 5084 key: "_enableScroll", 5085 value: function _enableScroll(scrollTop) { 5086 scrollTop = scrollTop || parseInt(jquery__WEBPACK_IMPORTED_MODULE_0___default()("html").css("top"), 10); 5087 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).height() > jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).height()) { 5088 jquery__WEBPACK_IMPORTED_MODULE_0___default()("html").css("top", ""); 5089 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).scrollTop(-scrollTop); 5090 } 5091 } 5092 5093 /** 5094 * Opens the modal controlled by `this.$anchor`, and closes all others by default. 5095 * @function 5096 * @fires Reveal#closeme 5097 * @fires Reveal#open 5098 */ 5099 }, { 5100 key: "open", 5101 value: function open() { 5102 var _this4 = this; 5103 // either update or replace browser history 5104 var hash = "#".concat(this.id); 5105 if (this.options.deepLink && window.location.hash !== hash) { 5106 if (window.history.pushState) { 5107 if (this.options.updateHistory) { 5108 window.history.pushState({}, '', hash); 5109 } else { 5110 window.history.replaceState({}, '', hash); 5111 } 5112 } else { 5113 window.location.hash = hash; 5114 } 5115 } 5116 5117 // Remember anchor that opened it to set focus back later, have general anchors as fallback 5118 this.$activeAnchor = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document.activeElement).is(this.$anchor) ? jquery__WEBPACK_IMPORTED_MODULE_0___default()(document.activeElement) : this.$anchor; 5119 this.isActive = true; 5120 5121 // Make elements invisible, but remove display: none so we can get size and positioning 5122 this.$element.css({ 5123 'visibility': 'hidden' 5124 }).show().scrollTop(0); 5125 if (this.options.overlay) { 5126 this.$overlay.css({ 5127 'visibility': 'hidden' 5128 }).show(); 5129 } 5130 this._updatePosition(); 5131 this.$element.hide().css({ 5132 'visibility': '' 5133 }); 5134 if (this.$overlay) { 5135 this.$overlay.css({ 5136 'visibility': '' 5137 }).hide(); 5138 if (this.$element.hasClass('fast')) { 5139 this.$overlay.addClass('fast'); 5140 } else if (this.$element.hasClass('slow')) { 5141 this.$overlay.addClass('slow'); 5142 } 5143 } 5144 if (!this.options.multipleOpened) { 5145 /** 5146 * Fires immediately before the modal opens. 5147 * Closes any other modals that are currently open 5148 * @event Reveal#closeme 5149 */ 5150 this.$element.trigger('closeme.zf.reveal', this.id); 5151 } 5152 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.reveal:visible').length === 0) { 5153 this._disableScroll(); 5154 } 5155 var _this = this; 5156 5157 // Motion UI method of reveal 5158 if (this.options.animationIn) { 5159 var afterAnimation = function afterAnimation() { 5160 _this.$element.attr({ 5161 'aria-hidden': false, 5162 'tabindex': -1 5163 }).focus(); 5164 _this._addGlobalClasses(); 5165 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__.Keyboard.trapFocus(_this.$element); 5166 }; 5167 if (this.options.overlay) { 5168 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__.Motion.animateIn(this.$overlay, 'fade-in'); 5169 } 5170 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__.Motion.animateIn(this.$element, this.options.animationIn, function () { 5171 if (_this4.$element) { 5172 // protect against object having been removed 5173 _this4.focusableElements = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__.Keyboard.findFocusable(_this4.$element); 5174 afterAnimation(); 5175 } 5176 }); 5177 } 5178 // jQuery method of reveal 5179 else { 5180 if (this.options.overlay) { 5181 this.$overlay.show(0); 5182 } 5183 this.$element.show(this.options.showDelay); 5184 } 5185 5186 // handle accessibility 5187 this.$element.attr({ 5188 'aria-hidden': false, 5189 'tabindex': -1 5190 }).focus(); 5191 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__.Keyboard.trapFocus(this.$element); 5192 this._addGlobalClasses(); 5193 this._addGlobalListeners(); 5194 5195 /** 5196 * Fires when the modal has successfully opened. 5197 * @event Reveal#open 5198 */ 5199 this.$element.trigger('open.zf.reveal'); 5200 } 5201 5202 /** 5203 * Adds classes and listeners on document required by open modals. 5204 * 5205 * The following classes are added and updated: 5206 * - `.is-reveal-open` - Prevents the scroll on document 5207 * - `.zf-has-scroll` - Displays a disabled scrollbar on document if required like if the 5208 * scroll was not disabled. This prevent a "shift" of the page content due 5209 * the scrollbar disappearing when the modal opens. 5210 * 5211 * @private 5212 */ 5213 }, { 5214 key: "_addGlobalClasses", 5215 value: function _addGlobalClasses() { 5216 var updateScrollbarClass = function updateScrollbarClass() { 5217 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').toggleClass('zf-has-scroll', !!(jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).height() > jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).height())); 5218 }; 5219 this.$element.on('resizeme.zf.trigger.revealScrollbarListener', function () { 5220 return updateScrollbarClass(); 5221 }); 5222 updateScrollbarClass(); 5223 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').addClass('is-reveal-open'); 5224 } 5225 5226 /** 5227 * Removes classes and listeners on document that were required by open modals. 5228 * @private 5229 */ 5230 }, { 5231 key: "_removeGlobalClasses", 5232 value: function _removeGlobalClasses() { 5233 this.$element.off('resizeme.zf.trigger.revealScrollbarListener'); 5234 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').removeClass('is-reveal-open'); 5235 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').removeClass('zf-has-scroll'); 5236 } 5237 5238 /** 5239 * Adds extra event handlers for the body and window if necessary. 5240 * @private 5241 */ 5242 }, { 5243 key: "_addGlobalListeners", 5244 value: function _addGlobalListeners() { 5245 var _this = this; 5246 if (!this.$element) { 5247 return; 5248 } // If we're in the middle of cleanup, don't freak out 5249 this.focusableElements = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__.Keyboard.findFocusable(this.$element); 5250 if (!this.options.overlay && this.options.closeOnClick && !this.options.fullScreen) { 5251 jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').on('click.zf.dropdown tap.zf.dropdown', function (e) { 5252 if (e.target === _this.$element[0] || jquery__WEBPACK_IMPORTED_MODULE_0___default().contains(_this.$element[0], e.target) || !jquery__WEBPACK_IMPORTED_MODULE_0___default().contains(document, e.target)) { 5253 return; 5254 } 5255 _this.close(); 5256 }); 5257 } 5258 if (this.options.closeOnEsc) { 5259 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('keydown.zf.reveal', function (e) { 5260 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__.Keyboard.handleKey(e, 'Reveal', { 5261 close: function close() { 5262 if (_this.options.closeOnEsc) { 5263 _this.close(); 5264 } 5265 } 5266 }); 5267 }); 5268 } 5269 } 5270 5271 /** 5272 * Closes the modal. 5273 * @function 5274 * @fires Reveal#closed 5275 */ 5276 }, { 5277 key: "close", 5278 value: function close() { 5279 if (!this.isActive || !this.$element.is(':visible')) { 5280 return false; 5281 } 5282 var _this = this; 5283 5284 // Motion UI method of hiding 5285 if (this.options.animationOut) { 5286 if (this.options.overlay) { 5287 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__.Motion.animateOut(this.$overlay, 'fade-out'); 5288 } 5289 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__.Motion.animateOut(this.$element, this.options.animationOut, finishUp); 5290 } 5291 // jQuery method of hiding 5292 else { 5293 this.$element.hide(this.options.hideDelay); 5294 if (this.options.overlay) { 5295 this.$overlay.hide(0, finishUp); 5296 } else { 5297 finishUp(); 5298 } 5299 } 5300 5301 // Conditionals to remove extra event listeners added on open 5302 if (this.options.closeOnEsc) { 5303 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('keydown.zf.reveal'); 5304 } 5305 if (!this.options.overlay && this.options.closeOnClick) { 5306 jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').off('click.zf.dropdown tap.zf.dropdown'); 5307 } 5308 this.$element.off('keydown.zf.reveal'); 5309 function finishUp() { 5310 // Get the current top before the modal is closed and restore the scroll after. 5311 // TODO: use component properties instead of HTML properties 5312 // See https://github.com/foundation/foundation-sites/pull/10786 5313 var scrollTop = parseInt(jquery__WEBPACK_IMPORTED_MODULE_0___default()("html").css("top"), 10); 5314 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.reveal:visible').length === 0) { 5315 _this._removeGlobalClasses(); // also remove .is-reveal-open from the html element when there is no opened reveal 5316 } 5317 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__.Keyboard.releaseFocus(_this.$element); 5318 _this.$element.attr('aria-hidden', true); 5319 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.reveal:visible').length === 0) { 5320 _this._enableScroll(scrollTop); 5321 } 5322 5323 /** 5324 * Fires when the modal is done closing. 5325 * @event Reveal#closed 5326 */ 5327 _this.$element.trigger('closed.zf.reveal'); 5328 } 5329 5330 /** 5331 * Resets the modal content 5332 * This prevents a running video to keep going in the background 5333 */ 5334 if (this.options.resetOnClose) { 5335 this.$element.html(this.$element.html()); 5336 } 5337 this.isActive = false; 5338 // If deepLink and we did not switched to an other modal... 5339 if (_this.options.deepLink && window.location.hash === "#".concat(this.id)) { 5340 // Remove the history hash 5341 if (window.history.replaceState) { 5342 var urlWithoutHash = window.location.pathname + window.location.search; 5343 if (this.options.updateHistory) { 5344 window.history.pushState({}, '', urlWithoutHash); // remove the hash 5345 } else { 5346 window.history.replaceState('', document.title, urlWithoutHash); 5347 } 5348 } else { 5349 window.location.hash = ''; 5350 } 5351 } 5352 this.$activeAnchor.focus(); 5353 } 5354 5355 /** 5356 * Toggles the open/closed state of a modal. 5357 * @function 5358 */ 5359 }, { 5360 key: "toggle", 5361 value: function toggle() { 5362 if (this.isActive) { 5363 this.close(); 5364 } else { 5365 this.open(); 5366 } 5367 } 5368 }, { 5369 key: "_destroy", 5370 value: 5371 /** 5372 * Destroys an instance of a modal. 5373 * @function 5374 */ 5375 function _destroy() { 5376 if (this.options.overlay) { 5377 this.$element.appendTo(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.options.appendTo)); // move $element outside of $overlay to prevent error unregisterPlugin() 5378 this.$overlay.hide().off().remove(); 5379 } 5380 this.$element.hide().off(); 5381 this.$anchor.off('.zf'); 5382 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(".zf.reveal:".concat(this.id)); 5383 if (this.onLoadListener) jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(this.onLoadListener); 5384 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.reveal:visible').length === 0) { 5385 this._removeGlobalClasses(); // also remove .is-reveal-open from the html element when there is no opened reveal 5386 } 5387 } 5388 }]); 5389}(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__.Plugin); 5390Reveal.defaults = { 5391 /** 5392 * Motion-UI class to use for animated elements. If none used, defaults to simple show/hide. 5393 * @option 5394 * @type {string} 5395 * @default '' 5396 */ 5397 animationIn: '', 5398 /** 5399 * Motion-UI class to use for animated elements. If none used, defaults to simple show/hide. 5400 * @option 5401 * @type {string} 5402 * @default '' 5403 */ 5404 animationOut: '', 5405 /** 5406 * Time, in ms, to delay the opening of a modal after a click if no animation used. 5407 * @option 5408 * @type {number} 5409 * @default 0 5410 */ 5411 showDelay: 0, 5412 /** 5413 * Time, in ms, to delay the closing of a modal after a click if no animation used. 5414 * @option 5415 * @type {number} 5416 * @default 0 5417 */ 5418 hideDelay: 0, 5419 /** 5420 * Allows a click on the body/overlay to close the modal. 5421 * @option 5422 * @type {boolean} 5423 * @default true 5424 */ 5425 closeOnClick: true, 5426 /** 5427 * Allows the modal to close if the user presses the `ESCAPE` key. 5428 * @option 5429 * @type {boolean} 5430 * @default true 5431 */ 5432 closeOnEsc: true, 5433 /** 5434 * If true, allows multiple modals to be displayed at once. 5435 * @option 5436 * @type {boolean} 5437 * @default false 5438 */ 5439 multipleOpened: false, 5440 /** 5441 * Distance, in pixels, the modal should push down from the top of the screen. 5442 * @option 5443 * @type {number|string} 5444 * @default auto 5445 */ 5446 vOffset: 'auto', 5447 /** 5448 * Distance, in pixels, the modal should push in from the side of the screen. 5449 * @option 5450 * @type {number|string} 5451 * @default auto 5452 */ 5453 hOffset: 'auto', 5454 /** 5455 * Allows the modal to be fullscreen, completely blocking out the rest of the view. JS checks for this as well. 5456 * @option 5457 * @type {boolean} 5458 * @default false 5459 */ 5460 fullScreen: false, 5461 /** 5462 * Allows the modal to generate an overlay div, which will cover the view when modal opens. 5463 * @option 5464 * @type {boolean} 5465 * @default true 5466 */ 5467 overlay: true, 5468 /** 5469 * Allows the modal to remove and reinject markup on close. Should be true if using video elements w/o using provider's api, otherwise, videos will continue to play in the background. 5470 * @option 5471 * @type {boolean} 5472 * @default false 5473 */ 5474 resetOnClose: false, 5475 /** 5476 * Link the location hash to the modal. 5477 * Set the location hash when the modal is opened/closed, and open/close the modal when the location changes. 5478 * @option 5479 * @type {boolean} 5480 * @default false 5481 */ 5482 deepLink: false, 5483 /** 5484 * If `deepLink` is enabled, update the browser history with the open modal 5485 * @option 5486 * @default false 5487 */ 5488 updateHistory: false, 5489 /** 5490 * Allows the modal to append to custom div. 5491 * @option 5492 * @type {string} 5493 * @default "body" 5494 */ 5495 appendTo: "body", 5496 /** 5497 * Allows adding additional class names to the reveal overlay. 5498 * @option 5499 * @type {string} 5500 * @default '' 5501 */ 5502 additionalOverlayClasses: '' 5503}; 5504 5505 5506/***/ }), 5507
vendor: 12,890 bytes, lines 5508-5785
5508/***/ "./js/foundation.util.triggers.js": 5509/*!****************************************!*\ 5510 !*** ./js/foundation.util.triggers.js ***! 5511 \****************************************/ 5512/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 5513 5514__webpack_require__.r(__webpack_exports__); 5515/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5516/* harmony export */ Triggers: function() { return /* binding */ Triggers; } 5517/* harmony export */ }); 5518/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 5519/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 5520/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ "./foundation.core"); 5521/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__); 5522/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.motion */ "./foundation.util.motion"); 5523/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__); 5524function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 5525 5526 5527 5528var MutationObserver = function () { 5529 var prefixes = ['WebKit', 'Moz', 'O', 'Ms', '']; 5530 for (var i = 0; i < prefixes.length; i++) { 5531 if ("".concat(prefixes[i], "MutationObserver") in window) { 5532 return window["".concat(prefixes[i], "MutationObserver")]; 5533 } 5534 } 5535 return false; 5536}(); 5537var triggers = function triggers(el, type) { 5538 el.data(type).split(' ').forEach(function (id) { 5539 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id))[type === 'close' ? 'trigger' : 'triggerHandler']("".concat(type, ".zf.trigger"), [el]); 5540 }); 5541}; 5542var Triggers = { 5543 Listeners: { 5544 Basic: {}, 5545 Global: {} 5546 }, 5547 Initializers: {} 5548}; 5549Triggers.Listeners.Basic = { 5550 openListener: function openListener() { 5551 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'open'); 5552 }, 5553 closeListener: function closeListener() { 5554 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('close'); 5555 if (id) { 5556 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'close'); 5557 } else { 5558 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('close.zf.trigger'); 5559 } 5560 }, 5561 toggleListener: function toggleListener() { 5562 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle'); 5563 if (id) { 5564 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'toggle'); 5565 } else { 5566 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('toggle.zf.trigger'); 5567 } 5568 }, 5569 closeableListener: function closeableListener(e) { 5570 var animation = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('closable'); 5571 5572 // Only close the first closable element. See https://git.io/zf-7833 5573 e.stopPropagation(); 5574 if (animation !== '') { 5575 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__.Motion.animateOut(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), animation, function () { 5576 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('closed.zf'); 5577 }); 5578 } else { 5579 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).fadeOut().trigger('closed.zf'); 5580 } 5581 }, 5582 toggleFocusListener: function toggleFocusListener() { 5583 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle-focus'); 5584 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id)).triggerHandler('toggle.zf.trigger', [jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)]); 5585 } 5586}; 5587 5588// Elements with [data-open] will reveal a plugin that supports it when clicked. 5589Triggers.Initializers.addOpenListener = function ($elem) { 5590 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener); 5591 $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener); 5592}; 5593 5594// Elements with [data-close] will close a plugin that supports it when clicked. 5595// If used without a value on [data-close], the event will bubble, allowing it to close a parent component. 5596Triggers.Initializers.addCloseListener = function ($elem) { 5597 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener); 5598 $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener); 5599}; 5600 5601// Elements with [data-toggle] will toggle a plugin that supports it when clicked. 5602Triggers.Initializers.addToggleListener = function ($elem) { 5603 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener); 5604 $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener); 5605}; 5606 5607// Elements with [data-closable] will respond to close.zf.trigger events. 5608Triggers.Initializers.addCloseableListener = function ($elem) { 5609 $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener); 5610 $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener); 5611}; 5612 5613// Elements with [data-toggle-focus] will respond to coming in and out of focus 5614Triggers.Initializers.addToggleFocusListener = function ($elem) { 5615 $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener); 5616 $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener); 5617}; 5618 5619// More Global/complex listeners and triggers 5620Triggers.Listeners.Global = { 5621 resizeListener: function resizeListener($nodes) { 5622 if (!MutationObserver) { 5623 //fallback for IE 9 5624 $nodes.each(function () { 5625 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('resizeme.zf.trigger'); 5626 }); 5627 } 5628 //trigger all listening elements and signal a resize event 5629 $nodes.attr('data-events', "resize"); 5630 }, 5631 scrollListener: function scrollListener($nodes) { 5632 if (!MutationObserver) { 5633 //fallback for IE 9 5634 $nodes.each(function () { 5635 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('scrollme.zf.trigger'); 5636 }); 5637 } 5638 //trigger all listening elements and signal a scroll event 5639 $nodes.attr('data-events', "scroll"); 5640 }, 5641 closeMeListener: function closeMeListener(e, pluginId) { 5642 var plugin = e.namespace.split('.')[0]; 5643 var plugins = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-".concat(plugin, "]")).not("[data-yeti-box=\"".concat(pluginId, "\"]")); 5644 plugins.each(function () { 5645 var _this = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 5646 _this.triggerHandler('close.zf.trigger', [_this]); 5647 }); 5648 } 5649}; 5650 5651// Global, parses whole document. 5652Triggers.Initializers.addClosemeListener = function (pluginName) { 5653 var yetiBoxes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-yeti-box]'), 5654 plugNames = ['dropdown', 'tooltip', 'reveal']; 5655 if (pluginName) { 5656 if (typeof pluginName === 'string') { 5657 plugNames.push(pluginName); 5658 } else if (_typeof(pluginName) === 'object' && typeof pluginName[0] === 'string') { 5659 plugNames = plugNames.concat(pluginName); 5660 } else { 5661 console.error('Plugin names must be strings'); 5662 } 5663 } 5664 if (yetiBoxes.length) { 5665 var listeners = plugNames.map(function (name) { 5666 return "closeme.zf.".concat(name); 5667 }).join(' '); 5668 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener); 5669 } 5670}; 5671function debounceGlobalListener(debounce, trigger, listener) { 5672 var timer, 5673 args = Array.prototype.slice.call(arguments, 3); 5674 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on(trigger, function () { 5675 if (timer) { 5676 clearTimeout(timer); 5677 } 5678 timer = setTimeout(function () { 5679 listener.apply(null, args); 5680 }, debounce || 10); //default time to emit scroll event 5681 }); 5682} 5683Triggers.Initializers.addResizeListener = function (debounce) { 5684 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-resize]'); 5685 if ($nodes.length) { 5686 debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes); 5687 } 5688}; 5689Triggers.Initializers.addScrollListener = function (debounce) { 5690 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-scroll]'); 5691 if ($nodes.length) { 5692 debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes); 5693 } 5694}; 5695Triggers.Initializers.addMutationEventsListener = function ($elem) { 5696 if (!MutationObserver) { 5697 return false; 5698 } 5699 var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]'); 5700 5701 //element callback 5702 var listeningElementsMutation = function listeningElementsMutation(mutationRecordsList) { 5703 var $target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(mutationRecordsList[0].target); 5704 5705 //trigger the event handler for the element depending on type 5706 switch (mutationRecordsList[0].type) { 5707 case "attributes": 5708 if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") { 5709 $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]); 5710 } 5711 if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") { 5712 $target.triggerHandler('resizeme.zf.trigger', [$target]); 5713 } 5714 if (mutationRecordsList[0].attributeName === "style") { 5715 $target.closest("[data-mutate]").attr("data-events", "mutate"); 5716 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 5717 } 5718 break; 5719 case "childList": 5720 $target.closest("[data-mutate]").attr("data-events", "mutate"); 5721 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 5722 break; 5723 default: 5724 return false; 5725 //nothing 5726 } 5727 }; 5728 if ($nodes.length) { 5729 //for each element that needs to listen for resizing, scrolling, or mutation add a single observer 5730 for (var i = 0; i <= $nodes.length - 1; i++) { 5731 var elementObserver = new MutationObserver(listeningElementsMutation); 5732 elementObserver.observe($nodes[i], { 5733 attributes: true, 5734 childList: true, 5735 characterData: false, 5736 subtree: true, 5737 attributeFilter: ["data-events", "style"] 5738 }); 5739 } 5740 } 5741}; 5742Triggers.Initializers.addSimpleListeners = function () { 5743 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 5744 Triggers.Initializers.addOpenListener($document); 5745 Triggers.Initializers.addCloseListener($document); 5746 Triggers.Initializers.addToggleListener($document); 5747 Triggers.Initializers.addCloseableListener($document); 5748 Triggers.Initializers.addToggleFocusListener($document); 5749}; 5750Triggers.Initializers.addGlobalListeners = function () { 5751 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 5752 Triggers.Initializers.addMutationEventsListener($document); 5753 Triggers.Initializers.addResizeListener(250); 5754 Triggers.Initializers.addScrollListener(); 5755 Triggers.Initializers.addClosemeListener(); 5756}; 5757Triggers.init = function (__, Foundation) { 5758 (0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__.onLoad)(jquery__WEBPACK_IMPORTED_MODULE_0___default()(window), function () { 5759 if ((jquery__WEBPACK_IMPORTED_MODULE_0___default().triggersInitialized) !== true) { 5760 Triggers.Initializers.addSimpleListeners(); 5761 Triggers.Initializers.addGlobalListeners(); 5762 (jquery__WEBPACK_IMPORTED_MODULE_0___default().triggersInitialized) = true; 5763 } 5764 }); 5765 if (Foundation) { 5766 Foundation.Triggers = Triggers; 5767 // Legacy included to be backwards compatible for now. 5768 Foundation.IHearYou = Triggers.Initializers.addGlobalListeners; 5769 } 5770}; 5771 5772 5773/***/ }), 5774 5775/***/ "./foundation.core": 5776/*!****************************************************************************************************************************************************************!*\ 5777 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 5778 \****************************************************************************************************************************************************************/ 5779/***/ (function(module) { 5780 5781module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 5782 5783/***/ }), 5784 5785/***/ "./foundation.util.
5785keyboard": 5786/*!****************************************************************************************************************************************************************************************************!*\ 5787 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.keyboard"],"amd":"./foundation.util.keyboard","commonjs":"./foundation.util.keyboard","commonjs2":"./foundation.util.keyboard"} ***! 5788 \****************************************************************************************************************************************************************************************************/ 5789/***/ (function(module) { 5790 5791module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__; 5792 5793/***/ }), 5794 5795/***/ "./foundation.util.mediaQuery": 5796/*!************************************************************************************************************************************************************************************************************!*\ 5797 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.mediaQuery"],"amd":"./foundation.util.mediaQuery","commonjs":"./foundation.util.mediaQuery","commonjs2":"./foundation.util.mediaQuery"} ***! 5798 \************************************************************************************************************************************************************************************************************/ 5799/***/ (function(module) { 5800 5801module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__; 5802 5803/***/ }), 5804 5805/***/ "./foundation.util.motion": 5806/*!********************************************************************************************************************************************************************************************!*\ 5807 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.motion"],"amd":"./foundation.util.motion","commonjs":"./foundation.util.motion","commonjs2":"./foundation.util.motion"} ***! 5808 \********************************************************************************************************************************************************************************************/ 5809/***/ (function(module) { 5810 5811module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__; 5812 5813/***/ }), 5814 5815/***/ "./foundation.util.touch": 5816/*!****************************************************************************************************************************************************************************************!*\ 5817 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.touch"],"amd":"./foundation.util.touch","commonjs":"./foundation.util.touch","commonjs2":"./foundation.util.touch"} ***! 5818 \****************************************************************************************************************************************************************************************/ 5819/***/ (function(module) { 5820 5821module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_touch__; 5822 5823/***/ }), 5824 5825/***/ "jquery": 5826/*!********************************************************************************************!*\ 5827 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 5828 \********************************************************************************************/ 5829/***/ (function(module) { 5830 5831module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 5832 5833/***/ }) 5834 5835/******/ }); 5836/************************************************************************/ 5837/******/ // The module cache 5838/******/ var __webpack_module_cache__ = {}; 5839/******/ 5840/******/ // The require function 5841/******/ function __webpack_require__(moduleId) { 5842/******/ // Check if module is in cache 5843/******/ var cachedModule = __webpack_module_cache__[moduleId]; 5844/******/ if (cachedModule !== undefined) { 5845/******/ return cachedModule.exports; 5846/******/ } 5847/******/ // Create a new module (and put it into the cache) 5848/******/ var module = __webpack_module_cache__[moduleId] = { 5849/******/ // no module.id needed 5850/******/ // no module.loaded needed 5851/******/ exports: {} 5852/******/ }; 5853/******/ 5854/******/ // Execute the module function 5855/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 5856/******/ 5857/******/ // Return the exports of the module 5858/******/ return module.exports; 5859/******/ } 5860/******/ 5861/************************************************************************/ 5862/******/ /* webpack/runtime/compat get default export */ 5863/******/ !function() { 5864/******/ // getDefaultExport function for compatibility with non-harmony modules 5865/******/ __webpack_require__.n = function(module) {
vendor: 2,923 bytes, lines 5866-5926
5866/******/ var getter = module && module.__esModule ? 5867/******/ function() { return module['default']; } : 5868/******/ function() { return module; }; 5869/******/ __webpack_require__.d(getter, { a: getter }); 5870/******/ return getter; 5871/******/ }; 5872/******/ }(); 5873/******/ 5874/******/ /* webpack/runtime/define property getters */ 5875/******/ !function() { 5876/******/ // define getter functions for harmony exports 5877/******/ __webpack_require__.d = function(exports, definition) { 5878/******/ for(var key in definition) { 5879/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 5880/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 5881/******/ } 5882/******/ } 5883/******/ }; 5884/******/ }(); 5885/******/ 5886/******/ /* webpack/runtime/hasOwnProperty shorthand */ 5887/******/ !function() { 5888/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 5889/******/ }(); 5890/******/ 5891/******/ /* webpack/runtime/make namespace object */ 5892/******/ !function() { 5893/******/ // define __esModule on exports 5894/******/ __webpack_require__.r = function(exports) { 5895/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 5896/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 5897/******/ } 5898/******/ Object.defineProperty(exports, '__esModule', { value: true }); 5899/******/ }; 5900/******/ }(); 5901/******/ 5902/************************************************************************/ 5903var __webpack_exports__ = {}; 5904// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 5905!function() { 5906/*!*************************************************!*\ 5907 !*** ./js/entries/plugins/foundation.reveal.js ***! 5908 \*************************************************/ 5909__webpack_require__.r(__webpack_exports__); 5910/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5911/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation; }, 5912/* harmony export */ Reveal: function() { return /* reexport safe */ _foundation_reveal__WEBPACK_IMPORTED_MODULE_1__.Reveal; } 5913/* harmony export */ }); 5914/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core"); 5915/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 5916/* harmony import */ var _foundation_reveal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.reveal */ "./js/foundation.reveal.js"); 5917 5918 5919_foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation.plugin(_foundation_reveal__WEBPACK_IMPORTED_MODULE_1__.Reveal, 'Reveal'); 5920 5921}(); 5922/******/ return __webpack_exports__; 5923/******/ })() 5924; 5925}); 5926
vendor: 32,390 bytes, lines 5927-6691
5927(function webpackUniversalModuleDefinition(root, factory) { 5928 if(typeof exports === 'object' && typeof module === 'object') 5929 module.exports = factory(require("./foundation.core"), require("jquery"), require("./foundation.util.mediaQuery"), require("./foundation.util.motion"), require("./foundation.util.box")); 5930 else if(typeof define === 'function' && define.amd) 5931 define(["./foundation.core", "jquery", "./foundation.util.mediaQuery", "./foundation.util.motion", "./foundation.util.box"], factory); 5932 else if(typeof exports === 'object') 5933 exports["__FOUNDATION_EXTERNAL__"] = factory(require("./foundation.core"), require("jquery"), require("./foundation.util.mediaQuery"), require("./foundation.util.motion"), require("./foundation.util.box")); 5934 else 5935 root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.tooltip"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.mediaQuery"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.motion"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.box"]); 5936})(self, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__, __WEBPACK_EXTERNAL_MODULE__foundation_util_box__) { 5937return /******/ (function() { // webpackBootstrap 5938/******/ "use strict"; 5939/******/ var __webpack_modules__ = ({ 5940 5941/***/ "./js/foundation.positionable.js": 5942/*!***************************************!*\ 5943 !*** ./js/foundation.positionable.js ***! 5944 \***************************************/ 5945/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 5946 5947__webpack_require__.r(__webpack_exports__); 5948/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5949/* harmony export */ Positionable: function() { return /* binding */ Positionable; } 5950/* harmony export */ }); 5951/* harmony import */ var _foundation_util_box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.util.box */ "./foundation.util.box"); 5952/* harmony import */ var _foundation_util_box__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__); 5953/* harmony import */ var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ "./foundation.core"); 5954/* harmony import */ var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__); 5955function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 5956function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } 5957function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } 5958function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } 5959function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 5960function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 5961function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } 5962function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } 5963function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } 5964function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } 5965function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } 5966function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } 5967function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } 5968 5969 5970 5971var POSITIONS = ['left', 'right', 'top', 'bottom']; 5972var VERTICAL_ALIGNMENTS = ['top', 'bottom', 'center']; 5973var HORIZONTAL_ALIGNMENTS = ['left', 'right', 'center']; 5974var ALIGNMENTS = { 5975 'left': VERTICAL_ALIGNMENTS, 5976 'right': VERTICAL_ALIGNMENTS, 5977 'top': HORIZONTAL_ALIGNMENTS, 5978 'bottom': HORIZONTAL_ALIGNMENTS 5979}; 5980function nextItem(item, array) { 5981 var currentIdx = array.indexOf(item); 5982 if (currentIdx === array.length - 1) { 5983 return array[0]; 5984 } else { 5985 return array[currentIdx + 1]; 5986 } 5987} 5988var Positionable = /*#__PURE__*/function (_Plugin) { 5989 function Positionable() { 5990 _classCallCheck(this, Positionable); 5991 return _callSuper(this, Positionable, arguments); 5992 } 5993 _inherits(Positionable, _Plugin); 5994 return _createClass(Positionable, [{ 5995 key: "_init", 5996 value: 5997 /** 5998 * Abstract class encapsulating the tether-like explicit positioning logic 5999 * including repositioning based on overlap. 6000 * Expects classes to define defaults for vOffset, hOffset, position, 6001 * alignment, allowOverlap, and allowBottomOverlap. They can do this by 6002 * extending the defaults, or (for now recommended due to the way docs are 6003 * generated) by explicitly declaring them. 6004 * 6005 **/ 6006 6007 function _init() { 6008 this.triedPositions = {}; 6009 this.position = this.options.position === 'auto' ? this._getDefaultPosition() : this.options.position; 6010 this.alignment = this.options.alignment === 'auto' ? this._getDefaultAlignment() : this.options.alignment; 6011 this.originalPosition = this.position; 6012 this.originalAlignment = this.alignment; 6013 } 6014 }, { 6015 key: "_getDefaultPosition", 6016 value: function _getDefaultPosition() { 6017 return 'bottom'; 6018 } 6019 }, { 6020 key: "_getDefaultAlignment", 6021 value: function _getDefaultAlignment() { 6022 switch (this.position) { 6023 case 'bottom': 6024 case 'top': 6025 return (0,_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__.rtl)() ? 'right' : 'left'; 6026 case 'left': 6027 case 'right': 6028 return 'bottom'; 6029 } 6030 } 6031 6032 /** 6033 * Adjusts the positionable possible positions by iterating through alignments 6034 * and positions. 6035 * @function 6036 * @private 6037 */ 6038 }, { 6039 key: "_reposition", 6040 value: function _reposition() { 6041 if (this._alignmentsExhausted(this.position)) { 6042 this.position = nextItem(this.position, POSITIONS); 6043 this.alignment = ALIGNMENTS[this.position][0]; 6044 } else { 6045 this._realign(); 6046 } 6047 } 6048 6049 /** 6050 * Adjusts the dropdown pane possible positions by iterating through alignments 6051 * on the current position. 6052 * @function 6053 * @private 6054 */ 6055 }, { 6056 key: "_realign", 6057 value: function _realign() { 6058 this._addTriedPosition(this.position, this.alignment); 6059 this.alignment = nextItem(this.alignment, ALIGNMENTS[this.position]); 6060 } 6061 }, { 6062 key: "_addTriedPosition", 6063 value: function _addTriedPosition(position, alignment) { 6064 this.triedPositions[position] = this.triedPositions[position] || []; 6065 this.triedPositions[position].push(alignment); 6066 } 6067 }, { 6068 key: "_positionsExhausted", 6069 value: function _positionsExhausted() { 6070 var isExhausted = true; 6071 for (var i = 0; i < POSITIONS.length; i++) { 6072 isExhausted = isExhausted && this._alignmentsExhausted(POSITIONS[i]); 6073 } 6074 return isExhausted; 6075 } 6076 }, { 6077 key: "_alignmentsExhausted", 6078 value: function _alignmentsExhausted(position) { 6079 return this.triedPositions[position] && this.triedPositions[position].length === ALIGNMENTS[position].length; 6080 } 6081 6082 // When we're trying to center, we don't want to apply offset that's going to 6083 // take us just off center, so wrap around to return 0 for the appropriate 6084 // offset in those alignments. TODO: Figure out if we want to make this 6085 // configurable behavior... it feels more intuitive, especially for tooltips, but 6086 // it's possible someone might actually want to start from center and then nudge 6087 // slightly off. 6088 }, { 6089 key: "_getVOffset", 6090 value: function _getVOffset() { 6091 return this.options.vOffset; 6092 } 6093 }, { 6094 key: "_getHOffset", 6095 value: function _getHOffset() { 6096 return this.options.hOffset; 6097 } 6098 }, { 6099 key: "_setPosition", 6100 value: function _setPosition($anchor, $element, $parent) { 6101 if ($anchor.attr('aria-expanded') === 'false') { 6102 return false; 6103 } 6104 if (!this.options.allowOverlap) { 6105 // restore original position & alignment before checking overlap 6106 this.position = this.originalPosition; 6107 this.alignment = this.originalAlignment; 6108 } 6109 $element.offset(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__.Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset())); 6110 if (!this.options.allowOverlap) { 6111 var minOverlap = 100000000; 6112 // default coordinates to how we start, in case we can't figure out better 6113 var minCoordinates = { 6114 position: this.position, 6115 alignment: this.alignment 6116 }; 6117 while (!this._positionsExhausted()) { 6118 var overlap = _foundation_util_box__WEBPACK_IMPORTED_MODULE_0__.Box.OverlapArea($element, $parent, false, false, this.options.allowBottomOverlap); 6119 if (overlap === 0) { 6120 return; 6121 } 6122 if (overlap < minOverlap) { 6123 minOverlap = overlap; 6124 minCoordinates = { 6125 position: this.position, 6126 alignment: this.alignment 6127 }; 6128 } 6129 this._reposition(); 6130 $element.offset(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__.Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset())); 6131 } 6132 // If we get through the entire loop, there was no non-overlapping 6133 // position available. Pick the version with least overlap. 6134 this.position = minCoordinates.position; 6135 this.alignment = minCoordinates.alignment; 6136 $element.offset(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__.Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset())); 6137 } 6138 } 6139 }]); 6140}(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__.Plugin); 6141Positionable.defaults = { 6142 /** 6143 * Position of positionable relative to anchor. Can be left, right, bottom, top, or auto. 6144 * @option 6145 * @type {string} 6146 * @default 'auto' 6147 */ 6148 position: 'auto', 6149 /** 6150 * Alignment of positionable relative to anchor. Can be left, right, bottom, top, center, or auto. 6151 * @option 6152 * @type {string} 6153 * @default 'auto' 6154 */ 6155 alignment: 'auto', 6156 /** 6157 * Allow overlap of container/window. If false, dropdown positionable first 6158 * try to position as defined by data-position and data-alignment, but 6159 * reposition if it would cause an overflow. 6160 * @option 6161 * @type {boolean} 6162 * @default false 6163 */ 6164 allowOverlap: false, 6165 /** 6166 * Allow overlap of only the bottom of the container. This is the most common 6167 * behavior for dropdowns, allowing the dropdown to extend the bottom of the 6168 * screen but not otherwise influence or break out of the container. 6169 * @option 6170 * @type {boolean} 6171 * @default true 6172 */ 6173 allowBottomOverlap: true, 6174 /** 6175 * Number of pixels the positionable should be separated vertically from anchor 6176 * @option 6177 * @type {number} 6178 * @default 0 6179 */ 6180 vOffset: 0, 6181 /** 6182 * Number of pixels the positionable should be separated horizontally from anchor 6183 * @option 6184 * @type {number} 6185 * @default 0 6186 */ 6187 hOffset: 0 6188}; 6189 6190 6191/***/ }), 6192 6193/***/ "./js/foundation.tooltip.js": 6194/*!**********************************!*\ 6195 !*** ./js/foundation.tooltip.js ***! 6196 \**********************************/ 6197/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 6198 6199__webpack_require__.r(__webpack_exports__); 6200/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6201/* harmony export */ Tooltip: function() { return /* binding */ Tooltip; } 6202/* harmony export */ }); 6203/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 6204/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 6205/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ "./foundation.core"); 6206/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__); 6207/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./foundation.util.mediaQuery"); 6208/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__); 6209/* harmony import */ var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.triggers */ "./js/foundation.util.triggers.js"); 6210/* harmony import */ var _foundation_positionable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.positionable */ "./js/foundation.positionable.js"); 6211function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 6212function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } 6213function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } 6214function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } 6215function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 6216function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 6217function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } 6218function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } 6219function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } 6220function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } 6221function _superPropGet(t, e, o, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), e, o); return 2 & r && "function" == typeof p ? function (t) { return p.apply(o, t); } : p; } 6222function _get() { return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); } 6223function _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; } 6224function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } 6225function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } 6226function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } 6227 6228 6229 6230 6231 6232 6233/** 6234 * Tooltip module. 6235 * @module foundation.tooltip 6236 * @requires foundation.util.box 6237 * @requires foundation.util.mediaQuery 6238 * @requires foundation.util.triggers 6239 */ 6240var Tooltip = /*#__PURE__*/function (_Positionable) { 6241 function Tooltip() { 6242 _classCallCheck(this, Tooltip); 6243 return _callSuper(this, Tooltip, arguments); 6244 } 6245 _inherits(Tooltip, _Positionable); 6246 return _createClass(Tooltip, [{ 6247 key: "_setup", 6248 value: 6249 /** 6250 * Creates a new instance of a Tooltip. 6251 * @class 6252 * @name Tooltip 6253 * @fires Tooltip#init 6254 * @param {jQuery} element - jQuery object to attach a tooltip to. 6255 * @param {Object} options - object to extend the default configuration. 6256 */ 6257 function _setup(element, options) { 6258 this.$element = element; 6259 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default().extend({}, Tooltip.defaults, this.$element.data(), options); 6260 this.className = 'Tooltip'; // ie9 back compat 6261 6262 this.isActive = false; 6263 this.isClick = false; 6264 6265 // Triggers init is idempotent, just need to make sure it is initialized 6266 _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_3__.Triggers.init((jquery__WEBPACK_IMPORTED_MODULE_0___default())); 6267 this._init(); 6268 } 6269 6270 /** 6271 * Initializes the tooltip by setting the creating the tip element, adding it's text, setting private variables and setting attributes on the anchor. 6272 * @private 6273 */ 6274 }, { 6275 key: "_init", 6276 value: function _init() { 6277 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__.MediaQuery._init(); 6278 var elemId = this.$element.attr('aria-describedby') || (0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__.GetYoDigits)(6, 'tooltip'); 6279 this.options.tipText = this.options.tipText || this.$element.attr('title'); 6280 this.template = this.options.template ? jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.options.template) : this._buildTemplate(elemId); 6281 if (this.options.allowHtml) { 6282 this.template.appendTo(document.body).html(this.options.tipText).hide(); 6283 } else { 6284 this.template.appendTo(document.body).text(this.options.tipText).hide(); 6285 } 6286 this.$element.attr({ 6287 'title': '', 6288 'aria-describedby': elemId, 6289 'data-yeti-box': elemId, 6290 'data-toggle': elemId, 6291 'data-resize': elemId 6292 }).addClass(this.options.triggerClass); 6293 _superPropGet(Tooltip, "_init", this, 3)([]); 6294 this._events(); 6295 } 6296 }, { 6297 key: "_getDefaultPosition", 6298 value: function _getDefaultPosition() { 6299 // handle legacy classnames 6300 var elementClassName = this.$element[0].className; 6301 if (this.$element[0] instanceof SVGElement) { 6302 elementClassName = elementClassName.baseVal; 6303 } 6304 var position = elementClassName.match(/\b(top|left|right|bottom)\b/g); 6305 return position ? position[0] : 'top'; 6306 } 6307 }, { 6308 key: "_getDefaultAlignment", 6309 value: function _getDefaultAlignment() { 6310 return 'center'; 6311 } 6312 }, { 6313 key: "_getHOffset", 6314 value: function _getHOffset() { 6315 if (this.position === 'left' || this.position === 'right') { 6316 return this.options.hOffset + this.options.tooltipWidth; 6317 } else { 6318 return this.options.hOffset; 6319 } 6320 } 6321 }, { 6322 key: "_getVOffset", 6323 value: function _getVOffset() { 6324 if (this.position === 'top' || this.position === 'bottom') { 6325 return this.options.vOffset + this.options.tooltipHeight; 6326 } else { 6327 return this.options.vOffset; 6328 } 6329 } 6330 6331 /** 6332 * builds the tooltip element, adds attributes, and returns the template. 6333 * @private 6334 */ 6335 }, { 6336 key: "_buildTemplate", 6337 value: function _buildTemplate(id) { 6338 var templateClasses = "".concat(this.options.tooltipClass, " ").concat(this.options.templateClasses).trim(); 6339 var $template = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div></div>').addClass(templateClasses).attr({ 6340 'role': 'tooltip', 6341 'aria-hidden': true, 6342 'data-is-active': false, 6343 'data-is-focus': false, 6344 'id': id 6345 }); 6346 return $template; 6347 } 6348 6349 /** 6350 * sets the position class of an element and recursively calls itself until there are no more possible positions to attempt, or the tooltip element is no longer colliding. 6351 * if the tooltip is larger than the screen width, default to full width - any user selected margin 6352 * @private 6353 */ 6354 }, { 6355 key: "_setPosition", 6356 value: function _setPosition() { 6357 _superPropGet(Tooltip, "_setPosition", this, 3)([this.$element, this.template]); 6358 } 6359 6360 /** 6361 * reveals the tooltip, and fires an event to close any other open tooltips on the page 6362 * @fires Tooltip#closeme 6363 * @fires Tooltip#show 6364 * @function 6365 */ 6366 }, { 6367 key: "show", 6368 value: function show() { 6369 if (this.options.showOn !== 'all' && !_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__.MediaQuery.is(this.options.showOn)) { 6370 // console.error('The screen is too small to display this tooltip'); 6371 return false; 6372 } 6373 var _this = this; 6374 this.template.css('visibility', 'hidden').show(); 6375 this._setPosition(); 6376 this.template.removeClass('top bottom left right').addClass(this.position); 6377 this.template.removeClass('align-top align-bottom align-left align-right align-center').addClass('align-' + this.alignment); 6378 6379 /** 6380 * Fires to close all other open tooltips on the page 6381 * @event Closeme#tooltip 6382 */ 6383 this.$element.trigger('closeme.zf.tooltip', this.template.attr('id')); 6384 this.template.attr({ 6385 'data-is-active': true, 6386 'aria-hidden': false 6387 }); 6388 _this.isActive = true; 6389 this.template.stop().hide().css('visibility', '').fadeIn(this.options.fadeInDuration, function () { 6390 //maybe do stuff? 6391 }); 6392 /** 6393 * Fires when the tooltip is shown 6394 * @event Tooltip#show 6395 */ 6396 this.$element.trigger('show.zf.tooltip'); 6397 } 6398 6399 /** 6400 * Hides the current tooltip, and resets the positioning class if it was changed due to collision 6401 * @fires Tooltip#hide 6402 * @function 6403 */ 6404 }, { 6405 key: "hide", 6406 value: function hide() { 6407 var _this = this; 6408 this.template.stop().attr({ 6409 'aria-hidden': true, 6410 'data-is-active': false 6411 }).fadeOut(this.options.fadeOutDuration, function () { 6412 _this.isActive = false; 6413 _this.isClick = false; 6414 }); 6415 /** 6416 * fires when the tooltip is hidden 6417 * @event Tooltip#hide 6418 */ 6419 this.$element.trigger('hide.zf.tooltip'); 6420 } 6421 6422 /** 6423 * adds event listeners for the tooltip and its anchor 6424 * TODO combine some of the listeners like focus and mouseenter, etc. 6425 * @private 6426 */ 6427 }, { 6428 key: "_events", 6429 value: function _events() { 6430 var _this = this; 6431 var hasTouch = 'ontouchstart' in window || typeof window.ontouchstart !== 'undefined'; 6432 var isFocus = false; 6433 6434 // `disableForTouch: Fully disable the tooltip on touch devices 6435 if (hasTouch && this.options.disableForTouch) return; 6436 if (!this.options.disableHover) { 6437 this.$element.on('mouseenter.zf.tooltip', function () { 6438 if (!_this.isActive) { 6439 _this.timeout = setTimeout(function () { 6440 _this.show(); 6441 }, _this.options.hoverDelay); 6442 } 6443 }).on('mouseleave.zf.tooltip', (0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__.ignoreMousedisappear)(function () { 6444 clearTimeout(_this.timeout); 6445 if (!isFocus || _this.isClick && !_this.options.clickOpen) { 6446 _this.hide(); 6447 } 6448 })); 6449 } 6450 if (hasTouch) { 6451 this.$element.on('tap.zf.tooltip touchend.zf.tooltip', function () { 6452 _this.isActive ? _this.hide() : _this.show(); 6453 }); 6454 } 6455 if (this.options.clickOpen) { 6456 this.$element.on('mousedown.zf.tooltip', function () { 6457 if (_this.isClick) { 6458 //_this.hide(); 6459 // _this.isClick = false; 6460 } else { 6461 _this.isClick = true; 6462 if ((_this.options.disableHover || !_this.$element.attr('tabindex')) && !_this.isActive) { 6463 _this.show(); 6464 } 6465 } 6466 }); 6467 } else { 6468 this.$element.on('mousedown.zf.tooltip', function () { 6469 _this.isClick = true; 6470 }); 6471 } 6472 this.$element.on({ 6473 // 'toggle.zf.trigger': this.toggle.bind(this), 6474 // 'close.zf.trigger': this.hide.bind(this) 6475 'close.zf.trigger': this.hide.bind(this) 6476 }); 6477 this.$element.on('focus.zf.tooltip', function () { 6478 isFocus = true; 6479 if (_this.isClick) { 6480 // If we're not showing open on clicks, we need to pretend a click-launched focus isn't 6481 // a real focus, otherwise on hover and come back we get bad behavior 6482 if (!_this.options.clickOpen) { 6483 isFocus = false; 6484 } 6485 return false; 6486 } else { 6487 _this.show(); 6488 } 6489 }).on('focusout.zf.tooltip', function () { 6490 isFocus = false; 6491 _this.isClick = false; 6492 _this.hide(); 6493 }).on('resizeme.zf.trigger', function () { 6494 if (_this.isActive) { 6495 _this._setPosition(); 6496 } 6497 }); 6498 } 6499 6500 /** 6501 * adds a toggle method, in addition to the static show() & hide() functions 6502 * @function 6503 */ 6504 }, { 6505 key: "toggle", 6506 value: function toggle() { 6507 if (this.isActive) { 6508 this.hide(); 6509 } else { 6510 this.show(); 6511 } 6512 } 6513 6514 /** 6515 * Destroys an instance of tooltip, removes template element from the view. 6516 * @function 6517 */ 6518 }, { 6519 key: "_destroy", 6520 value: function _destroy() { 6521 this.$element.attr('title', this.template.text()).off('.zf.trigger .zf.tooltip').removeClass(this.options.triggerClass).removeClass('top right left bottom').removeAttr('aria-describedby data-disable-hover data-resize data-toggle data-tooltip data-yeti-box'); 6522 this.template.remove(); 6523 } 6524 }]); 6525}(_foundation_positionable__WEBPACK_IMPORTED_MODULE_4__.Positionable); 6526Tooltip.defaults = { 6527 /** 6528 * Time, in ms, before a tooltip should open on hover. 6529 * @option 6530 * @type {number} 6531 * @default 200 6532 */ 6533 hoverDelay: 200, 6534 /** 6535 * Time, in ms, a tooltip should take to fade into view. 6536 * @option 6537 * @type {number} 6538 * @default 150 6539 */ 6540 fadeInDuration: 150, 6541 /** 6542 * Time, in ms, a tooltip should take to fade out of view. 6543 * @option 6544 * @type {number} 6545 * @default 150 6546 */ 6547 fadeOutDuration: 150, 6548 /** 6549 * Disables hover events from opening the tooltip if set to true 6550 * @option 6551 * @type {boolean} 6552 * @default false 6553 */ 6554 disableHover: false, 6555 /** 6556 * Disable the tooltip for touch devices. 6557 * This can be useful to make elements with a tooltip on it trigger their 6558 * action on the first tap instead of displaying the tooltip. 6559 * @option 6560 * @type {booelan} 6561 * @default false 6562 */ 6563 disableForTouch: false, 6564 /** 6565 * Optional addtional classes to apply to the tooltip template on init. 6566 * @option 6567 * @type {string} 6568 * @default '' 6569 */ 6570 templateClasses: '', 6571 /** 6572 * Non-optional class added to tooltip templates. Foundation default is 'tooltip'. 6573 * @option 6574 * @type {string} 6575 * @default 'tooltip' 6576 */ 6577 tooltipClass: 'tooltip', 6578 /** 6579 * Class applied to the tooltip anchor element. 6580 * @option 6581 * @type {string} 6582 * @default 'has-tip' 6583 */ 6584 triggerClass: 'has-tip', 6585 /** 6586 * Minimum breakpoint size at which to open the tooltip. 6587 * @option 6588 * @type {string} 6589 * @default 'small' 6590 */ 6591 showOn: 'small', 6592 /** 6593 * Custom template to be used to generate markup for tooltip. 6594 * @option 6595 * @type {string} 6596 * @default '' 6597 */ 6598 template: '', 6599 /** 6600 * Text displayed in the tooltip template on open. 6601 * @option 6602 * @type {string} 6603 * @default '' 6604 */ 6605 tipText: '', 6606 touchCloseText: 'Tap to close.', 6607 /** 6608 * Allows the tooltip to remain open if triggered with a click or touch event. 6609 * @option 6610 * @type {boolean} 6611 * @default true 6612 */ 6613 clickOpen: true, 6614 /** 6615 * Position of tooltip. Can be left, right, bottom, top, or auto. 6616 * @option 6617 * @type {string} 6618 * @default 'auto' 6619 */ 6620 position: 'auto', 6621 /** 6622 * Alignment of tooltip relative to anchor. Can be left, right, bottom, top, center, or auto. 6623 * @option 6624 * @type {string} 6625 * @default 'auto' 6626 */ 6627 alignment: 'auto', 6628 /** 6629 * Allow overlap of container/window. If false, tooltip will first try to 6630 * position as defined by data-position and data-alignment, but reposition if 6631 * it would cause an overflow. @option 6632 * @type {boolean} 6633 * @default false 6634 */ 6635 allowOverlap: false, 6636 /** 6637 * Allow overlap of only the bottom of the container. This is the most common 6638 * behavior for dropdowns, allowing the dropdown to extend the bottom of the 6639 * screen but not otherwise influence or break out of the container. 6640 * Less common for tooltips. 6641 * @option 6642 * @type {boolean} 6643 * @default false 6644 */ 6645 allowBottomOverlap: false, 6646 /** 6647 * Distance, in pixels, the template should push away from the anchor on the Y axis. 6648 * @option 6649 * @type {number} 6650 * @default 0 6651 */ 6652 vOffset: 0, 6653 /** 6654 * Distance, in pixels, the template should push away from the anchor on the X axis 6655 * @option 6656 * @type {number} 6657 * @default 0 6658 */ 6659 hOffset: 0, 6660 /** 6661 * Distance, in pixels, the template spacing auto-adjust for a vertical tooltip 6662 * @option 6663 * @type {number} 6664 * @default 14 6665 */ 6666 tooltipHeight: 14, 6667 /** 6668 * Distance, in pixels, the template spacing auto-adjust for a horizontal tooltip 6669 * @option 6670 * @type {number} 6671 * @default 12 6672 */ 6673 tooltipWidth: 12, 6674 /** 6675 * Allow HTML in tooltip. Warning: If you are loading user-generated content into tooltips, 6676 * allowing HTML may open yourself up to XSS attacks. 6677 * @option 6678 * @type {boolean} 6679 * @default false 6680 */ 6681 allowHtml: false 6682}; 6683 6684/** 6685 * TODO utilize resize event trigger 6686 */ 6687 6688 6689 6690/***/ }), 6691
vendor: 12,236 bytes, lines 6692-6957
6692/***/ "./js/foundation.util.triggers.js": 6693/*!****************************************!*\ 6694 !*** ./js/foundation.util.triggers.js ***! 6695 \****************************************/ 6696/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 6697 6698__webpack_require__.r(__webpack_exports__); 6699/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6700/* harmony export */ Triggers: function() { return /* binding */ Triggers; } 6701/* harmony export */ }); 6702/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); 6703/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 6704/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ "./foundation.core"); 6705/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__); 6706/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.motion */ "./foundation.util.motion"); 6707/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__); 6708function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 6709 6710 6711 6712var MutationObserver = function () { 6713 var prefixes = ['WebKit', 'Moz', 'O', 'Ms', '']; 6714 for (var i = 0; i < prefixes.length; i++) { 6715 if ("".concat(prefixes[i], "MutationObserver") in window) { 6716 return window["".concat(prefixes[i], "MutationObserver")]; 6717 } 6718 } 6719 return false; 6720}(); 6721var triggers = function triggers(el, type) { 6722 el.data(type).split(' ').forEach(function (id) { 6723 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id))[type === 'close' ? 'trigger' : 'triggerHandler']("".concat(type, ".zf.trigger"), [el]); 6724 }); 6725}; 6726var Triggers = { 6727 Listeners: { 6728 Basic: {}, 6729 Global: {} 6730 }, 6731 Initializers: {} 6732}; 6733Triggers.Listeners.Basic = { 6734 openListener: function openListener() { 6735 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'open'); 6736 }, 6737 closeListener: function closeListener() { 6738 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('close'); 6739 if (id) { 6740 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'close'); 6741 } else { 6742 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('close.zf.trigger'); 6743 } 6744 }, 6745 toggleListener: function toggleListener() { 6746 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle'); 6747 if (id) { 6748 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'toggle'); 6749 } else { 6750 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('toggle.zf.trigger'); 6751 } 6752 }, 6753 closeableListener: function closeableListener(e) { 6754 var animation = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('closable'); 6755 6756 // Only close the first closable element. See https://git.io/zf-7833 6757 e.stopPropagation(); 6758 if (animation !== '') { 6759 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__.Motion.animateOut(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), animation, function () { 6760 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('closed.zf'); 6761 }); 6762 } else { 6763 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).fadeOut().trigger('closed.zf'); 6764 } 6765 }, 6766 toggleFocusListener: function toggleFocusListener() { 6767 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle-focus'); 6768 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id)).triggerHandler('toggle.zf.trigger', [jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)]); 6769 } 6770}; 6771 6772// Elements with [data-open] will reveal a plugin that supports it when clicked. 6773Triggers.Initializers.addOpenListener = function ($elem) { 6774 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener); 6775 $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener); 6776}; 6777 6778// Elements with [data-close] will close a plugin that supports it when clicked. 6779// If used without a value on [data-close], the event will bubble, allowing it to close a parent component. 6780Triggers.Initializers.addCloseListener = function ($elem) { 6781 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener); 6782 $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener); 6783}; 6784 6785// Elements with [data-toggle] will toggle a plugin that supports it when clicked. 6786Triggers.Initializers.addToggleListener = function ($elem) { 6787 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener); 6788 $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener); 6789}; 6790 6791// Elements with [data-closable] will respond to close.zf.trigger events. 6792Triggers.Initializers.addCloseableListener = function ($elem) { 6793 $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener); 6794 $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener); 6795}; 6796 6797// Elements with [data-toggle-focus] will respond to coming in and out of focus 6798Triggers.Initializers.addToggleFocusListener = function ($elem) { 6799 $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener); 6800 $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener); 6801}; 6802 6803// More Global/complex listeners and triggers 6804Triggers.Listeners.Global = { 6805 resizeListener: function resizeListener($nodes) { 6806 if (!MutationObserver) { 6807 //fallback for IE 9 6808 $nodes.each(function () { 6809 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('resizeme.zf.trigger'); 6810 }); 6811 } 6812 //trigger all listening elements and signal a resize event 6813 $nodes.attr('data-events', "resize"); 6814 }, 6815 scrollListener: function scrollListener($nodes) { 6816 if (!MutationObserver) { 6817 //fallback for IE 9 6818 $nodes.each(function () { 6819 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('scrollme.zf.trigger'); 6820 }); 6821 } 6822 //trigger all listening elements and signal a scroll event 6823 $nodes.attr('data-events', "scroll"); 6824 }, 6825 closeMeListener: function closeMeListener(e, pluginId) { 6826 var plugin = e.namespace.split('.')[0]; 6827 var plugins = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-".concat(plugin, "]")).not("[data-yeti-box=\"".concat(pluginId, "\"]")); 6828 plugins.each(function () { 6829 var _this = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 6830 _this.triggerHandler('close.zf.trigger', [_this]); 6831 }); 6832 } 6833}; 6834 6835// Global, parses whole document. 6836Triggers.Initializers.addClosemeListener = function (pluginName) { 6837 var yetiBoxes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-yeti-box]'), 6838 plugNames = ['dropdown', 'tooltip', 'reveal']; 6839 if (pluginName) { 6840 if (typeof pluginName === 'string') { 6841 plugNames.push(pluginName); 6842 } else if (_typeof(pluginName) === 'object' && typeof pluginName[0] === 'string') { 6843 plugNames = plugNames.concat(pluginName); 6844 } else { 6845 console.error('Plugin names must be strings'); 6846 } 6847 } 6848 if (yetiBoxes.length) { 6849 var listeners = plugNames.map(function (name) { 6850 return "closeme.zf.".concat(name); 6851 }).join(' '); 6852 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener); 6853 } 6854}; 6855function debounceGlobalListener(debounce, trigger, listener) { 6856 var timer, 6857 args = Array.prototype.slice.call(arguments, 3); 6858 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on(trigger, function () { 6859 if (timer) { 6860 clearTimeout(timer); 6861 } 6862 timer = setTimeout(function () { 6863 listener.apply(null, args); 6864 }, debounce || 10); //default time to emit scroll event 6865 }); 6866} 6867Triggers.Initializers.addResizeListener = function (debounce) { 6868 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-resize]'); 6869 if ($nodes.length) { 6870 debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes); 6871 } 6872}; 6873Triggers.Initializers.addScrollListener = function (debounce) { 6874 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-scroll]'); 6875 if ($nodes.length) { 6876 debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes); 6877 } 6878}; 6879Triggers.Initializers.addMutationEventsListener = function ($elem) { 6880 if (!MutationObserver) { 6881 return false; 6882 } 6883 var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]'); 6884 6885 //element callback 6886 var listeningElementsMutation = function listeningElementsMutation(mutationRecordsList) { 6887 var $target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(mutationRecordsList[0].target); 6888 6889 //trigger the event handler for the element depending on type 6890 switch (mutationRecordsList[0].type) { 6891 case "attributes": 6892 if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") { 6893 $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]); 6894 } 6895 if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") { 6896 $target.triggerHandler('resizeme.zf.trigger', [$target]); 6897 } 6898 if (mutationRecordsList[0].attributeName === "style") { 6899 $target.closest("[data-mutate]").attr("data-events", "mutate"); 6900 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 6901 } 6902 break; 6903 case "childList": 6904 $target.closest("[data-mutate]").attr("data-events", "mutate"); 6905 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 6906 break; 6907 default: 6908 return false; 6909 //nothing 6910 } 6911 }; 6912 if ($nodes.length) { 6913 //for each element that needs to listen for resizing, scrolling, or mutation add a single observer 6914 for (var i = 0; i <= $nodes.length - 1; i++) { 6915 var elementObserver = new MutationObserver(listeningElementsMutation); 6916 elementObserver.observe($nodes[i], { 6917 attributes: true, 6918 childList: true, 6919 characterData: false, 6920 subtree: true, 6921 attributeFilter: ["data-events", "style"] 6922 }); 6923 } 6924 } 6925}; 6926Triggers.Initializers.addSimpleListeners = function () { 6927 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 6928 Triggers.Initializers.addOpenListener($document); 6929 Triggers.Initializers.addCloseListener($document); 6930 Triggers.Initializers.addToggleListener($document); 6931 Triggers.Initializers.addCloseableListener($document); 6932 Triggers.Initializers.addToggleFocusListener($document); 6933}; 6934Triggers.Initializers.addGlobalListeners = function () { 6935 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 6936 Triggers.Initializers.addMutationEventsListener($document); 6937 Triggers.Initializers.addResizeListener(250); 6938 Triggers.Initializers.addScrollListener(); 6939 Triggers.Initializers.addClosemeListener(); 6940}; 6941Triggers.init = function (__, Foundation) { 6942 (0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__.onLoad)(jquery__WEBPACK_IMPORTED_MODULE_0___default()(window), function () { 6943 if ((jquery__WEBPACK_IMPORTED_MODULE_0___default().triggersInitialized) !== true) { 6944 Triggers.Initializers.addSimpleListeners(); 6945 Triggers.Initializers.addGlobalListeners(); 6946 (jquery__WEBPACK_IMPORTED_MODULE_0___default().triggersInitialized) = true; 6947 } 6948 }); 6949 if (Foundation) { 6950 Foundation.Triggers = Triggers; 6951 // Legacy included to be backwards compatible for now. 6952 Foundation.IHearYou = Triggers.Initializers.addGlobalListeners; 6953 } 6954}; 6955 6956 6957/***/ })
vendor: 7,402 bytes, lines 6957-7099
6957, 6958 6959/***/ "./foundation.core": 6960/*!****************************************************************************************************************************************************************!*\ 6961 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***! 6962 \****************************************************************************************************************************************************************/ 6963/***/ (function(module) { 6964 6965module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__; 6966 6967/***/ }), 6968 6969/***/ "./foundation.util.box": 6970/*!********************************************************************************************************************************************************************************!*\ 6971 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.box"],"amd":"./foundation.util.box","commonjs":"./foundation.util.box","commonjs2":"./foundation.util.box"} ***! 6972 \********************************************************************************************************************************************************************************/ 6973/***/ (function(module) { 6974 6975module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_box__; 6976 6977/***/ }), 6978 6979/***/ "./foundation.util.mediaQuery": 6980/*!************************************************************************************************************************************************************************************************************!*\ 6981 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.mediaQuery"],"amd":"./foundation.util.mediaQuery","commonjs":"./foundation.util.mediaQuery","commonjs2":"./foundation.util.mediaQuery"} ***! 6982 \************************************************************************************************************************************************************************************************************/ 6983/***/ (function(module) { 6984 6985module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__; 6986 6987/***/ }), 6988 6989/***/ "./foundation.util.motion": 6990/*!********************************************************************************************************************************************************************************************!*\ 6991 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.motion"],"amd":"./foundation.util.motion","commonjs":"./foundation.util.motion","commonjs2":"./foundation.util.motion"} ***! 6992 \********************************************************************************************************************************************************************************************/ 6993/***/ (function(module) { 6994 6995module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__; 6996 6997/***/ }), 6998 6999/***/ "jquery": 7000/*!********************************************************************************************!*\ 7001 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***! 7002 \********************************************************************************************/ 7003/***/ (function(module) { 7004 7005module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__; 7006 7007/***/ }) 7008 7009/******/ }); 7010/************************************************************************/ 7011/******/ // The module cache 7012/******/ var __webpack_module_cache__ = {}; 7013/******/ 7014/******/ // The require function 7015/******/ function __webpack_require__(moduleId) { 7016/******/ // Check if module is in cache 7017/******/ var cachedModule = __webpack_module_cache__[moduleId]; 7018/******/ if (cachedModule !== undefined) { 7019/******/ return cachedModule.exports; 7020/******/ } 7021/******/ // Create a new module (and put it into the cache) 7022/******/ var module = __webpack_module_cache__[moduleId] = { 7023/******/ // no module.id needed 7024/******/ // no module.loaded needed 7025/******/ exports: {} 7026/******/ }; 7027/******/ 7028/******/ // Execute the module function 7029/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 7030/******/ 7031/******/ // Return the exports of the module 7032/******/ return module.exports; 7033/******/ } 7034/******/ 7035/************************************************************************/ 7036/******/ /* webpack/runtime/compat get default export */ 7037/******/ !function() { 7038/******/ // getDefaultExport function for compatibility with non-harmony modules 7039/******/ __webpack_require__.n = function(module) { 7040/******/ var getter = module && module.__esModule ? 7041/******/ function() { return module['default']; } : 7042/******/ function() { return module; }; 7043/******/ __webpack_require__.d(getter, { a: getter }); 7044/******/ return getter; 7045/******/ }; 7046/******/ }(); 7047/******/ 7048/******/ /* webpack/runtime/define property getters */ 7049/******/ !function() { 7050/******/ // define getter functions for harmony exports 7051/******/ __webpack_require__.d = function(exports, definition) { 7052/******/ for(var key in definition) { 7053/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 7054/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 7055/******/ } 7056/******/ } 7057/******/ }; 7058/******/ }(); 7059/******/ 7060/******/ /* webpack/runtime/hasOwnProperty shorthand */ 7061/******/ !function() { 7062/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 7063/******/ }(); 7064/******/ 7065/******/ /* webpack/runtime/make namespace object */ 7066/******/ !function() { 7067/******/ // define __esModule on exports 7068/******/ __webpack_require__.r = function(exports) { 7069/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 7070/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 7071/******/ } 7072/******/ Object.defineProperty(exports, '__esModule', { value: true }); 7073/******/ }; 7074/******/ }(); 7075/******/ 7076/************************************************************************/ 7077var __webpack_exports__ = {}; 7078// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 7079!function() { 7080/*!**************************************************!*\ 7081 !*** ./js/entries/plugins/foundation.tooltip.js ***! 7082 \**************************************************/ 7083__webpack_require__.r(__webpack_exports__); 7084/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7085/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation; }, 7086/* harmony export */ Tooltip: function() { return /* reexport safe */ _foundation_tooltip__WEBPACK_IMPORTED_MODULE_1__.Tooltip; } 7087/* harmony export */ }); 7088/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core"); 7089/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__); 7090/* harmony import */ var _foundation_tooltip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.tooltip */ "./js/foundation.tooltip.js"); 7091 7092 7093_foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation.plugin(_foundation_tooltip__WEBPACK_IMPORTED_MODULE_1__.Tooltip, 'Tooltip'); 7094 7095}(); 7096/******/ return __webpack_exports__; 7097/******/ })() 7098; 7099});
7100 7101jQuery(document).foundation(); 7102window.osj = { 7103 macyInstances: [], 7104 calendar: { 7105 eventsCount: 0, 7106 currentEventIds: [], 7107 }, 7108 islider: false, 7109 textListIndex: 0, 7110 texts: [], 7111 textsLoading: false, 7112 currentPopup: false, 7113}; 7114 7115const appHeight = () => { 7116 const doc = document.documentElement; 7117 doc.style.setProperty("--app-height", `${window.innerHeight}px`); 7118}; 7119window.addEventListener("resize", appHeight); 7120appHeight(); 7121 7122const hamburger_width = () => { 7123 const hamburger = document.getElementById("bigmenu_hamburger"); 7124 hamburger.style.width = ""; 7125 hamburger.style.width = hamburger.offsetWidth + "px"; 7126}; 7127window.addEventListener("resize", hamburger_width); 7128hamburger_width(); 7129 7130gsap.registerPlugin(ScrollTrigger); 7131 7132const initSmoothScrolling = () => { 7133 let lenis_options = { 7134 orientation: "vertical", 7135 lerp: 0.2, // Lower values create a smoother scroll effect 7136 smoothWheel: true, // Enables smooth scrolling for mouse wheel events 7137 }; 7138 7139 // Instantiate the Lenis object with specified properties 7140 window.lenis_scroll = new Lenis(lenis_options); 7141 7142 // Update ScrollTrigger each time the user scrolls 7143 window.lenis_scroll.on("scroll", ({ direction }) => {
7144 ScrollTrigger.update(); 7145 }); 7146 7147 // Define a function to run at each animation frame 7148 const scrollFn = (time) => { 7149 window.lenis_scroll.raf(time); // Run Lenis' requestAnimationFrame method 7150 requestAnimationFrame(scrollFn); // Recursively call scrollFn on each frame 7151 }; 7152 // Start the animation frame loop 7153 requestAnimationFrame(scrollFn); 7154}; 7155 7156initSmoothScrolling(); 7157 7158const generalAnimations = gsap.utils.toArray(".generalAnim"); 7159 7160generalAnimations.forEach((box, i) => { 7161 const anim = gsap.fromTo( 7162 box, 7163 { autoAlpha: 0, y: 100 }, 7164 { duration: 0.75, autoAlpha: 1, y: 0 }, 7165 ); 7166 ScrollTrigger.create({ 7167 trigger: box, 7168 start: "25% bottom", 7169 animation: anim, 7170 toggleActions: "play none none none", 7171 once: true, 7172 }); 7173}); 7174 7175const splitTextAnimate = gsap.utils.toArray(".split-text-animate"); 7176 7177splitTextAnimate.forEach(function (element) { 7178 const SplitTextTimeLine = gsap.timeline(); 7179 7180 const sectionTitleSplit = new SplitType(element, { 7181 types: "words, chars", 7182 }); 7183 const chars = sectionTitleSplit.chars; 7184 7185 SplitTextTimeLine.from(chars, { 7186 duration: 1.8, 7187 opacity: 0, 7188 y: 75, 7189 ease: "ease.out", 7190 stagger: 0.05, 7191 scrollTrigger: { 7192 trigger: element, 7193 start: "top 90%", 7194 end: "bottom center", 7195 scrub: true, 7196 }, 7197 }); 7198}); 7199 7200[...document.querySelectorAll(".mod_blocs .cols-2")].forEach((el, i) => { 7201 window.osj.macyInstances[i] = Macy({ 7202 container: el, 7203 trueOrder: true, 7204 waitForImages: false, 7205 cancelLegacy: true, 7206 margin: { 7207 x: 50, 7208 y: 50, 7209 }, 7210 columns: 2, 7211 breakAt: { 7212 760: { 7213 columns: 1, 7214 }, 7215 1000: { 7216 margin: { 7217 x: 30, 7218 y: 20, 7219 }, 7220 columns: 2, 7221 }, 7222 }, 7223 }); 7224 7225 //Bug fix to make it work for some reason 7226 setTimeout(function () { 7227 window.osj.macyInstances[i].reInit(); 7228 el.classList.add("loaded"); 7229 }, 250); 7230}); 7231
7232events_calendar(); 7233 7234document.addEventListener("DOMContentLoaded", function (event) { 7235 [...document.querySelectorAll(".results")].forEach((el, i) => { 7236 el.setAttribute("data-lenis-prevent", ""); 7237 }); 7238 const footer_products = document.querySelector(".glide-products"); 7239 if (footer_products) { 7240 new Glide(footer_products, { 7241 type: "slider", 7242 keyboard: false, 7243 perView: 3, 7244 gap: 20, 7245 breakpoints: { 7246 1020: { 7247 perView: 2, 7248 }, 7249 600: { 7250 perView: 1, 7251 }, 7252 }, 7253 }).mount(); 7254 7255 [...document.querySelectorAll(".glide-products .product")].forEach( 7256 (el, i) => { 7257 el.addEventListener("click", (event) => { 7258 window.open(event.currentTarget.dataset.link, "_blank"); 7259 }); 7260 }, 7261 ); 7262 } 7263 7264 [...document.querySelectorAll(".glide.glide-posts")].forEach((el, i) => { 7265 let slider = new Glide(el, { 7266 type: "slider", 7267 keyboard: false, 7268 perView: 3, 7269 rewind: false, 7270 gap: 60, 7271 bound: true, 7272 peek: { before: 0, after: 50 }, 7273 breakpoints: { 7274 1020: { 7275 perView: 2, 7276 gap: 30, 7277 }, 7278 600: { 7279 perView: 1, 7280 gap: 20, 7281 }, 7282 }, 7283 }); 7284 7285 slider.on("mount.after", function (event) { 7286 slider.selector.classList.add("loaded"); 7287 }); 7288 7289 /* slider.on("move.after", function (data) { 7290 if (data.movement > 0) { 7291 slider.selector.classList.add("page-2"); 7292 } else { 7293 slider.selector.classList.remove("page-2"); 7294 } 7295 });*/ 7296 7297 slider.mount(); 7298 7299 [...el.querySelectorAll(".post_wrap")].forEach((item, i) => { 7300 item.addEventListener("click", (event) => { 7301 window.location.href = event.currentTarget.dataset.link; 7302 }); 7303 }); 7304 }); 7305 7306 [...document.querySelectorAll(".glide.glide-rows")].forEach((el, i) => { 7307 new Glide(el, { 7308 type: "slider", 7309 keyboard: false, 7310 perView: 1, 7311 rewind: true, 7312 gap: 30, 7313 autoHeight: true, 7314 }).mount({ 7315 GlideAutoHeight: GlideAutoHeight, 7316 }); 7317 }); 7318 7319 [ 7320 ...document.querySelectorAll(".glide.glide-carousel-items-menu-image"), 7321 ].forEach((el, i) => { 7322 let slider = new Glide(el, { 7323 type: "slider", 7324 keyboard: false, 7325 perView: 1, 7326 rewind: true, 7327 gap: 30, 7328 }); 7329 7330 slider.on("mount.after", function (event) { 7331 slider.selector.classList.add("loaded"); 7332 }); 7333 7334 slider.mount(); 7335 }); 7336 7337 [...document.querySelectorAll("[data-open-mobile-map]")].forEach( 7338 (el, i) => { 7339 el.addEventListener("click", () => {
7340 document.body.classList.toggle("openMobileMap"); 7341 }); 7342 }, 7343 ); 7344 7345 [...document.querySelectorAll(".glide.glide-carousel-i")].forEach( 7346 (el, i) => { 7347 (window.osj.islider = new Glide(el, { 7348 type: "slider", 7349 keyboard: false, 7350 perView: 1, 7351 rewind: false, 7352 animationDuration: 0, 7353 gap: 0, 7354 autoHeight: true, 7355 touchAngle: 0, 7356 })), 7357 (sliderParent = document.getElementById("i-wrap")); 7358 7359 window.osj.islider.on("mount.after", function (event) { 7360 window.osj.islider.selector.classList.add("loaded"); 7361 }); 7362 7363 window.osj.islider.on("run.after", function (event) { 7364 [...sliderParent.querySelectorAll(".item_nav")].forEach( 7365 (el, i) => { 7366 let current = window.osj.islider.index; 7367 el.classList.remove("active"); 7368 if (el.dataset.index == current) { 7369 el.classList.add("active"); 7370 } 7371 }, 7372 ); 7373 }); 7374 7375 window.osj.islider.mount({ 7376 GlideAutoHeight: GlideAutoHeight, 7377 }); 7378 }, 7379 ); 7380 7381 [...document.querySelectorAll("#i-wrap .item_nav")].forEach((el, i) => { 7382 el.addEventListener("click", (e) => { 7383 let current = e.currentTarget; 7384 window.osj.islider.go("=" + current.dataset.index); 7385 document.body.classList.remove("openMobileMap"); 7386 }); 7387 }); 7388 7389 [...document.querySelectorAll(".glide.glide-mod-scroll")].forEach( 7390 (el, i) => { 7391 let slider = new Glide(el, { 7392 type: "slider", 7393 keyboard: false, 7394 perView: 1, 7395 rewind: true, 7396 gap: 30, 7397 }); 7398 7399 slider.on("mount.after", function (event) { 7400 slider.selector.classList.add("loaded"); 7401 }); 7402 7403 slider.mount(); 7404 }, 7405 ); 7406 7407 [...document.querySelectorAll(".glide.glide-mod-carousel")].forEach( 7408 (el, i) => { 7409 let slider = new Glide(el, { 7410 type: "slider", 7411 keyboard: false, 7412 perView: 2.15, 7413 rewind: true, 7414 gap: 60, 7415 bound: true, 7416 breakpoints: { 7417 1020: { 7418 perView: 2.15, 7419 gap: 30, 7420 }, 7421 600: { 7422 perView: 1.15, 7423 gap: 20, 7424 }, 7425 }, 7426 }); 7427 7428 slider.on("mount.after", function (event) { 7429 slider.selector.classList.add("loaded"); 7430 }); 7431 7432 slider.mount(); 7433 }, 7434 ); 7435 7436 [...document.querySelectorAll(".glide.glide-mod-carousel-images")].forEach( 7437 (el, i) => { 7438 let slider = new Glide(el, { 7439 type: "slider", 7440 keyboard: false, 7441 perView: 4.25, 7442 rewind: true, 7443 gap: 60, 7444 bound: true, 7445 touchAngle: 0, 7446 breakpoints: { 7447 1020: { 7448 perView: 3.15, 7449 gap: 30, 7450 }, 7451 600: { 7452 perView: 1.15, 7453 gap: 20, 7454 }, 7455 }, 7456 }); 7457 7458 slider.on("mount.after", function (event) { 7459 slider.selector.classList.add("loaded"); 7460 }); 7461 7462 slider.mount(); 7463 }, 7464 ); 7465 7466 [...document.querySelectorAll(".glide.glide-mod-carousel-scroll")].forEach( 7467 (el, i) => { 7468 let slider = new Glide(el, { 7469 type: "slider", 7470 keyboard: false, 7471 perView: 3.15, 7472 rewind: true, 7473 gap: 60, 7474 bound: true, 7475 breakpoints: { 7476 1200: { 7477 perView: 2.15, 7478 gap: 30, 7479 }, 7480 1020: { 7481 perView: 2.15, 7482 gap: 30, 7483 }, 7484 600: { 7485 perView: 1.15, 7486 gap: 20, 7487 }, 7488 }, 7489 }); 7490 7491 slider.on("mount.after", function (event) { 7492 slider.selector.classList.add("loaded"); 7493 }); 7494 7495 slider.mount(); 7496 }, 7497 ); 7498 7499 [...document.querySelectorAll(".glide.glide-mod-carousel-text")].forEach( 7500 (el, i) => { 7501 let slider = new Glide(el, { 7502 type: "slider", 7503 keyboard: false, 7504 perView: 2.65, 7505 rewind: true, 7506 gap: 60, 7507 breakpoints: { 7508 1200: { 7509 perView: 1.65, 7510 gap: 30, 7511 }, 7512 1020: { 7513 perView: 1.25, 7514 gap: 30, 7515 }, 7516 600: { 7517 perView: 1, 7518 gap: 20, 7519 }, 7520 }, 7521 }); 7522 7523 slider.on("mount.after", function (event) { 7524 slider.selector.classList.add("loaded"); 7525 }); 7526 7527 slider.mount(); 7528 }, 7529 ); 7530 7531 [...document.querySelectorAll(".glide.glide-popup")].forEach((el, i) => { 7532 let slider = new Glide(el, { 7533 type: "slider", 7534 keyboard: false, 7535 perView: 1, 7536 rewind: true, 7537 gap: 30, 7538 }); 7539 7540 slider.on("mount.after", function (event) { 7541 slider.selector.classList.add("loaded"); 7542 }); 7543 7544 slider.mount(); 7545 }); 7546 7547 [ 7548 ...document.querySelectorAll(".mod_carousel_image_menu .menu_items"), 7549 ].forEach((el, i) => { 7550 let image_bgs = el.querySelector(".image_bgs"), 7551 the_menu = el.querySelector(".the_menu"); 7552
7553 [...the_menu.querySelectorAll("li")].forEach((el, i) => { 7554 el.addEventListener("mouseenter", (event) => { 7555 let image = event.target.dataset.id; 7556 image_bgs.querySelector("." + image).classList.add("active"); 7557 }); 7558 el.addEventListener("mouseleave", (event) => { 7559 let image = event.target.dataset.id; 7560 image_bgs.querySelector("." + image).classList.remove("active"); 7561 }); 7562 }); 7563 }); 7564 7565 if (document.querySelectorAll(".mod_standard_header .gallery")) { 7566 new SimpleLightbox(".mod_standard_header .gallery a", { 7567 overlayOpacity: 0.95, 7568 fileExt: "png|jpg|jpeg|gif|webp", 7569 animationSlide: false, 7570 }); 7571 } 7572 7573 [...document.querySelectorAll(".mod_blocs .gallery")].forEach((el, i) => { 7574 new SimpleLightbox(el.querySelectorAll("a"), { 7575 overlayOpacity: 0.95, 7576 fileExt: "png|jpg|jpeg|gif|webp", 7577 animationSlide: false, 7578 }); 7579 }); 7580 7581 [ 7582 ...document.querySelectorAll(".mod_carousel_images .glide__slides"), 7583 ].forEach((el, i) => { 7584 new SimpleLightbox(el.querySelectorAll("a"), { 7585 overlayOpacity: 0.95, 7586 className: "mod_carousel_images_lb", 7587 fileExt: "png|jpg|jpeg|gif|webp", 7588 animationSlide: false, 7589 }); 7590 }); 7591 7592 if (document.querySelectorAll(".media-go")) { 7593 new SimpleLightbox(".media-go", { 7594 overlayOpacity: 0.95, 7595 animationSlide: false, 7596 }); 7597 } 7598 7599 if (document.querySelectorAll(".media-zoom")) { 7600 new SimpleLightbox(".media-zoom", { 7601 overlayOpacity: 0.95, 7602 animationSlide: false, 7603 }); 7604 } 7605 7606 const targetsPopup = [ 7607 "#popuplantern", 7608 "#popupprayer", 7609 "#popupdonation", 7610 "#popupwedding", 7611 "#popupwelcome", 7612 "#popupcontact", 7613 ]; 7614 const targetsPopupFR = [ 7615 "#popuplanterne", 7616 "#popuppriere", 7617 "#popupdonation", 7618 "#popupmariage", 7619 "#popupbienvenue", 7620 "#popupcontact", 7621 ]; 7622 7623 const hash = window.location.hash; 7624 7625 if (hash) { 7626 setTimeout(function () { 7627 const index = targetsPopupFR.indexOf(hash); 7628 window.osj.currentPopup = false; 7629 if (index !== -1) { 7630 window.osj.currentPopup = hash; 7631 const originalTarget = targetsPopup[index]; 7632 if (originalTarget) { 7633 jQuery(originalTarget).foundation("open"); 7634 } 7635 } 7636 }, 150); 7637 } 7638 7639 [...document.querySelectorAll("a[href*='#']")].forEach((el, i) => { 7640 el.addEventListener("click", (e) => { 7641 let href = e.currentTarget.getAttribute("href"); 7642 window.osj.currentPopup = false; 7643 7644 if (targetsPopup.includes(href)) { 7645 e.preventDefault(); 7646 if (osj_vars.lang == "fr") { 7647 const indexForFrOnEnSite = targetsPopup.indexOf(href); 7648 if (indexForFrOnEnSite !== -1) { 7649 const frTarget = targetsPopupFR[indexForFrOnEnSite]; 7650 window.osj.currentPopup = frTarget; 7651 } 7652 } 7653 7654 jQuery(href).foundation("open"); 7655 } else if (targetsPopupFR.includes(href)) { 7656 const index = targetsPopupFR.indexOf(href); 7657 if (index !== -1) { 7658 window.osj.currentPopup = href; 7659 const originalTarget = targetsPopup[index]; 7660 if (originalTarget) { 7661 jQuery(originalTarget).foundation("open"); 7662 } 7663 } 7664 } 7665 }); 7666 }); 7667 7668 [...document.querySelectorAll(".video-i .start")].forEach((el, i) => { 7669 el.addEventListener("click", (e) => { 7670 let current = e.currentTarget, 7671 video = prev(current, "video"); 7672 if (video) { 7673 video.parentElement.classList.add("playing"); 7674 video.setAttribute("controls", "controls"); 7675 video.removeAttribute("muted"); 7676 video.removeAttribute("loop"); 7677 video.play(); 7678 } 7679 }); 7680 }); 7681 7682 [...document.querySelectorAll(".close-i")].forEach((el, i) => { 7683 el.addEventListener("click", (e) => { 7684 let current = e.currentTarget, 7685 id = current.dataset.close; 7686 document 7687 .querySelector('.box_info[data-info="' + id + '"]') 7688 .classList.add("closed"); 7689 }); 7690 }); 7691 7692 [...document.querySelectorAll(".open-i")].forEach((el, i) => { 7693 el.addEventListener("click", (e) => { 7694 let current = e.currentTarget, 7695 id = current.dataset.open; 7696 document 7697 .querySelector('.box_info[data-info="' + id + '"]') 7698 .classList.remove("closed"); 7699 }); 7700 }); 7701 7702 jQuery(".reveal").on("open.zf.reveal", function (event) { 7703 document.documentElement.classList.add("is-reveal-open-timed"); 7704 if (window.osj.currentPopup) { 7705 history.replaceState( 7706 null, 7707 "", 7708 window.location.pathname + 7709 window.location.search + 7710 window.osj.currentPopup, 7711 ); 7712 } 7713 }); 7714 jQuery(".reveal").on("closed.zf.reveal", function (event) { 7715 document.documentElement.classList.remove("is-reveal-open"); 7716 setTimeout(function () { 7717 document.documentElement.classList.remove("is-reveal-open-timed"); 7718 }, 600); 7719 if (window.osj.currentPopup) { 7720 window.osj.currentPopup = false;
7721 history.replaceState( 7722 null, 7723 "", 7724 window.location.pathname + window.location.search, 7725 ); 7726 } 7727 }); 7728 7729 // Loop through each linksList block 7730 document.querySelectorAll(".linksList").forEach((linksList) => { 7731 const firstLink = linksList.querySelector("a"); 7732 7733 if (firstLink) { 7734 const videoHolderId = firstLink.getAttribute("data-videoHolder"); 7735 const videoId = new URL(firstLink.href).searchParams.get("v"); 7736 7737 // Load the first video on page load without autoplay 7738 loadYouTubeVideo(videoHolderId, videoId, false); 7739 7740 // Add active class to the first link 7741 firstLink.classList.add("active"); 7742 } 7743 7744 // Add click event listeners to links 7745 linksList.querySelectorAll("a").forEach((link) => { 7746 link.addEventListener("click", function (e) { 7747 e.preventDefault(); 7748 7749 const videoHolderId = link.getAttribute("data-videoHolder"); 7750 const videoId = new URL(link.href).searchParams.get("v"); 7751 7752 // Load the clicked video with autoplay 7753 loadYouTubeVideo(videoHolderId, videoId, true); 7754 7755 // Remove active class from all sibling links and add to the clicked one 7756 linksList.querySelectorAll("a").forEach((sibling) => { 7757 sibling.classList.remove("active"); 7758 }); 7759 link.classList.add("active"); 7760 }); 7761 }); 7762 }); 7763 7764 checkAndUpdateYouTubeIframesLive(); 7765 7766 const textList = document.getElementById("textList"); 7767 if (textList) { 7768 window.osj.texts = textList ? textList.querySelectorAll("li") : []; 7769 window.osj.textsLoading = document.getElementById( 7770 "loadingFloatingText", 7771 ); 7772 7773 changeText(); 7774 } 7775}); 7776 7777function checkAndUpdateYouTubeIframesLive() { 7778 const iframes = document.querySelectorAll(".yt_live_iframe"), 7779 apiEndpoint = "/wp-json/custom/v1/latest-livestream"; 7780 7781 if (iframes.length === 0) { 7782 console.log("No YouTube iframe found. Stopping script."); 7783 return; // Stop execution if no iframes exist 7784 } 7785 7786 let lastVideoId = iframes[0].dataset.videoid || null; // Get initial video ID 7787 7788 function checkLatestVideo() { 7789 fetch(apiEndpoint) // Fetch latest livestream video data from the API 7790 .then((response) => response.json()) 7791 .then((data) => { 7792 if (data.video_id && data.video_id !== lastVideoId) { 7793 lastVideoId = data.video_id; 7794 7795 // Update all iframes with the new video ID 7796 iframes.forEach((iframe) => { 7797 iframe.src = `https://www.youtube.com/embed/${lastVideoId}?autoplay=1`; 7798 iframe.dataset.videoid = lastVideoId; 7799 }); 7800 7801 console.log("Updated iframe to new video:", lastVideoId); 7802 } 7803 }) 7804 .catch((error) => 7805 console.error("Error fetching latest video:", error), 7806 ); 7807 } 7808 7809 // Run check every 60 seconds 7810 setInterval(checkLatestVideo, 60000); 7811 7812 // Initial check 7813 checkLatestVideo(); 7814} 7815 7816// Function to create the YouTube iframe 7817function loadYouTubeVideo(videoHolderId, videoId, autoplay) { 7818 const iframe = document.createElement("iframe"); 7819 iframe.src = `https://www.youtube.com/embed/${videoId}?autoplay=${autoplay ? 1 : 0}&rel=0`; 7820 iframe.frameBorder = "0"; 7821 iframe.allow = "autoplay; encrypted-media"; 7822 iframe.allowFullscreen = true; 7823 7824 const videoHolder = document.getElementById(videoHolderId); 7825 if (videoHolder) { 7826 videoHolder.innerHTML = ""; // Clear any existing iframe 7827 videoHolder.appendChild(iframe); 7828 } 7829} 7830
7831function events_calendar() { 7832 document.addEventListener("DOMContentLoaded", function () { 7833 let calendarEl = document.getElementById("eventsCalendar"); 7834 7835 if (calendarEl) { 7836 let alternateItems = next(calendarEl.parentNode, ".calendar_items"), 7837 alternateItemList = false, 7838 alternateItemListSet = 0, 7839 noEventsDiv = false; 7840 7841 if (alternateItems) { 7842 (alternateItemList = 7843 alternateItems.querySelector(".current_items")), 7844 (noEventsDiv = next(alternateItemList, ".no-events")); 7845 } 7846 7847 let calendarOptions = { 7848 initialView: "dayGridMonth", 7849 timeZone: osj_vars.timezone, 7850 events: { 7851 url: osj_vars.api.events, 7852 extraParams: { 7853 cat: calendarEl.dataset.cat, 7854 getItem: calendarEl.dataset.getitem, 7855 lang: osj_vars.lang, 7856 }, 7857 success: function (data) { 7858 window.osj.calendar.eventsCount = data.length; 7859 if (data.length == 0 && noEventsDiv) { 7860 noEventsDiv.style.display = "block"; 7861 } 7862 }, 7863 }, 7864 fixedWeekCount: false, 7865 displayEventTime: false, 7866 selectable: false, 7867 headerToolbar: false, 7868 contentHeight: "auto", 7869 firstDay: 1, 7870 datesSet: function (arg) { 7871 document.querySelectorAll( 7872 "#eventsControls .monthyear", 7873 )[0].innerHTML = arg.view.getCurrentData().viewTitle; 7874 if (alternateItems) { 7875 let alternateTitle = 7876 alternateItems.querySelector(".current_month"); 7877 7878 if (alternateTitle) { 7879 alternateTitle.innerHTML = 7880 arg.view.getCurrentData().viewTitle; 7881 } 7882 7883 if (alternateItemList) { 7884 alternateItemList.innerHTML = ""; 7885 if (noEventsDiv) { 7886 noEventsDiv.style.display = "none"; 7887 } 7888 } 7889 } 7890 window.osj.calendar.currentEventIds = []; 7891 // Reset day event counts for the new view 7892 Object.keys(dayEventCount).forEach(k => delete dayEventCount[k]); 7893 }, 7894 eventDidMount: function (info) { 7895 FullCalendar_add_classes_days_with_events(info.event); 7896 7897 new Foundation.Tooltip(jQuery(info.el), { 7898 tipText: info.event.title, 7899 }); 7900 7901 if ( 7902 !window.osj.calendar.currentEventIds.includes( 7903 info.event.id, 7904 ) 7905 ) { 7906 window.osj.calendar.currentEventIds.push(info.event.id); 7907 7908 if (alternateItemList) { 7909 if ( 7910 info.event.start.getMonth() + 1 == 7911 info.view 7912 .getCurrentData() 7913 .viewApi.currentEnd.getUTCMonth() 7914 ) { 7915 if (info.event.extendedProps.item) { 7916 alternateItemList.insertAdjacentHTML( 7917 "beforeend", 7918 info.event.extendedProps.item, 7919 ); 7920 } 7921 } else { 7922 window.osj.calendar.eventsCount -= 1; // remove count 7923 } 7924 7925 if (window.osj.calendar.eventsCount == 0) { 7926 noEventsDiv.style.display = "block"; 7927 } 7928 } 7929 } 7930 }, 7931 eventClick: function (info) { 7932 let url = info.event.extendedProps.link; 7933 if (url != "") { 7934 window.location.href = url; 7935 } 7936 }, 7937 loading: function (isLoading) { 7938 if (window.calendar) { 7939 if (isLoading) { 7940 window.calendar.el.classList.add("loading"); 7941 } else { 7942 window.calendar.el.classList.remove("loading"); 7943 } 7944 } 7945 }, 7946 }; 7947 7948 if (osj_vars.lang == "fr") { 7949 calendarOptions.locale = "fr"; 7950 } 7951 7952 window.calendar = new FullCalendar.Calendar( 7953 calendarEl, 7954 calendarOptions, 7955 ); 7956 7957 calendar.render(); 7958 7959 window.calendar.el.classList.add("loading"); 7960 7961 document 7962 .getElementById("eventMonthNext") 7963 .addEventListener("click", function () { 7964 calendar.next(); 7965 }); 7966 document 7967 .getElementById("eventMonthPrev") 7968 .addEventListener("click", function () { 7969 calendar.prev(); 7970 }); 7971 7972 let eventSliderEl = document.getElementById("glide-events"); 7973 if (eventSliderEl) { 7974 let eventSlider = new Glide(eventSliderEl, { 7975 type: "slider", 7976 hoverpause: false, 7977 keyboard: false, 7978 perView: 1, 7979 gap: 20, 7980 dragDistance: false, 7981 touchDistance: false, 7982 }).mount(); 7983 7984 eventSlider.on("run", (direction) => { 7985 let currentItemIndex = eventSlider.index; 7986 [ 7987 ...document.querySelectorAll("#glide-events .date"), 7988 ].forEach((el, i) => { 7989 el.classList.remove("active"); 7990 7991 if (i == currentItemIndex) { 7992 el.classList.add("active"); 7993 calendar.gotoDate(el.dataset.start); 7994 } 7995 }); 7996 }); 7997 } 7998 } 7999 }); 8000} 8001 8002const dayEventCount = {}; 8003 8004function FullCalendar_add_classes_days_with_events(event) { 8005 let dateStart = event.startStr, 8006 dateEnd = event.endStr, 8007 dateRanged = enumerateDaysBetweenDates(dateStart, dateEnd); 8008 8009 dateRanged.forEach(function (date, index) { 8010 let day = window.calendar.el.querySelector( 8011 '.fc-day[data-date="' + date + '"]', 8012 ); 8013 8014 if (day) { 8015 day.classList.add("has_event"); 8016 if (event.extendedProps.sameDay == "no") { 8017 day.classList.add("event-not-sameday"); 8018 } 8019 if (event.extendedProps.isYA) { 8020 day.classList.add("has-ya-event"); 8021 } 8022 8023 // Track distinct event IDs per day 8024 if (!dayEventCount[date]) { 8025 dayEventCount[date] = new Set(); 8026 } 8027 dayEventCount[date].add(event.id); 8028 8029 if (dayEventCount[date].size > 1) { 8030 day.classList.add("yacap"); 8031 } 8032 } 8033 }); 8034} 8035 8036const enumerateDaysBetweenDates = function (startDate, endDate) { 8037 let dates = []; 8038 8039 let currDate = dayjs(startDate), 8040 lastDate = dayjs(endDate), 8041 days = lastDate.diff(currDate, "days") - 1, 8042 i = 0; 8043 8044 dates.push(currDate.format("YYYY-MM-DD")); 8045 8046 while (i < days) { 8047 dates.push(currDate.add(i + 1, "days").format("YYYY-MM-DD")); 8048 i++; 8049 } 8050 8051 return dates; 8052}; 8053 8054const wrap = (elem, tag, className = "") => { 8055 const div = document.createElement(tag); 8056 if (Array.isArray(className)) { 8057 div.classList.add(...className); 8058 } else { 8059 div.classList.add(className); 8060 } 8061 elem.parentElement.insertBefore(div, elem); 8062 div.appendChild(elem); 8063}; 8064 8065const next = function (elem, selector) { 8066 if (elem == null) return null; 8067 // Get the next element 8068 let nextElem = elem.nextElementSibling; 8069 8070 // If there's no selector, return the next element 8071 if (!selector) { 8072 return nextElem; 8073 } 8074 8075 // Otherwise, check if the element matches the selector 8076 if (nextElem && nextElem.matches(selector)) { 8077 return nextElem; 8078 } 8079 8080 // if it's not a match, return null 8081 return null; 8082}; 8083 8084const prev = function (elem, selector) { 8085 if (elem == null) return null; 8086 // Get the prev element 8087 let prevElem = elem.previousElementSibling; 8088 8089 // If there's no selector, return the prev element 8090 if (!selector) { 8091 return prevElem; 8092 } 8093 8094 // Otherwise, check if the element matches the selector 8095 if (prevElem && prevElem.matches(selector)) { 8096 return prevElem; 8097 } 8098 8099 // if it's not a match, return null 8100 return null; 8101}; 8102 8103const getSiblings = function (e) { 8104 // for collecting siblings 8105 let siblings = []; 8106 // if no parent, return no sibling 8107 if (!e.parentNode) { 8108 return siblings; 8109 } 8110 // first child of the parent node 8111 let sibling = e.parentNode.firstChild; 8112 8113 // collecting siblings 8114 while (sibling) { 8115 if (sibling.nodeType === 1 && sibling !== e) { 8116 siblings.push(sibling); 8117 } 8118 sibling = sibling.nextSibling; 8119 } 8120 return siblings; 8121}; 8122 8123function GlideAutoHeight(Glide, Components, Events) { 8124 const Component = { 8125 mount() { 8126 if (!Glide.settings.autoHeight) return; 8127 Components.Html.track.style.transition = "height 200ms ease-in-out"; 8128 this.updateTrackHeight(); 8129 }, 8130 8131 updateTrackHeight() { 8132 if (!Glide.settings.autoHeight) return; 8133 8134 const activeSlides = Components.Html.slides.filter( 8135 (slide, index) => { 8136 return ( 8137 index >= Glide.index && 8138 index <= Glide.index - 1 + Glide.settings.perView 8139 ); 8140 }, 8141 ); 8142 8143 const newMaxHeight = activeSlides.reduce((maxHeight, slide) => { 8144 return Math.max(maxHeight, slide.offsetHeight); 8145 }, 0); 8146 8147 const glideTrack = Components.Html.track; 8148 if (newMaxHeight !== glideTrack.offsetHeight) { 8149 glideTrack.style.height = `${newMaxHeight}px`; 8150 } 8151 }, 8152 }; 8153 8154 Events.on("run", () => { 8155 Component.updateTrackHeight(); 8156 }); 8157 Events.on("update", () => { 8158 Component.updateTrackHeight(); 8159 }); 8160 Events.on("resize", () => { 8161 Component.updateTrackHeight(); 8162 }); 8163 8164 return Component; 8165} 8166 8167function changeText() { 8168 if ( 8169 !textList || 8170 window.osj.texts.length === 0 || 8171 window.osj.texts.length === 1 8172 ) { 8173 let index = 0; 8174 8175 window.osj.textsLoading.classList.toggle("active"); // Show loading before changing text 8176 window.osj.textsLoading.parentElement.classList.remove("active"); // Show loading before changing text 8177
8178 window.osj.texts.forEach((li) => { 8179 li.classList.remove("active"); 8180 li.classList.add("not-active"); 8181 }); 8182 8183 setTimeout(() => { 8184 window.osj.textsLoading.classList.toggle("active"); // Hide loading 8185 window.osj.textsLoading.parentElement.classList.add("active"); // Hide loading 8186 8187 window.osj.texts[window.osj.textListIndex].classList.remove( 8188 "not-active", 8189 ); 8190 window.osj.texts[window.osj.textListIndex].classList.add("active"); 8191 8192 window.osj.textListIndex = 8193 (window.osj.textListIndex + 1) % window.osj.texts.length; 8194 setTimeout(() => requestAnimationFrame(changeText), 4000); 8195 }, 2000); // Show loading for 500ms before changing text 8196 } else if (window.osj.texts.length == 1) { 8197 let index = 0; 8198 8199 window.osj.textsLoading.classList.toggle("active"); // Show loading before changing text 8200 window.osj.textsLoading.parentElement.classList.remove("active"); // Show loading before changing text 8201 8202 window.osj.texts.forEach((li) => { 8203 li.classList.remove("active"); 8204 li.classList.add("not-active"); 8205 }); 8206 8207 window.osj.textsLoading.classList.toggle("active"); // Hide loading 8208 window.osj.textsLoading.parentElement.classList.add("active"); // Hide loading 8209 8210 window.osj.texts[window.osj.textListIndex].classList.remove( 8211 "not-active", 8212 ); 8213 window.osj.texts[window.osj.textListIndex].classList.add("active"); 8214 8215 window.osj.textListIndex = 8216 (window.osj.textListIndex + 1) % window.osj.texts.length; 8217 } 8218} 8219//# sourceMappingURL=scripts.js.map 8220 8221//setting anchor for the newsletter link sent out for L'ami on the donation page 8222 8223function setItemIds() { 8224 const ids = { 'page-id-6664': 'friendLink', 'page-id-6596': 'amiLink' }; 8225 const page = Object.keys(ids).find(id => document.body.classList.contains(id)); 8226 const item = page && document.querySelector('.section.mod_blocs div.item'); 8227 if (item) item.id = ids[page]; 8228} 8229setItemIds(); 8230
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.