├── .eslintrc.js ├── .gitignore ├── .npmignore ├── README.md ├── babel.config.js ├── demo ├── App.vue └── main.js ├── dist ├── demo.html ├── vue-anime.common.js ├── vue-anime.umd.js └── vue-anime.umd.min.js ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html ├── src ├── anime-mixin.js ├── anime-prop.js ├── index.js ├── is.js ├── vue-anime-group.js ├── vue-anime-timeline.js └── vue-anime.js └── vue.config.js /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | 'extends': [ 7 | 'plugin:vue/essential', 8 | '@vue/standard' 9 | ], 10 | rules: { 11 | 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 12 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 13 | }, 14 | parserOptions: { 15 | parser: 'babel-eslint' 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | 4 | # local env files 5 | .env.local 6 | .env.*.local 7 | 8 | # Log files 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | *.sw* 21 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /demo 2 | /public 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-anime 2 | Vue animation with timeline and grouping support using http://animejs.com/ 3 | 4 | 5 | ## Usage 6 | 7 | ```sh 8 | npm install vue-anime 9 | ``` 10 | 11 | In vue file, first import 12 | ```javascript 13 | import {VueAnime} from 'vue-anime' 14 | import {VueAnimeGroup} from 'vue-anime' 15 | import {VueAnimeTimeLine} from 'vue-anime' 16 | export default { 17 | name: 'app', 18 | components: { 19 | VueAnime, 20 | VueAnimeGroup, 21 | VueAnimeTimeLine 22 | }, 23 | } 24 | 25 | ``` 26 | 27 | and then use in template 28 | 29 | ```vue 30 | 33 | ``` 34 | 35 | Vue-anime support all feature provided by animejs. 36 | 37 | There are three element available for use: 38 | 1. vue-anime: a single animation element 39 | 2. vue-anime-group: a group of elements that share the same animation properties 40 | 3. vue-anime-timeline: multiple elements that run animation by orders 41 | 42 | ## Props 43 | 44 | ### animate 45 | Type: `Object` 46 | 47 | The animation `to` transitions or css properties with numeric values 48 | 49 | CSS: `opacity`, `backgroundColor`, `fontSize` ... 50 | Transforms: `translateX`, `rotate`, `scale ` ... 51 | 52 | **Initial css properties should be written as inline-css ** 53 | 54 | ```vue 55 | 56 | ``` 57 | 58 | ### duration 59 | 60 | Type: `Number` or `Function` 61 | 62 | ### delay 63 | 64 | Type: `Number` or `Function` 65 | 66 | ### easing 67 | Type: `Number` or `Array` 68 | 69 | | Types | Examples | Infos | 70 | | ------- | -------------------- | -------------------------------------------------- | 71 | | String | `'easeOutExpo'` | Built in function names | 72 | | `Array` | [.91,-0.54,.29,1.56] | Custom Bézier curve coordinates ([x1, y1, x2, y2]) | 73 | 74 | | easeIn | easeOut | easeInOut | 75 | | ------------- | -------------- | ---------------- | 76 | | easeInQuad | easeOutQuad | easeInOutQuad | 77 | | easeInCubic | easeOutCubic | easeInOutCubic | 78 | | easeInQuart | easeOutQuart | easeInOutQuart | 79 | | easeInQuint | easeOutQuint | easeInOutQuint | 80 | | easeInSine | easeOutSine | easeInOutSine | 81 | | easeInExpo | easeOutExpo | easeInOutExpo | 82 | | easeInCirc | easeOutCirc | easeInOutCirc | 83 | | easeInBack | easeOutBack | easeInOutBack | 84 | | easeInElastic | easeOutElastic | easeInOutElastic | 85 | 86 | 87 | ### elasticity 88 | 89 | Elasticity of Elastic easings can be configured with the elasticity parameters 90 | 91 | ### direction 92 | Type: `String` 93 | One of 'normal', 'reverse', 'alternate' 94 | 95 | ### loop 96 | 97 | Type: `Boolean` 98 | Default: false 99 | 100 | ### autoplay 101 | 102 | Type: `Boolean` 103 | Default: false 104 | 105 | ### seek 106 | Type: `Number` 107 | Animations or timelines current time. 108 | 109 | ### object object-props 110 | Type: `Object` 111 | 112 | set animation target to object and specify property to change by object-props 113 | 114 | ```html 115 | 124 | {{objectAnimeData.prop1}} / {{objectAnimeData.prop2}} 125 | 126 | ``` 127 | 128 | ### offset (timeline only) 129 | 130 | Defines starting time relative to the previous animations duration. 131 | ```html 132 | ` 133 | 134 | 135 | ``` 136 | 137 | 138 | 139 | 140 | ## Example 141 | 142 | ### Group 143 | 144 | Adding vue-anime to one group and share the same animation 145 | ```vue 146 | 149 | 150 | 151 | 152 | 153 | ``` 154 | 155 | ### Css Animation 156 | Animate any css properties (not only translate) 157 | ```vue 158 | 164 | ``` 165 | 166 | ### Object Animation 167 | 168 | Set object and property 169 | ```vue 170 | 175 | {{objectAnimeData.prop1}} / {{objectAnimeData.prop2}} 176 | 177 | ``` 178 | 179 | ### SVG Animation 180 | 181 | Animate svg points 182 | 183 | ```vue 184 | 189 | 190 | ``` 191 | 192 | ### Specific property parameters 193 | 194 | ```vue 195 | 213 | 214 | ``` 215 | 216 | ### DURATION FUNCTION 217 | 218 | ```vue 219 | 224 | 225 | 226 | ``` 227 | 228 | ### key frames 229 | 230 | ```vue 231 | 255 | 256 | ``` 257 | 258 | ### timeline basic 259 | 260 | ```vue 261 | 262 | 263 | 264 | ``` 265 | 266 | 267 | 268 | ### TIMELINE with offsets 269 | 270 | ```vue 271 | 272 | 273 | 274 | ``` 275 | 276 | 277 | 278 | ### Time-line property Inheritance 279 | 280 | ```vue 281 | 293 | 294 | 295 | 296 | 297 | ``` 298 | 299 | 300 | ### Animate process control 301 | 302 | ```vue 303 | 306 | 307 | 308 | 309 | 310 | 311 | ``` 312 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/babel-preset-app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /demo/App.vue: -------------------------------------------------------------------------------- 1 | 92 | 93 | 307 | 308 | 400 | -------------------------------------------------------------------------------- /demo/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | 4 | Vue.config.productionTip = false 5 | 6 | new Vue({ 7 | render: h => h(App) 8 | }).$mount('#app') 9 | -------------------------------------------------------------------------------- /dist/demo.html: -------------------------------------------------------------------------------- 1 | 2 | vue-anime demo 3 | 4 | 5 | 6 | 9 | -------------------------------------------------------------------------------- /dist/vue-anime.common.js: -------------------------------------------------------------------------------- 1 | module.exports = 2 | /******/ (function(modules) { // webpackBootstrap 3 | /******/ // The module cache 4 | /******/ var installedModules = {}; 5 | /******/ 6 | /******/ // The require function 7 | /******/ function __webpack_require__(moduleId) { 8 | /******/ 9 | /******/ // Check if module is in cache 10 | /******/ if(installedModules[moduleId]) { 11 | /******/ return installedModules[moduleId].exports; 12 | /******/ } 13 | /******/ // Create a new module (and put it into the cache) 14 | /******/ var module = installedModules[moduleId] = { 15 | /******/ i: moduleId, 16 | /******/ l: false, 17 | /******/ exports: {} 18 | /******/ }; 19 | /******/ 20 | /******/ // Execute the module function 21 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 22 | /******/ 23 | /******/ // Flag the module as loaded 24 | /******/ module.l = true; 25 | /******/ 26 | /******/ // Return the exports of the module 27 | /******/ return module.exports; 28 | /******/ } 29 | /******/ 30 | /******/ 31 | /******/ // expose the modules object (__webpack_modules__) 32 | /******/ __webpack_require__.m = modules; 33 | /******/ 34 | /******/ // expose the module cache 35 | /******/ __webpack_require__.c = installedModules; 36 | /******/ 37 | /******/ // define getter function for harmony exports 38 | /******/ __webpack_require__.d = function(exports, name, getter) { 39 | /******/ if(!__webpack_require__.o(exports, name)) { 40 | /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 41 | /******/ } 42 | /******/ }; 43 | /******/ 44 | /******/ // define __esModule on exports 45 | /******/ __webpack_require__.r = function(exports) { 46 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 47 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 48 | /******/ } 49 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); 50 | /******/ }; 51 | /******/ 52 | /******/ // create a fake namespace object 53 | /******/ // mode & 1: value is a module id, require it 54 | /******/ // mode & 2: merge all properties of value into the ns 55 | /******/ // mode & 4: return value when already ns object 56 | /******/ // mode & 8|1: behave like require 57 | /******/ __webpack_require__.t = function(value, mode) { 58 | /******/ if(mode & 1) value = __webpack_require__(value); 59 | /******/ if(mode & 8) return value; 60 | /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 61 | /******/ var ns = Object.create(null); 62 | /******/ __webpack_require__.r(ns); 63 | /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 64 | /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 65 | /******/ return ns; 66 | /******/ }; 67 | /******/ 68 | /******/ // getDefaultExport function for compatibility with non-harmony modules 69 | /******/ __webpack_require__.n = function(module) { 70 | /******/ var getter = module && module.__esModule ? 71 | /******/ function getDefault() { return module['default']; } : 72 | /******/ function getModuleExports() { return module; }; 73 | /******/ __webpack_require__.d(getter, 'a', getter); 74 | /******/ return getter; 75 | /******/ }; 76 | /******/ 77 | /******/ // Object.prototype.hasOwnProperty.call 78 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 79 | /******/ 80 | /******/ // __webpack_public_path__ 81 | /******/ __webpack_require__.p = ""; 82 | /******/ 83 | /******/ 84 | /******/ // Load entry module and return exports 85 | /******/ return __webpack_require__(__webpack_require__.s = "fae3"); 86 | /******/ }) 87 | /************************************************************************/ 88 | /******/ ({ 89 | 90 | /***/ "01f9": 91 | /***/ (function(module, exports, __webpack_require__) { 92 | 93 | "use strict"; 94 | 95 | var LIBRARY = __webpack_require__("2d00"); 96 | var $export = __webpack_require__("5ca1"); 97 | var redefine = __webpack_require__("2aba"); 98 | var hide = __webpack_require__("32e9"); 99 | var Iterators = __webpack_require__("84f2"); 100 | var $iterCreate = __webpack_require__("41a0"); 101 | var setToStringTag = __webpack_require__("7f20"); 102 | var getPrototypeOf = __webpack_require__("38fd"); 103 | var ITERATOR = __webpack_require__("2b4c")('iterator'); 104 | var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` 105 | var FF_ITERATOR = '@@iterator'; 106 | var KEYS = 'keys'; 107 | var VALUES = 'values'; 108 | 109 | var returnThis = function () { return this; }; 110 | 111 | module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { 112 | $iterCreate(Constructor, NAME, next); 113 | var getMethod = function (kind) { 114 | if (!BUGGY && kind in proto) return proto[kind]; 115 | switch (kind) { 116 | case KEYS: return function keys() { return new Constructor(this, kind); }; 117 | case VALUES: return function values() { return new Constructor(this, kind); }; 118 | } return function entries() { return new Constructor(this, kind); }; 119 | }; 120 | var TAG = NAME + ' Iterator'; 121 | var DEF_VALUES = DEFAULT == VALUES; 122 | var VALUES_BUG = false; 123 | var proto = Base.prototype; 124 | var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; 125 | var $default = $native || getMethod(DEFAULT); 126 | var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; 127 | var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; 128 | var methods, key, IteratorPrototype; 129 | // Fix native 130 | if ($anyNative) { 131 | IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); 132 | if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { 133 | // Set @@toStringTag to native iterators 134 | setToStringTag(IteratorPrototype, TAG, true); 135 | // fix for some old engines 136 | if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); 137 | } 138 | } 139 | // fix Array#{values, @@iterator}.name in V8 / FF 140 | if (DEF_VALUES && $native && $native.name !== VALUES) { 141 | VALUES_BUG = true; 142 | $default = function values() { return $native.call(this); }; 143 | } 144 | // Define iterator 145 | if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { 146 | hide(proto, ITERATOR, $default); 147 | } 148 | // Plug for library 149 | Iterators[NAME] = $default; 150 | Iterators[TAG] = returnThis; 151 | if (DEFAULT) { 152 | methods = { 153 | values: DEF_VALUES ? $default : getMethod(VALUES), 154 | keys: IS_SET ? $default : getMethod(KEYS), 155 | entries: $entries 156 | }; 157 | if (FORCED) for (key in methods) { 158 | if (!(key in proto)) redefine(proto, key, methods[key]); 159 | } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); 160 | } 161 | return methods; 162 | }; 163 | 164 | 165 | /***/ }), 166 | 167 | /***/ "0bfb": 168 | /***/ (function(module, exports, __webpack_require__) { 169 | 170 | "use strict"; 171 | 172 | // 21.2.5.3 get RegExp.prototype.flags 173 | var anObject = __webpack_require__("cb7c"); 174 | module.exports = function () { 175 | var that = anObject(this); 176 | var result = ''; 177 | if (that.global) result += 'g'; 178 | if (that.ignoreCase) result += 'i'; 179 | if (that.multiline) result += 'm'; 180 | if (that.unicode) result += 'u'; 181 | if (that.sticky) result += 'y'; 182 | return result; 183 | }; 184 | 185 | 186 | /***/ }), 187 | 188 | /***/ "0d58": 189 | /***/ (function(module, exports, __webpack_require__) { 190 | 191 | // 19.1.2.14 / 15.2.3.14 Object.keys(O) 192 | var $keys = __webpack_require__("ce10"); 193 | var enumBugKeys = __webpack_require__("e11e"); 194 | 195 | module.exports = Object.keys || function keys(O) { 196 | return $keys(O, enumBugKeys); 197 | }; 198 | 199 | 200 | /***/ }), 201 | 202 | /***/ "1169": 203 | /***/ (function(module, exports, __webpack_require__) { 204 | 205 | // 7.2.2 IsArray(argument) 206 | var cof = __webpack_require__("2d95"); 207 | module.exports = Array.isArray || function isArray(arg) { 208 | return cof(arg) == 'Array'; 209 | }; 210 | 211 | 212 | /***/ }), 213 | 214 | /***/ "11e9": 215 | /***/ (function(module, exports, __webpack_require__) { 216 | 217 | var pIE = __webpack_require__("52a7"); 218 | var createDesc = __webpack_require__("4630"); 219 | var toIObject = __webpack_require__("6821"); 220 | var toPrimitive = __webpack_require__("6a99"); 221 | var has = __webpack_require__("69a8"); 222 | var IE8_DOM_DEFINE = __webpack_require__("c69a"); 223 | var gOPD = Object.getOwnPropertyDescriptor; 224 | 225 | exports.f = __webpack_require__("9e1e") ? gOPD : function getOwnPropertyDescriptor(O, P) { 226 | O = toIObject(O); 227 | P = toPrimitive(P, true); 228 | if (IE8_DOM_DEFINE) try { 229 | return gOPD(O, P); 230 | } catch (e) { /* empty */ } 231 | if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); 232 | }; 233 | 234 | 235 | /***/ }), 236 | 237 | /***/ "1495": 238 | /***/ (function(module, exports, __webpack_require__) { 239 | 240 | var dP = __webpack_require__("86cc"); 241 | var anObject = __webpack_require__("cb7c"); 242 | var getKeys = __webpack_require__("0d58"); 243 | 244 | module.exports = __webpack_require__("9e1e") ? Object.defineProperties : function defineProperties(O, Properties) { 245 | anObject(O); 246 | var keys = getKeys(Properties); 247 | var length = keys.length; 248 | var i = 0; 249 | var P; 250 | while (length > i) dP.f(O, P = keys[i++], Properties[P]); 251 | return O; 252 | }; 253 | 254 | 255 | /***/ }), 256 | 257 | /***/ "230e": 258 | /***/ (function(module, exports, __webpack_require__) { 259 | 260 | var isObject = __webpack_require__("d3f4"); 261 | var document = __webpack_require__("7726").document; 262 | // typeof document.createElement is 'object' in old IE 263 | var is = isObject(document) && isObject(document.createElement); 264 | module.exports = function (it) { 265 | return is ? document.createElement(it) : {}; 266 | }; 267 | 268 | 269 | /***/ }), 270 | 271 | /***/ "2621": 272 | /***/ (function(module, exports) { 273 | 274 | exports.f = Object.getOwnPropertySymbols; 275 | 276 | 277 | /***/ }), 278 | 279 | /***/ "2aba": 280 | /***/ (function(module, exports, __webpack_require__) { 281 | 282 | var global = __webpack_require__("7726"); 283 | var hide = __webpack_require__("32e9"); 284 | var has = __webpack_require__("69a8"); 285 | var SRC = __webpack_require__("ca5a")('src'); 286 | var TO_STRING = 'toString'; 287 | var $toString = Function[TO_STRING]; 288 | var TPL = ('' + $toString).split(TO_STRING); 289 | 290 | __webpack_require__("8378").inspectSource = function (it) { 291 | return $toString.call(it); 292 | }; 293 | 294 | (module.exports = function (O, key, val, safe) { 295 | var isFunction = typeof val == 'function'; 296 | if (isFunction) has(val, 'name') || hide(val, 'name', key); 297 | if (O[key] === val) return; 298 | if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); 299 | if (O === global) { 300 | O[key] = val; 301 | } else if (!safe) { 302 | delete O[key]; 303 | hide(O, key, val); 304 | } else if (O[key]) { 305 | O[key] = val; 306 | } else { 307 | hide(O, key, val); 308 | } 309 | // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative 310 | })(Function.prototype, TO_STRING, function toString() { 311 | return typeof this == 'function' && this[SRC] || $toString.call(this); 312 | }); 313 | 314 | 315 | /***/ }), 316 | 317 | /***/ "2aeb": 318 | /***/ (function(module, exports, __webpack_require__) { 319 | 320 | // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) 321 | var anObject = __webpack_require__("cb7c"); 322 | var dPs = __webpack_require__("1495"); 323 | var enumBugKeys = __webpack_require__("e11e"); 324 | var IE_PROTO = __webpack_require__("613b")('IE_PROTO'); 325 | var Empty = function () { /* empty */ }; 326 | var PROTOTYPE = 'prototype'; 327 | 328 | // Create object with fake `null` prototype: use iframe Object with cleared prototype 329 | var createDict = function () { 330 | // Thrash, waste and sodomy: IE GC bug 331 | var iframe = __webpack_require__("230e")('iframe'); 332 | var i = enumBugKeys.length; 333 | var lt = '<'; 334 | var gt = '>'; 335 | var iframeDocument; 336 | iframe.style.display = 'none'; 337 | __webpack_require__("fab2").appendChild(iframe); 338 | iframe.src = 'javascript:'; // eslint-disable-line no-script-url 339 | // createDict = iframe.contentWindow.Object; 340 | // html.removeChild(iframe); 341 | iframeDocument = iframe.contentWindow.document; 342 | iframeDocument.open(); 343 | iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); 344 | iframeDocument.close(); 345 | createDict = iframeDocument.F; 346 | while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; 347 | return createDict(); 348 | }; 349 | 350 | module.exports = Object.create || function create(O, Properties) { 351 | var result; 352 | if (O !== null) { 353 | Empty[PROTOTYPE] = anObject(O); 354 | result = new Empty(); 355 | Empty[PROTOTYPE] = null; 356 | // add "__proto__" for Object.getPrototypeOf polyfill 357 | result[IE_PROTO] = O; 358 | } else result = createDict(); 359 | return Properties === undefined ? result : dPs(result, Properties); 360 | }; 361 | 362 | 363 | /***/ }), 364 | 365 | /***/ "2b4c": 366 | /***/ (function(module, exports, __webpack_require__) { 367 | 368 | var store = __webpack_require__("5537")('wks'); 369 | var uid = __webpack_require__("ca5a"); 370 | var Symbol = __webpack_require__("7726").Symbol; 371 | var USE_SYMBOL = typeof Symbol == 'function'; 372 | 373 | var $exports = module.exports = function (name) { 374 | return store[name] || (store[name] = 375 | USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); 376 | }; 377 | 378 | $exports.store = store; 379 | 380 | 381 | /***/ }), 382 | 383 | /***/ "2d00": 384 | /***/ (function(module, exports) { 385 | 386 | module.exports = false; 387 | 388 | 389 | /***/ }), 390 | 391 | /***/ "2d95": 392 | /***/ (function(module, exports) { 393 | 394 | var toString = {}.toString; 395 | 396 | module.exports = function (it) { 397 | return toString.call(it).slice(8, -1); 398 | }; 399 | 400 | 401 | /***/ }), 402 | 403 | /***/ "32e9": 404 | /***/ (function(module, exports, __webpack_require__) { 405 | 406 | var dP = __webpack_require__("86cc"); 407 | var createDesc = __webpack_require__("4630"); 408 | module.exports = __webpack_require__("9e1e") ? function (object, key, value) { 409 | return dP.f(object, key, createDesc(1, value)); 410 | } : function (object, key, value) { 411 | object[key] = value; 412 | return object; 413 | }; 414 | 415 | 416 | /***/ }), 417 | 418 | /***/ "37c8": 419 | /***/ (function(module, exports, __webpack_require__) { 420 | 421 | exports.f = __webpack_require__("2b4c"); 422 | 423 | 424 | /***/ }), 425 | 426 | /***/ "3846": 427 | /***/ (function(module, exports, __webpack_require__) { 428 | 429 | // 21.2.5.3 get RegExp.prototype.flags() 430 | if (__webpack_require__("9e1e") && /./g.flags != 'g') __webpack_require__("86cc").f(RegExp.prototype, 'flags', { 431 | configurable: true, 432 | get: __webpack_require__("0bfb") 433 | }); 434 | 435 | 436 | /***/ }), 437 | 438 | /***/ "38fd": 439 | /***/ (function(module, exports, __webpack_require__) { 440 | 441 | // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) 442 | var has = __webpack_require__("69a8"); 443 | var toObject = __webpack_require__("4bf8"); 444 | var IE_PROTO = __webpack_require__("613b")('IE_PROTO'); 445 | var ObjectProto = Object.prototype; 446 | 447 | module.exports = Object.getPrototypeOf || function (O) { 448 | O = toObject(O); 449 | if (has(O, IE_PROTO)) return O[IE_PROTO]; 450 | if (typeof O.constructor == 'function' && O instanceof O.constructor) { 451 | return O.constructor.prototype; 452 | } return O instanceof Object ? ObjectProto : null; 453 | }; 454 | 455 | 456 | /***/ }), 457 | 458 | /***/ "3a72": 459 | /***/ (function(module, exports, __webpack_require__) { 460 | 461 | var global = __webpack_require__("7726"); 462 | var core = __webpack_require__("8378"); 463 | var LIBRARY = __webpack_require__("2d00"); 464 | var wksExt = __webpack_require__("37c8"); 465 | var defineProperty = __webpack_require__("86cc").f; 466 | module.exports = function (name) { 467 | var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); 468 | if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); 469 | }; 470 | 471 | 472 | /***/ }), 473 | 474 | /***/ "41a0": 475 | /***/ (function(module, exports, __webpack_require__) { 476 | 477 | "use strict"; 478 | 479 | var create = __webpack_require__("2aeb"); 480 | var descriptor = __webpack_require__("4630"); 481 | var setToStringTag = __webpack_require__("7f20"); 482 | var IteratorPrototype = {}; 483 | 484 | // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() 485 | __webpack_require__("32e9")(IteratorPrototype, __webpack_require__("2b4c")('iterator'), function () { return this; }); 486 | 487 | module.exports = function (Constructor, NAME, next) { 488 | Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); 489 | setToStringTag(Constructor, NAME + ' Iterator'); 490 | }; 491 | 492 | 493 | /***/ }), 494 | 495 | /***/ "4588": 496 | /***/ (function(module, exports) { 497 | 498 | // 7.1.4 ToInteger 499 | var ceil = Math.ceil; 500 | var floor = Math.floor; 501 | module.exports = function (it) { 502 | return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); 503 | }; 504 | 505 | 506 | /***/ }), 507 | 508 | /***/ "4630": 509 | /***/ (function(module, exports) { 510 | 511 | module.exports = function (bitmap, value) { 512 | return { 513 | enumerable: !(bitmap & 1), 514 | configurable: !(bitmap & 2), 515 | writable: !(bitmap & 4), 516 | value: value 517 | }; 518 | }; 519 | 520 | 521 | /***/ }), 522 | 523 | /***/ "4bf8": 524 | /***/ (function(module, exports, __webpack_require__) { 525 | 526 | // 7.1.13 ToObject(argument) 527 | var defined = __webpack_require__("be13"); 528 | module.exports = function (it) { 529 | return Object(defined(it)); 530 | }; 531 | 532 | 533 | /***/ }), 534 | 535 | /***/ "52a7": 536 | /***/ (function(module, exports) { 537 | 538 | exports.f = {}.propertyIsEnumerable; 539 | 540 | 541 | /***/ }), 542 | 543 | /***/ "5537": 544 | /***/ (function(module, exports, __webpack_require__) { 545 | 546 | var core = __webpack_require__("8378"); 547 | var global = __webpack_require__("7726"); 548 | var SHARED = '__core-js_shared__'; 549 | var store = global[SHARED] || (global[SHARED] = {}); 550 | 551 | (module.exports = function (key, value) { 552 | return store[key] || (store[key] = value !== undefined ? value : {}); 553 | })('versions', []).push({ 554 | version: core.version, 555 | mode: __webpack_require__("2d00") ? 'pure' : 'global', 556 | copyright: '© 2018 Denis Pushkarev (zloirock.ru)' 557 | }); 558 | 559 | 560 | /***/ }), 561 | 562 | /***/ "5a72": 563 | /***/ (function(module, exports, __webpack_require__) { 564 | 565 | /* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* 566 | 2017 Julian Garnier 567 | Released under the MIT license 568 | */ 569 | var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(e,r,p){if(p.get||p.set)throw new TypeError("ES3 does not support getters and setters.");e!=Array.prototype&&e!=Object.prototype&&(e[r]=p.value)};$jscomp.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:"undefined"!=typeof global&&null!=global?global:e};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_"; 570 | $jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(e){return $jscomp.SYMBOL_PREFIX+(e||"")+$jscomp.symbolCounter_++}; 571 | $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var e=$jscomp.global.Symbol.iterator;e||(e=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[e]&&$jscomp.defineProperty(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(e){var r=0;return $jscomp.iteratorPrototype(function(){return rb&&(b+=1);1b?c:b<2/3?a+(c-a)*(2/3-b)*6:a}var d=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a=parseInt(d[1])/360;var b=parseInt(d[2])/100,f=parseInt(d[3])/100,d=d[4]||1;if(0==b)f=b=a=f;else{var n=.5>f?f*(1+b):f+b-f*b,k=2*f-n,f=c(k,n,a+1/3),b=c(k,n,a);a=c(k,n,a-1/3)}return"rgba("+ 580 | 255*f+","+255*b+","+255*a+","+d+")"}function y(a){if(a=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a))return a[2]}function V(a){if(-1=g.currentTime)for(var G=0;G=w||!k)g.began||(g.began=!0,f("begin")),f("run");if(q>n&&q=k&&r!==k||!k)b(k),x||e();f("update");a>=k&&(g.remaining?(t=h,"alternate"===g.direction&&(g.reversed=!g.reversed)):(g.pause(),g.completed||(g.completed=!0,f("complete"),"Promise"in window&&(p(),m=c()))),l=0)}a=void 0===a?{}:a;var h,t,l=0,p=null,m=c(),g=fa(a);g.reset=function(){var a=g.direction,c=g.loop;g.currentTime= 592 | 0;g.progress=0;g.paused=!0;g.began=!1;g.completed=!1;g.reversed="reverse"===a;g.remaining="alternate"===a&&1===c?2:c;b(0);for(a=g.children.length;a--;)g.children[a].reset()};g.tick=function(a){h=a;t||(t=h);k((l+h-t)*q.speed)};g.seek=function(a){k(d(a))};g.pause=function(){var a=v.indexOf(g);-1=c&&0<=b&&1>=b){var e=new Float32Array(11);if(c!==d||b!==f)for(var k=0;11>k;++k)e[k]=a(.1*k,c,b);return function(k){if(c===d&&b===f)return k;if(0===k)return 0;if(1===k)return 1;for(var h=0,l=1;10!==l&&e[l]<=k;++l)h+=.1;--l;var l=h+(k-e[l])/(e[l+1]-e[l])*.1,n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(.001<=n){for(h=0;4>h;++h){n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(0===n)break;var m=a(l,c,b)-k,l=l-m/n}k=l}else if(0=== 596 | n)k=l;else{var l=h,h=h+.1,g=0;do m=l+(h-l)/2,n=a(m,c,b)-k,0++g);k=m}return a(k,d,f)}}}}(),Q=function(){function a(a,b){return 0===a||1===a?a:-Math.pow(2,10*(a-1))*Math.sin(2*(a-1-b/(2*Math.PI)*Math.asin(1))*Math.PI/b)}var c="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),d={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],a],Out:[[.25, 597 | .46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(b,c){return 1-a(1-b,c)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(b,c){return.5>b?a(2*b,c)/2:1-a(-2*b+2,c)/2}]},b={linear:A(.25,.25,.75,.75)},f={},e;for(e in d)f.type=e,d[f.type].forEach(function(a){return function(d,f){b["ease"+a.type+c[f]]=h.fnc(d)? 598 | d:A.apply($jscomp$this,d)}}(f)),f={type:f.type};return b}(),ha={css:function(a,c,d){return a.style[c]=d},attribute:function(a,c,d){return a.setAttribute(c,d)},object:function(a,c,d){return a[c]=d},transform:function(a,c,d,b,f){b[f]||(b[f]=[]);b[f].push(c+"("+d+")")}},v=[],B=0,ia=function(){function a(){B=requestAnimationFrame(c)}function c(c){var b=v.length;if(b){for(var d=0;db&&(c.duration=d.duration);c.children.push(d)});c.seek(0);c.reset();c.autoplay&&c.restart();return c};return c};q.random=function(a,c){return Math.floor(Math.random()*(c-a+1))+a};return q}); 601 | /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba"))) 602 | 603 | /***/ }), 604 | 605 | /***/ "5ca1": 606 | /***/ (function(module, exports, __webpack_require__) { 607 | 608 | var global = __webpack_require__("7726"); 609 | var core = __webpack_require__("8378"); 610 | var hide = __webpack_require__("32e9"); 611 | var redefine = __webpack_require__("2aba"); 612 | var ctx = __webpack_require__("9b43"); 613 | var PROTOTYPE = 'prototype'; 614 | 615 | var $export = function (type, name, source) { 616 | var IS_FORCED = type & $export.F; 617 | var IS_GLOBAL = type & $export.G; 618 | var IS_STATIC = type & $export.S; 619 | var IS_PROTO = type & $export.P; 620 | var IS_BIND = type & $export.B; 621 | var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; 622 | var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); 623 | var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); 624 | var key, own, out, exp; 625 | if (IS_GLOBAL) source = name; 626 | for (key in source) { 627 | // contains in native 628 | own = !IS_FORCED && target && target[key] !== undefined; 629 | // export native or passed 630 | out = (own ? target : source)[key]; 631 | // bind timers to global for call from export context 632 | exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; 633 | // extend global 634 | if (target) redefine(target, key, out, type & $export.U); 635 | // export 636 | if (exports[key] != out) hide(exports, key, exp); 637 | if (IS_PROTO && expProto[key] != out) expProto[key] = out; 638 | } 639 | }; 640 | global.core = core; 641 | // type bitmap 642 | $export.F = 1; // forced 643 | $export.G = 2; // global 644 | $export.S = 4; // static 645 | $export.P = 8; // proto 646 | $export.B = 16; // bind 647 | $export.W = 32; // wrap 648 | $export.U = 64; // safe 649 | $export.R = 128; // real proto method for `library` 650 | module.exports = $export; 651 | 652 | 653 | /***/ }), 654 | 655 | /***/ "5dbc": 656 | /***/ (function(module, exports, __webpack_require__) { 657 | 658 | var isObject = __webpack_require__("d3f4"); 659 | var setPrototypeOf = __webpack_require__("8b97").set; 660 | module.exports = function (that, target, C) { 661 | var S = target.constructor; 662 | var P; 663 | if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { 664 | setPrototypeOf(that, P); 665 | } return that; 666 | }; 667 | 668 | 669 | /***/ }), 670 | 671 | /***/ "613b": 672 | /***/ (function(module, exports, __webpack_require__) { 673 | 674 | var shared = __webpack_require__("5537")('keys'); 675 | var uid = __webpack_require__("ca5a"); 676 | module.exports = function (key) { 677 | return shared[key] || (shared[key] = uid(key)); 678 | }; 679 | 680 | 681 | /***/ }), 682 | 683 | /***/ "626a": 684 | /***/ (function(module, exports, __webpack_require__) { 685 | 686 | // fallback for non-array-like ES3 and non-enumerable old V8 strings 687 | var cof = __webpack_require__("2d95"); 688 | // eslint-disable-next-line no-prototype-builtins 689 | module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { 690 | return cof(it) == 'String' ? it.split('') : Object(it); 691 | }; 692 | 693 | 694 | /***/ }), 695 | 696 | /***/ "6762": 697 | /***/ (function(module, exports, __webpack_require__) { 698 | 699 | "use strict"; 700 | 701 | // https://github.com/tc39/Array.prototype.includes 702 | var $export = __webpack_require__("5ca1"); 703 | var $includes = __webpack_require__("c366")(true); 704 | 705 | $export($export.P, 'Array', { 706 | includes: function includes(el /* , fromIndex = 0 */) { 707 | return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); 708 | } 709 | }); 710 | 711 | __webpack_require__("9c6c")('includes'); 712 | 713 | 714 | /***/ }), 715 | 716 | /***/ "67ab": 717 | /***/ (function(module, exports, __webpack_require__) { 718 | 719 | var META = __webpack_require__("ca5a")('meta'); 720 | var isObject = __webpack_require__("d3f4"); 721 | var has = __webpack_require__("69a8"); 722 | var setDesc = __webpack_require__("86cc").f; 723 | var id = 0; 724 | var isExtensible = Object.isExtensible || function () { 725 | return true; 726 | }; 727 | var FREEZE = !__webpack_require__("79e5")(function () { 728 | return isExtensible(Object.preventExtensions({})); 729 | }); 730 | var setMeta = function (it) { 731 | setDesc(it, META, { value: { 732 | i: 'O' + ++id, // object ID 733 | w: {} // weak collections IDs 734 | } }); 735 | }; 736 | var fastKey = function (it, create) { 737 | // return primitive with prefix 738 | if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; 739 | if (!has(it, META)) { 740 | // can't set metadata to uncaught frozen object 741 | if (!isExtensible(it)) return 'F'; 742 | // not necessary to add metadata 743 | if (!create) return 'E'; 744 | // add missing metadata 745 | setMeta(it); 746 | // return object ID 747 | } return it[META].i; 748 | }; 749 | var getWeak = function (it, create) { 750 | if (!has(it, META)) { 751 | // can't set metadata to uncaught frozen object 752 | if (!isExtensible(it)) return true; 753 | // not necessary to add metadata 754 | if (!create) return false; 755 | // add missing metadata 756 | setMeta(it); 757 | // return hash weak collections IDs 758 | } return it[META].w; 759 | }; 760 | // add metadata on freeze-family methods calling 761 | var onFreeze = function (it) { 762 | if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); 763 | return it; 764 | }; 765 | var meta = module.exports = { 766 | KEY: META, 767 | NEED: false, 768 | fastKey: fastKey, 769 | getWeak: getWeak, 770 | onFreeze: onFreeze 771 | }; 772 | 773 | 774 | /***/ }), 775 | 776 | /***/ "6821": 777 | /***/ (function(module, exports, __webpack_require__) { 778 | 779 | // to indexed object, toObject with fallback for non-array-like ES3 strings 780 | var IObject = __webpack_require__("626a"); 781 | var defined = __webpack_require__("be13"); 782 | module.exports = function (it) { 783 | return IObject(defined(it)); 784 | }; 785 | 786 | 787 | /***/ }), 788 | 789 | /***/ "69a8": 790 | /***/ (function(module, exports) { 791 | 792 | var hasOwnProperty = {}.hasOwnProperty; 793 | module.exports = function (it, key) { 794 | return hasOwnProperty.call(it, key); 795 | }; 796 | 797 | 798 | /***/ }), 799 | 800 | /***/ "6a99": 801 | /***/ (function(module, exports, __webpack_require__) { 802 | 803 | // 7.1.1 ToPrimitive(input [, PreferredType]) 804 | var isObject = __webpack_require__("d3f4"); 805 | // instead of the ES6 spec version, we didn't implement @@toPrimitive case 806 | // and the second argument - flag - preferred type is a string 807 | module.exports = function (it, S) { 808 | if (!isObject(it)) return it; 809 | var fn, val; 810 | if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; 811 | if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; 812 | if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; 813 | throw TypeError("Can't convert object to primitive value"); 814 | }; 815 | 816 | 817 | /***/ }), 818 | 819 | /***/ "6b54": 820 | /***/ (function(module, exports, __webpack_require__) { 821 | 822 | "use strict"; 823 | 824 | __webpack_require__("3846"); 825 | var anObject = __webpack_require__("cb7c"); 826 | var $flags = __webpack_require__("0bfb"); 827 | var DESCRIPTORS = __webpack_require__("9e1e"); 828 | var TO_STRING = 'toString'; 829 | var $toString = /./[TO_STRING]; 830 | 831 | var define = function (fn) { 832 | __webpack_require__("2aba")(RegExp.prototype, TO_STRING, fn, true); 833 | }; 834 | 835 | // 21.2.5.14 RegExp.prototype.toString() 836 | if (__webpack_require__("79e5")(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { 837 | define(function toString() { 838 | var R = anObject(this); 839 | return '/'.concat(R.source, '/', 840 | 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); 841 | }); 842 | // FF44- RegExp#toString has a wrong name 843 | } else if ($toString.name != TO_STRING) { 844 | define(function toString() { 845 | return $toString.call(this); 846 | }); 847 | } 848 | 849 | 850 | /***/ }), 851 | 852 | /***/ "7333": 853 | /***/ (function(module, exports, __webpack_require__) { 854 | 855 | "use strict"; 856 | 857 | // 19.1.2.1 Object.assign(target, source, ...) 858 | var getKeys = __webpack_require__("0d58"); 859 | var gOPS = __webpack_require__("2621"); 860 | var pIE = __webpack_require__("52a7"); 861 | var toObject = __webpack_require__("4bf8"); 862 | var IObject = __webpack_require__("626a"); 863 | var $assign = Object.assign; 864 | 865 | // should work with symbols and should have deterministic property order (V8 bug) 866 | module.exports = !$assign || __webpack_require__("79e5")(function () { 867 | var A = {}; 868 | var B = {}; 869 | // eslint-disable-next-line no-undef 870 | var S = Symbol(); 871 | var K = 'abcdefghijklmnopqrst'; 872 | A[S] = 7; 873 | K.split('').forEach(function (k) { B[k] = k; }); 874 | return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; 875 | }) ? function assign(target, source) { // eslint-disable-line no-unused-vars 876 | var T = toObject(target); 877 | var aLen = arguments.length; 878 | var index = 1; 879 | var getSymbols = gOPS.f; 880 | var isEnum = pIE.f; 881 | while (aLen > index) { 882 | var S = IObject(arguments[index++]); 883 | var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); 884 | var length = keys.length; 885 | var j = 0; 886 | var key; 887 | while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; 888 | } return T; 889 | } : $assign; 890 | 891 | 892 | /***/ }), 893 | 894 | /***/ "7726": 895 | /***/ (function(module, exports) { 896 | 897 | // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 898 | var global = module.exports = typeof window != 'undefined' && window.Math == Math 899 | ? window : typeof self != 'undefined' && self.Math == Math ? self 900 | // eslint-disable-next-line no-new-func 901 | : Function('return this')(); 902 | if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef 903 | 904 | 905 | /***/ }), 906 | 907 | /***/ "77f1": 908 | /***/ (function(module, exports, __webpack_require__) { 909 | 910 | var toInteger = __webpack_require__("4588"); 911 | var max = Math.max; 912 | var min = Math.min; 913 | module.exports = function (index, length) { 914 | index = toInteger(index); 915 | return index < 0 ? max(index + length, 0) : min(index, length); 916 | }; 917 | 918 | 919 | /***/ }), 920 | 921 | /***/ "79e5": 922 | /***/ (function(module, exports) { 923 | 924 | module.exports = function (exec) { 925 | try { 926 | return !!exec(); 927 | } catch (e) { 928 | return true; 929 | } 930 | }; 931 | 932 | 933 | /***/ }), 934 | 935 | /***/ "7bbc": 936 | /***/ (function(module, exports, __webpack_require__) { 937 | 938 | // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window 939 | var toIObject = __webpack_require__("6821"); 940 | var gOPN = __webpack_require__("9093").f; 941 | var toString = {}.toString; 942 | 943 | var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames 944 | ? Object.getOwnPropertyNames(window) : []; 945 | 946 | var getWindowNames = function (it) { 947 | try { 948 | return gOPN(it); 949 | } catch (e) { 950 | return windowNames.slice(); 951 | } 952 | }; 953 | 954 | module.exports.f = function getOwnPropertyNames(it) { 955 | return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); 956 | }; 957 | 958 | 959 | /***/ }), 960 | 961 | /***/ "7f20": 962 | /***/ (function(module, exports, __webpack_require__) { 963 | 964 | var def = __webpack_require__("86cc").f; 965 | var has = __webpack_require__("69a8"); 966 | var TAG = __webpack_require__("2b4c")('toStringTag'); 967 | 968 | module.exports = function (it, tag, stat) { 969 | if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); 970 | }; 971 | 972 | 973 | /***/ }), 974 | 975 | /***/ "8378": 976 | /***/ (function(module, exports) { 977 | 978 | var core = module.exports = { version: '2.5.7' }; 979 | if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef 980 | 981 | 982 | /***/ }), 983 | 984 | /***/ "84f2": 985 | /***/ (function(module, exports) { 986 | 987 | module.exports = {}; 988 | 989 | 990 | /***/ }), 991 | 992 | /***/ "86cc": 993 | /***/ (function(module, exports, __webpack_require__) { 994 | 995 | var anObject = __webpack_require__("cb7c"); 996 | var IE8_DOM_DEFINE = __webpack_require__("c69a"); 997 | var toPrimitive = __webpack_require__("6a99"); 998 | var dP = Object.defineProperty; 999 | 1000 | exports.f = __webpack_require__("9e1e") ? Object.defineProperty : function defineProperty(O, P, Attributes) { 1001 | anObject(O); 1002 | P = toPrimitive(P, true); 1003 | anObject(Attributes); 1004 | if (IE8_DOM_DEFINE) try { 1005 | return dP(O, P, Attributes); 1006 | } catch (e) { /* empty */ } 1007 | if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); 1008 | if ('value' in Attributes) O[P] = Attributes.value; 1009 | return O; 1010 | }; 1011 | 1012 | 1013 | /***/ }), 1014 | 1015 | /***/ "8a81": 1016 | /***/ (function(module, exports, __webpack_require__) { 1017 | 1018 | "use strict"; 1019 | 1020 | // ECMAScript 6 symbols shim 1021 | var global = __webpack_require__("7726"); 1022 | var has = __webpack_require__("69a8"); 1023 | var DESCRIPTORS = __webpack_require__("9e1e"); 1024 | var $export = __webpack_require__("5ca1"); 1025 | var redefine = __webpack_require__("2aba"); 1026 | var META = __webpack_require__("67ab").KEY; 1027 | var $fails = __webpack_require__("79e5"); 1028 | var shared = __webpack_require__("5537"); 1029 | var setToStringTag = __webpack_require__("7f20"); 1030 | var uid = __webpack_require__("ca5a"); 1031 | var wks = __webpack_require__("2b4c"); 1032 | var wksExt = __webpack_require__("37c8"); 1033 | var wksDefine = __webpack_require__("3a72"); 1034 | var enumKeys = __webpack_require__("d4c0"); 1035 | var isArray = __webpack_require__("1169"); 1036 | var anObject = __webpack_require__("cb7c"); 1037 | var isObject = __webpack_require__("d3f4"); 1038 | var toIObject = __webpack_require__("6821"); 1039 | var toPrimitive = __webpack_require__("6a99"); 1040 | var createDesc = __webpack_require__("4630"); 1041 | var _create = __webpack_require__("2aeb"); 1042 | var gOPNExt = __webpack_require__("7bbc"); 1043 | var $GOPD = __webpack_require__("11e9"); 1044 | var $DP = __webpack_require__("86cc"); 1045 | var $keys = __webpack_require__("0d58"); 1046 | var gOPD = $GOPD.f; 1047 | var dP = $DP.f; 1048 | var gOPN = gOPNExt.f; 1049 | var $Symbol = global.Symbol; 1050 | var $JSON = global.JSON; 1051 | var _stringify = $JSON && $JSON.stringify; 1052 | var PROTOTYPE = 'prototype'; 1053 | var HIDDEN = wks('_hidden'); 1054 | var TO_PRIMITIVE = wks('toPrimitive'); 1055 | var isEnum = {}.propertyIsEnumerable; 1056 | var SymbolRegistry = shared('symbol-registry'); 1057 | var AllSymbols = shared('symbols'); 1058 | var OPSymbols = shared('op-symbols'); 1059 | var ObjectProto = Object[PROTOTYPE]; 1060 | var USE_NATIVE = typeof $Symbol == 'function'; 1061 | var QObject = global.QObject; 1062 | // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 1063 | var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; 1064 | 1065 | // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 1066 | var setSymbolDesc = DESCRIPTORS && $fails(function () { 1067 | return _create(dP({}, 'a', { 1068 | get: function () { return dP(this, 'a', { value: 7 }).a; } 1069 | })).a != 7; 1070 | }) ? function (it, key, D) { 1071 | var protoDesc = gOPD(ObjectProto, key); 1072 | if (protoDesc) delete ObjectProto[key]; 1073 | dP(it, key, D); 1074 | if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); 1075 | } : dP; 1076 | 1077 | var wrap = function (tag) { 1078 | var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); 1079 | sym._k = tag; 1080 | return sym; 1081 | }; 1082 | 1083 | var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { 1084 | return typeof it == 'symbol'; 1085 | } : function (it) { 1086 | return it instanceof $Symbol; 1087 | }; 1088 | 1089 | var $defineProperty = function defineProperty(it, key, D) { 1090 | if (it === ObjectProto) $defineProperty(OPSymbols, key, D); 1091 | anObject(it); 1092 | key = toPrimitive(key, true); 1093 | anObject(D); 1094 | if (has(AllSymbols, key)) { 1095 | if (!D.enumerable) { 1096 | if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); 1097 | it[HIDDEN][key] = true; 1098 | } else { 1099 | if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; 1100 | D = _create(D, { enumerable: createDesc(0, false) }); 1101 | } return setSymbolDesc(it, key, D); 1102 | } return dP(it, key, D); 1103 | }; 1104 | var $defineProperties = function defineProperties(it, P) { 1105 | anObject(it); 1106 | var keys = enumKeys(P = toIObject(P)); 1107 | var i = 0; 1108 | var l = keys.length; 1109 | var key; 1110 | while (l > i) $defineProperty(it, key = keys[i++], P[key]); 1111 | return it; 1112 | }; 1113 | var $create = function create(it, P) { 1114 | return P === undefined ? _create(it) : $defineProperties(_create(it), P); 1115 | }; 1116 | var $propertyIsEnumerable = function propertyIsEnumerable(key) { 1117 | var E = isEnum.call(this, key = toPrimitive(key, true)); 1118 | if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; 1119 | return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; 1120 | }; 1121 | var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { 1122 | it = toIObject(it); 1123 | key = toPrimitive(key, true); 1124 | if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; 1125 | var D = gOPD(it, key); 1126 | if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; 1127 | return D; 1128 | }; 1129 | var $getOwnPropertyNames = function getOwnPropertyNames(it) { 1130 | var names = gOPN(toIObject(it)); 1131 | var result = []; 1132 | var i = 0; 1133 | var key; 1134 | while (names.length > i) { 1135 | if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); 1136 | } return result; 1137 | }; 1138 | var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { 1139 | var IS_OP = it === ObjectProto; 1140 | var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); 1141 | var result = []; 1142 | var i = 0; 1143 | var key; 1144 | while (names.length > i) { 1145 | if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); 1146 | } return result; 1147 | }; 1148 | 1149 | // 19.4.1.1 Symbol([description]) 1150 | if (!USE_NATIVE) { 1151 | $Symbol = function Symbol() { 1152 | if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); 1153 | var tag = uid(arguments.length > 0 ? arguments[0] : undefined); 1154 | var $set = function (value) { 1155 | if (this === ObjectProto) $set.call(OPSymbols, value); 1156 | if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; 1157 | setSymbolDesc(this, tag, createDesc(1, value)); 1158 | }; 1159 | if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); 1160 | return wrap(tag); 1161 | }; 1162 | redefine($Symbol[PROTOTYPE], 'toString', function toString() { 1163 | return this._k; 1164 | }); 1165 | 1166 | $GOPD.f = $getOwnPropertyDescriptor; 1167 | $DP.f = $defineProperty; 1168 | __webpack_require__("9093").f = gOPNExt.f = $getOwnPropertyNames; 1169 | __webpack_require__("52a7").f = $propertyIsEnumerable; 1170 | __webpack_require__("2621").f = $getOwnPropertySymbols; 1171 | 1172 | if (DESCRIPTORS && !__webpack_require__("2d00")) { 1173 | redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); 1174 | } 1175 | 1176 | wksExt.f = function (name) { 1177 | return wrap(wks(name)); 1178 | }; 1179 | } 1180 | 1181 | $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); 1182 | 1183 | for (var es6Symbols = ( 1184 | // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 1185 | 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' 1186 | ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); 1187 | 1188 | for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); 1189 | 1190 | $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { 1191 | // 19.4.2.1 Symbol.for(key) 1192 | 'for': function (key) { 1193 | return has(SymbolRegistry, key += '') 1194 | ? SymbolRegistry[key] 1195 | : SymbolRegistry[key] = $Symbol(key); 1196 | }, 1197 | // 19.4.2.5 Symbol.keyFor(sym) 1198 | keyFor: function keyFor(sym) { 1199 | if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); 1200 | for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; 1201 | }, 1202 | useSetter: function () { setter = true; }, 1203 | useSimple: function () { setter = false; } 1204 | }); 1205 | 1206 | $export($export.S + $export.F * !USE_NATIVE, 'Object', { 1207 | // 19.1.2.2 Object.create(O [, Properties]) 1208 | create: $create, 1209 | // 19.1.2.4 Object.defineProperty(O, P, Attributes) 1210 | defineProperty: $defineProperty, 1211 | // 19.1.2.3 Object.defineProperties(O, Properties) 1212 | defineProperties: $defineProperties, 1213 | // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) 1214 | getOwnPropertyDescriptor: $getOwnPropertyDescriptor, 1215 | // 19.1.2.7 Object.getOwnPropertyNames(O) 1216 | getOwnPropertyNames: $getOwnPropertyNames, 1217 | // 19.1.2.8 Object.getOwnPropertySymbols(O) 1218 | getOwnPropertySymbols: $getOwnPropertySymbols 1219 | }); 1220 | 1221 | // 24.3.2 JSON.stringify(value [, replacer [, space]]) 1222 | $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { 1223 | var S = $Symbol(); 1224 | // MS Edge converts symbol values to JSON as {} 1225 | // WebKit converts symbol values to JSON as null 1226 | // V8 throws on boxed symbols 1227 | return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; 1228 | })), 'JSON', { 1229 | stringify: function stringify(it) { 1230 | var args = [it]; 1231 | var i = 1; 1232 | var replacer, $replacer; 1233 | while (arguments.length > i) args.push(arguments[i++]); 1234 | $replacer = replacer = args[1]; 1235 | if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined 1236 | if (!isArray(replacer)) replacer = function (key, value) { 1237 | if (typeof $replacer == 'function') value = $replacer.call(this, key, value); 1238 | if (!isSymbol(value)) return value; 1239 | }; 1240 | args[1] = replacer; 1241 | return _stringify.apply($JSON, args); 1242 | } 1243 | }); 1244 | 1245 | // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) 1246 | $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__("32e9")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); 1247 | // 19.4.3.5 Symbol.prototype[@@toStringTag] 1248 | setToStringTag($Symbol, 'Symbol'); 1249 | // 20.2.1.9 Math[@@toStringTag] 1250 | setToStringTag(Math, 'Math', true); 1251 | // 24.3.3 JSON[@@toStringTag] 1252 | setToStringTag(global.JSON, 'JSON', true); 1253 | 1254 | 1255 | /***/ }), 1256 | 1257 | /***/ "8b97": 1258 | /***/ (function(module, exports, __webpack_require__) { 1259 | 1260 | // Works with __proto__ only. Old v8 can't work with null proto objects. 1261 | /* eslint-disable no-proto */ 1262 | var isObject = __webpack_require__("d3f4"); 1263 | var anObject = __webpack_require__("cb7c"); 1264 | var check = function (O, proto) { 1265 | anObject(O); 1266 | if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); 1267 | }; 1268 | module.exports = { 1269 | set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line 1270 | function (test, buggy, set) { 1271 | try { 1272 | set = __webpack_require__("9b43")(Function.call, __webpack_require__("11e9").f(Object.prototype, '__proto__').set, 2); 1273 | set(test, []); 1274 | buggy = !(test instanceof Array); 1275 | } catch (e) { buggy = true; } 1276 | return function setPrototypeOf(O, proto) { 1277 | check(O, proto); 1278 | if (buggy) O.__proto__ = proto; 1279 | else set(O, proto); 1280 | return O; 1281 | }; 1282 | }({}, false) : undefined), 1283 | check: check 1284 | }; 1285 | 1286 | 1287 | /***/ }), 1288 | 1289 | /***/ "9093": 1290 | /***/ (function(module, exports, __webpack_require__) { 1291 | 1292 | // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) 1293 | var $keys = __webpack_require__("ce10"); 1294 | var hiddenKeys = __webpack_require__("e11e").concat('length', 'prototype'); 1295 | 1296 | exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { 1297 | return $keys(O, hiddenKeys); 1298 | }; 1299 | 1300 | 1301 | /***/ }), 1302 | 1303 | /***/ "9b43": 1304 | /***/ (function(module, exports, __webpack_require__) { 1305 | 1306 | // optional / simple context binding 1307 | var aFunction = __webpack_require__("d8e8"); 1308 | module.exports = function (fn, that, length) { 1309 | aFunction(fn); 1310 | if (that === undefined) return fn; 1311 | switch (length) { 1312 | case 1: return function (a) { 1313 | return fn.call(that, a); 1314 | }; 1315 | case 2: return function (a, b) { 1316 | return fn.call(that, a, b); 1317 | }; 1318 | case 3: return function (a, b, c) { 1319 | return fn.call(that, a, b, c); 1320 | }; 1321 | } 1322 | return function (/* ...args */) { 1323 | return fn.apply(that, arguments); 1324 | }; 1325 | }; 1326 | 1327 | 1328 | /***/ }), 1329 | 1330 | /***/ "9c6c": 1331 | /***/ (function(module, exports, __webpack_require__) { 1332 | 1333 | // 22.1.3.31 Array.prototype[@@unscopables] 1334 | var UNSCOPABLES = __webpack_require__("2b4c")('unscopables'); 1335 | var ArrayProto = Array.prototype; 1336 | if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("32e9")(ArrayProto, UNSCOPABLES, {}); 1337 | module.exports = function (key) { 1338 | ArrayProto[UNSCOPABLES][key] = true; 1339 | }; 1340 | 1341 | 1342 | /***/ }), 1343 | 1344 | /***/ "9def": 1345 | /***/ (function(module, exports, __webpack_require__) { 1346 | 1347 | // 7.1.15 ToLength 1348 | var toInteger = __webpack_require__("4588"); 1349 | var min = Math.min; 1350 | module.exports = function (it) { 1351 | return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 1352 | }; 1353 | 1354 | 1355 | /***/ }), 1356 | 1357 | /***/ "9e1e": 1358 | /***/ (function(module, exports, __webpack_require__) { 1359 | 1360 | // Thank's IE8 for his funny defineProperty 1361 | module.exports = !__webpack_require__("79e5")(function () { 1362 | return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; 1363 | }); 1364 | 1365 | 1366 | /***/ }), 1367 | 1368 | /***/ "aa77": 1369 | /***/ (function(module, exports, __webpack_require__) { 1370 | 1371 | var $export = __webpack_require__("5ca1"); 1372 | var defined = __webpack_require__("be13"); 1373 | var fails = __webpack_require__("79e5"); 1374 | var spaces = __webpack_require__("fdef"); 1375 | var space = '[' + spaces + ']'; 1376 | var non = '\u200b\u0085'; 1377 | var ltrim = RegExp('^' + space + space + '*'); 1378 | var rtrim = RegExp(space + space + '*$'); 1379 | 1380 | var exporter = function (KEY, exec, ALIAS) { 1381 | var exp = {}; 1382 | var FORCE = fails(function () { 1383 | return !!spaces[KEY]() || non[KEY]() != non; 1384 | }); 1385 | var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; 1386 | if (ALIAS) exp[ALIAS] = fn; 1387 | $export($export.P + $export.F * FORCE, 'String', exp); 1388 | }; 1389 | 1390 | // 1 -> String#trimLeft 1391 | // 2 -> String#trimRight 1392 | // 3 -> String#trim 1393 | var trim = exporter.trim = function (string, TYPE) { 1394 | string = String(defined(string)); 1395 | if (TYPE & 1) string = string.replace(ltrim, ''); 1396 | if (TYPE & 2) string = string.replace(rtrim, ''); 1397 | return string; 1398 | }; 1399 | 1400 | module.exports = exporter; 1401 | 1402 | 1403 | /***/ }), 1404 | 1405 | /***/ "ac4d": 1406 | /***/ (function(module, exports, __webpack_require__) { 1407 | 1408 | __webpack_require__("3a72")('asyncIterator'); 1409 | 1410 | 1411 | /***/ }), 1412 | 1413 | /***/ "ac6a": 1414 | /***/ (function(module, exports, __webpack_require__) { 1415 | 1416 | var $iterators = __webpack_require__("cadf"); 1417 | var getKeys = __webpack_require__("0d58"); 1418 | var redefine = __webpack_require__("2aba"); 1419 | var global = __webpack_require__("7726"); 1420 | var hide = __webpack_require__("32e9"); 1421 | var Iterators = __webpack_require__("84f2"); 1422 | var wks = __webpack_require__("2b4c"); 1423 | var ITERATOR = wks('iterator'); 1424 | var TO_STRING_TAG = wks('toStringTag'); 1425 | var ArrayValues = Iterators.Array; 1426 | 1427 | var DOMIterables = { 1428 | CSSRuleList: true, // TODO: Not spec compliant, should be false. 1429 | CSSStyleDeclaration: false, 1430 | CSSValueList: false, 1431 | ClientRectList: false, 1432 | DOMRectList: false, 1433 | DOMStringList: false, 1434 | DOMTokenList: true, 1435 | DataTransferItemList: false, 1436 | FileList: false, 1437 | HTMLAllCollection: false, 1438 | HTMLCollection: false, 1439 | HTMLFormElement: false, 1440 | HTMLSelectElement: false, 1441 | MediaList: true, // TODO: Not spec compliant, should be false. 1442 | MimeTypeArray: false, 1443 | NamedNodeMap: false, 1444 | NodeList: true, 1445 | PaintRequestList: false, 1446 | Plugin: false, 1447 | PluginArray: false, 1448 | SVGLengthList: false, 1449 | SVGNumberList: false, 1450 | SVGPathSegList: false, 1451 | SVGPointList: false, 1452 | SVGStringList: false, 1453 | SVGTransformList: false, 1454 | SourceBufferList: false, 1455 | StyleSheetList: true, // TODO: Not spec compliant, should be false. 1456 | TextTrackCueList: false, 1457 | TextTrackList: false, 1458 | TouchList: false 1459 | }; 1460 | 1461 | for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { 1462 | var NAME = collections[i]; 1463 | var explicit = DOMIterables[NAME]; 1464 | var Collection = global[NAME]; 1465 | var proto = Collection && Collection.prototype; 1466 | var key; 1467 | if (proto) { 1468 | if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); 1469 | if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); 1470 | Iterators[NAME] = ArrayValues; 1471 | if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); 1472 | } 1473 | } 1474 | 1475 | 1476 | /***/ }), 1477 | 1478 | /***/ "be13": 1479 | /***/ (function(module, exports) { 1480 | 1481 | // 7.2.1 RequireObjectCoercible(argument) 1482 | module.exports = function (it) { 1483 | if (it == undefined) throw TypeError("Can't call method on " + it); 1484 | return it; 1485 | }; 1486 | 1487 | 1488 | /***/ }), 1489 | 1490 | /***/ "c366": 1491 | /***/ (function(module, exports, __webpack_require__) { 1492 | 1493 | // false -> Array#indexOf 1494 | // true -> Array#includes 1495 | var toIObject = __webpack_require__("6821"); 1496 | var toLength = __webpack_require__("9def"); 1497 | var toAbsoluteIndex = __webpack_require__("77f1"); 1498 | module.exports = function (IS_INCLUDES) { 1499 | return function ($this, el, fromIndex) { 1500 | var O = toIObject($this); 1501 | var length = toLength(O.length); 1502 | var index = toAbsoluteIndex(fromIndex, length); 1503 | var value; 1504 | // Array#includes uses SameValueZero equality algorithm 1505 | // eslint-disable-next-line no-self-compare 1506 | if (IS_INCLUDES && el != el) while (length > index) { 1507 | value = O[index++]; 1508 | // eslint-disable-next-line no-self-compare 1509 | if (value != value) return true; 1510 | // Array#indexOf ignores holes, Array#includes - not 1511 | } else for (;length > index; index++) if (IS_INCLUDES || index in O) { 1512 | if (O[index] === el) return IS_INCLUDES || index || 0; 1513 | } return !IS_INCLUDES && -1; 1514 | }; 1515 | }; 1516 | 1517 | 1518 | /***/ }), 1519 | 1520 | /***/ "c5f6": 1521 | /***/ (function(module, exports, __webpack_require__) { 1522 | 1523 | "use strict"; 1524 | 1525 | var global = __webpack_require__("7726"); 1526 | var has = __webpack_require__("69a8"); 1527 | var cof = __webpack_require__("2d95"); 1528 | var inheritIfRequired = __webpack_require__("5dbc"); 1529 | var toPrimitive = __webpack_require__("6a99"); 1530 | var fails = __webpack_require__("79e5"); 1531 | var gOPN = __webpack_require__("9093").f; 1532 | var gOPD = __webpack_require__("11e9").f; 1533 | var dP = __webpack_require__("86cc").f; 1534 | var $trim = __webpack_require__("aa77").trim; 1535 | var NUMBER = 'Number'; 1536 | var $Number = global[NUMBER]; 1537 | var Base = $Number; 1538 | var proto = $Number.prototype; 1539 | // Opera ~12 has broken Object#toString 1540 | var BROKEN_COF = cof(__webpack_require__("2aeb")(proto)) == NUMBER; 1541 | var TRIM = 'trim' in String.prototype; 1542 | 1543 | // 7.1.3 ToNumber(argument) 1544 | var toNumber = function (argument) { 1545 | var it = toPrimitive(argument, false); 1546 | if (typeof it == 'string' && it.length > 2) { 1547 | it = TRIM ? it.trim() : $trim(it, 3); 1548 | var first = it.charCodeAt(0); 1549 | var third, radix, maxCode; 1550 | if (first === 43 || first === 45) { 1551 | third = it.charCodeAt(2); 1552 | if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix 1553 | } else if (first === 48) { 1554 | switch (it.charCodeAt(1)) { 1555 | case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i 1556 | case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i 1557 | default: return +it; 1558 | } 1559 | for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { 1560 | code = digits.charCodeAt(i); 1561 | // parseInt parses a string to a first unavailable symbol 1562 | // but ToNumber should return NaN if a string contains unavailable symbols 1563 | if (code < 48 || code > maxCode) return NaN; 1564 | } return parseInt(digits, radix); 1565 | } 1566 | } return +it; 1567 | }; 1568 | 1569 | if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { 1570 | $Number = function Number(value) { 1571 | var it = arguments.length < 1 ? 0 : value; 1572 | var that = this; 1573 | return that instanceof $Number 1574 | // check on 1..constructor(foo) case 1575 | && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER) 1576 | ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); 1577 | }; 1578 | for (var keys = __webpack_require__("9e1e") ? gOPN(Base) : ( 1579 | // ES3: 1580 | 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + 1581 | // ES6 (in case, if modules with ES6 Number statics required before): 1582 | 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 1583 | 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' 1584 | ).split(','), j = 0, key; keys.length > j; j++) { 1585 | if (has(Base, key = keys[j]) && !has($Number, key)) { 1586 | dP($Number, key, gOPD(Base, key)); 1587 | } 1588 | } 1589 | $Number.prototype = proto; 1590 | proto.constructor = $Number; 1591 | __webpack_require__("2aba")(global, NUMBER, $Number); 1592 | } 1593 | 1594 | 1595 | /***/ }), 1596 | 1597 | /***/ "c69a": 1598 | /***/ (function(module, exports, __webpack_require__) { 1599 | 1600 | module.exports = !__webpack_require__("9e1e") && !__webpack_require__("79e5")(function () { 1601 | return Object.defineProperty(__webpack_require__("230e")('div'), 'a', { get: function () { return 7; } }).a != 7; 1602 | }); 1603 | 1604 | 1605 | /***/ }), 1606 | 1607 | /***/ "c8ba": 1608 | /***/ (function(module, exports) { 1609 | 1610 | var g; 1611 | 1612 | // This works in non-strict mode 1613 | g = (function() { 1614 | return this; 1615 | })(); 1616 | 1617 | try { 1618 | // This works if eval is allowed (see CSP) 1619 | g = g || Function("return this")() || (1, eval)("this"); 1620 | } catch (e) { 1621 | // This works if the window reference is available 1622 | if (typeof window === "object") g = window; 1623 | } 1624 | 1625 | // g can still be undefined, but nothing to do about it... 1626 | // We return undefined, instead of nothing here, so it's 1627 | // easier to handle this case. if(!global) { ...} 1628 | 1629 | module.exports = g; 1630 | 1631 | 1632 | /***/ }), 1633 | 1634 | /***/ "ca5a": 1635 | /***/ (function(module, exports) { 1636 | 1637 | var id = 0; 1638 | var px = Math.random(); 1639 | module.exports = function (key) { 1640 | return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); 1641 | }; 1642 | 1643 | 1644 | /***/ }), 1645 | 1646 | /***/ "cadf": 1647 | /***/ (function(module, exports, __webpack_require__) { 1648 | 1649 | "use strict"; 1650 | 1651 | var addToUnscopables = __webpack_require__("9c6c"); 1652 | var step = __webpack_require__("d53b"); 1653 | var Iterators = __webpack_require__("84f2"); 1654 | var toIObject = __webpack_require__("6821"); 1655 | 1656 | // 22.1.3.4 Array.prototype.entries() 1657 | // 22.1.3.13 Array.prototype.keys() 1658 | // 22.1.3.29 Array.prototype.values() 1659 | // 22.1.3.30 Array.prototype[@@iterator]() 1660 | module.exports = __webpack_require__("01f9")(Array, 'Array', function (iterated, kind) { 1661 | this._t = toIObject(iterated); // target 1662 | this._i = 0; // next index 1663 | this._k = kind; // kind 1664 | // 22.1.5.2.1 %ArrayIteratorPrototype%.next() 1665 | }, function () { 1666 | var O = this._t; 1667 | var kind = this._k; 1668 | var index = this._i++; 1669 | if (!O || index >= O.length) { 1670 | this._t = undefined; 1671 | return step(1); 1672 | } 1673 | if (kind == 'keys') return step(0, index); 1674 | if (kind == 'values') return step(0, O[index]); 1675 | return step(0, [index, O[index]]); 1676 | }, 'values'); 1677 | 1678 | // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) 1679 | Iterators.Arguments = Iterators.Array; 1680 | 1681 | addToUnscopables('keys'); 1682 | addToUnscopables('values'); 1683 | addToUnscopables('entries'); 1684 | 1685 | 1686 | /***/ }), 1687 | 1688 | /***/ "cb7c": 1689 | /***/ (function(module, exports, __webpack_require__) { 1690 | 1691 | var isObject = __webpack_require__("d3f4"); 1692 | module.exports = function (it) { 1693 | if (!isObject(it)) throw TypeError(it + ' is not an object!'); 1694 | return it; 1695 | }; 1696 | 1697 | 1698 | /***/ }), 1699 | 1700 | /***/ "ce10": 1701 | /***/ (function(module, exports, __webpack_require__) { 1702 | 1703 | var has = __webpack_require__("69a8"); 1704 | var toIObject = __webpack_require__("6821"); 1705 | var arrayIndexOf = __webpack_require__("c366")(false); 1706 | var IE_PROTO = __webpack_require__("613b")('IE_PROTO'); 1707 | 1708 | module.exports = function (object, names) { 1709 | var O = toIObject(object); 1710 | var i = 0; 1711 | var result = []; 1712 | var key; 1713 | for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); 1714 | // Don't enum bug & hidden keys 1715 | while (names.length > i) if (has(O, key = names[i++])) { 1716 | ~arrayIndexOf(result, key) || result.push(key); 1717 | } 1718 | return result; 1719 | }; 1720 | 1721 | 1722 | /***/ }), 1723 | 1724 | /***/ "d3f4": 1725 | /***/ (function(module, exports) { 1726 | 1727 | module.exports = function (it) { 1728 | return typeof it === 'object' ? it !== null : typeof it === 'function'; 1729 | }; 1730 | 1731 | 1732 | /***/ }), 1733 | 1734 | /***/ "d4c0": 1735 | /***/ (function(module, exports, __webpack_require__) { 1736 | 1737 | // all enumerable object keys, includes symbols 1738 | var getKeys = __webpack_require__("0d58"); 1739 | var gOPS = __webpack_require__("2621"); 1740 | var pIE = __webpack_require__("52a7"); 1741 | module.exports = function (it) { 1742 | var result = getKeys(it); 1743 | var getSymbols = gOPS.f; 1744 | if (getSymbols) { 1745 | var symbols = getSymbols(it); 1746 | var isEnum = pIE.f; 1747 | var i = 0; 1748 | var key; 1749 | while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); 1750 | } return result; 1751 | }; 1752 | 1753 | 1754 | /***/ }), 1755 | 1756 | /***/ "d53b": 1757 | /***/ (function(module, exports) { 1758 | 1759 | module.exports = function (done, value) { 1760 | return { value: value, done: !!done }; 1761 | }; 1762 | 1763 | 1764 | /***/ }), 1765 | 1766 | /***/ "d8e8": 1767 | /***/ (function(module, exports) { 1768 | 1769 | module.exports = function (it) { 1770 | if (typeof it != 'function') throw TypeError(it + ' is not a function!'); 1771 | return it; 1772 | }; 1773 | 1774 | 1775 | /***/ }), 1776 | 1777 | /***/ "e11e": 1778 | /***/ (function(module, exports) { 1779 | 1780 | // IE 8- don't enum bug keys 1781 | module.exports = ( 1782 | 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' 1783 | ).split(','); 1784 | 1785 | 1786 | /***/ }), 1787 | 1788 | /***/ "f751": 1789 | /***/ (function(module, exports, __webpack_require__) { 1790 | 1791 | // 19.1.3.1 Object.assign(target, source) 1792 | var $export = __webpack_require__("5ca1"); 1793 | 1794 | $export($export.S + $export.F, 'Object', { assign: __webpack_require__("7333") }); 1795 | 1796 | 1797 | /***/ }), 1798 | 1799 | /***/ "fab2": 1800 | /***/ (function(module, exports, __webpack_require__) { 1801 | 1802 | var document = __webpack_require__("7726").document; 1803 | module.exports = document && document.documentElement; 1804 | 1805 | 1806 | /***/ }), 1807 | 1808 | /***/ "fae3": 1809 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 1810 | 1811 | "use strict"; 1812 | __webpack_require__.r(__webpack_exports__); 1813 | 1814 | // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js 1815 | // This file is imported into lib/wc client bundles. 1816 | 1817 | if (typeof window !== 'undefined') { 1818 | var setPublicPath_i 1819 | if ((setPublicPath_i = window.document.currentScript) && (setPublicPath_i = setPublicPath_i.src.match(/(.+\/)[^/]+\.js$/))) { 1820 | __webpack_require__.p = setPublicPath_i[1] // eslint-disable-line 1821 | } 1822 | } 1823 | 1824 | // Indicate to webpack that this file can be concatenated 1825 | /* harmony default export */ var setPublicPath = (null); 1826 | 1827 | // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.assign.js 1828 | var es6_object_assign = __webpack_require__("f751"); 1829 | 1830 | // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/builtin/es6/arrayWithoutHoles.js 1831 | function _arrayWithoutHoles(arr) { 1832 | if (Array.isArray(arr)) { 1833 | for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { 1834 | arr2[i] = arr[i]; 1835 | } 1836 | 1837 | return arr2; 1838 | } 1839 | } 1840 | // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/builtin/es6/iterableToArray.js 1841 | function _iterableToArray(iter) { 1842 | if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); 1843 | } 1844 | // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/builtin/es6/nonIterableSpread.js 1845 | function _nonIterableSpread() { 1846 | throw new TypeError("Invalid attempt to spread non-iterable instance"); 1847 | } 1848 | // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/builtin/es6/toConsumableArray.js 1849 | 1850 | 1851 | 1852 | function _toConsumableArray(arr) { 1853 | return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); 1854 | } 1855 | // EXTERNAL MODULE: ./node_modules/core-js/modules/es7.array.includes.js 1856 | var es7_array_includes = __webpack_require__("6762"); 1857 | 1858 | // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js 1859 | var web_dom_iterable = __webpack_require__("ac6a"); 1860 | 1861 | // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.number.constructor.js 1862 | var es6_number_constructor = __webpack_require__("c5f6"); 1863 | 1864 | // CONCATENATED MODULE: ./src/anime-prop.js 1865 | 1866 | /* harmony default export */ var anime_prop = ({ 1867 | duration: { 1868 | type: [Number, Function], 1869 | default: function _default() { 1870 | return 1000; 1871 | } 1872 | }, 1873 | delay: { 1874 | type: [Number, Function], 1875 | default: 0 1876 | }, 1877 | offset: { 1878 | type: [Number, String] 1879 | }, 1880 | easing: { 1881 | type: [String, Array], 1882 | default: 'easeOutElastic' 1883 | }, 1884 | elasticity: { 1885 | type: [Number, Function], 1886 | default: 500 1887 | }, 1888 | direction: { 1889 | type: String, 1890 | default: function _default() { 1891 | return 'normal'; 1892 | } 1893 | }, 1894 | loop: { 1895 | type: [Boolean, Number], 1896 | default: false 1897 | }, 1898 | seek: { 1899 | type: Number 1900 | }, 1901 | from: { 1902 | type: Object, 1903 | default: function _default() { 1904 | return {}; 1905 | } 1906 | }, 1907 | animate: { 1908 | type: Object, 1909 | default: function _default() { 1910 | return {}; 1911 | } 1912 | }, 1913 | object: { 1914 | type: Object 1915 | }, 1916 | objectProps: { 1917 | type: Object 1918 | }, 1919 | tag: { 1920 | type: String, 1921 | default: 'div' 1922 | }, 1923 | playing: { 1924 | type: Boolean, 1925 | default: true 1926 | } 1927 | }); 1928 | // EXTERNAL MODULE: ./node_modules/animejs/anime.min.js 1929 | var anime_min = __webpack_require__("5a72"); 1930 | var anime_min_default = /*#__PURE__*/__webpack_require__.n(anime_min); 1931 | 1932 | // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.to-string.js 1933 | var es6_regexp_to_string = __webpack_require__("6b54"); 1934 | 1935 | // CONCATENATED MODULE: ./src/is.js 1936 | 1937 | 1938 | /* global SVGElement:true */ 1939 | function stringContains(str, text) { 1940 | return str.indexOf(text) > -1; 1941 | } 1942 | 1943 | var is = { 1944 | arr: function arr(a) { 1945 | return Array.isArray(a); 1946 | }, 1947 | obj: function obj(a) { 1948 | return stringContains(Object.prototype.toString.call(a), 'Object'); 1949 | }, 1950 | pth: function pth(a) { 1951 | return is.obj(a) && a.hasOwnProperty('totalLength'); 1952 | }, 1953 | svg: function svg(a) { 1954 | return a instanceof SVGElement; 1955 | }, 1956 | dom: function dom(a) { 1957 | return a.nodeType || is.svg(a); 1958 | }, 1959 | str: function str(a) { 1960 | return typeof a === 'string'; 1961 | }, 1962 | fnc: function fnc(a) { 1963 | return typeof a === 'function'; 1964 | }, 1965 | und: function und(a) { 1966 | return typeof a === 'undefined'; 1967 | }, 1968 | hex: function hex(a) { 1969 | return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a); 1970 | }, 1971 | rgb: function rgb(a) { 1972 | return /^rgb/.test(a); 1973 | }, 1974 | hsl: function hsl(a) { 1975 | return /^hsl/.test(a); 1976 | }, 1977 | col: function col(a) { 1978 | return is.hex(a) || is.rgb(a) || is.hsl(a); 1979 | } 1980 | }; 1981 | // CONCATENATED MODULE: ./src/anime-mixin.js 1982 | 1983 | 1984 | 1985 | 1986 | 1987 | 1988 | var validTransforms = ['translateX', 'translateY', 'translateZ', 'rotate', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scaleX', 'scaleY', 'scaleZ', 'skewX', 'skewY', 'perspective']; 1989 | /* harmony default export */ var anime_mixin = ({ 1990 | props: anime_prop, 1991 | data: function data() { 1992 | return {}; 1993 | }, 1994 | mounted: function mounted() { 1995 | if (is.fnc(this.$parent.addAnime)) { 1996 | this.$parent.addAnime(this); 1997 | } else { 1998 | this.initAnime(); 1999 | } 2000 | }, 2001 | watch: { 2002 | 'playing': function playing(value) { 2003 | if (value) { 2004 | this.play(); 2005 | } else { 2006 | this.pause(); 2007 | } 2008 | }, 2009 | 'seek': function seek(value) { 2010 | this.anime.seek(value); 2011 | } 2012 | }, 2013 | methods: { 2014 | initAnime: function initAnime() { 2015 | var _this = this; 2016 | 2017 | this.anime = anime_min_default()(this.getAnimeConfig()); 2018 | 2019 | if (this.playing === true) { 2020 | this.play(); 2021 | } 2022 | 2023 | this.anime.update = function (anim) { 2024 | _this.$emit('update', anim); 2025 | }; 2026 | 2027 | this.anime.begin = function (anim) { 2028 | _this.$emit('begin', anim); 2029 | }; 2030 | 2031 | this.anime.complete = function (anim) { 2032 | _this.$emit('complete', anim); 2033 | }; 2034 | }, 2035 | reset: function reset() { 2036 | // pause to remove from anime loop list 2037 | this.anime.pause(); 2038 | this.initAnime(); 2039 | }, 2040 | getAnimeConfig: function getAnimeConfig(inherit) { 2041 | var animeConfig = {}; 2042 | 2043 | if (inherit) { 2044 | Object.assign(animeConfig, inherit); 2045 | } // prepare animejs options 2046 | 2047 | 2048 | Object.assign(animeConfig, this.animate, { 2049 | duration: this.duration, 2050 | delay: this.delay, 2051 | easing: this.easing, 2052 | elasticity: this.elasticity, 2053 | autoplay: false, 2054 | direction: this.direction, 2055 | loop: this.loop 2056 | }); 2057 | 2058 | if (this.offset || this.offset === 0) { 2059 | animeConfig.offset = this.offset; 2060 | } // object numeric value animates 2061 | 2062 | 2063 | if (this.object) { 2064 | Object.assign(animeConfig, this.objectProps); 2065 | } 2066 | 2067 | animeConfig.targets = this.getTargets(); 2068 | this.setFromProperties(animeConfig); 2069 | console.log('init with', animeConfig); 2070 | return animeConfig; 2071 | }, 2072 | pause: function pause() { 2073 | this.anime.pause(); 2074 | }, 2075 | play: function play() { 2076 | this.anime.play(); 2077 | }, 2078 | restart: function restart() { 2079 | this.anime.restart(); 2080 | }, 2081 | setFromProperties: function setFromProperties(animeConfig) { 2082 | var _this2 = this; 2083 | 2084 | var transforms = []; 2085 | 2086 | var _loop = function _loop(key) { 2087 | if (validTransforms.includes(key)) { 2088 | var transformValue = is.str(_this2.from[key]) ? _this2.from[key] : "".concat(_this2.from[key]).concat(_this2.getTransformUnit(key)); 2089 | transforms.push("".concat(key, "(").concat(transformValue, ")")); 2090 | } else { 2091 | if (is.arr(animeConfig.targets)) { 2092 | animeConfig.targets.forEach(function (el) { 2093 | el.style[key] = _this2.from[key]; 2094 | }); 2095 | } else { 2096 | animeConfig.targets.style[key] = _this2.from[key]; 2097 | } 2098 | } 2099 | }; 2100 | 2101 | for (var key in this.from) { 2102 | _loop(key); 2103 | } 2104 | 2105 | if (transforms.length) { 2106 | var transfromStr = transforms.join(' '); 2107 | 2108 | if (is.arr(animeConfig.targets)) { 2109 | animeConfig.targets.forEach(function (el) { 2110 | el.style.transform = transfromStr; 2111 | }); 2112 | } else { 2113 | animeConfig.targets.style.transform = transfromStr; 2114 | } 2115 | } 2116 | }, 2117 | // copy from animejs 2118 | getTransformUnit: function getTransformUnit(propName) { 2119 | if (propName.indexOf('translate') > -1 || propName.indexOf('perspective') > -1) return 'px'; 2120 | if (propName.indexOf('rotate') > -1 || propName.indexOf('skew') > -1) return 'deg'; 2121 | }, 2122 | getTargets: function getTargets() { 2123 | return this.object || this.$el; 2124 | } 2125 | } 2126 | }); 2127 | // CONCATENATED MODULE: ./src/vue-anime.js 2128 | 2129 | 2130 | 2131 | /* harmony default export */ var vue_anime = ({ 2132 | name: 'vue-anime', 2133 | mixins: [anime_mixin], 2134 | data: function data() { 2135 | return {}; 2136 | }, 2137 | render: function render(h) { 2138 | var slots = this.$slots.default; 2139 | var children = slots; 2140 | var footer = this.$slots.footer; 2141 | 2142 | if (footer) { 2143 | children = slots ? _toConsumableArray(slots).concat(_toConsumableArray(footer)) : _toConsumableArray(footer); 2144 | } 2145 | 2146 | return h(this.tag, Object.assign({ 2147 | class: '_vue-anime' 2148 | }, this.$attrs), children); 2149 | }, 2150 | methods: {} 2151 | }); 2152 | // EXTERNAL MODULE: ./node_modules/core-js/modules/es7.symbol.async-iterator.js 2153 | var es7_symbol_async_iterator = __webpack_require__("ac4d"); 2154 | 2155 | // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.symbol.js 2156 | var es6_symbol = __webpack_require__("8a81"); 2157 | 2158 | // CONCATENATED MODULE: ./src/vue-anime-group.js 2159 | 2160 | 2161 | 2162 | 2163 | 2164 | /* harmony default export */ var vue_anime_group = ({ 2165 | name: 'vue-anime-group', 2166 | mixins: [anime_mixin], 2167 | data: function data() { 2168 | return { 2169 | animes: [] 2170 | }; 2171 | }, 2172 | render: function render(h) { 2173 | var slots = this.$slots.default; 2174 | var children = slots; 2175 | return h(this.tag, Object.assign({ 2176 | class: '_vue-anime-group' 2177 | }, this.$attrs), children); 2178 | }, 2179 | methods: { 2180 | getTargets: function getTargets() { 2181 | var targets = []; 2182 | var _iteratorNormalCompletion = true; 2183 | var _didIteratorError = false; 2184 | var _iteratorError = undefined; 2185 | 2186 | try { 2187 | for (var _iterator = this.animes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { 2188 | var anime = _step.value; 2189 | targets.push(anime.$el); 2190 | } 2191 | } catch (err) { 2192 | _didIteratorError = true; 2193 | _iteratorError = err; 2194 | } finally { 2195 | try { 2196 | if (!_iteratorNormalCompletion && _iterator.return != null) { 2197 | _iterator.return(); 2198 | } 2199 | } finally { 2200 | if (_didIteratorError) { 2201 | throw _iteratorError; 2202 | } 2203 | } 2204 | } 2205 | 2206 | return targets; 2207 | }, 2208 | addAnime: function addAnime(anime) { 2209 | this.animes.push(anime); 2210 | } 2211 | } 2212 | }); 2213 | // CONCATENATED MODULE: ./src/vue-anime-timeline.js 2214 | 2215 | 2216 | 2217 | 2218 | 2219 | 2220 | /* harmony default export */ var vue_anime_timeline = ({ 2221 | name: 'vue-anime-timeline', 2222 | props: Object.assign(anime_prop, { 2223 | timelines: { 2224 | type: Array 2225 | } 2226 | }), 2227 | data: function data() { 2228 | return { 2229 | animeInstance: null, 2230 | animes: [] 2231 | }; 2232 | }, 2233 | render: function render(h) { 2234 | var slots = this.$slots.default; 2235 | var children = slots; 2236 | return h(this.tag, this.$attrs, children); 2237 | }, 2238 | mounted: function mounted() { 2239 | this.initAnimeTimeLine(); 2240 | }, 2241 | watch: { 2242 | 'playing': function playing(value) { 2243 | if (value) { 2244 | this.play(); 2245 | } else { 2246 | this.pause(); 2247 | } 2248 | }, 2249 | 'seek': function seek(value) { 2250 | this.animeInstance.seek(value); 2251 | } 2252 | }, 2253 | methods: { 2254 | initAnimeTimeLine: function initAnimeTimeLine() { 2255 | var _this = this; 2256 | 2257 | this.animeInstance = anime_min_default.a.timeline({ 2258 | direction: this.direction, 2259 | loop: this.loop, 2260 | delay: this.delay, 2261 | // adding delay for the case of group time line 2262 | autoplay: false 2263 | }); 2264 | 2265 | if (this.timelines) { 2266 | // time frame for one or group 2267 | var _iteratorNormalCompletion = true; 2268 | var _didIteratorError = false; 2269 | var _iteratorError = undefined; 2270 | 2271 | try { 2272 | for (var _iterator = this.timelines[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { 2273 | var timeline = _step.value; 2274 | timeline.targets = this.getTargets(); 2275 | this.animeInstance.add(timeline); 2276 | } 2277 | } catch (err) { 2278 | _didIteratorError = true; 2279 | _iteratorError = err; 2280 | } finally { 2281 | try { 2282 | if (!_iteratorNormalCompletion && _iterator.return != null) { 2283 | _iterator.return(); 2284 | } 2285 | } finally { 2286 | if (_didIteratorError) { 2287 | throw _iteratorError; 2288 | } 2289 | } 2290 | } 2291 | } else { 2292 | // add each time line with different target 2293 | for (var i = 0; i < this.animes.length; i++) { 2294 | this.animeInstance.add(this.animes[i].getAnimeConfig(this.$props)); 2295 | } 2296 | } 2297 | 2298 | this.animeInstance.update = function (anim) { 2299 | _this.$emit('update', anim); 2300 | }; 2301 | 2302 | this.animeInstance.begin = function (anim) { 2303 | _this.$emit('begin', anim); 2304 | }; 2305 | 2306 | this.animeInstance.complete = function (anim) { 2307 | _this.$emit('complete', anim); 2308 | }; 2309 | 2310 | if (this.playing) { 2311 | this.animeInstance.play(); 2312 | } 2313 | }, 2314 | getTargets: function getTargets() { 2315 | var targets = []; 2316 | var _iteratorNormalCompletion2 = true; 2317 | var _didIteratorError2 = false; 2318 | var _iteratorError2 = undefined; 2319 | 2320 | try { 2321 | for (var _iterator2 = this.animes[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { 2322 | var _anime = _step2.value; 2323 | targets.push(_anime.$el); 2324 | } 2325 | } catch (err) { 2326 | _didIteratorError2 = true; 2327 | _iteratorError2 = err; 2328 | } finally { 2329 | try { 2330 | if (!_iteratorNormalCompletion2 && _iterator2.return != null) { 2331 | _iterator2.return(); 2332 | } 2333 | } finally { 2334 | if (_didIteratorError2) { 2335 | throw _iteratorError2; 2336 | } 2337 | } 2338 | } 2339 | 2340 | return targets; 2341 | }, 2342 | play: function play() { 2343 | this.animeInstance.play(); 2344 | }, 2345 | pause: function pause() { 2346 | this.animeInstance.pause(); 2347 | }, 2348 | restart: function restart() { 2349 | this.animeInstance.restart(); 2350 | }, 2351 | addAnime: function addAnime(anime) { 2352 | this.animes.push(anime); 2353 | } 2354 | } 2355 | }); 2356 | // CONCATENATED MODULE: ./src/index.js 2357 | 2358 | 2359 | 2360 | 2361 | // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js 2362 | /* concated harmony reexport VueAnime */__webpack_require__.d(__webpack_exports__, "VueAnime", function() { return vue_anime; }); 2363 | /* concated harmony reexport VueAnimeGroup */__webpack_require__.d(__webpack_exports__, "VueAnimeGroup", function() { return vue_anime_group; }); 2364 | /* concated harmony reexport VueAnimeTimeLine */__webpack_require__.d(__webpack_exports__, "VueAnimeTimeLine", function() { return vue_anime_timeline; }); 2365 | 2366 | 2367 | 2368 | 2369 | /***/ }), 2370 | 2371 | /***/ "fdef": 2372 | /***/ (function(module, exports) { 2373 | 2374 | module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + 2375 | '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; 2376 | 2377 | 2378 | /***/ }) 2379 | 2380 | /******/ }); -------------------------------------------------------------------------------- /dist/vue-anime.umd.min.js: -------------------------------------------------------------------------------- 1 | (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue-anime"]=e():t["vue-anime"]=e()})("undefined"!==typeof self?self:this,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return 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.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fae3")}({"01f9":function(t,e,n){"use strict";var r=n("2d00"),i=n("5ca1"),o=n("2aba"),a=n("32e9"),u=n("84f2"),c=n("41a0"),f=n("7f20"),s=n("38fd"),l=n("2b4c")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",y="keys",h="values",m=function(){return this};t.exports=function(t,e,n,b,g,v,x){c(n,e,b);var w,O,S,j=function(t){if(!p&&t in E)return E[t];switch(t){case y:return function(){return new n(this,t)};case h:return function(){return new n(this,t)}}return function(){return new n(this,t)}},A=e+" Iterator",P=g==h,I=!1,E=t.prototype,_=E[l]||E[d]||g&&E[g],T=_||j(g),M=g?P?j("entries"):T:void 0,k="Array"==e&&E.entries||_;if(k&&(S=s(k.call(new t)),S!==Object.prototype&&S.next&&(f(S,A,!0),r||"function"==typeof S[l]||a(S,l,m))),P&&_&&_.name!==h&&(I=!0,T=function(){return _.call(this)}),r&&!x||!p&&!I&&E[l]||a(E,l,T),u[e]=T,u[A]=m,g)if(w={values:P?T:j(h),keys:v?T:j(y),entries:M},x)for(O in w)O in E||o(E,O,w[O]);else i(i.P+i.F*(p||I),e,w);return w}},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,n){var r=n("ce10"),i=n("e11e");t.exports=Object.keys||function(t){return r(t,i)}},1169:function(t,e,n){var r=n("2d95");t.exports=Array.isArray||function(t){return"Array"==r(t)}},"11e9":function(t,e,n){var r=n("52a7"),i=n("4630"),o=n("6821"),a=n("6a99"),u=n("69a8"),c=n("c69a"),f=Object.getOwnPropertyDescriptor;e.f=n("9e1e")?f:function(t,e){if(t=o(t),e=a(e,!0),c)try{return f(t,e)}catch(t){}if(u(t,e))return i(!r.f.call(t,e),t[e])}},1495:function(t,e,n){var r=n("86cc"),i=n("cb7c"),o=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){i(t);var n,a=o(e),u=a.length,c=0;while(u>c)r.f(t,n=a[c++],e[n]);return t}},"230e":function(t,e,n){var r=n("d3f4"),i=n("7726").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},2621:function(t,e){e.f=Object.getOwnPropertySymbols},"2aba":function(t,e,n){var r=n("7726"),i=n("32e9"),o=n("69a8"),a=n("ca5a")("src"),u="toString",c=Function[u],f=(""+c).split(u);n("8378").inspectSource=function(t){return c.call(t)},(t.exports=function(t,e,n,u){var c="function"==typeof n;c&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(c&&(o(n,a)||i(n,a,t[e]?""+t[e]:f.join(String(e)))),t===r?t[e]=n:u?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,u,function(){return"function"==typeof this&&this[a]||c.call(this)})},"2aeb":function(t,e,n){var r=n("cb7c"),i=n("1495"),o=n("e11e"),a=n("613b")("IE_PROTO"),u=function(){},c="prototype",f=function(){var t,e=n("230e")("iframe"),r=o.length,i="<",a=">";e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+a+"document.F=Object"+i+"/script"+a),t.close(),f=t.F;while(r--)delete f[c][o[r]];return f()};t.exports=Object.create||function(t,e){var n;return null!==t?(u[c]=r(t),n=new u,u[c]=null,n[a]=t):n=f(),void 0===e?n:i(n,e)}},"2b4c":function(t,e,n){var r=n("5537")("wks"),i=n("ca5a"),o=n("7726").Symbol,a="function"==typeof o,u=t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))};u.store=r},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"32e9":function(t,e,n){var r=n("86cc"),i=n("4630");t.exports=n("9e1e")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},"37c8":function(t,e,n){e.f=n("2b4c")},3846:function(t,e,n){n("9e1e")&&"g"!=/./g.flags&&n("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:n("0bfb")})},"38fd":function(t,e,n){var r=n("69a8"),i=n("4bf8"),o=n("613b")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},"3a72":function(t,e,n){var r=n("7726"),i=n("8378"),o=n("2d00"),a=n("37c8"),u=n("86cc").f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||u(e,t,{value:a.f(t)})}},"41a0":function(t,e,n){"use strict";var r=n("2aeb"),i=n("4630"),o=n("7f20"),a={};n("32e9")(a,n("2b4c")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},4588:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},"52a7":function(t,e){e.f={}.propertyIsEnumerable},5537:function(t,e,n){var r=n("8378"),i=n("7726"),o="__core-js_shared__",a=i[o]||(i[o]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},"5a72":function(t,e,n){(function(n){var r,i,o,a={scope:{}};a.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){if(n.get||n.set)throw new TypeError("ES3 does not support getters and setters.");t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)},a.getGlobal=function(t){return"undefined"!=typeof window&&window===t?t:"undefined"!=typeof n&&null!=n?n:t},a.global=a.getGlobal(this),a.SYMBOL_PREFIX="jscomp_symbol_",a.initSymbol=function(){a.initSymbol=function(){},a.global.Symbol||(a.global.Symbol=a.Symbol)},a.symbolCounter_=0,a.Symbol=function(t){return a.SYMBOL_PREFIX+(t||"")+a.symbolCounter_++},a.initSymbolIterator=function(){a.initSymbol();var t=a.global.Symbol.iterator;t||(t=a.global.Symbol.iterator=a.global.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&a.defineProperty(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return a.arrayIterator(this)}}),a.initSymbolIterator=function(){}},a.arrayIterator=function(t){var e=0;return a.iteratorPrototype(function(){return en&&(n+=1),1n?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var n=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t);t=parseInt(n[1])/360;var r=parseInt(n[2])/100,i=parseInt(n[3])/100;n=n[4]||1;if(0==r)i=r=t=i;else{var o=.5>i?i*(1+r):i+r-i*r,a=2*i-o;i=e(a,o,t+1/3),r=e(a,o,t);t=e(a,o,t-1/3)}return"rgba("+255*i+","+255*r+","+255*t+","+n+")"}function l(t){if(t=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t))return t[2]}function p(t){return-1=d.currentTime)for(var x=0;x=y||!e)&&(d.began||(d.began=!0,o("begin")),o("run")),b>u&&b=e&&h!==e||!e)&&(i(e),m||a())),o("update"),t>=e&&(d.remaining?(f=c,"alternate"===d.direction&&(d.reversed=!d.reversed)):(d.pause(),d.completed||(d.completed=!0,o("complete"),"Promise"in window&&(l(),p=n()))),s=0)}t=void 0===t?{}:t;var c,f,s=0,l=null,p=n(),d=k(t);return d.reset=function(){var t=d.direction,e=d.loop;for(d.currentTime=0,d.progress=0,d.paused=!0,d.began=!1,d.completed=!1,d.reversed="reverse"===t,d.remaining="alternate"===t&&1===e?2:e,i(0),t=d.children.length;t--;)d.children[t].reset()},d.tick=function(t){c=t,f||(f=c),u((s+c-f)*F.speed)},d.seek=function(t){u(r(t))},d.pause=function(){var t=X.indexOf(d);-1=e&&0<=r&&1>=r){var o=new Float32Array(11);if(e!==n||r!==i)for(var a=0;11>a;++a)o[a]=t(.1*a,e,r);return function(a){if(e===n&&r===i)return a;if(0===a)return 0;if(1===a)return 1;for(var u=0,c=1;10!==c&&o[c]<=a;++c)u+=.1;--c;c=u+(a-o[c])/(o[c+1]-o[c])*.1;var f=3*(1-3*r+3*e)*c*c+2*(3*r-6*e)*c+3*e;if(.001<=f){for(u=0;4>u;++u){if(f=3*(1-3*r+3*e)*c*c+2*(3*r-6*e)*c+3*e,0===f)break;var s=t(c,e,r)-a;c=c-s/f}a=c}else if(0===f)a=c;else{c=u,u=u+.1;var l=0;do{s=c+(u-c)/2,f=t(s,e,r)-a,0++l);a=s}return t(a,n,i)}}}}(),R=function(){function t(t,e){return 0===t||1===t?t:-Math.pow(2,10*(t-1))*Math.sin(2*(t-1-e/(2*Math.PI)*Math.asin(1))*Math.PI/e)}var e,n="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),r={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],t],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(e,n){return 1-t(1-e,n)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(e,n){return.5>e?t(2*e,n)/2:1-t(-2*e+2,n)/2}]},i={linear:G(.25,.25,.75,.75)},o={};for(e in r)o.type=e,r[o.type].forEach(function(t){return function(e,r){i["ease"+t.type+n[r]]=V.fnc(e)?e:G.apply(u,e)}}(o)),o={type:o.type};return i}(),Y={css:function(t,e,n){return t.style[e]=n},attribute:function(t,e,n){return t.setAttribute(e,n)},object:function(t,e,n){return t[e]=n},transform:function(t,e,n,r,i){r[i]||(r[i]=[]),r[i].push(e+"("+n+")")}},X=[],D=0,B=function(){function t(){D=requestAnimationFrame(e)}function e(e){var n=X.length;if(n){for(var r=0;rn&&(e.duration=r.duration),e.children.push(r)}),e.seek(0),e.reset(),e.autoplay&&e.restart(),e},e},F.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},F})}).call(this,n("c8ba"))},"5ca1":function(t,e,n){var r=n("7726"),i=n("8378"),o=n("32e9"),a=n("2aba"),u=n("9b43"),c="prototype",f=function(t,e,n){var s,l,p,d,y=t&f.F,h=t&f.G,m=t&f.S,b=t&f.P,g=t&f.B,v=h?r:m?r[e]||(r[e]={}):(r[e]||{})[c],x=h?i:i[e]||(i[e]={}),w=x[c]||(x[c]={});for(s in h&&(n=e),n)l=!y&&v&&void 0!==v[s],p=(l?v:n)[s],d=g&&l?u(p,r):b&&"function"==typeof p?u(Function.call,p):p,v&&a(v,s,p,t&f.U),x[s]!=p&&o(x,s,d),b&&w[s]!=p&&(w[s]=p)};r.core=i,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},"5dbc":function(t,e,n){var r=n("d3f4"),i=n("8b97").set;t.exports=function(t,e,n){var o,a=e.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},"613b":function(t,e,n){var r=n("5537")("keys"),i=n("ca5a");t.exports=function(t){return r[t]||(r[t]=i(t))}},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},6762:function(t,e,n){"use strict";var r=n("5ca1"),i=n("c366")(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},"67ab":function(t,e,n){var r=n("ca5a")("meta"),i=n("d3f4"),o=n("69a8"),a=n("86cc").f,u=0,c=Object.isExtensible||function(){return!0},f=!n("79e5")(function(){return c(Object.preventExtensions({}))}),s=function(t){a(t,r,{value:{i:"O"+ ++u,w:{}}})},l=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!c(t))return"F";if(!e)return"E";s(t)}return t[r].i},p=function(t,e){if(!o(t,r)){if(!c(t))return!0;if(!e)return!1;s(t)}return t[r].w},d=function(t){return f&&y.NEED&&c(t)&&!o(t,r)&&s(t),t},y=t.exports={KEY:r,NEED:!1,fastKey:l,getWeak:p,onFreeze:d}},6821:function(t,e,n){var r=n("626a"),i=n("be13");t.exports=function(t){return r(i(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},"6b54":function(t,e,n){"use strict";n("3846");var r=n("cb7c"),i=n("0bfb"),o=n("9e1e"),a="toString",u=/./[a],c=function(t){n("2aba")(RegExp.prototype,a,t,!0)};n("79e5")(function(){return"/a/b"!=u.call({source:"a",flags:"b"})})?c(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):u.name!=a&&c(function(){return u.call(this)})},7333:function(t,e,n){"use strict";var r=n("0d58"),i=n("2621"),o=n("52a7"),a=n("4bf8"),u=n("626a"),c=Object.assign;t.exports=!c||n("79e5")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){var n=a(t),c=arguments.length,f=1,s=i.f,l=o.f;while(c>f){var p,d=u(arguments[f++]),y=s?r(d).concat(s(d)):r(d),h=y.length,m=0;while(h>m)l.call(d,p=y[m++])&&(n[p]=d[p])}return n}:c},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(t,e,n){var r=n("4588"),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},"7bbc":function(t,e,n){var r=n("6821"),i=n("9093").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(t){try{return i(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?u(t):i(r(t))}},"7f20":function(t,e,n){var r=n("86cc").f,i=n("69a8"),o=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},8378:function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},"84f2":function(t,e){t.exports={}},"86cc":function(t,e,n){var r=n("cb7c"),i=n("c69a"),o=n("6a99"),a=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"8a81":function(t,e,n){"use strict";var r=n("7726"),i=n("69a8"),o=n("9e1e"),a=n("5ca1"),u=n("2aba"),c=n("67ab").KEY,f=n("79e5"),s=n("5537"),l=n("7f20"),p=n("ca5a"),d=n("2b4c"),y=n("37c8"),h=n("3a72"),m=n("d4c0"),b=n("1169"),g=n("cb7c"),v=n("d3f4"),x=n("6821"),w=n("6a99"),O=n("4630"),S=n("2aeb"),j=n("7bbc"),A=n("11e9"),P=n("86cc"),I=n("0d58"),E=A.f,_=P.f,T=j.f,M=r.Symbol,k=r.JSON,F=k&&k.stringify,N="prototype",L=d("_hidden"),C=d("toPrimitive"),$={}.propertyIsEnumerable,V=s("symbol-registry"),G=s("symbols"),R=s("op-symbols"),Y=Object[N],X="function"==typeof M,D=r.QObject,B=!D||!D[N]||!D[N].findChild,Z=o&&f(function(){return 7!=S(_({},"a",{get:function(){return _(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=E(Y,e);r&&delete Y[e],_(t,e,n),r&&t!==Y&&_(Y,e,r)}:_,U=function(t){var e=G[t]=S(M[N]);return e._k=t,e},q=X&&"symbol"==typeof M.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof M},z=function(t,e,n){return t===Y&&z(R,e,n),g(t),e=w(e,!0),g(n),i(G,e)?(n.enumerable?(i(t,L)&&t[L][e]&&(t[L][e]=!1),n=S(n,{enumerable:O(0,!1)})):(i(t,L)||_(t,L,O(1,{})),t[L][e]=!0),Z(t,e,n)):_(t,e,n)},H=function(t,e){g(t);var n,r=m(e=x(e)),i=0,o=r.length;while(o>i)z(t,n=r[i++],e[n]);return t},W=function(t,e){return void 0===e?S(t):H(S(t),e)},J=function(t){var e=$.call(this,t=w(t,!0));return!(this===Y&&i(G,t)&&!i(R,t))&&(!(e||!i(this,t)||!i(G,t)||i(this,L)&&this[L][t])||e)},Q=function(t,e){if(t=x(t),e=w(e,!0),t!==Y||!i(G,e)||i(R,e)){var n=E(t,e);return!n||!i(G,e)||i(t,L)&&t[L][e]||(n.enumerable=!0),n}},K=function(t){var e,n=T(x(t)),r=[],o=0;while(n.length>o)i(G,e=n[o++])||e==L||e==c||r.push(e);return r},tt=function(t){var e,n=t===Y,r=T(n?R:x(t)),o=[],a=0;while(r.length>a)!i(G,e=r[a++])||n&&!i(Y,e)||o.push(G[e]);return o};X||(M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===Y&&e.call(R,n),i(this,L)&&i(this[L],t)&&(this[L][t]=!1),Z(this,t,O(1,n))};return o&&B&&Z(Y,t,{configurable:!0,set:e}),U(t)},u(M[N],"toString",function(){return this._k}),A.f=Q,P.f=z,n("9093").f=j.f=K,n("52a7").f=J,n("2621").f=tt,o&&!n("2d00")&&u(Y,"propertyIsEnumerable",J,!0),y.f=function(t){return U(d(t))}),a(a.G+a.W+a.F*!X,{Symbol:M});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var rt=I(d.store),it=0;rt.length>it;)h(rt[it++]);a(a.S+a.F*!X,"Symbol",{for:function(t){return i(V,t+="")?V[t]:V[t]=M(t)},keyFor:function(t){if(!q(t))throw TypeError(t+" is not a symbol!");for(var e in V)if(V[e]===t)return e},useSetter:function(){B=!0},useSimple:function(){B=!1}}),a(a.S+a.F*!X,"Object",{create:W,defineProperty:z,defineProperties:H,getOwnPropertyDescriptor:Q,getOwnPropertyNames:K,getOwnPropertySymbols:tt}),k&&a(a.S+a.F*(!X||f(function(){var t=M();return"[null]"!=F([t])||"{}"!=F({a:t})||"{}"!=F(Object(t))})),"JSON",{stringify:function(t){var e,n,r=[t],i=1;while(arguments.length>i)r.push(arguments[i++]);if(n=e=r[1],(v(e)||void 0!==t)&&!q(t))return b(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!q(e))return e}),r[1]=e,F.apply(k,r)}}),M[N][C]||n("32e9")(M[N],C,M[N].valueOf),l(M,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},"8b97":function(t,e,n){var r=n("d3f4"),i=n("cb7c"),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n("9b43")(Function.call,n("11e9").f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},9093:function(t,e,n){var r=n("ce10"),i=n("e11e").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),i=Array.prototype;void 0==i[r]&&n("32e9")(i,r,{}),t.exports=function(t){i[r][t]=!0}},"9def":function(t,e,n){var r=n("4588"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},aa77:function(t,e,n){var r=n("5ca1"),i=n("be13"),o=n("79e5"),a=n("fdef"),u="["+a+"]",c="​…",f=RegExp("^"+u+u+"*"),s=RegExp(u+u+"*$"),l=function(t,e,n){var i={},u=o(function(){return!!a[t]()||c[t]()!=c}),f=i[t]=u?e(p):a[t];n&&(i[n]=f),r(r.P+r.F*u,"String",i)},p=l.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(f,"")),2&e&&(t=t.replace(s,"")),t};t.exports=l},ac4d:function(t,e,n){n("3a72")("asyncIterator")},ac6a:function(t,e,n){for(var r=n("cadf"),i=n("0d58"),o=n("2aba"),a=n("7726"),u=n("32e9"),c=n("84f2"),f=n("2b4c"),s=f("iterator"),l=f("toStringTag"),p=c.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},y=i(d),h=0;hs)if(u=c[s++],u!=u)return!0}else for(;f>s;s++)if((t||s in c)&&c[s]===n)return t||s||0;return!t&&-1}}},c5f6:function(t,e,n){"use strict";var r=n("7726"),i=n("69a8"),o=n("2d95"),a=n("5dbc"),u=n("6a99"),c=n("79e5"),f=n("9093").f,s=n("11e9").f,l=n("86cc").f,p=n("aa77").trim,d="Number",y=r[d],h=y,m=y.prototype,b=o(n("2aeb")(m))==d,g="trim"in String.prototype,v=function(t){var e=u(t,!1);if("string"==typeof e&&e.length>2){e=g?e.trim():p(e,3);var n,r,i,o=e.charCodeAt(0);if(43===o||45===o){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,c=e.slice(2),f=0,s=c.length;fi)return NaN;return parseInt(c,r)}}return+e};if(!y(" 0o1")||!y("0b1")||y("+0x1")){y=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof y&&(b?c(function(){m.valueOf.call(n)}):o(n)!=d)?a(new h(v(e)),n,y):v(e)};for(var x,w=n("9e1e")?f(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),O=0;w.length>O;O++)i(h,x=w[O])&&!i(y,x)&&l(y,x,s(h,x));y.prototype=m,m.constructor=y,n("2aba")(r,d,y)}},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"===typeof window&&(n=window)}t.exports=n},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cadf:function(t,e,n){"use strict";var r=n("9c6c"),i=n("d53b"),o=n("84f2"),a=n("6821");t.exports=n("01f9")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},ce10:function(t,e,n){var r=n("69a8"),i=n("6821"),o=n("c366")(!1),a=n("613b")("IE_PROTO");t.exports=function(t,e){var n,u=i(t),c=0,f=[];for(n in u)n!=a&&r(u,n)&&f.push(n);while(e.length>c)r(u,n=e[c++])&&(~o(f,n)||f.push(n));return f}},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d4c0:function(t,e,n){var r=n("0d58"),i=n("2621"),o=n("52a7");t.exports=function(t){var e=r(t),n=i.f;if(n){var a,u=n(t),c=o.f,f=0;while(u.length>f)c.call(t,a=u[f++])&&e.push(a)}return e}},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f751:function(t,e,n){var r=n("5ca1");r(r.S+r.F,"Object",{assign:n("7333")})},fab2:function(t,e,n){var r=n("7726").document;t.exports=r&&r.documentElement},fae3:function(t,e,n){"use strict";var r;(n.r(e),"undefined"!==typeof window)&&((r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js$/))&&(n.p=r[1]));n("f751");function i(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e-1}var p={arr:function(t){return Array.isArray(t)},obj:function(t){return l(Object.prototype.toString.call(t),"Object")},pth:function(t){return p.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},dom:function(t){return t.nodeType||p.svg(t)},str:function(t){return"string"===typeof t},fnc:function(t){return"function"===typeof t},und:function(t){return"undefined"===typeof t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return p.hex(t)||p.rgb(t)||p.hsl(t)}},d=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skewX","skewY","perspective"],y={props:c,data:function(){return{}},mounted:function(){p.fnc(this.$parent.addAnime)?this.$parent.addAnime(this):this.initAnime()},watch:{playing:function(t){t?this.play():this.pause()},seek:function(t){this.anime.seek(t)}},methods:{initAnime:function(){var t=this;this.anime=s()(this.getAnimeConfig()),!0===this.playing&&this.play(),this.anime.update=function(e){t.$emit("update",e)},this.anime.begin=function(e){t.$emit("begin",e)},this.anime.complete=function(e){t.$emit("complete",e)}},reset:function(){this.anime.pause(),this.initAnime()},getAnimeConfig:function(t){var e={};return t&&Object.assign(e,t),Object.assign(e,this.animate,{duration:this.duration,delay:this.delay,easing:this.easing,elasticity:this.elasticity,autoplay:!1,direction:this.direction,loop:this.loop}),(this.offset||0===this.offset)&&(e.offset=this.offset),this.object&&Object.assign(e,this.objectProps),e.targets=this.getTargets(),this.setFromProperties(e),console.log("init with",e),e},pause:function(){this.anime.pause()},play:function(){this.anime.play()},restart:function(){this.anime.restart()},setFromProperties:function(t){var e=this,n=[],r=function(r){if(d.includes(r)){var i=p.str(e.from[r])?e.from[r]:"".concat(e.from[r]).concat(e.getTransformUnit(r));n.push("".concat(r,"(").concat(i,")"))}else p.arr(t.targets)?t.targets.forEach(function(t){t.style[r]=e.from[r]}):t.targets.style[r]=e.from[r]};for(var i in this.from)r(i);if(n.length){var o=n.join(" ");p.arr(t.targets)?t.targets.forEach(function(t){t.style.transform=o}):t.targets.style.transform=o}},getTransformUnit:function(t){return t.indexOf("translate")>-1||t.indexOf("perspective")>-1?"px":t.indexOf("rotate")>-1||t.indexOf("skew")>-1?"deg":void 0},getTargets:function(){return this.object||this.$el}}},h={name:"vue-anime",mixins:[y],data:function(){return{}},render:function(t){var e=this.$slots.default,n=e,r=this.$slots.footer;return r&&(n=e?u(e).concat(u(r)):u(r)),t(this.tag,Object.assign({class:"_vue-anime"},this.$attrs),n)},methods:{}},m=(n("ac4d"),n("8a81"),{name:"vue-anime-group",mixins:[y],data:function(){return{animes:[]}},render:function(t){var e=this.$slots.default,n=e;return t(this.tag,Object.assign({class:"_vue-anime-group"},this.$attrs),n)},methods:{getTargets:function(){var t=[],e=!0,n=!1,r=void 0;try{for(var i,o=this.animes[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;t.push(a.$el)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}return t},addAnime:function(t){this.animes.push(t)}}}),b={name:"vue-anime-timeline",props:Object.assign(c,{timelines:{type:Array}}),data:function(){return{animeInstance:null,animes:[]}},render:function(t){var e=this.$slots.default,n=e;return t(this.tag,this.$attrs,n)},mounted:function(){this.initAnimeTimeLine()},watch:{playing:function(t){t?this.play():this.pause()},seek:function(t){this.animeInstance.seek(t)}},methods:{initAnimeTimeLine:function(){var t=this;if(this.animeInstance=s.a.timeline({direction:this.direction,loop:this.loop,delay:this.delay,autoplay:!1}),this.timelines){var e=!0,n=!1,r=void 0;try{for(var i,o=this.timelines[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;a.targets=this.getTargets(),this.animeInstance.add(a)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}else for(var u=0;u 1%", 45 | "last 2 versions", 46 | "not ie <= 8" 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuhann/vue-anime/69aaac5a353922621eddb1898f51169baecbb554/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | vue-anime1 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/anime-mixin.js: -------------------------------------------------------------------------------- 1 | import props from './anime-prop' 2 | import anime from 'animejs' 3 | import { is } from './is' 4 | const validTransforms = ['translateX', 'translateY', 'translateZ', 'rotate', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scaleX', 'scaleY', 'scaleZ', 'skewX', 'skewY', 'perspective'] 5 | 6 | export default { 7 | props, 8 | 9 | data () { 10 | return { 11 | } 12 | }, 13 | 14 | computed: { 15 | hasUpdateListener () { 16 | return this.$listeners && this.$listeners.update 17 | } 18 | }, 19 | 20 | mounted () { 21 | if (is.fnc(this.$parent.addAnime)) { 22 | this.$parent.addAnime(this) 23 | } else { 24 | this.initAnime() 25 | } 26 | }, 27 | 28 | watch: { 29 | 'playing': function (value) { 30 | if (value) { 31 | this.play() 32 | } else { 33 | this.pause() 34 | } 35 | }, 36 | 'seek': function (value) { 37 | this.anime.seek(value) 38 | } 39 | }, 40 | 41 | methods: { 42 | initAnime () { 43 | this.anime = anime(this.getAnimeConfig()) 44 | if (this.playing === true) { 45 | this.play() 46 | } 47 | if (this.hasUpdateListener) { 48 | this.anime.update = (anim) => { 49 | this.$emit('update', anim) 50 | } 51 | } 52 | this.anime.begin = (anim) => { 53 | this.$emit('begin', anim) 54 | } 55 | this.anime.complete = (anim) => { 56 | this.$emit('complete', anim) 57 | } 58 | if (this.animate && this.animate.__ob__) { 59 | this.$watch('animate', () => { 60 | this.reset() 61 | }) 62 | } 63 | }, 64 | 65 | reset () { 66 | // pause to remove from anime loop list 67 | this.anime.pause() 68 | this.initAnime() 69 | }, 70 | 71 | getAnimeConfig (inherit) { 72 | const animeConfig = {} 73 | if (inherit) { 74 | Object.assign(animeConfig, inherit) 75 | } 76 | // prepare animejs options 77 | Object.assign(animeConfig, this.animate, { 78 | duration: this.duration, 79 | delay: this.delay, 80 | easing: this.easing, 81 | elasticity: this.elasticity, 82 | autoplay: false, 83 | direction: this.direction, 84 | loop: this.loop 85 | }) 86 | if (this.offset || this.offset === 0) { 87 | animeConfig.offset = this.offset 88 | } 89 | // object numeric value animates 90 | if (this.object) { 91 | Object.assign(animeConfig, this.objectProps) 92 | } 93 | animeConfig.targets = this.getTargets() 94 | this.setFromProperties(animeConfig) 95 | return animeConfig 96 | }, 97 | 98 | pause () { 99 | this.anime.pause() 100 | }, 101 | 102 | play () { 103 | this.anime.play() 104 | }, 105 | restart () { 106 | this.anime.restart() 107 | }, 108 | setFromProperties (animeConfig) { 109 | const transforms = [] 110 | for (let key in this.from) { 111 | if (validTransforms.includes(key)) { 112 | const transformValue = is.str(this.from[key]) ? this.from[key] : `${this.from[key]}${this.getTransformUnit(key)}` 113 | transforms.push(`${key}(${transformValue})`) 114 | } else { 115 | if (is.arr(animeConfig.targets)) { 116 | animeConfig.targets.forEach(el => { 117 | el.style[key] = this.from[key] 118 | }) 119 | } else { 120 | animeConfig.targets.style[key] = this.from[key] 121 | } 122 | } 123 | } 124 | if (transforms.length) { 125 | const transfromStr = transforms.join(' ') 126 | if (is.arr(animeConfig.targets)) { 127 | animeConfig.targets.forEach(el => { 128 | el.style.transform = transfromStr 129 | }) 130 | } else { 131 | animeConfig.targets.style.transform = transfromStr 132 | } 133 | } 134 | }, 135 | 136 | // copy from animejs 137 | getTransformUnit (propName) { 138 | if (propName.indexOf('translate') > -1 || propName.indexOf('perspective') > -1) return 'px' 139 | if (propName.indexOf('rotate') > -1 || propName.indexOf('skew') > -1) return 'deg' 140 | }, 141 | 142 | getTargets () { 143 | return this.object || this.$el 144 | } 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /src/anime-prop.js: -------------------------------------------------------------------------------- 1 | export default { 2 | duration: { 3 | type: [Number, Function], 4 | default: function () { 5 | return 1000 6 | } 7 | }, 8 | delay: { 9 | type: [Number, Function], 10 | default: 0 11 | }, 12 | offset: { 13 | type: [Number, String] 14 | }, 15 | easing: { 16 | type: [String, Array], 17 | default: 'easeOutElastic' 18 | }, 19 | elasticity: { 20 | type: [Number, Function], 21 | default: 500 22 | }, 23 | direction: { 24 | type: String, 25 | default: () => 'normal' 26 | }, 27 | loop: { 28 | type: [Boolean, Number], 29 | default: false 30 | }, 31 | seek: { 32 | type: Number 33 | }, 34 | from: { 35 | type: Object, 36 | default: function () { 37 | return {} 38 | } 39 | }, 40 | animate: { 41 | type: Object, 42 | default: function () { 43 | return {} 44 | } 45 | }, 46 | object: { 47 | type: Object 48 | }, 49 | objectProps: { 50 | type: Object 51 | }, 52 | tag: { 53 | type: String, 54 | default: 'div' 55 | }, 56 | playing: { 57 | type: Boolean, 58 | default: true 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import VueAnime from './vue-anime' 2 | import VueAnimeGroup from './vue-anime-group' 3 | import VueAnimeTimeLine from './vue-anime-timeline' 4 | 5 | export { 6 | VueAnime, 7 | VueAnimeGroup, 8 | VueAnimeTimeLine 9 | } 10 | -------------------------------------------------------------------------------- /src/is.js: -------------------------------------------------------------------------------- 1 | /* global SVGElement:true */ 2 | function stringContains (str, text) { 3 | return str.indexOf(text) > -1 4 | } 5 | export const is = { 6 | arr: a => Array.isArray(a), 7 | obj: a => stringContains(Object.prototype.toString.call(a), 'Object'), 8 | pth: a => is.obj(a) && a.hasOwnProperty('totalLength'), 9 | svg: a => a instanceof SVGElement, 10 | dom: a => a.nodeType || is.svg(a), 11 | str: a => typeof a === 'string', 12 | fnc: a => typeof a === 'function', 13 | und: a => typeof a === 'undefined', 14 | hex: a => /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a), 15 | rgb: a => /^rgb/.test(a), 16 | hsl: a => /^hsl/.test(a), 17 | col: a => (is.hex(a) || is.rgb(a) || is.hsl(a)) 18 | } 19 | -------------------------------------------------------------------------------- /src/vue-anime-group.js: -------------------------------------------------------------------------------- 1 | import animeMixin from './anime-mixin' 2 | 3 | export default { 4 | name: 'vue-anime-group', 5 | mixins: [animeMixin], 6 | 7 | data () { 8 | return { 9 | animes: [] 10 | } 11 | }, 12 | render (h) { 13 | const slots = this.$slots.default 14 | let children = slots 15 | return h(this.tag, Object.assign({ 16 | class: '_vue-anime-group', 17 | on: this.$listeners 18 | }, this.$attrs), children) 19 | }, 20 | 21 | methods: { 22 | getTargets () { 23 | const targets = [] 24 | for (let anime of this.animes) { 25 | targets.push(anime.$el) 26 | } 27 | return targets 28 | }, 29 | 30 | addAnime (anime) { 31 | this.animes.push(anime) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/vue-anime-timeline.js: -------------------------------------------------------------------------------- 1 | import anime from 'animejs' 2 | import props from './anime-prop' 3 | 4 | export default { 5 | name: 'vue-anime-timeline', 6 | props: Object.assign(props, { 7 | timelines: { 8 | type: Array 9 | } 10 | }), 11 | 12 | data () { 13 | return { 14 | animeInstance: null, 15 | animes: [] 16 | } 17 | }, 18 | 19 | computed: { 20 | hasUpdateListener () { 21 | return this.$listeners && this.$listeners.update 22 | } 23 | }, 24 | 25 | render (h) { 26 | const slots = this.$slots.default 27 | let children = slots 28 | return h(this.tag, this.$attrs, children) 29 | }, 30 | 31 | mounted () { 32 | this.initAnimeTimeLine() 33 | }, 34 | 35 | watch: { 36 | 'playing': function (value) { 37 | if (value) { 38 | this.play() 39 | } else { 40 | this.pause() 41 | } 42 | }, 43 | 'seek': function (value) { 44 | this.animeInstance.seek(value) 45 | } 46 | }, 47 | 48 | methods: { 49 | initAnimeTimeLine () { 50 | this.animeInstance = anime.timeline({ 51 | direction: this.direction, 52 | loop: this.loop, 53 | delay: this.delay, // adding delay for the case of group time line 54 | autoplay: false 55 | }) 56 | 57 | if (this.timelines) { 58 | // time frame for one or group 59 | for (let timeline of this.timelines) { 60 | timeline.targets = this.getTargets() 61 | this.animeInstance.add(timeline) 62 | } 63 | } else { 64 | // add each time line with different target 65 | for (let i = 0; i < this.animes.length; i++) { 66 | this.animeInstance.add(this.animes[i].getAnimeConfig(this.$props)) 67 | } 68 | } 69 | if (this.hasUpdateListener) { 70 | this.animeInstance.update = (anim) => { 71 | this.$emit('update', anim) 72 | } 73 | } 74 | this.animeInstance.begin = (anim) => { 75 | this.$emit('begin', anim) 76 | } 77 | this.animeInstance.complete = (anim) => { 78 | this.$emit('complete', anim) 79 | } 80 | 81 | if (this.playing) { 82 | this.animeInstance.play() 83 | } 84 | }, 85 | 86 | getTargets () { 87 | const targets = [] 88 | for (let anime of this.animes) { 89 | targets.push(anime.$el) 90 | } 91 | return targets 92 | }, 93 | 94 | play () { 95 | this.animeInstance.play() 96 | }, 97 | pause () { 98 | this.animeInstance.pause() 99 | }, 100 | restart () { 101 | this.animeInstance.restart() 102 | }, 103 | 104 | addAnime (anime) { 105 | this.animes.push(anime) 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /src/vue-anime.js: -------------------------------------------------------------------------------- 1 | import animeMixin from './anime-mixin' 2 | 3 | export default { 4 | name: 'vue-anime', 5 | mixins: [animeMixin], 6 | 7 | render (h) { 8 | const slots = this.$slots.default 9 | let children = slots 10 | const { footer } = this.$slots 11 | if (footer) { 12 | children = slots ? [...slots, ...footer] : [...footer] 13 | } 14 | return h(this.tag, Object.assign({ 15 | class: '_vue-anime', 16 | on: this.$listeners 17 | }, this.$attrs), children) 18 | }, 19 | 20 | methods: { 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | configureWebpack: { 3 | entry: { 4 | app: './demo/main.js' 5 | } 6 | }, 7 | productionSourceMap: false 8 | } 9 | --------------------------------------------------------------------------------