1 line
18 KiB
Plaintext
1 line
18 KiB
Plaintext
{"version":3,"sources":["foundation.util.motion.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.motion.js","__webpack_exports__","_foundation_core__WEBPACK_IMPORTED_MODULE_0__","_foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__","Motion","Move","./js/foundation.util.motion.js","jquery__WEBPACK_IMPORTED_MODULE_0__","jquery__WEBPACK_IMPORTED_MODULE_0___default","_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__","initClasses","activeClasses","animateIn","element","animation","cb","animate","animateOut","duration","elem","fn","anim","prog","start","apply","trigger","triggerHandler","requestAnimationFrame","move","ts","cancelAnimationFrame","isIn","eq","length","initClass","activeClass","reset","addClass","css","show","offsetWidth","one","hide","style","transitionDuration","removeClass","concat","25","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,0BAA4BD,EAAQG,QAAQ,qBAAsBA,QAAQ,2BAA4BA,QAAQ,YAEtHJ,EAA8B,wBAAIA,EAA8B,yBAAK,GAAIA,EAA8B,wBAAE,0BAA4BC,EAAQD,EAA8B,wBAAE,mBAAoBA,EAA8B,wBAAE,mBAAoBA,EAAa,SARpQ,CASGO,OAAQ,SAASC,EA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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.motion\"] = 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.motion\"] = 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 = 25);\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.motion.js\":\n/*!******************************************************!*\\\n !*** ./js/entries/plugins/foundation.util.motion.js ***!\n \\******************************************************/\n/*! exports provided: Foundation, Motion, Move */\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_motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.motion */ \"./js/foundation.util.motion.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Motion\", function() { return _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__[\"Motion\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Move\", function() { return _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__[\"Move\"]; });\n\n\n\n_foundation_core__WEBPACK_IMPORTED_MODULE_0__[\"Foundation\"].Motion = _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__[\"Motion\"];\n_foundation_core__WEBPACK_IMPORTED_MODULE_0__[\"Foundation\"].Move = _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__[\"Move\"];\n\n\n/***/ }),\n\n/***/ \"./js/foundation.util.motion.js\":\n/*!**************************************!*\\\n !*** ./js/foundation.util.motion.js ***!\n \\**************************************/\n/*! exports provided: Move, Motion */\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__, \"Move\", function() { return Move; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Motion\", function() { return Motion; });\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\n\n/**\n * Motion module.\n * @module foundation.motion\n */\n\nvar initClasses = ['mui-enter', 'mui-leave'];\nvar activeClasses = ['mui-enter-active', 'mui-leave-active'];\nvar Motion = {\n animateIn: function animateIn(element, animation, cb) {\n animate(true, element, animation, cb);\n },\n animateOut: function animateOut(element, animation, cb) {\n animate(false, element, animation, cb);\n }\n};\n\nfunction Move(duration, elem, fn) {\n var anim,\n prog,\n start = null; // console.log('called');\n\n if (duration === 0) {\n fn.apply(elem);\n elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]);\n return;\n }\n\n function move(ts) {\n if (!start) start = ts; // console.log(start, ts);\n\n prog = ts - start;\n fn.apply(elem);\n\n if (prog < duration) {\n anim = window.requestAnimationFrame(move, elem);\n } else {\n window.cancelAnimationFrame(anim);\n elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]);\n }\n }\n\n anim = window.requestAnimationFrame(move);\n}\n/**\n * Animates an element in or out using a CSS transition class.\n * @function\n * @private\n * @param {Boolean} isIn - Defines if the animation is in or out.\n * @param {Object} element - jQuery or HTML object to animate.\n * @param {String} animation - CSS class to use.\n * @param {Function} cb - Callback to run when animation is finished.\n */\n\n\nfunction animate(isIn, element, animation, cb) {\n element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(element).eq(0);\n if (!element.length) return;\n var initClass = isIn ? initClasses[0] : initClasses[1];\n var activeClass = isIn ? activeClasses[0] : activeClasses[1]; // Set up the animation\n\n reset();\n element.addClass(animation).css('transition', 'none');\n requestAnimationFrame(function () {\n element.addClass(initClass);\n if (isIn) element.show();\n }); // Start the animation\n\n requestAnimationFrame(function () {\n element[0].offsetWidth;\n element.css('transition', '').addClass(activeClass);\n }); // Clean up the animation when it finishes\n\n element.one(Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__[\"transitionend\"])(element), finish); // Hides the element (for out animations), resets the element, and runs a callback\n\n function finish() {\n if (!isIn) element.hide();\n reset();\n if (cb) cb.apply(element);\n } // Resets transitions and removes motion-specific classes\n\n\n function reset() {\n element[0].style.transitionDuration = 0;\n element.removeClass(\"\".concat(initClass, \" \").concat(activeClass, \" \").concat(animation));\n }\n}\n\n\n\n/***/ }),\n\n/***/ 25:\n/*!************************************************************!*\\\n !*** multi ./js/entries/plugins/foundation.util.motion.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.motion.js */\"./js/entries/plugins/foundation.util.motion.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.motion.js.map"]} |