biofriction-wp-theme/node_modules/foundation-sites/dist/js/plugins/foundation.util.keyboard.mi...

1 line
20 KiB
Plaintext

{"version":3,"sources":["foundation.util.keyboard.min.js"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__foundation_core__","__WEBPACK_EXTERNAL_MODULE__foundation_core_utils__","__WEBPACK_EXTERNAL_MODULE_jquery__","modules","installedModules","__webpack_require__","moduleId","i","l","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","./foundation.core","./foundation.core.utils","./js/entries/plugins/foundation.util.keyboard.js","__webpack_exports__","_foundation_core__WEBPACK_IMPORTED_MODULE_0__","_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__","Keyboard","./js/foundation.util.keyboard.js","jquery__WEBPACK_IMPORTED_MODULE_0__","jquery__WEBPACK_IMPORTED_MODULE_0___default","_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__","keyCodes","9","13","27","32","35","36","37","38","39","40","commands","findFocusable","$element","find","filter","this","is","attr","parseKey","event","which","keyCode","String","fromCharCode","toUpperCase","replace","shiftKey","concat","ctrlKey","altKey","keys","kcs","k","kc","getKeyCodes","handleKey","component","functions","fn","commandList","console","warn","ltr","a","extend","rtl","returnValue","apply","handled","unhandled","register","componentName","cmds","trapFocus","$focusable","$firstFocusable","eq","$lastFocusable","on","target","preventDefault","focus","releaseFocus","off","23","jquery"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,qBAAsBA,QAAQ,2BAA4BA,QAAQ,WAC1E,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,oBAAqB,0BAA2B,UAAWJ,GACzC,iBAAZC,QACdA,QAAQ,4BAA8BD,EAAQG,QAAQ,qBAAsBA,QAAQ,2BAA4BA,QAAQ,YAExHJ,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,EAAWE,GAAG,GAChCC,EAAiBH,EAAWE,IAAI,GACpC5C,EAAS8C,GAAG,uBAAwB,SAAUvC,GACxCA,EAAMwC,SAAWF,EAAe,IAA0B,QAApBvC,EAASC,IACjDA,EAAMyC,iBACNL,EAAgBM,SACP1C,EAAMwC,SAAWJ,EAAgB,IAA0B,cAApBrC,EAASC,KACzDA,EAAMyC,iBACNH,EAAeI,YASrBC,aAAc,SAAsBlD,GAClCA,EAASmD,IAAI,2BAsBXC,GAKA,SAAUvH,EAAQD,EAASW,GAEjCV,EAAOD,QAAUW,EAAuK,qDAKlL8G,OAKA,SAAUxH,EAAQD,GAExBC,EAAOD,QAAUQ","file":"foundation.util.keyboard.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.core\"), require(\"./foundation.core.utils\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.core\", \"./foundation.core.utils\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"foundation.util.keyboard\"] = factory(require(\"./foundation.core\"), require(\"./foundation.core.utils\"), require(\"jquery\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.keyboard\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"jQuery\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE__foundation_core_utils__, __WEBPACK_EXTERNAL_MODULE_jquery__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \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 = 23);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ \"./foundation.core\":\n/*!****************************************************************************************************************************************************************!*\\\n !*** external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core\",\"commonjs\":\"./foundation.core\",\"commonjs2\":\"./foundation.core\"} ***!\n \\****************************************************************************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;\n\n/***/ }),\n\n/***/ \"./foundation.core.utils\":\n/*!**********************************************************************************************************************************************************************************!*\\\n !*** external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core.utils\",\"commonjs\":\"./foundation.core.utils\",\"commonjs2\":\"./foundation.core.utils\"} ***!\n \\**********************************************************************************************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core_utils__;\n\n/***/ }),\n\n/***/ \"./js/entries/plugins/foundation.util.keyboard.js\":\n/*!********************************************************!*\\\n !*** ./js/entries/plugins/foundation.util.keyboard.js ***!\n \\********************************************************/\n/*! exports provided: Foundation, Keyboard */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ \"./foundation.core\");\n/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Foundation\", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_0__[\"Foundation\"]; });\n\n/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.keyboard */ \"./js/foundation.util.keyboard.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Keyboard\", function() { return _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__[\"Keyboard\"]; });\n\n\n\n_foundation_core__WEBPACK_IMPORTED_MODULE_0__[\"Foundation\"].Keyboard = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__[\"Keyboard\"];\n\n\n/***/ }),\n\n/***/ \"./js/foundation.util.keyboard.js\":\n/*!****************************************!*\\\n !*** ./js/foundation.util.keyboard.js ***!\n \\****************************************/\n/*! exports provided: Keyboard */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Keyboard\", function() { return Keyboard; });\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ \"jquery\");\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ \"./foundation.core.utils\");\n/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__);\n/*******************************************\n * *\n * This util was created by Marius Olbertz *\n * Please thank Marius on GitHub /owlbertz *\n * or the web http://www.mariusolbertz.de/ *\n * *\n ******************************************/\n\n\n\n\nvar keyCodes = {\n 9: 'TAB',\n 13: 'ENTER',\n 27: 'ESCAPE',\n 32: 'SPACE',\n 35: 'END',\n 36: 'HOME',\n 37: 'ARROW_LEFT',\n 38: 'ARROW_UP',\n 39: 'ARROW_RIGHT',\n 40: 'ARROW_DOWN'\n};\nvar commands = {}; // Functions pulled out to be referenceable from internals\n\nfunction findFocusable($element) {\n if (!$element) {\n return false;\n }\n\n 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 () {\n if (!jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).is(':visible') || jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr('tabindex') < 0) {\n return false;\n } //only have visible elements and those that have a tabindex greater or equal 0\n\n\n return true;\n });\n}\n\nfunction parseKey(event) {\n var key = keyCodes[event.which || event.keyCode] || String.fromCharCode(event.which).toUpperCase(); // Remove un-printable characters, e.g. for `fromCharCode` calls for CTRL only events\n\n key = key.replace(/\\W+/, '');\n if (event.shiftKey) key = \"SHIFT_\".concat(key);\n if (event.ctrlKey) key = \"CTRL_\".concat(key);\n if (event.altKey) key = \"ALT_\".concat(key); // Remove trailing underscore, in case only modifiers were used (e.g. only `CTRL_ALT`)\n\n key = key.replace(/_$/, '');\n return key;\n}\n\nvar Keyboard = {\n keys: getKeyCodes(keyCodes),\n\n /**\n * Parses the (keyboard) event and returns a String that represents its key\n * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE\n * @param {Event} event - the event generated by the event handler\n * @return String key - String that represents the key pressed\n */\n parseKey: parseKey,\n\n /**\n * Handles the given (keyboard) event\n * @param {Event} event - the event generated by the event handler\n * @param {String} component - Foundation component's name, e.g. Slider or Reveal\n * @param {Objects} functions - collection of functions that are to be executed\n */\n handleKey: function handleKey(event, component, functions) {\n var commandList = commands[component],\n keyCode = this.parseKey(event),\n cmds,\n command,\n fn;\n if (!commandList) return console.warn('Component not defined!');\n\n if (typeof commandList.ltr === 'undefined') {\n // this component does not differentiate between ltr and rtl\n cmds = commandList; // use plain list\n } else {\n // merge ltr and rtl: if document is rtl, rtl overwrites ltr and vice versa\n if (Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__[\"rtl\"])()) cmds = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, commandList.ltr, commandList.rtl);else cmds = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, commandList.rtl, commandList.ltr);\n }\n\n command = cmds[keyCode];\n fn = functions[command];\n\n if (fn && typeof fn === 'function') {\n // execute function if exists\n var returnValue = fn.apply();\n\n if (functions.handled || typeof functions.handled === 'function') {\n // execute function when event was handled\n functions.handled(returnValue);\n }\n } else {\n if (functions.unhandled || typeof functions.unhandled === 'function') {\n // execute function when event was not handled\n functions.unhandled();\n }\n }\n },\n\n /**\n * Finds all focusable elements within the given `$element`\n * @param {jQuery} $element - jQuery object to search within\n * @return {jQuery} $focusable - all focusable elements within `$element`\n */\n findFocusable: findFocusable,\n\n /**\n * Returns the component name name\n * @param {Object} component - Foundation component, e.g. Slider or Reveal\n * @return String componentName\n */\n register: function register(componentName, cmds) {\n commands[componentName] = cmds;\n },\n // TODO9438: These references to Keyboard need to not require global. Will 'this' work in this context?\n //\n\n /**\n * Traps the focus in the given element.\n * @param {jQuery} $element jQuery object to trap the foucs into.\n */\n trapFocus: function trapFocus($element) {\n var $focusable = findFocusable($element),\n $firstFocusable = $focusable.eq(0),\n $lastFocusable = $focusable.eq(-1);\n $element.on('keydown.zf.trapfocus', function (event) {\n if (event.target === $lastFocusable[0] && parseKey(event) === 'TAB') {\n event.preventDefault();\n $firstFocusable.focus();\n } else if (event.target === $firstFocusable[0] && parseKey(event) === 'SHIFT_TAB') {\n event.preventDefault();\n $lastFocusable.focus();\n }\n });\n },\n\n /**\n * Releases the trapped focus from the given element.\n * @param {jQuery} $element jQuery object to release the focus for.\n */\n releaseFocus: function releaseFocus($element) {\n $element.off('keydown.zf.trapfocus');\n }\n};\n/*\n * Constants for easier comparing.\n * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE\n */\n\nfunction getKeyCodes(kcs) {\n var k = {};\n\n for (var kc in kcs) {\n k[kcs[kc]] = kcs[kc];\n }\n\n return k;\n}\n\n\n\n/***/ }),\n\n/***/ 23:\n/*!**************************************************************!*\\\n !*** multi ./js/entries/plugins/foundation.util.keyboard.js ***!\n \\**************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(/*! /Users/ncoden/Documents/Documents/Projects/Programmation/Web/2016/Foundation/foundation-sites/js/entries/plugins/foundation.util.keyboard.js */\"./js/entries/plugins/foundation.util.keyboard.js\");\n\n\n/***/ }),\n\n/***/ \"jquery\":\n/*!********************************************************************************************!*\\\n !*** external {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"} ***!\n \\********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;\n\n/***/ })\n\n/******/ });\n});\n//# sourceMappingURL=foundation.util.keyboard.js.map"]}