{"version":3,"sources":["webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/universalModuleDefinition","webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/bootstrap","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core\",\"commonjs\":\"./foundation.core\",\"commonjs2\":\"./foundation.core\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.util.mediaQuery\"],\"amd\":\"./foundation.util.mediaQuery\",\"commonjs\":\"./foundation.util.mediaQuery\",\"commonjs2\":\"./foundation.util.mediaQuery\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.util.motion\"],\"amd\":\"./foundation.util.motion\",\"commonjs\":\"./foundation.util.motion\",\"commonjs2\":\"./foundation.util.motion\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/entries/plugins/foundation.interchange.js","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/foundation.interchange.js","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/foundation.util.triggers.js","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"}"],"names":["Foundation","plugin","Interchange","element","options","$element","$","extend","defaults","data","rules","currentPath","className","Triggers","init","_init","_events","MediaQuery","id","GetYoDigits","attr","_parseOptions","_addBreakpoints","_generateRules","_reflow","off","on","match","i","hasOwnProperty","rule","window","matchMedia","query","matches","replace","path","types","type","indexOf","console","log","queries","SPECIAL_QUERIES","name","value","rulesList","slice","split","join","length","push","trigger","nodeName","css","get","response","html","foundation","Plugin","MutationObserver","prefixes","triggers","el","forEach","Listeners","Basic","Global","Initializers","openListener","closeListener","toggleListener","closeableListener","e","animation","stopPropagation","Motion","animateOut","fadeOut","toggleFocusListener","triggerHandler","addOpenListener","$elem","addCloseListener","addToggleListener","addCloseableListener","addToggleFocusListener","resizeListener","$nodes","each","scrollListener","closeMeListener","pluginId","namespace","plugins","not","_this","addClosemeListener","pluginName","yetiBoxes","plugNames","concat","error","listeners","map","debounceGlobalListener","debounce","listener","timer","args","Array","prototype","call","arguments","clearTimeout","setTimeout","apply","addResizeListener","addScrollListener","addMutationEventsListener","find","listeningElementsMutation","mutationRecordsList","$target","target","attributeName","pageYOffset","closest","elementObserver","observe","attributes","childList","characterData","subtree","attributeFilter","addSimpleListeners","$document","document","addGlobalListeners","onLoad","triggersInitialized","IHearYou"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;AClFA,8D;;;;;;;;;;;ACAA,yE;;;;;;;;;;;ACAA,qE;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA;AACAA,2DAAU,CAACC,MAAX,CAAkBC,mEAAlB,EAA+B,aAA/B;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AsBmD,yBAAtB,CAAgDiB,SAAhD;AACA3H,UAAQ,CAACuD,YAAT,CAAsBiD,iBAAtB;AACAxG,UAAQ,CAACuD,YAAT,CAAsBkD,iBAAtB;AACAzG,UAAQ,CAACuD,YAAT,CAAsB6B,kBAAtB;AACD,CAND;;AASApF,QAAQ,CAACC,IAAT,GAAgB,UAAUR,CAAV,EAAaN,UAAb,EAAyB;AACvC2I,uEAAM,CAACrI,CAAC,CAACyB,MAAD,CAAF,EAAY,YAAY;AAC5B,QAAIzB,CAAC,CAACsI,mBAAF,KAA0B,IAA9B,EAAoC;AAClC/H,cAAQ,CAACuD,YAAT,CAAsBmE,kBAAtB;AACA1H,cAAQ,CAACuD,YAAT,CAAsBsE,kBAAtB;AACApI,OAAC,CAACsI,mBAAF,GAAwB,IAAxB;AACD;AACF,GANK,CAAN;;AAQA,MAAG5I,UAAH,EAAe;AACbA,cAAU,CAACa,QAAX,GAAsBA,QAAtB,CADa,CAEb;;AACAb,cAAU,CAAC6I,QAAX,GAAsBhI,QAAQ,CAACuD,YAAT,CAAsBsE,kBAA5C;AACD;AACF,CAdD;;;;;;;;;;;;;;;;;;;;;;;;;ACrPA,oD","file":"foundation.interchange.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.core\"), require(\"./foundation.util.mediaQuery\"), require(\"./foundation.util.motion\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.core\", \"./foundation.util.mediaQuery\", \"./foundation.util.motion\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"foundation.interchange\"] = factory(require(\"./foundation.core\"), require(\"./foundation.util.mediaQuery\"), require(\"./foundation.util.motion\"), require(\"jquery\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.interchange\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.mediaQuery\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.motion\"], root[\"jQuery\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__, __WEBPACK_EXTERNAL_MODULE_jquery__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__;","import { Foundation } from './foundation.core';\n\nimport { Interchange } from '../../foundation.interchange';\nFoundation.plugin(Interchange, 'Interchange');\n\nexport { Foundation, Interchange };\n","'use strict';\n\nimport $ from 'jquery';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Plugin } from './foundation.core.plugin';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * Interchange module.\n * @module foundation.interchange\n * @requires foundation.util.mediaQuery\n */\n\nclass Interchange extends Plugin {\n /**\n * Creates a new instance of Interchange.\n * @class\n * @name Interchange\n * @fires Interchange#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Interchange.defaults, this.$element.data(), options);\n this.rules = [];\n this.currentPath = '';\n this.className = 'Interchange'; // ie9 back compat\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n \n this._init();\n this._events();\n }\n\n /**\n * Initializes the Interchange plugin and calls functions to get interchange functioning on load.\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n\n var id = this.$element[0].id || GetYoDigits(6, 'interchange');\n this.$element.attr({\n 'data-resize': id,\n 'id': id\n });\n\n this._parseOptions();\n this._addBreakpoints();\n this._generateRules();\n this._reflow();\n }\n\n /**\n * Initializes events for Interchange.\n * @function\n * @private\n */\n _events() {\n this.$element.off('resizeme.zf.trigger').on('resizeme.zf.trigger', () => this._reflow());\n }\n\n /**\n * Calls necessary functions to update Interchange upon DOM change\n * @function\n * @private\n */\n _reflow() {\n var match;\n\n // Iterate through each rule, but only save the last match\n for (var i in this.rules) {\n if(this.rules.hasOwnProperty(i)) {\n var rule = this.rules[i];\n if (window.matchMedia(rule.query).matches) {\n match = rule;\n }\n }\n }\n\n if (match) {\n this.replace(match.path);\n }\n }\n\n /**\n * Check options valifity and set defaults for:\n * - `data-interchange-type`: if set, enforce the type of replacement (auto, src, background or html)\n * @function\n * @private\n */\n _parseOptions() {\n var types = ['auto', 'src', 'background', 'html'];\n if (typeof this.options.type === 'undefined')\n this.options.type = 'auto';\n else if (types.indexOf(this.options.type) === -1) {\n console.log(`Warning: invalid value \"${this.options.type}\" for Interchange option \"type\"`);\n this.options.type = 'auto';\n }\n }\n\n /**\n * Gets the Foundation breakpoints and adds them to the Interchange.SPECIAL_QUERIES object.\n * @function\n * @private\n */\n _addBreakpoints() {\n for (var i in MediaQuery.queries) {\n if (MediaQuery.queries.hasOwnProperty(i)) {\n var query = MediaQuery.queries[i];\n Interchange.SPECIAL_QUERIES[query.name] = query.value;\n }\n }\n }\n\n /**\n * Checks the Interchange element for the provided media query + content pairings\n * @function\n * @private\n * @param {Object} element - jQuery object that is an Interchange instance\n * @returns {Array} scenarios - Array of objects that have 'mq' and 'path' keys with corresponding keys\n */\n _generateRules(element) {\n var rulesList = [];\n var rules;\n\n if (this.options.rules) {\n rules = this.options.rules;\n }\n else {\n rules = this.$element.data('interchange');\n }\n\n rules = typeof rules === 'string' ? rules.match(/\\[.*?, .*?\\]/g) : rules;\n\n for (var i in rules) {\n if(rules.hasOwnProperty(i)) {\n var rule = rules[i].slice(1, -1).split(', ');\n var path = rule.slice(0, -1).join('');\n var query = rule[rule.length - 1];\n\n if (Interchange.SPECIAL_QUERIES[query]) {\n query = Interchange.SPECIAL_QUERIES[query];\n }\n\n rulesList.push({\n path: path,\n query: query\n });\n }\n }\n\n this.rules = rulesList;\n }\n\n /**\n * Update the `src` property of an image, or change the HTML of a container, to the specified path.\n * @function\n * @param {String} path - Path to the image or HTML partial.\n * @fires Interchange#replaced\n */\n replace(path) {\n if (this.currentPath === path) return;\n\n var trigger = 'replaced.zf.interchange';\n\n var type = this.options.type;\n if (type === 'auto') {\n if (this.$element[0].nodeName === 'IMG')\n type = 'src';\n else if (path.match(/\\.(gif|jpe?g|png|svg|tiff)([?#].*)?/i))\n type = 'background';\n else\n type = 'html';\n }\n\n // Replacing images\n if (type === 'src') {\n this.$element.attr('src', path)\n .on('load', () => { this.currentPath = path; })\n .trigger(trigger);\n }\n // Replacing background images\n else if (type === 'background') {\n path = path.replace(/\\(/g, '%28').replace(/\\)/g, '%29');\n this.$element\n .css({ 'background-image': 'url(' + path + ')' })\n .trigger(trigger);\n }\n // Replacing HTML\n else if (type === 'html') {\n $.get(path, (response) => {\n this.$element\n .html(response)\n .trigger(trigger);\n $(response).foundation();\n this.currentPath = path;\n });\n }\n\n /**\n * Fires when content in an Interchange element is done being loaded.\n * @event Interchange#replaced\n */\n // this.$element.trigger('replaced.zf.interchange');\n }\n\n /**\n * Destroys an instance of interchange.\n * @function\n */\n _destroy() {\n this.$element.off('resizeme.zf.trigger')\n }\n}\n\n/**\n * Default settings for plugin\n */\nInterchange.defaults = {\n /**\n * Rules to be applied to Interchange elements. Set with the `data-interchange` array notation.\n * @option\n * @type {?array}\n * @default null\n */\n rules: null,\n\n /**\n * Type of the responsive ressource to replace. It can take the following options:\n * - `auto` (default): choose the type according to the element tag or the ressource extension,\n * - `src`: replace the `[src]` attribute, recommended for images ``.\n * - `background`: replace the `background-image` CSS property.\n * - `html`: replace the element content.\n * @option\n * @type {string}\n * @default 'auto'\n */\n type: 'auto'\n};\n\nInterchange.SPECIAL_QUERIES = {\n 'landscape': 'screen and (orientation: landscape)',\n 'portrait': 'screen and (orientation: portrait)',\n '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)'\n};\n\nexport {Interchange};\n","'use strict';\n\nimport $ from 'jquery';\nimport { onLoad } from './foundation.core.utils';\nimport { Motion } from './foundation.util.motion';\n\nconst MutationObserver = (function () {\n var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];\n for (var i=0; i < prefixes.length; i++) {\n if (`${prefixes[i]}MutationObserver` in window) {\n return window[`${prefixes[i]}MutationObserver`];\n }\n }\n return false;\n}());\n\nconst triggers = (el, type) => {\n el.data(type).split(' ').forEach(id => {\n $(`#${id}`)[ type === 'close' ? 'trigger' : 'triggerHandler'](`${type}.zf.trigger`, [el]);\n });\n};\n\nvar Triggers = {\n Listeners: {\n Basic: {},\n Global: {}\n },\n Initializers: {}\n}\n\nTriggers.Listeners.Basic = {\n openListener: function() {\n triggers($(this), 'open');\n },\n closeListener: function() {\n let id = $(this).data('close');\n if (id) {\n triggers($(this), 'close');\n }\n else {\n $(this).trigger('close.zf.trigger');\n }\n },\n toggleListener: function() {\n let id = $(this).data('toggle');\n if (id) {\n triggers($(this), 'toggle');\n } else {\n $(this).trigger('toggle.zf.trigger');\n }\n },\n closeableListener: function(e) {\n let animation = $(this).data('closable');\n\n // Only close the first closable element. See https://git.io/zf-7833\n e.stopPropagation();\n\n if(animation !== ''){\n Motion.animateOut($(this), animation, function() {\n $(this).trigger('closed.zf');\n });\n }else{\n $(this).fadeOut().trigger('closed.zf');\n }\n },\n toggleFocusListener: function() {\n let id = $(this).data('toggle-focus');\n $(`#${id}`).triggerHandler('toggle.zf.trigger', [$(this)]);\n }\n};\n\n// Elements with [data-open] will reveal a plugin that supports it when clicked.\nTriggers.Initializers.addOpenListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener);\n $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener);\n}\n\n// Elements with [data-close] will close a plugin that supports it when clicked.\n// If used without a value on [data-close], the event will bubble, allowing it to close a parent component.\nTriggers.Initializers.addCloseListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener);\n $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener);\n}\n\n// Elements with [data-toggle] will toggle a plugin that supports it when clicked.\nTriggers.Initializers.addToggleListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener);\n $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener);\n}\n\n// Elements with [data-closable] will respond to close.zf.trigger events.\nTriggers.Initializers.addCloseableListener = ($elem) => {\n $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener);\n $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener);\n}\n\n// Elements with [data-toggle-focus] will respond to coming in and out of focus\nTriggers.Initializers.addToggleFocusListener = ($elem) => {\n $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener);\n $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener);\n}\n\n\n\n// More Global/complex listeners and triggers\nTriggers.Listeners.Global = {\n resizeListener: function($nodes) {\n if(!MutationObserver){//fallback for IE 9\n $nodes.each(function(){\n $(this).triggerHandler('resizeme.zf.trigger');\n });\n }\n //trigger all listening elements and signal a resize event\n $nodes.attr('data-events', \"resize\");\n },\n scrollListener: function($nodes) {\n if(!MutationObserver){//fallback for IE 9\n $nodes.each(function(){\n $(this).triggerHandler('scrollme.zf.trigger');\n });\n }\n //trigger all listening elements and signal a scroll event\n $nodes.attr('data-events', \"scroll\");\n },\n closeMeListener: function(e, pluginId){\n let plugin = e.namespace.split('.')[0];\n let plugins = $(`[data-${plugin}]`).not(`[data-yeti-box=\"${pluginId}\"]`);\n\n plugins.each(function(){\n let _this = $(this);\n _this.triggerHandler('close.zf.trigger', [_this]);\n });\n }\n}\n\n// Global, parses whole document.\nTriggers.Initializers.addClosemeListener = function(pluginName) {\n var yetiBoxes = $('[data-yeti-box]'),\n plugNames = ['dropdown', 'tooltip', 'reveal'];\n\n if(pluginName){\n if(typeof pluginName === 'string'){\n plugNames.push(pluginName);\n }else if(typeof pluginName === 'object' && typeof pluginName[0] === 'string'){\n plugNames = plugNames.concat(pluginName);\n }else{\n console.error('Plugin names must be strings');\n }\n }\n if(yetiBoxes.length){\n let listeners = plugNames.map((name) => {\n return `closeme.zf.${name}`;\n }).join(' ');\n\n $(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener);\n }\n}\n\nfunction debounceGlobalListener(debounce, trigger, listener) {\n let timer, args = Array.prototype.slice.call(arguments, 3);\n $(window).off(trigger).on(trigger, function(e) {\n if (timer) { clearTimeout(timer); }\n timer = setTimeout(function(){\n listener.apply(null, args);\n }, debounce || 10);//default time to emit scroll event\n });\n}\n\nTriggers.Initializers.addResizeListener = function(debounce){\n let $nodes = $('[data-resize]');\n if($nodes.length){\n debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes);\n }\n}\n\nTriggers.Initializers.addScrollListener = function(debounce){\n let $nodes = $('[data-scroll]');\n if($nodes.length){\n debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes);\n }\n}\n\nTriggers.Initializers.addMutationEventsListener = function($elem) {\n if(!MutationObserver){ return false; }\n let $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]');\n\n //element callback\n var listeningElementsMutation = function (mutationRecordsList) {\n var $target = $(mutationRecordsList[0].target);\n\n //trigger the event handler for the element depending on type\n switch (mutationRecordsList[0].type) {\n case \"attributes\":\n if ($target.attr(\"data-events\") === \"scroll\" && mutationRecordsList[0].attributeName === \"data-events\") {\n $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]);\n }\n if ($target.attr(\"data-events\") === \"resize\" && mutationRecordsList[0].attributeName === \"data-events\") {\n $target.triggerHandler('resizeme.zf.trigger', [$target]);\n }\n if (mutationRecordsList[0].attributeName === \"style\") {\n $target.closest(\"[data-mutate]\").attr(\"data-events\",\"mutate\");\n $target.closest(\"[data-mutate]\").triggerHandler('mutateme.zf.trigger', [$target.closest(\"[data-mutate]\")]);\n }\n break;\n\n case \"childList\":\n $target.closest(\"[data-mutate]\").attr(\"data-events\",\"mutate\");\n $target.closest(\"[data-mutate]\").triggerHandler('mutateme.zf.trigger', [$target.closest(\"[data-mutate]\")]);\n break;\n\n default:\n return false;\n //nothing\n }\n };\n\n if ($nodes.length) {\n //for each element that needs to listen for resizing, scrolling, or mutation add a single observer\n for (var i = 0; i <= $nodes.length - 1; i++) {\n var elementObserver = new MutationObserver(listeningElementsMutation);\n elementObserver.observe($nodes[i], { attributes: true, childList: true, characterData: false, subtree: true, attributeFilter: [\"data-events\", \"style\"] });\n }\n }\n}\n\nTriggers.Initializers.addSimpleListeners = function() {\n let $document = $(document);\n\n Triggers.Initializers.addOpenListener($document);\n Triggers.Initializers.addCloseListener($document);\n Triggers.Initializers.addToggleListener($document);\n Triggers.Initializers.addCloseableListener($document);\n Triggers.Initializers.addToggleFocusListener($document);\n\n}\n\nTriggers.Initializers.addGlobalListeners = function() {\n let $document = $(document);\n Triggers.Initializers.addMutationEventsListener($document);\n Triggers.Initializers.addResizeListener();\n Triggers.Initializers.addScrollListener();\n Triggers.Initializers.addClosemeListener();\n}\n\n\nTriggers.init = function ($, Foundation) {\n onLoad($(window), function () {\n if ($.triggersInitialized !== true) {\n Triggers.Initializers.addSimpleListeners();\n Triggers.Initializers.addGlobalListeners();\n $.triggersInitialized = true;\n }\n });\n\n if(Foundation) {\n Foundation.Triggers = Triggers;\n // Legacy included to be backwards compatible for now.\n Foundation.IHearYou = Triggers.Initializers.addGlobalListeners\n }\n}\n\nexport {Triggers};\n","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;"],"sourceRoot":""}