(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react"), require("react-dom")); else if(typeof define === 'function' && define.amd) define(["react", "react-dom"], factory); else if(typeof exports === 'object') exports["rc-swipeout"] = factory(require("react"), require("react-dom")); else root["rc-swipeout"] = factory(root["React"], root["ReactDOM"]); })(this, function(__WEBPACK_EXTERNAL_MODULE_48__, __WEBPACK_EXTERNAL_MODULE_96__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // identity function for calling harmony imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 97); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { var core = module.exports = { version: '2.5.7' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /* 1 */ /***/ (function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(11)(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 3 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(10); var IE8_DOM_DEFINE = __webpack_require__(39); var toPrimitive = __webpack_require__(26); var dP = Object.defineProperty; exports.f = __webpack_require__(2) ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return dP(O, P, Attributes); } catch (e) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(1); var core = __webpack_require__(0); var ctx = __webpack_require__(37); var hide = __webpack_require__(6); var has = __webpack_require__(3); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var IS_WRAP = type & $export.W; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE]; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; var key, own, out; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; if (own && has(exports, key)) continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function (C) { var F = function (a, b, c) { if (this instanceof C) { switch (arguments.length) { case 0: return new C(); case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if (IS_PROTO) { (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(4); var createDesc = __webpack_require__(15); module.exports = __webpack_require__(2) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /* 7 */ /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(40); var defined = __webpack_require__(17); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__(24)('wks'); var uid = __webpack_require__(16); var Symbol = __webpack_require__(1).Symbol; var USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function (name) { return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(7); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; /***/ }), /* 11 */ /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; /***/ }), /* 12 */ /***/ (function(module, exports) { module.exports = true; /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(44); var enumBugKeys = __webpack_require__(18); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; /***/ }), /* 14 */ /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }), /* 15 */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /* 16 */ /***/ (function(module, exports) { var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /* 17 */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /* 18 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /* 19 */ /***/ (function(module, exports) { module.exports = {}; /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(10); var dPs = __webpack_require__(76); var enumBugKeys = __webpack_require__(18); var IE_PROTO = __webpack_require__(23)('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function () { // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__(38)('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; __webpack_require__(70).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { Empty[PROTOTYPE] = anObject(O); result = new Empty(); Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }), /* 21 */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__(4).f; var has = __webpack_require__(3); var TAG = __webpack_require__(9)('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; /***/ }), /* 23 */ /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__(24)('keys'); var uid = __webpack_require__(16); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; /***/ }), /* 24 */ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(0); var global = __webpack_require__(1); var SHARED = '__core-js_shared__'; var store = global[SHARED] || (global[SHARED] = {}); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: core.version, mode: __webpack_require__(12) ? 'pure' : 'global', copyright: '© 2018 Denis Pushkarev (zloirock.ru)' }); /***/ }), /* 25 */ /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /* 26 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(7); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /* 27 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(1); var core = __webpack_require__(0); var LIBRARY = __webpack_require__(12); var wksExt = __webpack_require__(28); var defineProperty = __webpack_require__(4).f; module.exports = function (name) { var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); }; /***/ }), /* 28 */ /***/ (function(module, exports, __webpack_require__) { exports.f = __webpack_require__(9); /***/ }), /* 29 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(62), __esModule: true }; /***/ }), /* 30 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; /***/ }), /* 31 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(29); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; (0, _defineProperty2.default)(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /***/ }), /* 32 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _assign = __webpack_require__(53); var _assign2 = _interopRequireDefault(_assign); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = _assign2.default || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /***/ }), /* 33 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _setPrototypeOf = __webpack_require__(55); var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); var _create = __webpack_require__(54); var _create2 = _interopRequireDefault(_create); var _typeof2 = __webpack_require__(35); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); } subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; }; /***/ }), /* 34 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _typeof2 = __webpack_require__(35); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; }; /***/ }), /* 35 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _iterator = __webpack_require__(57); var _iterator2 = _interopRequireDefault(_iterator); var _symbol = __webpack_require__(56); var _symbol2 = _interopRequireDefault(_symbol); var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { return typeof obj === "undefined" ? "undefined" : _typeof(obj); } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); }; /***/ }), /* 36 */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /* 37 */ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(66); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /* 38 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(7); var document = __webpack_require__(1).document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; /***/ }), /* 39 */ /***/ (function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(2) && !__webpack_require__(11)(function () { return Object.defineProperty(__webpack_require__(38)('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 40 */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(36); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }), /* 41 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var LIBRARY = __webpack_require__(12); var $export = __webpack_require__(5); var redefine = __webpack_require__(45); var hide = __webpack_require__(6); var Iterators = __webpack_require__(19); var $iterCreate = __webpack_require__(72); var setToStringTag = __webpack_require__(22); var getPrototypeOf = __webpack_require__(78); var ITERATOR = __webpack_require__(9)('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; var KEYS = 'keys'; var VALUES = 'values'; var returnThis = function () { return this; }; module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); var getMethod = function (kind) { if (!BUGGY && kind in proto) return proto[kind]; switch (kind) { case KEYS: return function keys() { return new Constructor(this, kind); }; case VALUES: return function values() { return new Constructor(this, kind); }; } return function entries() { return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator'; var DEF_VALUES = DEFAULT == VALUES; var VALUES_BUG = false; var proto = Base.prototype; var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; var $default = $native || getMethod(DEFAULT); var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; var methods, key, IteratorPrototype; // Fix native if ($anyNative) { IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if (DEF_VALUES && $native && $native.name !== VALUES) { VALUES_BUG = true; $default = function values() { return $native.call(this); }; } // Define iterator if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if (DEFAULT) { methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if (FORCED) for (key in methods) { if (!(key in proto)) redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }), /* 42 */ /***/ (function(module, exports, __webpack_require__) { var pIE = __webpack_require__(14); var createDesc = __webpack_require__(15); var toIObject = __webpack_require__(8); var toPrimitive = __webpack_require__(26); var has = __webpack_require__(3); var IE8_DOM_DEFINE = __webpack_require__(39); var gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(2) ? gOPD : function getOwnPropertyDescriptor(O, P) { O = toIObject(O); P = toPrimitive(P, true); if (IE8_DOM_DEFINE) try { return gOPD(O, P); } catch (e) { /* empty */ } if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); }; /***/ }), /* 43 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = __webpack_require__(44); var hiddenKeys = __webpack_require__(18).concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return $keys(O, hiddenKeys); }; /***/ }), /* 44 */ /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(3); var toIObject = __webpack_require__(8); var arrayIndexOf = __webpack_require__(68)(false); var IE_PROTO = __webpack_require__(23)('IE_PROTO'); module.exports = function (object, names) { var O = toIObject(object); var i = 0; var result = []; var key; for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }), /* 45 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(6); /***/ }), /* 46 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(17); module.exports = function (it) { return Object(defined(it)); }; /***/ }), /* 47 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return DIRECTION_NONE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return DIRECTION_LEFT; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return DIRECTION_RIGHT; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return DIRECTION_UP; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return DIRECTION_DOWN; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return DIRECTION_HORIZONTAL; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return DIRECTION_VERTICAL; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DIRECTION_ALL; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return PRESS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return SWIPE; }); /* tslint:disable:no-bitwise */ // http://hammerjs.github.io/api/#directions var DIRECTION_NONE = 1; // 00001 var DIRECTION_LEFT = 2; // 00010 var DIRECTION_RIGHT = 4; // 00100 var DIRECTION_UP = 8; // 01000 var DIRECTION_DOWN = 16; // 10000 var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; // 00110 6 var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; // 11000 24 var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; // 11110 30 // http://hammerjs.github.io/recognizer-press/ var PRESS = { time: 251 }; // http://hammerjs.github.io/recognizer-swipe/ var SWIPE = { threshold: 10, velocity: 0.3 }; /***/ }), /* 48 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_48__; /***/ }), /* 49 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src___ = __webpack_require__(52); /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__src___["a" /* default */]); /***/ }), /* 50 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /* 51 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(32); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(58); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(30); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(31); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(34); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(33); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_dom__ = __webpack_require__(96); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_dom__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_rc_gesture__ = __webpack_require__(94); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames__ = __webpack_require__(59); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_classnames__); var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; }if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]]; }return t; }; // https://developer.mozilla.org/en-US/docs/Web/API/Element/matches // http://caniuse.com/#search=match function closest(el, selector) { var matchesSelector = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector; while (el) { if (matchesSelector.call(el, selector)) { return el; } else { el = el.parentElement; } } return null; } var Swipeout = function (_React$Component) { __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(Swipeout, _React$Component); function Swipeout(props) { __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Swipeout); var _this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, (Swipeout.__proto__ || Object.getPrototypeOf(Swipeout)).call(this, props)); _this.onCloseSwipe = function (ev) { if (!(_this.openedLeft || _this.openedRight)) { return; } var pNode = closest(ev.target, '.' + _this.props.prefixCls + '-actions'); if (!pNode) { ev.preventDefault(); _this.close(); } }; _this.onPanStart = function (e) { var direction = e.direction, moveStatus = e.moveStatus; var deltaX = moveStatus.x; // http://hammerjs.github.io/api/#directions var isLeft = direction === 2; var isRight = direction === 4; if (!isLeft && !isRight) { return; } var _this$props = _this.props, left = _this$props.left, right = _this$props.right; _this.needShowRight = isLeft && right.length > 0; _this.needShowLeft = isRight && left.length > 0; if (_this.left) { _this.left.style.visibility = _this.needShowRight ? 'hidden' : 'visible'; } if (_this.right) { _this.right.style.visibility = _this.needShowLeft ? 'hidden' : 'visible'; } if (_this.needShowLeft || _this.needShowRight) { _this.swiping = true; _this.setState({ swiping: _this.swiping }); _this._setStyle(deltaX); } }; _this.onPanMove = function (e) { var moveStatus = e.moveStatus, srcEvent = e.srcEvent; var deltaX = moveStatus.x; if (!_this.swiping) { return; } // fixed scroll when it's pan and moving. if (srcEvent && srcEvent.preventDefault) { srcEvent.preventDefault(); } _this._setStyle(deltaX); }; _this.onPanEnd = function (e) { if (!_this.swiping) { return; } var moveStatus = e.moveStatus; var deltaX = moveStatus.x; var needOpenRight = _this.needShowRight && Math.abs(deltaX) > _this.btnsRightWidth / 2; var needOpenLeft = _this.needShowLeft && Math.abs(deltaX) > _this.btnsLeftWidth / 2; if (needOpenRight) { _this.doOpenRight(); } else if (needOpenLeft) { _this.doOpenLeft(); } else { _this.close(); } _this.swiping = false; _this.setState({ swiping: _this.swiping }); _this.needShowLeft = false; _this.needShowRight = false; }; _this.doOpenLeft = function () { _this.open(_this.btnsLeftWidth, true, false); }; _this.doOpenRight = function () { _this.open(-_this.btnsRightWidth, true, false); }; // set content & actions style _this._setStyle = function (value) { var limit = value > 0 ? _this.btnsLeftWidth : -_this.btnsRightWidth; var contentLeft = _this._getContentEasing(value, limit); _this.content.style.left = contentLeft + 'px'; if (_this.cover) { _this.cover.style.display = Math.abs(value) > 0 ? 'block' : 'none'; _this.cover.style.left = contentLeft + 'px'; } }; _this.open = function (value, openedLeft, openedRight) { if (!_this.openedLeft && !_this.openedRight && _this.props.onOpen) { _this.props.onOpen(); } _this.openedLeft = openedLeft; _this.openedRight = openedRight; _this._setStyle(value); }; _this.close = function () { if ((_this.openedLeft || _this.openedRight) && _this.props.onClose) { _this.props.onClose(); } _this._setStyle(0); _this.openedLeft = false; _this.openedRight = false; }; _this.onTouchMove = function (e) { if (_this.swiping) { e.preventDefault(); } }; _this.state = { swiping: false }; _this.openedLeft = false; _this.openedRight = false; return _this; } __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default()(Swipeout, [{ key: 'componentDidMount', value: function componentDidMount() { this.btnsLeftWidth = this.left ? this.left.offsetWidth : 0; this.btnsRightWidth = this.right ? this.right.offsetWidth : 0; document.body.addEventListener('touchstart', this.onCloseSwipe, true); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { document.body.removeEventListener('touchstart', this.onCloseSwipe, true); } // left & right button click }, { key: 'onBtnClick', value: function onBtnClick(ev, btn) { var onPress = btn.onPress; if (onPress) { onPress(ev); } if (this.props.autoClose) { this.close(); } } }, { key: '_getContentEasing', value: function _getContentEasing(value, limit) { // limit content style left when value > actions width var delta = Math.abs(value) - Math.abs(limit); var isOverflow = delta > 0; var factor = limit > 0 ? 1 : -1; if (isOverflow) { value = limit + Math.pow(delta, 0.85) * factor; return Math.abs(value) > Math.abs(limit) ? limit : value; } return value; } }, { key: 'renderButtons', value: function renderButtons(buttons, _ref) { var _this2 = this; var prefixCls = this.props.prefixCls; return buttons && buttons.length ? __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement( 'div', { className: prefixCls + '-actions ' + prefixCls + '-actions-' + _ref, ref: function ref(el) { return _this2[_ref] = el; } }, buttons.map(function (btn, i) { return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement( 'div', { key: i, className: prefixCls + '-btn ' + (btn.hasOwnProperty('className') ? btn.className : ''), style: btn.style, role: 'button', onClick: function onClick(e) { return _this2.onBtnClick(e, btn); } }, __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement( 'div', { className: prefixCls + '-btn-text' }, btn.text || 'Click' ) ); }) ) : null; } }, { key: 'render', value: function render() { var _this3 = this; var _a = this.props, prefixCls = _a.prefixCls, left = _a.left, right = _a.right, disabled = _a.disabled, children = _a.children, restProps = __rest(_a, ["prefixCls", "left", "right", "disabled", "children"]); var autoClose = restProps.autoClose, onOpen = restProps.onOpen, onClose = restProps.onClose, divProps = __rest(restProps, ["autoClose", "onOpen", "onClose"]); var cls = __WEBPACK_IMPORTED_MODULE_9_classnames___default()(prefixCls, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()({}, prefixCls + '-swiping', this.state.swiping)); var refProps = { ref: function ref(el) { return _this3.content = __WEBPACK_IMPORTED_MODULE_7_react_dom___default.a.findDOMNode(el); } }; return (left.length || right.length) && !disabled ? __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement( 'div', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({ className: cls }, divProps), __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div', { className: prefixCls + '-cover', ref: function ref(el) { return _this3.cover = el; } }), this.renderButtons(left, 'left'), this.renderButtons(right, 'right'), __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement( __WEBPACK_IMPORTED_MODULE_8_rc_gesture__["a" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({ onTouchMove: this.onTouchMove, onPanStart: this.onPanStart, onPanMove: this.onPanMove, onPanEnd: this.onPanEnd, onPanCancel: this.onPanEnd, onSwipeLeft: this.doOpenRight, onSwipeRight: this.doOpenLeft, direction: 'horizontal' }, refProps), __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement( 'div', { className: prefixCls + '-content' }, children ) ) ) : __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement( 'div', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, refProps, divProps), children ); } }]); return Swipeout; }(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component); /* harmony default export */ __webpack_exports__["a"] = (Swipeout); Swipeout.defaultProps = { prefixCls: 'rc-swipeout', autoClose: false, disabled: false, left: [], right: [], onOpen: function onOpen() {}, onClose: function onClose() {} }; /***/ }), /* 52 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Swipeout__ = __webpack_require__(51); /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__Swipeout__["a" /* default */]); /***/ }), /* 53 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(60), __esModule: true }; /***/ }), /* 54 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(61), __esModule: true }; /***/ }), /* 55 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(63), __esModule: true }; /***/ }), /* 56 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(64), __esModule: true }; /***/ }), /* 57 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(65), __esModule: true }; /***/ }), /* 58 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(29); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (obj, key, value) { if (key in obj) { (0, _defineProperty2.default)(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }; /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; function classNames () { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = typeof arg; if (argType === 'string' || argType === 'number') { classes.push(arg); } else if (Array.isArray(arg) && arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } else if (argType === 'object') { for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } } return classes.join(' '); } if (typeof module !== 'undefined' && module.exports) { classNames.default = classNames; module.exports = classNames; } else if (true) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () { return classNames; }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else { window.classNames = classNames; } }()); /***/ }), /* 60 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(84); module.exports = __webpack_require__(0).Object.assign; /***/ }), /* 61 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(85); var $Object = __webpack_require__(0).Object; module.exports = function create(P, D) { return $Object.create(P, D); }; /***/ }), /* 62 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(86); var $Object = __webpack_require__(0).Object; module.exports = function defineProperty(it, key, desc) { return $Object.defineProperty(it, key, desc); }; /***/ }), /* 63 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(87); module.exports = __webpack_require__(0).Object.setPrototypeOf; /***/ }), /* 64 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(90); __webpack_require__(88); __webpack_require__(91); __webpack_require__(92); module.exports = __webpack_require__(0).Symbol; /***/ }), /* 65 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(89); __webpack_require__(93); module.exports = __webpack_require__(28).f('iterator'); /***/ }), /* 66 */ /***/ (function(module, exports) { module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; /***/ }), /* 67 */ /***/ (function(module, exports) { module.exports = function () { /* empty */ }; /***/ }), /* 68 */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(8); var toLength = __webpack_require__(82); var toAbsoluteIndex = __webpack_require__(81); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); var length = toLength(O.length); var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) if (IS_INCLUDES || index in O) { if (O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; /***/ }), /* 69 */ /***/ (function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols var getKeys = __webpack_require__(13); var gOPS = __webpack_require__(21); var pIE = __webpack_require__(14); module.exports = function (it) { var result = getKeys(it); var getSymbols = gOPS.f; if (getSymbols) { var symbols = getSymbols(it); var isEnum = pIE.f; var i = 0; var key; while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); } return result; }; /***/ }), /* 70 */ /***/ (function(module, exports, __webpack_require__) { var document = __webpack_require__(1).document; module.exports = document && document.documentElement; /***/ }), /* 71 */ /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) var cof = __webpack_require__(36); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; /***/ }), /* 72 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var create = __webpack_require__(20); var descriptor = __webpack_require__(15); var setToStringTag = __webpack_require__(22); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() __webpack_require__(6)(IteratorPrototype, __webpack_require__(9)('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }), /* 73 */ /***/ (function(module, exports) { module.exports = function (done, value) { return { value: value, done: !!done }; }; /***/ }), /* 74 */ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(16)('meta'); var isObject = __webpack_require__(7); var has = __webpack_require__(3); var setDesc = __webpack_require__(4).f; var id = 0; var isExtensible = Object.isExtensible || function () { return true; }; var FREEZE = !__webpack_require__(11)(function () { return isExtensible(Object.preventExtensions({})); }); var setMeta = function (it) { setDesc(it, META, { value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return 'F'; // not necessary to add metadata if (!create) return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function (it, create) { if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return true; // not necessary to add metadata if (!create) return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function (it) { if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; /***/ }), /* 75 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = __webpack_require__(13); var gOPS = __webpack_require__(21); var pIE = __webpack_require__(14); var toObject = __webpack_require__(46); var IObject = __webpack_require__(40); var $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__(11)(function () { var A = {}; var B = {}; // eslint-disable-next-line no-undef var S = Symbol(); var K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function (k) { B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source) { // eslint-disable-line no-unused-vars var T = toObject(target); var aLen = arguments.length; var index = 1; var getSymbols = gOPS.f; var isEnum = pIE.f; while (aLen > index) { var S = IObject(arguments[index++]); var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); var length = keys.length; var j = 0; var key; while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; } return T; } : $assign; /***/ }), /* 76 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(4); var anObject = __webpack_require__(10); var getKeys = __webpack_require__(13); module.exports = __webpack_require__(2) ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = getKeys(Properties); var length = keys.length; var i = 0; var P; while (length > i) dP.f(O, P = keys[i++], Properties[P]); return O; }; /***/ }), /* 77 */ /***/ (function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = __webpack_require__(8); var gOPN = __webpack_require__(43).f; var toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function (it) { try { return gOPN(it); } catch (e) { return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it) { return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; /***/ }), /* 78 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__(3); var toObject = __webpack_require__(46); var IE_PROTO = __webpack_require__(23)('IE_PROTO'); var ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function (O) { O = toObject(O); if (has(O, IE_PROTO)) return O[IE_PROTO]; if (typeof O.constructor == 'function' && O instanceof O.constructor) { return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; /***/ }), /* 79 */ /***/ (function(module, exports, __webpack_require__) { // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = __webpack_require__(7); var anObject = __webpack_require__(10); var check = function (O, proto) { anObject(O); if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function (test, buggy, set) { try { set = __webpack_require__(37)(Function.call, __webpack_require__(42).f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch (e) { buggy = true; } return function setPrototypeOf(O, proto) { check(O, proto); if (buggy) O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check }; /***/ }), /* 80 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(25); var defined = __webpack_require__(17); // true -> String#at // false -> String#codePointAt module.exports = function (TO_STRING) { return function (that, pos) { var s = String(defined(that)); var i = toInteger(pos); var l = s.length; var a, b; if (i < 0 || i >= l) return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; /***/ }), /* 81 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(25); var max = Math.max; var min = Math.min; module.exports = function (index, length) { index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }), /* 82 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(25); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /* 83 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var addToUnscopables = __webpack_require__(67); var step = __webpack_require__(73); var Iterators = __webpack_require__(19); var toIObject = __webpack_require__(8); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = __webpack_require__(41)(Array, 'Array', function (iterated, kind) { this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function () { var O = this._t; var kind = this._k; var index = this._i++; if (!O || index >= O.length) { this._t = undefined; return step(1); } if (kind == 'keys') return step(0, index); if (kind == 'values') return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); /***/ }), /* 84 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(5); $export($export.S + $export.F, 'Object', { assign: __webpack_require__(75) }); /***/ }), /* 85 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(5); // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', { create: __webpack_require__(20) }); /***/ }), /* 86 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(5); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__(2), 'Object', { defineProperty: __webpack_require__(4).f }); /***/ }), /* 87 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = __webpack_require__(5); $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(79).set }); /***/ }), /* 88 */ /***/ (function(module, exports) { /***/ }), /* 89 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $at = __webpack_require__(80)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(41)(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function () { var O = this._t; var index = this._i; var point; if (index >= O.length) return { value: undefined, done: true }; point = $at(O, index); this._i += point.length; return { value: point, done: false }; }); /***/ }), /* 90 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // ECMAScript 6 symbols shim var global = __webpack_require__(1); var has = __webpack_require__(3); var DESCRIPTORS = __webpack_require__(2); var $export = __webpack_require__(5); var redefine = __webpack_require__(45); var META = __webpack_require__(74).KEY; var $fails = __webpack_require__(11); var shared = __webpack_require__(24); var setToStringTag = __webpack_require__(22); var uid = __webpack_require__(16); var wks = __webpack_require__(9); var wksExt = __webpack_require__(28); var wksDefine = __webpack_require__(27); var enumKeys = __webpack_require__(69); var isArray = __webpack_require__(71); var anObject = __webpack_require__(10); var isObject = __webpack_require__(7); var toIObject = __webpack_require__(8); var toPrimitive = __webpack_require__(26); var createDesc = __webpack_require__(15); var _create = __webpack_require__(20); var gOPNExt = __webpack_require__(77); var $GOPD = __webpack_require__(42); var $DP = __webpack_require__(4); var $keys = __webpack_require__(13); var gOPD = $GOPD.f; var dP = $DP.f; var gOPN = gOPNExt.f; var $Symbol = global.Symbol; var $JSON = global.JSON; var _stringify = $JSON && $JSON.stringify; var PROTOTYPE = 'prototype'; var HIDDEN = wks('_hidden'); var TO_PRIMITIVE = wks('toPrimitive'); var isEnum = {}.propertyIsEnumerable; var SymbolRegistry = shared('symbol-registry'); var AllSymbols = shared('symbols'); var OPSymbols = shared('op-symbols'); var ObjectProto = Object[PROTOTYPE]; var USE_NATIVE = typeof $Symbol == 'function'; var QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDesc = DESCRIPTORS && $fails(function () { return _create(dP({}, 'a', { get: function () { return dP(this, 'a', { value: 7 }).a; } })).a != 7; }) ? function (it, key, D) { var protoDesc = gOPD(ObjectProto, key); if (protoDesc) delete ObjectProto[key]; dP(it, key, D); if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); } : dP; var wrap = function (tag) { var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); sym._k = tag; return sym; }; var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { return typeof it == 'symbol'; } : function (it) { return it instanceof $Symbol; }; var $defineProperty = function defineProperty(it, key, D) { if (it === ObjectProto) $defineProperty(OPSymbols, key, D); anObject(it); key = toPrimitive(key, true); anObject(D); if (has(AllSymbols, key)) { if (!D.enumerable) { if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); it[HIDDEN][key] = true; } else { if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; D = _create(D, { enumerable: createDesc(0, false) }); } return setSymbolDesc(it, key, D); } return dP(it, key, D); }; var $defineProperties = function defineProperties(it, P) { anObject(it); var keys = enumKeys(P = toIObject(P)); var i = 0; var l = keys.length; var key; while (l > i) $defineProperty(it, key = keys[i++], P[key]); return it; }; var $create = function create(it, P) { return P === undefined ? _create(it) : $defineProperties(_create(it), P); }; var $propertyIsEnumerable = function propertyIsEnumerable(key) { var E = isEnum.call(this, key = toPrimitive(key, true)); if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { it = toIObject(it); key = toPrimitive(key, true); if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; var D = gOPD(it, key); if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; return D; }; var $getOwnPropertyNames = function getOwnPropertyNames(it) { var names = gOPN(toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); } return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { var IS_OP = it === ObjectProto; var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); } return result; }; // 19.4.1.1 Symbol([description]) if (!USE_NATIVE) { $Symbol = function Symbol() { if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); var tag = uid(arguments.length > 0 ? arguments[0] : undefined); var $set = function (value) { if (this === ObjectProto) $set.call(OPSymbols, value); if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; setSymbolDesc(this, tag, createDesc(1, value)); }; if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); return wrap(tag); }; redefine($Symbol[PROTOTYPE], 'toString', function toString() { return this._k; }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; __webpack_require__(43).f = gOPNExt.f = $getOwnPropertyNames; __webpack_require__(14).f = $propertyIsEnumerable; __webpack_require__(21).f = $getOwnPropertySymbols; if (DESCRIPTORS && !__webpack_require__(12)) { redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } wksExt.f = function (name) { return wrap(wks(name)); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); for (var es6Symbols = ( // 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 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function (key) { return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(sym) { if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; }, useSetter: function () { setter = true; }, useSimple: function () { setter = false; } }); $export($export.S + $export.F * !USE_NATIVE, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: $defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: $defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; })), 'JSON', { stringify: function stringify(it) { var args = [it]; var i = 1; var replacer, $replacer; while (arguments.length > i) args.push(arguments[i++]); $replacer = replacer = args[1]; if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined if (!isArray(replacer)) replacer = function (key, value) { if (typeof $replacer == 'function') value = $replacer.call(this, key, value); if (!isSymbol(value)) return value; }; args[1] = replacer; return _stringify.apply($JSON, args); } }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(6)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); /***/ }), /* 91 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(27)('asyncIterator'); /***/ }), /* 92 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(27)('observable'); /***/ }), /* 93 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(83); var global = __webpack_require__(1); var hide = __webpack_require__(6); var Iterators = __webpack_require__(19); var TO_STRING_TAG = __webpack_require__(9)('toStringTag'); var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + 'TextTrackList,TouchList').split(','); for (var i = 0; i < DOMIterables.length; i++) { var NAME = DOMIterables[i]; var Collection = global[NAME]; var proto = Collection && Collection.prototype; if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; } /***/ }), /* 94 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(32); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(30); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(31); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(34); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(33); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util__ = __webpack_require__(95); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__config__ = __webpack_require__(47); /* tslint:disable:no-console */ ; ; var directionMap = { all: __WEBPACK_IMPORTED_MODULE_7__config__["a" /* DIRECTION_ALL */], vertical: __WEBPACK_IMPORTED_MODULE_7__config__["b" /* DIRECTION_VERTICAL */], horizontal: __WEBPACK_IMPORTED_MODULE_7__config__["c" /* DIRECTION_HORIZONTAL */] }; var Gesture = function (_Component) { __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Gesture, _Component); function Gesture(props) { __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, Gesture); var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, (Gesture.__proto__ || Object.getPrototypeOf(Gesture)).call(this, props)); _this.state = {}; _this.triggerEvent = function (name) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var cb = _this.props[name]; if (typeof cb === 'function') { // always give user gesture object as first params first cb.apply(undefined, [_this.getGestureState()].concat(args)); } }; _this.triggerCombineEvent = function (mainEventName, eventStatus) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; } _this.triggerEvent.apply(_this, [mainEventName].concat(args)); _this.triggerSubEvent.apply(_this, [mainEventName, eventStatus].concat(args)); }; _this.triggerSubEvent = function (mainEventName, eventStatus) { for (var _len3 = arguments.length, args = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) { args[_key3 - 2] = arguments[_key3]; } if (eventStatus) { var subEventName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["a" /* getEventName */])(mainEventName, eventStatus); _this.triggerEvent.apply(_this, [subEventName].concat(args)); } }; _this.triggerPinchEvent = function (mainEventName, eventStatus) { for (var _len4 = arguments.length, args = Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) { args[_key4 - 2] = arguments[_key4]; } var scale = _this.gesture.scale; if (eventStatus === 'move' && typeof scale === 'number') { if (scale > 1) { _this.triggerEvent('onPinchOut'); } if (scale < 1) { _this.triggerEvent('onPinchIn'); } } _this.triggerCombineEvent.apply(_this, [mainEventName, eventStatus].concat(args)); }; _this.initPressTimer = function () { _this.cleanPressTimer(); _this.pressTimer = setTimeout(function () { _this.setGestureState({ press: true }); _this.triggerEvent('onPress'); }, __WEBPACK_IMPORTED_MODULE_7__config__["d" /* PRESS */].time); }; _this.cleanPressTimer = function () { /* tslint:disable:no-unused-expression */ _this.pressTimer && clearTimeout(_this.pressTimer); }; _this.setGestureState = function (params) { if (!_this.gesture) { _this.gesture = {}; } // cache the previous touches if (_this.gesture.touches) { _this.gesture.preTouches = _this.gesture.touches; } _this.gesture = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, _this.gesture, params); }; _this.getGestureState = function () { if (!_this.gesture) { return _this.gesture; } else { // shallow copy return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, _this.gesture); } }; _this.cleanGestureState = function () { delete _this.gesture; }; _this.getTouches = function (e) { return Array.prototype.slice.call(e.touches).map(function (item) { return { x: item.screenX, y: item.screenY }; }); }; _this.triggerUserCb = function (status, e) { var cbName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["a" /* getEventName */])('onTouch', status); if (cbName in _this.props) { _this.props[cbName](e); } }; _this._handleTouchStart = function (e) { _this.triggerUserCb('start', e); _this.event = e; if (e.touches.length > 1) { e.preventDefault(); } _this.initGestureStatus(e); _this.initPressTimer(); _this.checkIfMultiTouchStart(); }; _this.initGestureStatus = function (e) { _this.cleanGestureState(); // store the gesture start state var startTouches = _this.getTouches(e); var startTime = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["b" /* now */])(); var startMutliFingerStatus = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["c" /* calcMutliFingerStatus */])(startTouches); _this.setGestureState({ startTime: startTime, startTouches: startTouches, startMutliFingerStatus: startMutliFingerStatus, /* copy for next time touch move cala convenient*/ time: startTime, touches: startTouches, mutliFingerStatus: startMutliFingerStatus, srcEvent: _this.event }); }; _this.checkIfMultiTouchStart = function () { var _this$props = _this.props, enablePinch = _this$props.enablePinch, enableRotate = _this$props.enableRotate; var touches = _this.gesture.touches; if (touches.length > 1 && (enablePinch || enableRotate)) { if (enablePinch) { var startMutliFingerStatus = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["c" /* calcMutliFingerStatus */])(touches); _this.setGestureState({ startMutliFingerStatus: startMutliFingerStatus, /* init pinch status */ pinch: true, scale: 1 }); _this.triggerCombineEvent('onPinch', 'start'); } if (enableRotate) { _this.setGestureState({ /* init rotate status */ rotate: true, rotation: 0 }); _this.triggerCombineEvent('onRotate', 'start'); } } }; _this._handleTouchMove = function (e) { _this.triggerUserCb('move', e); _this.event = e; if (!_this.gesture) { // sometimes weird happen: touchstart -> touchmove..touchmove.. --> touchend --> touchmove --> touchend // so we need to skip the unnormal event cycle after touchend return; } // not a long press _this.cleanPressTimer(); _this.updateGestureStatus(e); _this.checkIfSingleTouchMove(); _this.checkIfMultiTouchMove(); }; _this.checkIfMultiTouchMove = function () { var _this$gesture = _this.gesture, pinch = _this$gesture.pinch, rotate = _this$gesture.rotate, touches = _this$gesture.touches, startMutliFingerStatus = _this$gesture.startMutliFingerStatus, mutliFingerStatus = _this$gesture.mutliFingerStatus; if (!pinch && !rotate) { return; } if (touches.length < 2) { _this.setGestureState({ pinch: false, rotate: false }); // Todo: 2 finger -> 1 finger, wait to test this situation pinch && _this.triggerCombineEvent('onPinch', 'cancel'); rotate && _this.triggerCombineEvent('onRotate', 'cancel'); return; } if (pinch) { var scale = mutliFingerStatus.z / startMutliFingerStatus.z; _this.setGestureState({ scale: scale }); _this.triggerPinchEvent('onPinch', 'move'); } if (rotate) { var rotation = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["d" /* calcRotation */])(startMutliFingerStatus, mutliFingerStatus); _this.setGestureState({ rotation: rotation }); _this.triggerCombineEvent('onRotate', 'move'); } }; _this.allowGesture = function () { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["e" /* shouldTriggerDirection */])(_this.gesture.direction, _this.directionSetting); }; _this.checkIfSingleTouchMove = function () { var _this$gesture2 = _this.gesture, pan = _this$gesture2.pan, touches = _this$gesture2.touches, moveStatus = _this$gesture2.moveStatus, preTouches = _this$gesture2.preTouches, _this$gesture2$availa = _this$gesture2.availablePan, availablePan = _this$gesture2$availa === undefined ? true : _this$gesture2$availa; if (touches.length > 1) { _this.setGestureState({ pan: false }); // Todo: 1 finger -> 2 finger, wait to test this situation pan && _this.triggerCombineEvent('onPan', 'cancel'); return; } // add avilablePan condition to fix the case in scrolling, which will cause unavailable pan move. if (moveStatus && availablePan) { var direction = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["f" /* getMovingDirection */])(preTouches[0], touches[0]); _this.setGestureState({ direction: direction }); var eventName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["g" /* getDirectionEventName */])(direction); if (!_this.allowGesture()) { // if the first move is unavailable, then judge all of remaining touch movings are also invalid. if (!pan) { _this.setGestureState({ availablePan: false }); } return; } if (!pan) { _this.triggerCombineEvent('onPan', 'start'); _this.setGestureState({ pan: true, availablePan: true }); } else { _this.triggerCombineEvent('onPan', eventName); _this.triggerSubEvent('onPan', 'move'); } } }; _this.checkIfMultiTouchEnd = function (status) { var _this$gesture3 = _this.gesture, pinch = _this$gesture3.pinch, rotate = _this$gesture3.rotate; if (pinch) { _this.triggerCombineEvent('onPinch', status); } if (rotate) { _this.triggerCombineEvent('onRotate', status); } }; _this.updateGestureStatus = function (e) { var time = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["b" /* now */])(); _this.setGestureState({ time: time }); if (!e.touches || !e.touches.length) { return; } var _this$gesture4 = _this.gesture, startTime = _this$gesture4.startTime, startTouches = _this$gesture4.startTouches, pinch = _this$gesture4.pinch, rotate = _this$gesture4.rotate; var touches = _this.getTouches(e); var moveStatus = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["h" /* calcMoveStatus */])(startTouches, touches, time - startTime); var mutliFingerStatus = void 0; if (pinch || rotate) { mutliFingerStatus = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["c" /* calcMutliFingerStatus */])(touches); } _this.setGestureState({ /* update status snapshot */ touches: touches, mutliFingerStatus: mutliFingerStatus, /* update duration status */ moveStatus: moveStatus }); }; _this._handleTouchEnd = function (e) { _this.triggerUserCb('end', e); _this.event = e; if (!_this.gesture) { return; } _this.cleanPressTimer(); _this.updateGestureStatus(e); _this.doSingleTouchEnd('end'); _this.checkIfMultiTouchEnd('end'); }; _this._handleTouchCancel = function (e) { _this.triggerUserCb('cancel', e); _this.event = e; // Todo: wait to test cancel case if (!_this.gesture) { return; } _this.cleanPressTimer(); _this.updateGestureStatus(e); _this.doSingleTouchEnd('cancel'); _this.checkIfMultiTouchEnd('cancel'); }; _this.triggerAllowEvent = function (type, status) { if (_this.allowGesture()) { _this.triggerCombineEvent(type, status); } else { _this.triggerSubEvent(type, status); } }; _this.doSingleTouchEnd = function (status) { var _this$gesture5 = _this.gesture, moveStatus = _this$gesture5.moveStatus, pinch = _this$gesture5.pinch, rotate = _this$gesture5.rotate, press = _this$gesture5.press, pan = _this$gesture5.pan, direction = _this$gesture5.direction; if (pinch || rotate) { return; } if (moveStatus) { var z = moveStatus.z, velocity = moveStatus.velocity; var swipe = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["i" /* shouldTriggerSwipe */])(z, velocity); _this.setGestureState({ swipe: swipe }); if (pan) { // pan need end, it's a process // sometimes, start with pan left, but end with pan right.... _this.triggerAllowEvent('onPan', status); } if (swipe) { var directionEvName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["g" /* getDirectionEventName */])(direction); // swipe just need a direction, it's a endpoint _this.triggerAllowEvent('onSwipe', directionEvName); return; } } if (press) { _this.triggerEvent('onPressUp'); return; } _this.triggerEvent('onTap'); }; _this.getTouchAction = function () { var _this$props2 = _this.props, enablePinch = _this$props2.enablePinch, enableRotate = _this$props2.enableRotate; var directionSetting = _this.directionSetting; if (enablePinch || enableRotate || directionSetting === __WEBPACK_IMPORTED_MODULE_7__config__["a" /* DIRECTION_ALL */]) { return 'pan-x pan-y'; } if (directionSetting === __WEBPACK_IMPORTED_MODULE_7__config__["b" /* DIRECTION_VERTICAL */]) { return 'pan-x'; } if (directionSetting === __WEBPACK_IMPORTED_MODULE_7__config__["c" /* DIRECTION_HORIZONTAL */]) { return 'pan-y'; } return 'auto'; }; _this.directionSetting = directionMap[props.direction]; return _this; } __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default()(Gesture, [{ key: 'componentWillUnmount', value: function componentWillUnmount() { this.cleanPressTimer(); } }, { key: 'render', value: function render() { var children = this.props.children; var child = __WEBPACK_IMPORTED_MODULE_5_react___default.a.Children.only(children); var touchAction = this.getTouchAction(); var events = { onTouchStart: this._handleTouchStart, onTouchMove: this._handleTouchMove, onTouchCancel: this._handleTouchCancel, onTouchEnd: this._handleTouchEnd }; return __WEBPACK_IMPORTED_MODULE_5_react___default.a.cloneElement(child, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, events, { style: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({ touchAction: touchAction }, child.props.style || {}) })); } }]); return Gesture; }(__WEBPACK_IMPORTED_MODULE_5_react__["Component"]); /* harmony default export */ __webpack_exports__["a"] = (Gesture); Gesture.defaultProps = { enableRotate: false, enablePinch: false, direction: 'all' }; /***/ }), /* 95 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = now; /* harmony export (immutable) */ __webpack_exports__["c"] = calcMutliFingerStatus; /* harmony export (immutable) */ __webpack_exports__["h"] = calcMoveStatus; /* harmony export (immutable) */ __webpack_exports__["d"] = calcRotation; /* harmony export (immutable) */ __webpack_exports__["a"] = getEventName; /* harmony export (immutable) */ __webpack_exports__["i"] = shouldTriggerSwipe; /* harmony export (immutable) */ __webpack_exports__["e"] = shouldTriggerDirection; /* unused harmony export getDirection */ /* harmony export (immutable) */ __webpack_exports__["f"] = getMovingDirection; /* harmony export (immutable) */ __webpack_exports__["g"] = getDirectionEventName; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__config__ = __webpack_require__(47); /* tslint:disable:no-bitwise */ function _calcTriangleDistance(x, y) { return Math.sqrt(x * x + y * y); } function _calcAngle(x, y) { var radian = Math.atan2(y, x); return 180 / (Math.PI / radian); } function now() { return Date.now(); } function calcMutliFingerStatus(touches) { if (touches.length < 2) { return; } var _touches$ = touches[0], x1 = _touches$.x, y1 = _touches$.y; var _touches$2 = touches[1], x2 = _touches$2.x, y2 = _touches$2.y; var deltaX = x2 - x1; var deltaY = y2 - y1; return { x: deltaX, y: deltaY, z: _calcTriangleDistance(deltaX, deltaY), angle: _calcAngle(deltaX, deltaY) }; } function calcMoveStatus(startTouches, touches, time) { var _startTouches$ = startTouches[0], x1 = _startTouches$.x, y1 = _startTouches$.y; var _touches$3 = touches[0], x2 = _touches$3.x, y2 = _touches$3.y; var deltaX = x2 - x1; var deltaY = y2 - y1; var deltaZ = _calcTriangleDistance(deltaX, deltaY); return { x: deltaX, y: deltaY, z: deltaZ, time: time, velocity: deltaZ / time, angle: _calcAngle(deltaX, deltaY) }; } function calcRotation(startMutliFingerStatus, mutliFingerStatus) { var startAngle = startMutliFingerStatus.angle; var angle = mutliFingerStatus.angle; return angle - startAngle; } function getEventName(prefix, status) { return prefix + status[0].toUpperCase() + status.slice(1); } function shouldTriggerSwipe(delta, velocity) { return Math.abs(delta) >= __WEBPACK_IMPORTED_MODULE_0__config__["e" /* SWIPE */].threshold && Math.abs(velocity) > __WEBPACK_IMPORTED_MODULE_0__config__["e" /* SWIPE */].velocity; } function shouldTriggerDirection(direction, directionSetting) { if (directionSetting & direction) { return true; } return false; } /** * @private * get the direction between two points * Note: will change next version * @param {Number} x * @param {Number} y * @return {Number} direction */ function getDirection(x, y) { if (x === y) { return __WEBPACK_IMPORTED_MODULE_0__config__["f" /* DIRECTION_NONE */]; } if (Math.abs(x) >= Math.abs(y)) { return x < 0 ? __WEBPACK_IMPORTED_MODULE_0__config__["g" /* DIRECTION_LEFT */] : __WEBPACK_IMPORTED_MODULE_0__config__["h" /* DIRECTION_RIGHT */]; } return y < 0 ? __WEBPACK_IMPORTED_MODULE_0__config__["i" /* DIRECTION_UP */] : __WEBPACK_IMPORTED_MODULE_0__config__["j" /* DIRECTION_DOWN */]; } /** * @private * get the direction between tow points when touch moving * Note: will change next version * @param {Object} point1 coordinate point, include x & y attributes * @param {Object} point2 coordinate point, include x & y attributes * @return {Number} direction */ function getMovingDirection(point1, point2) { var x1 = point1.x, y1 = point1.y; var x2 = point2.x, y2 = point2.y; var deltaX = x2 - x1; var deltaY = y2 - y1; if (deltaX === 0 && deltaY === 0) { return __WEBPACK_IMPORTED_MODULE_0__config__["f" /* DIRECTION_NONE */]; } if (Math.abs(deltaX) >= Math.abs(deltaY)) { return deltaX < 0 ? __WEBPACK_IMPORTED_MODULE_0__config__["g" /* DIRECTION_LEFT */] : __WEBPACK_IMPORTED_MODULE_0__config__["h" /* DIRECTION_RIGHT */]; } return deltaY < 0 ? __WEBPACK_IMPORTED_MODULE_0__config__["i" /* DIRECTION_UP */] : __WEBPACK_IMPORTED_MODULE_0__config__["j" /* DIRECTION_DOWN */]; } function getDirectionEventName(direction) { var name = void 0; switch (direction) { case __WEBPACK_IMPORTED_MODULE_0__config__["f" /* DIRECTION_NONE */]: break; case __WEBPACK_IMPORTED_MODULE_0__config__["g" /* DIRECTION_LEFT */]: name = 'left'; break; case __WEBPACK_IMPORTED_MODULE_0__config__["h" /* DIRECTION_RIGHT */]: name = 'right'; break; case __WEBPACK_IMPORTED_MODULE_0__config__["i" /* DIRECTION_UP */]: name = 'up'; break; case __WEBPACK_IMPORTED_MODULE_0__config__["j" /* DIRECTION_DOWN */]: name = 'down'; break; default: } return name; } /***/ }), /* 96 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_96__; /***/ }), /* 97 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(49); module.exports = __webpack_require__(50); /***/ }) /******/ ]); }); //# sourceMappingURL=rc-swipeout.js.map