1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180 |
- (function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory(require("jquery"));
- else if(typeof define === 'function' && define.amd)
- define(["jquery"], factory);
- else if(typeof exports === 'object')
- exports["foundation.core"] = factory(require("jquery"));
- else
- root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.core"] = factory(root["jQuery"]);
- })(window, function(__WEBPACK_EXTERNAL_MODULE_jquery__) {
- return (function(modules) {
-
- var installedModules = {};
-
- function __webpack_require__(moduleId) {
-
- if(installedModules[moduleId]) {
- return installedModules[moduleId].exports;
- }
-
- var module = installedModules[moduleId] = {
- i: moduleId,
- l: false,
- exports: {}
- };
-
- modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-
- module.l = true;
-
- return module.exports;
- }
-
- __webpack_require__.m = modules;
-
- __webpack_require__.c = installedModules;
-
- __webpack_require__.d = function(exports, name, getter) {
- if(!__webpack_require__.o(exports, name)) {
- Object.defineProperty(exports, name, { enumerable: true, get: getter });
- }
- };
-
- __webpack_require__.r = function(exports) {
- if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
- }
- Object.defineProperty(exports, '__esModule', { value: true });
- };
-
-
-
-
-
- __webpack_require__.t = function(value, mode) {
- if(mode & 1) value = __webpack_require__(value);
- if(mode & 8) return value;
- if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
- var ns = Object.create(null);
- __webpack_require__.r(ns);
- Object.defineProperty(ns, 'default', { enumerable: true, value: value });
- if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
- return ns;
- };
-
- __webpack_require__.n = function(module) {
- var getter = module && module.__esModule ?
- function getDefault() { return module['default']; } :
- function getModuleExports() { return module; };
- __webpack_require__.d(getter, 'a', getter);
- return getter;
- };
-
- __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-
- __webpack_require__.p = "";
-
- return __webpack_require__(__webpack_require__.s = 0);
- })
- ({
- "./js/entries/plugins/foundation.core.js":
- (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "jquery");
- var jquery__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
- var _foundation_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./js/foundation.core.js");
- __webpack_require__.d(__webpack_exports__, "Foundation", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"]; });
- var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./js/foundation.core.plugin.js");
- var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./js/foundation.core.utils.js");
- __webpack_require__.d(__webpack_exports__, "Plugin", function() { return _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__["Plugin"]; });
- __webpack_require__.d(__webpack_exports__, "rtl", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["rtl"]; });
- __webpack_require__.d(__webpack_exports__, "GetYoDigits", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["GetYoDigits"]; });
- __webpack_require__.d(__webpack_exports__, "RegExpEscape", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["RegExpEscape"]; });
- __webpack_require__.d(__webpack_exports__, "transitionend", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["transitionend"]; });
- __webpack_require__.d(__webpack_exports__, "onLoad", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["onLoad"]; });
- __webpack_require__.d(__webpack_exports__, "ignoreMousedisappear", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["ignoreMousedisappear"]; });
- _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].addToJquery(jquery__WEBPACK_IMPORTED_MODULE_0___default.a);
- _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].Plugin = _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__["Plugin"];
- _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].rtl = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["rtl"];
- _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].GetYoDigits = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["GetYoDigits"];
- _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].transitionend = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["transitionend"];
- _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].RegExpEscape = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["RegExpEscape"];
- _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].onLoad = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["onLoad"];
- window.Foundation = _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"];
- }),
- "./js/foundation.core.js":
- (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- __webpack_require__.d(__webpack_exports__, "Foundation", function() { return Foundation; });
- var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "jquery");
- var jquery__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
- var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./js/foundation.core.utils.js");
- var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./js/foundation.util.mediaQuery.js");
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
- var FOUNDATION_VERSION = '6.6.3';
- var Foundation = {
- version: FOUNDATION_VERSION,
-
- _plugins: {},
-
- _uuids: [],
-
- plugin: function plugin(_plugin, name) {
-
-
- var className = name || functionName(_plugin);
-
- var attrName = hyphenate(className);
- this._plugins[attrName] = this[className] = _plugin;
- },
-
- registerPlugin: function registerPlugin(plugin, name) {
- var pluginName = name ? hyphenate(name) : functionName(plugin.constructor).toLowerCase();
- plugin.uuid = Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__["GetYoDigits"])(6, pluginName);
- if (!plugin.$element.attr("data-".concat(pluginName))) {
- plugin.$element.attr("data-".concat(pluginName), plugin.uuid);
- }
- if (!plugin.$element.data('zfPlugin')) {
- plugin.$element.data('zfPlugin', plugin);
- }
-
- plugin.$element.trigger("init.zf.".concat(pluginName));
- this._uuids.push(plugin.uuid);
- return;
- },
-
- unregisterPlugin: function unregisterPlugin(plugin) {
- var pluginName = hyphenate(functionName(plugin.$element.data('zfPlugin').constructor));
- this._uuids.splice(this._uuids.indexOf(plugin.uuid), 1);
- plugin.$element.removeAttr("data-".concat(pluginName)).removeData('zfPlugin')
-
- .trigger("destroyed.zf.".concat(pluginName));
- for (var prop in plugin) {
- plugin[prop] = null;
- }
- return;
- },
-
- reInit: function reInit(plugins) {
- var isJQ = plugins instanceof jquery__WEBPACK_IMPORTED_MODULE_0___default.a;
- try {
- if (isJQ) {
- plugins.each(function () {
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('zfPlugin')._init();
- });
- } else {
- var type = _typeof(plugins),
- _this = this,
- fns = {
- 'object': function object(plgs) {
- plgs.forEach(function (p) {
- p = hyphenate(p);
- jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-' + p + ']').foundation('_init');
- });
- },
- 'string': function string() {
- plugins = hyphenate(plugins);
- jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-' + plugins + ']').foundation('_init');
- },
- 'undefined': function undefined() {
- this['object'](Object.keys(_this._plugins));
- }
- };
- fns[type](plugins);
- }
- } catch (err) {
- console.error(err);
- } finally {
- return plugins;
- }
- },
-
- reflow: function reflow(elem, plugins) {
-
- if (typeof plugins === 'undefined') {
- plugins = Object.keys(this._plugins);
- }
- else if (typeof plugins === 'string') {
- plugins = [plugins];
- }
- var _this = this;
- jquery__WEBPACK_IMPORTED_MODULE_0___default.a.each(plugins, function (i, name) {
-
- var plugin = _this._plugins[name];
- var $elem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(elem).find('[data-' + name + ']').addBack('[data-' + name + ']').filter(function () {
- return typeof jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data("zfPlugin") === 'undefined';
- });
- $elem.each(function () {
- var $el = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this),
- opts = {
- reflow: true
- };
- if ($el.attr('data-options')) {
- $el.attr('data-options').split(';').forEach(function (option, _index) {
- var opt = option.split(':').map(function (el) {
- return el.trim();
- });
- if (opt[0]) opts[opt[0]] = parseValue(opt[1]);
- });
- }
- try {
- $el.data('zfPlugin', new plugin(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), opts));
- } catch (er) {
- console.error(er);
- } finally {
- return;
- }
- });
- });
- },
- getFnName: functionName,
- addToJquery: function addToJquery($) {
-
-
-
- var foundation = function foundation(method) {
- var type = _typeof(method),
- $noJS = $('.no-js');
- if ($noJS.length) {
- $noJS.removeClass('no-js');
- }
- if (type === 'undefined') {
-
- _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__["MediaQuery"]._init();
- Foundation.reflow(this);
- } else if (type === 'string') {
-
- var args = Array.prototype.slice.call(arguments, 1);
- var plugClass = this.data('zfPlugin');
- if (typeof plugClass !== 'undefined' && typeof plugClass[method] !== 'undefined') {
-
- if (this.length === 1) {
-
- plugClass[method].apply(plugClass, args);
- } else {
- this.each(function (i, el) {
-
- plugClass[method].apply($(el).data('zfPlugin'), args);
- });
- }
- } else {
-
- throw new ReferenceError("We're sorry, '" + method + "' is not an available method for " + (plugClass ? functionName(plugClass) : 'this element') + '.');
- }
- } else {
-
- 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."));
- }
- return this;
- };
- $.fn.foundation = foundation;
- return $;
- }
- };
- Foundation.util = {
-
- throttle: function throttle(func, delay) {
- var timer = null;
- return function () {
- var context = this,
- args = arguments;
- if (timer === null) {
- timer = setTimeout(function () {
- func.apply(context, args);
- timer = null;
- }, delay);
- }
- };
- }
- };
- window.Foundation = Foundation;
- (function () {
- if (!Date.now || !window.Date.now) window.Date.now = Date.now = function () {
- return new Date().getTime();
- };
- var vendors = ['webkit', 'moz'];
- for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) {
- var vp = vendors[i];
- window.requestAnimationFrame = window[vp + 'RequestAnimationFrame'];
- window.cancelAnimationFrame = window[vp + 'CancelAnimationFrame'] || window[vp + 'CancelRequestAnimationFrame'];
- }
- if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) || !window.requestAnimationFrame || !window.cancelAnimationFrame) {
- var lastTime = 0;
- window.requestAnimationFrame = function (callback) {
- var now = Date.now();
- var nextTime = Math.max(lastTime + 16, now);
- return setTimeout(function () {
- callback(lastTime = nextTime);
- }, nextTime - now);
- };
- window.cancelAnimationFrame = clearTimeout;
- }
-
- if (!window.performance || !window.performance.now) {
- window.performance = {
- start: Date.now(),
- now: function now() {
- return Date.now() - this.start;
- }
- };
- }
- })();
- if (!Function.prototype.bind) {
- Function.prototype.bind = function (oThis) {
- if (typeof this !== 'function') {
-
-
- throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
- }
- var aArgs = Array.prototype.slice.call(arguments, 1),
- fToBind = this,
- fNOP = function fNOP() {},
- fBound = function fBound() {
- return fToBind.apply(this instanceof fNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));
- };
- if (this.prototype) {
-
- fNOP.prototype = this.prototype;
- }
- fBound.prototype = new fNOP();
- return fBound;
- };
- }
- function functionName(fn) {
- if (typeof Function.prototype.name === 'undefined') {
- var funcNameRegex = /function\s([^(]{1,})\(/;
- var results = funcNameRegex.exec(fn.toString());
- return results && results.length > 1 ? results[1].trim() : "";
- } else if (typeof fn.prototype === 'undefined') {
- return fn.constructor.name;
- } else {
- return fn.prototype.constructor.name;
- }
- }
- function parseValue(str) {
- if ('true' === str) return true;else if ('false' === str) return false;else if (!isNaN(str * 1)) return parseFloat(str);
- return str;
- }
- function hyphenate(str) {
- return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
- }
- }),
- "./js/foundation.core.plugin.js":
- (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- __webpack_require__.d(__webpack_exports__, "Plugin", function() { return Plugin; });
- var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "jquery");
- var jquery__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
- var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./js/foundation.core.utils.js");
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
-
- var Plugin =
- function () {
- function Plugin(element, options) {
- _classCallCheck(this, Plugin);
- this._setup(element, options);
- var pluginName = getPluginName(this);
- this.uuid = Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__["GetYoDigits"])(6, pluginName);
- if (!this.$element.attr("data-".concat(pluginName))) {
- this.$element.attr("data-".concat(pluginName), this.uuid);
- }
- if (!this.$element.data('zfPlugin')) {
- this.$element.data('zfPlugin', this);
- }
-
- this.$element.trigger("init.zf.".concat(pluginName));
- }
- _createClass(Plugin, [{
- key: "destroy",
- value: function destroy() {
- this._destroy();
- var pluginName = getPluginName(this);
- this.$element.removeAttr("data-".concat(pluginName)).removeData('zfPlugin')
-
- .trigger("destroyed.zf.".concat(pluginName));
- for (var prop in this) {
- this[prop] = null;
- }
- }
- }]);
- return Plugin;
- }();
- function hyphenate(str) {
- return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
- }
- function getPluginName(obj) {
- return hyphenate(obj.className);
- }
- }),
- "./js/foundation.core.utils.js":
- (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- __webpack_require__.d(__webpack_exports__, "rtl", function() { return rtl; });
- __webpack_require__.d(__webpack_exports__, "GetYoDigits", function() { return GetYoDigits; });
- __webpack_require__.d(__webpack_exports__, "RegExpEscape", function() { return RegExpEscape; });
- __webpack_require__.d(__webpack_exports__, "transitionend", function() { return transitionend; });
- __webpack_require__.d(__webpack_exports__, "onLoad", function() { return onLoad; });
- __webpack_require__.d(__webpack_exports__, "ignoreMousedisappear", function() { return ignoreMousedisappear; });
- var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "jquery");
- var jquery__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
-
- function rtl() {
- return jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').attr('dir') === 'rtl';
- }
- function GetYoDigits() {
- var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 6;
- var namespace = arguments.length > 1 ? arguments[1] : undefined;
- var str = '';
- var chars = '0123456789abcdefghijklmnopqrstuvwxyz';
- var charsLength = chars.length;
- for (var i = 0; i < length; i++) {
- str += chars[Math.floor(Math.random() * charsLength)];
- }
- return namespace ? "".concat(str, "-").concat(namespace) : str;
- }
- function RegExpEscape(str) {
- return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
- }
- function transitionend($elem) {
- var transitions = {
- 'transition': 'transitionend',
- 'WebkitTransition': 'webkitTransitionEnd',
- 'MozTransition': 'transitionend',
- 'OTransition': 'otransitionend'
- };
- var elem = document.createElement('div'),
- end;
- for (var transition in transitions) {
- if (typeof elem.style[transition] !== 'undefined') {
- end = transitions[transition];
- }
- }
- if (end) {
- return end;
- } else {
- setTimeout(function () {
- $elem.triggerHandler('transitionend', [$elem]);
- }, 1);
- return 'transitionend';
- }
- }
- function onLoad($elem, handler) {
- var didLoad = document.readyState === 'complete';
- var eventType = (didLoad ? '_didLoad' : 'load') + '.zf.util.onLoad';
- var cb = function cb() {
- return $elem.triggerHandler(eventType);
- };
- if ($elem) {
- if (handler) $elem.one(eventType, handler);
- if (didLoad) setTimeout(cb);else jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).one('load', cb);
- }
- return eventType;
- }
- function ignoreMousedisappear(handler) {
- var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
- _ref$ignoreLeaveWindo = _ref.ignoreLeaveWindow,
- ignoreLeaveWindow = _ref$ignoreLeaveWindo === void 0 ? false : _ref$ignoreLeaveWindo,
- _ref$ignoreReappear = _ref.ignoreReappear,
- ignoreReappear = _ref$ignoreReappear === void 0 ? false : _ref$ignoreReappear;
- return function leaveEventHandler(eLeave) {
- for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- rest[_key - 1] = arguments[_key];
- }
- var callback = handler.bind.apply(handler, [this, eLeave].concat(rest));
- if (eLeave.relatedTarget !== null) {
- return callback();
- }
-
-
- setTimeout(function leaveEventDebouncer() {
- if (!ignoreLeaveWindow && document.hasFocus && !document.hasFocus()) {
- return callback();
- }
- if (!ignoreReappear) {
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).one('mouseenter', function reenterEventHandler(eReenter) {
- if (!jquery__WEBPACK_IMPORTED_MODULE_0___default()(eLeave.currentTarget).has(eReenter.target).length) {
-
- eLeave.relatedTarget = eReenter.target;
- callback();
- }
- });
- }
- }, 0);
- };
- }
- }),
- "./js/foundation.util.mediaQuery.js":
- (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- __webpack_require__.d(__webpack_exports__, "MediaQuery", function() { return MediaQuery; });
- var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "jquery");
- var jquery__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
- function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
-
- var defaultQueries = {
- 'default': 'only screen',
- landscape: 'only screen and (orientation: landscape)',
- portrait: 'only screen and (orientation: portrait)',
- retina: 'only screen and (-webkit-min-device-pixel-ratio: 2),' + 'only screen and (min--moz-device-pixel-ratio: 2),' + 'only screen and (-o-min-device-pixel-ratio: 2/1),' + 'only screen and (min-device-pixel-ratio: 2),' + 'only screen and (min-resolution: 192dpi),' + 'only screen and (min-resolution: 2dppx)'
- };
- window.matchMedia || (window.matchMedia = function () {
- "use strict";
- var styleMedia = window.styleMedia || window.media;
- if (!styleMedia) {
- var style = document.createElement('style'),
- script = document.getElementsByTagName('script')[0],
- info = null;
- style.type = 'text/css';
- style.id = 'matchmediajs-test';
- if (!script) {
- document.head.appendChild(style);
- } else {
- script.parentNode.insertBefore(style, script);
- }
- info = 'getComputedStyle' in window && window.getComputedStyle(style, null) || style.currentStyle;
- styleMedia = {
- matchMedium: function matchMedium(media) {
- var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';
- if (style.styleSheet) {
- style.styleSheet.cssText = text;
- } else {
- style.textContent = text;
- }
- return info.width === '1px';
- }
- };
- }
- return function (media) {
- return {
- matches: styleMedia.matchMedium(media || 'all'),
- media: media || 'all'
- };
- };
- }());
- var MediaQuery = {
- queries: [],
- current: '',
-
- _init: function _init() {
-
- if (this.isInitialized === true) {
- return;
- } else {
- this.isInitialized = true;
- }
- var self = this;
- var $meta = jquery__WEBPACK_IMPORTED_MODULE_0___default()('meta.foundation-mq');
- if (!$meta.length) {
- jquery__WEBPACK_IMPORTED_MODULE_0___default()('<meta class="foundation-mq">').appendTo(document.head);
- }
- var extractedStyles = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.foundation-mq').css('font-family');
- var namedQueries;
- namedQueries = parseStyleToObject(extractedStyles);
- self.queries = [];
- for (var key in namedQueries) {
- if (namedQueries.hasOwnProperty(key)) {
- self.queries.push({
- name: key,
- value: "only screen and (min-width: ".concat(namedQueries[key], ")")
- });
- }
- }
- this.current = this._getCurrentSize();
- this._watcher();
- },
-
- _reInit: function _reInit() {
- this.isInitialized = false;
- this._init();
- },
-
- atLeast: function atLeast(size) {
- var query = this.get(size);
- if (query) {
- return window.matchMedia(query).matches;
- }
- return false;
- },
-
- only: function only(size) {
- return size === this._getCurrentSize();
- },
-
- upTo: function upTo(size) {
- var nextSize = this.next(size);
-
- if (nextSize) {
- return !this.atLeast(nextSize);
- }
-
- return true;
- },
-
- is: function is(size) {
- var parts = size.trim().split(' ').filter(function (p) {
- return !!p.length;
- });
- var _parts = _slicedToArray(parts, 2),
- bpSize = _parts[0],
- _parts$ = _parts[1],
- bpModifier = _parts$ === void 0 ? '' : _parts$;
- if (bpModifier === 'only') {
- return this.only(bpSize);
- }
- if (!bpModifier || bpModifier === 'up') {
- return this.atLeast(bpSize);
- }
- if (bpModifier === 'down') {
- return this.upTo(bpSize);
- }
- throw new Error("\n Invalid breakpoint passed to MediaQuery.is().\n Expected a breakpoint name formatted like \"<size> <modifier>\", got \"".concat(size, "\".\n "));
- },
-
- get: function get(size) {
- for (var i in this.queries) {
- if (this.queries.hasOwnProperty(i)) {
- var query = this.queries[i];
- if (size === query.name) return query.value;
- }
- }
- return null;
- },
-
- next: function next(size) {
- var _this = this;
- var queryIndex = this.queries.findIndex(function (q) {
- return _this._getQueryName(q) === size;
- });
- if (queryIndex === -1) {
- throw new Error("\n Unknown breakpoint \"".concat(size, "\" passed to MediaQuery.next().\n Ensure it is present in your Sass \"$breakpoints\" setting.\n "));
- }
- var nextQuery = this.queries[queryIndex + 1];
- return nextQuery ? nextQuery.name : null;
- },
-
- _getQueryName: function _getQueryName(value) {
- if (typeof value === 'string') return value;
- if (_typeof(value) === 'object') return value.name;
- 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 "));
- },
-
- _getCurrentSize: function _getCurrentSize() {
- var matched;
- for (var i = 0; i < this.queries.length; i++) {
- var query = this.queries[i];
- if (window.matchMedia(query.value).matches) {
- matched = query;
- }
- }
- return matched && this._getQueryName(matched);
- },
-
- _watcher: function _watcher() {
- var _this2 = this;
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('resize.zf.mediaquery').on('resize.zf.mediaquery', function () {
- var newSize = _this2._getCurrentSize(),
- currentSize = _this2.current;
- if (newSize !== currentSize) {
-
- _this2.current = newSize;
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).trigger('changed.zf.mediaquery', [newSize, currentSize]);
- }
- });
- }
- };
- function parseStyleToObject(str) {
- var styleObject = {};
- if (typeof str !== 'string') {
- return styleObject;
- }
- str = str.trim().slice(1, -1);
- if (!str) {
- return styleObject;
- }
- styleObject = str.split('&').reduce(function (ret, param) {
- var parts = param.replace(/\+/g, ' ').split('=');
- var key = parts[0];
- var val = parts[1];
- key = decodeURIComponent(key);
-
- val = typeof val === 'undefined' ? null : decodeURIComponent(val);
- if (!ret.hasOwnProperty(key)) {
- ret[key] = val;
- } else if (Array.isArray(ret[key])) {
- ret[key].push(val);
- } else {
- ret[key] = [ret[key], val];
- }
- return ret;
- }, {});
- return styleObject;
- }
- }),
- 0:
- (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__("./js/entries/plugins/foundation.core.js");
- }),
- "jquery":
- (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;
- })
- });
- });
|