(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-slider"] = factory(require("react"), require("react-dom")); else root["rc-slider"] = factory(root["React"], root["ReactDOM"]); })(this, function(__WEBPACK_EXTERNAL_MODULE_87__, __WEBPACK_EXTERNAL_MODULE_109__) { 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] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.loaded = 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; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(1); module.exports = __webpack_require__(2); /***/ }), /* 1 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Slider = __webpack_require__(3); var _Slider2 = _interopRequireDefault(_Slider); var _Range = __webpack_require__(126); var _Range2 = _interopRequireDefault(_Range); var _Handle = __webpack_require__(114); var _Handle2 = _interopRequireDefault(_Handle); var _createSliderWithTooltip = __webpack_require__(127); var _createSliderWithTooltip2 = _interopRequireDefault(_createSliderWithTooltip); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } _Slider2.default.Range = _Range2.default; _Slider2.default.Handle = _Handle2.default; _Slider2.default.createSliderWithTooltip = _createSliderWithTooltip2.default; exports.default = _Slider2.default; module.exports = exports['default']; /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(4); var _extends3 = _interopRequireDefault(_extends2); var _classCallCheck2 = __webpack_require__(42); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(43); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(79); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(88); var _propTypes2 = _interopRequireDefault(_propTypes); var _Track = __webpack_require__(97); var _Track2 = _interopRequireDefault(_Track); var _createSlider = __webpack_require__(98); var _createSlider2 = _interopRequireDefault(_createSlider); var _utils = __webpack_require__(115); var utils = _interopRequireWildcard(_utils); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Slider = function (_React$Component) { (0, _inherits3.default)(Slider, _React$Component); function Slider(props) { (0, _classCallCheck3.default)(this, Slider); var _this = (0, _possibleConstructorReturn3.default)(this, _React$Component.call(this, props)); _this.onEnd = function () { _this.setState({ dragging: false }); _this.removeDocumentEvents(); _this.props.onAfterChange(_this.getValue()); }; var defaultValue = props.defaultValue !== undefined ? props.defaultValue : props.min; var value = props.value !== undefined ? props.value : defaultValue; _this.state = { value: _this.trimAlignValue(value), dragging: false }; return _this; } Slider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (!('value' in nextProps || 'min' in nextProps || 'max' in nextProps)) return; var prevValue = this.state.value; var value = nextProps.value !== undefined ? nextProps.value : prevValue; var nextValue = this.trimAlignValue(value, nextProps); if (nextValue === prevValue) return; this.setState({ value: nextValue }); if (utils.isValueOutOfRange(value, nextProps)) { this.props.onChange(nextValue); } }; Slider.prototype.onChange = function onChange(state) { var props = this.props; var isNotControlled = !('value' in props); if (isNotControlled) { this.setState(state); } var changedValue = state.value; props.onChange(changedValue); }; Slider.prototype.onStart = function onStart(position) { this.setState({ dragging: true }); var props = this.props; var prevValue = this.getValue(); props.onBeforeChange(prevValue); var value = this.calcValueByPos(position); this.startValue = value; this.startPosition = position; if (value === prevValue) return; this.onChange({ value: value }); }; Slider.prototype.onMove = function onMove(e, position) { utils.pauseEvent(e); var state = this.state; var value = this.calcValueByPos(position); var oldValue = state.value; if (value === oldValue) return; this.onChange({ value: value }); }; Slider.prototype.getValue = function getValue() { return this.state.value; }; Slider.prototype.getLowerBound = function getLowerBound() { return this.props.min; }; Slider.prototype.getUpperBound = function getUpperBound() { return this.state.value; }; Slider.prototype.trimAlignValue = function trimAlignValue(v) { var nextProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var mergedProps = (0, _extends3.default)({}, this.props, nextProps); var val = utils.ensureValueInRange(v, mergedProps); return utils.ensureValuePrecision(val, mergedProps); }; Slider.prototype.render = function render() { var _this2 = this; var _props = this.props, prefixCls = _props.prefixCls, vertical = _props.vertical, included = _props.included, disabled = _props.disabled, minimumTrackStyle = _props.minimumTrackStyle, handleStyle = _props.handleStyle, handleGenerator = _props.handle; var _state = this.state, value = _state.value, dragging = _state.dragging; var offset = this.calcOffset(value); var handle = handleGenerator({ className: prefixCls + '-handle', vertical: vertical, offset: offset, value: value, dragging: dragging, disabled: disabled, handleStyle: handleStyle, ref: function ref(h) { return _this2.saveHandle(0, h); } }); var track = _react2.default.createElement(_Track2.default, { className: prefixCls + '-track', vertical: vertical, included: included, offset: 0, length: offset, minimumTrackStyle: minimumTrackStyle }); return { tracks: track, handles: handle }; }; return Slider; }(_react2.default.Component); /* eslint-disable react/prop-types */ Slider.displayName = 'Slider'; Slider.propTypes = { defaultValue: _propTypes2.default.number, value: _propTypes2.default.number, disabled: _propTypes2.default.bool }; Slider.defaultProps = {}; exports.default = (0, _createSlider2.default)(Slider); module.exports = exports['default']; /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _assign = __webpack_require__(5); 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; }; /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(6), __esModule: true }; /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(7); module.exports = __webpack_require__(10).Object.assign; /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(8); $export($export.S + $export.F, 'Object', {assign: __webpack_require__(23)}); /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(9) , core = __webpack_require__(10) , ctx = __webpack_require__(11) , hide = __webpack_require__(13) , PROTOTYPE = 'prototype'; var $export = function(type, name, source){ var IS_FORCED = type & $export.F , IS_GLOBAL = type & $export.G , IS_STATIC = type & $export.S , IS_PROTO = type & $export.P , IS_BIND = type & $export.B , IS_WRAP = type & $export.W , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) , expProto = exports[PROTOTYPE] , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] , key, own, out; if(IS_GLOBAL)source = name; for(key in source){ // contains in native own = !IS_FORCED && target && target[key] !== undefined; if(own && key in exports)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; /***/ }), /* 9 */ /***/ (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 : Function('return this')(); if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef /***/ }), /* 10 */ /***/ (function(module, exports) { var core = module.exports = {version: '2.4.0'}; if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(12); 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); }; }; /***/ }), /* 12 */ /***/ (function(module, exports) { module.exports = function(it){ if(typeof it != 'function')throw TypeError(it + ' is not a function!'); return it; }; /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(14) , createDesc = __webpack_require__(22); module.exports = __webpack_require__(18) ? function(object, key, value){ return dP.f(object, key, createDesc(1, value)); } : function(object, key, value){ object[key] = value; return object; }; /***/ }), /* 14 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(15) , IE8_DOM_DEFINE = __webpack_require__(17) , toPrimitive = __webpack_require__(21) , dP = Object.defineProperty; exports.f = __webpack_require__(18) ? 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; }; /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(16); module.exports = function(it){ if(!isObject(it))throw TypeError(it + ' is not an object!'); return it; }; /***/ }), /* 16 */ /***/ (function(module, exports) { module.exports = function(it){ return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /* 17 */ /***/ (function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(18) && !__webpack_require__(19)(function(){ return Object.defineProperty(__webpack_require__(20)('div'), 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(19)(function(){ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }), /* 19 */ /***/ (function(module, exports) { module.exports = function(exec){ try { return !!exec(); } catch(e){ return true; } }; /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(16) , document = __webpack_require__(9).document // in old IE typeof document.createElement is 'object' , is = isObject(document) && isObject(document.createElement); module.exports = function(it){ return is ? document.createElement(it) : {}; }; /***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(16); // 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"); }; /***/ }), /* 22 */ /***/ (function(module, exports) { module.exports = function(bitmap, value){ return { enumerable : !(bitmap & 1), configurable: !(bitmap & 2), writable : !(bitmap & 4), value : value }; }; /***/ }), /* 23 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = __webpack_require__(24) , gOPS = __webpack_require__(39) , pIE = __webpack_require__(40) , toObject = __webpack_require__(41) , IObject = __webpack_require__(28) , $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__(19)(function(){ var A = {} , B = {} , S = Symbol() , 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) , aLen = arguments.length , index = 1 , getSymbols = gOPS.f , isEnum = pIE.f; while(aLen > index){ var S = IObject(arguments[index++]) , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) , length = keys.length , j = 0 , key; while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; } return T; } : $assign; /***/ }), /* 24 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(25) , enumBugKeys = __webpack_require__(38); module.exports = Object.keys || function keys(O){ return $keys(O, enumBugKeys); }; /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(26) , toIObject = __webpack_require__(27) , arrayIndexOf = __webpack_require__(31)(false) , IE_PROTO = __webpack_require__(35)('IE_PROTO'); module.exports = function(object, names){ var O = toIObject(object) , i = 0 , result = [] , 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; }; /***/ }), /* 26 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function(it, key){ return hasOwnProperty.call(it, key); }; /***/ }), /* 27 */ /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(28) , defined = __webpack_require__(30); module.exports = function(it){ return IObject(defined(it)); }; /***/ }), /* 28 */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(29); module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }), /* 29 */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function(it){ return toString.call(it).slice(8, -1); }; /***/ }), /* 30 */ /***/ (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; }; /***/ }), /* 31 */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(27) , toLength = __webpack_require__(32) , toIndex = __webpack_require__(34); module.exports = function(IS_INCLUDES){ return function($this, el, fromIndex){ var O = toIObject($this) , length = toLength(O.length) , index = toIndex(fromIndex, length) , value; // Array#includes uses SameValueZero equality algorithm if(IS_INCLUDES && el != el)while(length > index){ value = O[index++]; if(value != value)return true; // Array#toIndex 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; }; }; /***/ }), /* 32 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(33) , min = Math.min; module.exports = function(it){ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /* 33 */ /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil , floor = Math.floor; module.exports = function(it){ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /* 34 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(33) , max = Math.max , min = Math.min; module.exports = function(index, length){ index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }), /* 35 */ /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__(36)('keys') , uid = __webpack_require__(37); module.exports = function(key){ return shared[key] || (shared[key] = uid(key)); }; /***/ }), /* 36 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(9) , SHARED = '__core-js_shared__' , store = global[SHARED] || (global[SHARED] = {}); module.exports = function(key){ return store[key] || (store[key] = {}); }; /***/ }), /* 37 */ /***/ (function(module, exports) { var id = 0 , px = Math.random(); module.exports = function(key){ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /* 38 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /* 39 */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /* 40 */ /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }), /* 41 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(30); module.exports = function(it){ return Object(defined(it)); }; /***/ }), /* 42 */ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports.default = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; /***/ }), /* 43 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _typeof2 = __webpack_require__(44); 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; }; /***/ }), /* 44 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _iterator = __webpack_require__(45); var _iterator2 = _interopRequireDefault(_iterator); var _symbol = __webpack_require__(65); 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); }; /***/ }), /* 45 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(46), __esModule: true }; /***/ }), /* 46 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(47); __webpack_require__(60); module.exports = __webpack_require__(64).f('iterator'); /***/ }), /* 47 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var $at = __webpack_require__(48)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(49)(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 , index = this._i , point; if(index >= O.length)return {value: undefined, done: true}; point = $at(O, index); this._i += point.length; return {value: point, done: false}; }); /***/ }), /* 48 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(33) , defined = __webpack_require__(30); // true -> String#at // false -> String#codePointAt module.exports = function(TO_STRING){ return function(that, pos){ var s = String(defined(that)) , i = toInteger(pos) , l = s.length , 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; }; }; /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var LIBRARY = __webpack_require__(50) , $export = __webpack_require__(8) , redefine = __webpack_require__(51) , hide = __webpack_require__(13) , has = __webpack_require__(26) , Iterators = __webpack_require__(52) , $iterCreate = __webpack_require__(53) , setToStringTag = __webpack_require__(57) , getPrototypeOf = __webpack_require__(59) , ITERATOR = __webpack_require__(58)('iterator') , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` , FF_ITERATOR = '@@iterator' , KEYS = 'keys' , 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' , DEF_VALUES = DEFAULT == VALUES , VALUES_BUG = false , proto = Base.prototype , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] , $default = $native || getMethod(DEFAULT) , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined , $anyNative = NAME == 'Array' ? proto.entries || $native : $native , methods, key, IteratorPrototype; // Fix native if($anyNative){ IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); if(IteratorPrototype !== Object.prototype){ // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if(!LIBRARY && !has(IteratorPrototype, ITERATOR))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; }; /***/ }), /* 50 */ /***/ (function(module, exports) { module.exports = true; /***/ }), /* 51 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(13); /***/ }), /* 52 */ /***/ (function(module, exports) { module.exports = {}; /***/ }), /* 53 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var create = __webpack_require__(54) , descriptor = __webpack_require__(22) , setToStringTag = __webpack_require__(57) , IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() __webpack_require__(13)(IteratorPrototype, __webpack_require__(58)('iterator'), function(){ return this; }); module.exports = function(Constructor, NAME, next){ Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }), /* 54 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(15) , dPs = __webpack_require__(55) , enumBugKeys = __webpack_require__(38) , IE_PROTO = __webpack_require__(35)('IE_PROTO') , Empty = function(){ /* empty */ } , 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__(20)('iframe') , i = enumBugKeys.length , lt = '<' , gt = '>' , iframeDocument; iframe.style.display = 'none'; __webpack_require__(56).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); }; /***/ }), /* 55 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(14) , anObject = __webpack_require__(15) , getKeys = __webpack_require__(24); module.exports = __webpack_require__(18) ? Object.defineProperties : function defineProperties(O, Properties){ anObject(O); var keys = getKeys(Properties) , length = keys.length , i = 0 , P; while(length > i)dP.f(O, P = keys[i++], Properties[P]); return O; }; /***/ }), /* 56 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(9).document && document.documentElement; /***/ }), /* 57 */ /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__(14).f , has = __webpack_require__(26) , TAG = __webpack_require__(58)('toStringTag'); module.exports = function(it, tag, stat){ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); }; /***/ }), /* 58 */ /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__(36)('wks') , uid = __webpack_require__(37) , Symbol = __webpack_require__(9).Symbol , 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; /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__(26) , toObject = __webpack_require__(41) , IE_PROTO = __webpack_require__(35)('IE_PROTO') , 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; }; /***/ }), /* 60 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(61); var global = __webpack_require__(9) , hide = __webpack_require__(13) , Iterators = __webpack_require__(52) , TO_STRING_TAG = __webpack_require__(58)('toStringTag'); for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ var NAME = collections[i] , Collection = global[NAME] , proto = Collection && Collection.prototype; if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; } /***/ }), /* 61 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var addToUnscopables = __webpack_require__(62) , step = __webpack_require__(63) , Iterators = __webpack_require__(52) , toIObject = __webpack_require__(27); // 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__(49)(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 , kind = this._k , 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'); /***/ }), /* 62 */ /***/ (function(module, exports) { module.exports = function(){ /* empty */ }; /***/ }), /* 63 */ /***/ (function(module, exports) { module.exports = function(done, value){ return {value: value, done: !!done}; }; /***/ }), /* 64 */ /***/ (function(module, exports, __webpack_require__) { exports.f = __webpack_require__(58); /***/ }), /* 65 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(66), __esModule: true }; /***/ }), /* 66 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(67); __webpack_require__(76); __webpack_require__(77); __webpack_require__(78); module.exports = __webpack_require__(10).Symbol; /***/ }), /* 67 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; // ECMAScript 6 symbols shim var global = __webpack_require__(9) , has = __webpack_require__(26) , DESCRIPTORS = __webpack_require__(18) , $export = __webpack_require__(8) , redefine = __webpack_require__(51) , META = __webpack_require__(68).KEY , $fails = __webpack_require__(19) , shared = __webpack_require__(36) , setToStringTag = __webpack_require__(57) , uid = __webpack_require__(37) , wks = __webpack_require__(58) , wksExt = __webpack_require__(64) , wksDefine = __webpack_require__(69) , keyOf = __webpack_require__(70) , enumKeys = __webpack_require__(71) , isArray = __webpack_require__(72) , anObject = __webpack_require__(15) , toIObject = __webpack_require__(27) , toPrimitive = __webpack_require__(21) , createDesc = __webpack_require__(22) , _create = __webpack_require__(54) , gOPNExt = __webpack_require__(73) , $GOPD = __webpack_require__(75) , $DP = __webpack_require__(14) , $keys = __webpack_require__(24) , gOPD = $GOPD.f , dP = $DP.f , gOPN = gOPNExt.f , $Symbol = global.Symbol , $JSON = global.JSON , _stringify = $JSON && $JSON.stringify , PROTOTYPE = 'prototype' , HIDDEN = wks('_hidden') , TO_PRIMITIVE = wks('toPrimitive') , isEnum = {}.propertyIsEnumerable , SymbolRegistry = shared('symbol-registry') , AllSymbols = shared('symbols') , OPSymbols = shared('op-symbols') , ObjectProto = Object[PROTOTYPE] , USE_NATIVE = typeof $Symbol == 'function' , 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)) , i = 0 , l = keys.length , 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)) , result = [] , i = 0 , 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 , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) , result = [] , i = 0 , 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__(74).f = gOPNExt.f = $getOwnPropertyNames; __webpack_require__(40).f = $propertyIsEnumerable; __webpack_require__(39).f = $getOwnPropertySymbols; if(DESCRIPTORS && !__webpack_require__(50)){ 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 symbols = ( // 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(','), i = 0; symbols.length > i; )wks(symbols[i++]); for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); $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(key){ if(isSymbol(key))return keyOf(SymbolRegistry, key); throw TypeError(key + ' is not a symbol!'); }, 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){ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined var args = [it] , i = 1 , replacer, $replacer; while(arguments.length > i)args.push(arguments[i++]); replacer = args[1]; if(typeof replacer == 'function')$replacer = replacer; if($replacer || !isArray(replacer))replacer = function(key, value){ if($replacer)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__(13)($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); /***/ }), /* 68 */ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(37)('meta') , isObject = __webpack_require__(16) , has = __webpack_require__(26) , setDesc = __webpack_require__(14).f , id = 0; var isExtensible = Object.isExtensible || function(){ return true; }; var FREEZE = !__webpack_require__(19)(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 }; /***/ }), /* 69 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(9) , core = __webpack_require__(10) , LIBRARY = __webpack_require__(50) , wksExt = __webpack_require__(64) , defineProperty = __webpack_require__(14).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)}); }; /***/ }), /* 70 */ /***/ (function(module, exports, __webpack_require__) { var getKeys = __webpack_require__(24) , toIObject = __webpack_require__(27); module.exports = function(object, el){ var O = toIObject(object) , keys = getKeys(O) , length = keys.length , index = 0 , key; while(length > index)if(O[key = keys[index++]] === el)return key; }; /***/ }), /* 71 */ /***/ (function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols var getKeys = __webpack_require__(24) , gOPS = __webpack_require__(39) , pIE = __webpack_require__(40); module.exports = function(it){ var result = getKeys(it) , getSymbols = gOPS.f; if(getSymbols){ var symbols = getSymbols(it) , isEnum = pIE.f , i = 0 , key; while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); } return result; }; /***/ }), /* 72 */ /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) var cof = __webpack_require__(29); module.exports = Array.isArray || function isArray(arg){ return cof(arg) == 'Array'; }; /***/ }), /* 73 */ /***/ (function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = __webpack_require__(27) , gOPN = __webpack_require__(74).f , 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)); }; /***/ }), /* 74 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = __webpack_require__(25) , hiddenKeys = __webpack_require__(38).concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ return $keys(O, hiddenKeys); }; /***/ }), /* 75 */ /***/ (function(module, exports, __webpack_require__) { var pIE = __webpack_require__(40) , createDesc = __webpack_require__(22) , toIObject = __webpack_require__(27) , toPrimitive = __webpack_require__(21) , has = __webpack_require__(26) , IE8_DOM_DEFINE = __webpack_require__(17) , gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(18) ? 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]); }; /***/ }), /* 76 */ /***/ (function(module, exports) { /***/ }), /* 77 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(69)('asyncIterator'); /***/ }), /* 78 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(69)('observable'); /***/ }), /* 79 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _setPrototypeOf = __webpack_require__(80); var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); var _create = __webpack_require__(84); var _create2 = _interopRequireDefault(_create); var _typeof2 = __webpack_require__(44); 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; }; /***/ }), /* 80 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(81), __esModule: true }; /***/ }), /* 81 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(82); module.exports = __webpack_require__(10).Object.setPrototypeOf; /***/ }), /* 82 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = __webpack_require__(8); $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(83).set}); /***/ }), /* 83 */ /***/ (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__(16) , anObject = __webpack_require__(15); 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__(11)(Function.call, __webpack_require__(75).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 }; /***/ }), /* 84 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(85), __esModule: true }; /***/ }), /* 85 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(86); var $Object = __webpack_require__(10).Object; module.exports = function create(P, D){ return $Object.create(P, D); }; /***/ }), /* 86 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(8) // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', {create: __webpack_require__(54)}); /***/ }), /* 87 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_87__; /***/ }), /* 88 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ if (process.env.NODE_ENV !== 'production') { var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || 0xeac7; var isValidElement = function(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; }; // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = __webpack_require__(90)(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(96)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(89))) /***/ }), /* 89 */ /***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.prependListener = noop; process.prependOnceListener = noop; process.listeners = function (name) { return [] } process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }), /* 90 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ 'use strict'; var emptyFunction = __webpack_require__(91); var invariant = __webpack_require__(92); var warning = __webpack_require__(93); var ReactPropTypesSecret = __webpack_require__(94); var checkPropTypes = __webpack_require__(95); module.exports = function(isValidElement, throwOnDirectAccess) { /* global Symbol */ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. /** * Returns the iterator method function contained on the iterable object. * * Be sure to invoke the function with the iterable as context: * * var iteratorFn = getIteratorFn(myIterable); * if (iteratorFn) { * var iterator = iteratorFn.call(myIterable); * ... * } * * @param {?object} maybeIterable * @return {?function} */ function getIteratorFn(maybeIterable) { var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); if (typeof iteratorFn === 'function') { return iteratorFn; } } /** * Collection of methods that allow declaration and validation of props that are * supplied to React components. Example usage: * * var Props = require('ReactPropTypes'); * var MyArticle = React.createClass({ * propTypes: { * // An optional string prop named "description". * description: Props.string, * * // A required enum prop named "category". * category: Props.oneOf(['News','Photos']).isRequired, * * // A prop named "dialog" that requires an instance of Dialog. * dialog: Props.instanceOf(Dialog).isRequired * }, * render: function() { ... } * }); * * A more formal specification of how these methods are used: * * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) * decl := ReactPropTypes.{type}(.isRequired)? * * Each and every declaration produces a function with the same signature. This * allows the creation of custom validation functions. For example: * * var MyLink = React.createClass({ * propTypes: { * // An optional string or URI prop named "href". * href: function(props, propName, componentName) { * var propValue = props[propName]; * if (propValue != null && typeof propValue !== 'string' && * !(propValue instanceof URI)) { * return new Error( * 'Expected a string or an URI for ' + propName + ' in ' + * componentName * ); * } * } * }, * render: function() {...} * }); * * @internal */ var ANONYMOUS = '<>'; // Important! // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. var ReactPropTypes = { array: createPrimitiveTypeChecker('array'), bool: createPrimitiveTypeChecker('boolean'), func: createPrimitiveTypeChecker('function'), number: createPrimitiveTypeChecker('number'), object: createPrimitiveTypeChecker('object'), string: createPrimitiveTypeChecker('string'), symbol: createPrimitiveTypeChecker('symbol'), any: createAnyTypeChecker(), arrayOf: createArrayOfTypeChecker, element: createElementTypeChecker(), instanceOf: createInstanceTypeChecker, node: createNodeChecker(), objectOf: createObjectOfTypeChecker, oneOf: createEnumTypeChecker, oneOfType: createUnionTypeChecker, shape: createShapeTypeChecker }; /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ /*eslint-disable no-self-compare*/ function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } } /*eslint-enable no-self-compare*/ /** * We use an Error-like object for backward compatibility as people may call * PropTypes directly and inspect their output. However, we don't use real * Errors anymore. We don't inspect their stack anyway, and creating them * is prohibitively expensive if they are created too often, such as what * happens in oneOfType() for any type before the one that matched. */ function PropTypeError(message) { this.message = message; this.stack = ''; } // Make `instanceof Error` still work for returned errors. PropTypeError.prototype = Error.prototype; function createChainableTypeChecker(validate) { if (process.env.NODE_ENV !== 'production') { var manualPropTypeCallCache = {}; var manualPropTypeWarningCount = 0; } function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { componentName = componentName || ANONYMOUS; propFullName = propFullName || propName; if (secret !== ReactPropTypesSecret) { if (throwOnDirectAccess) { // New behavior only for users of `prop-types` package invariant( false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') { // Old behavior for people using React.PropTypes var cacheKey = componentName + ':' + propName; if ( !manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors manualPropTypeWarningCount < 3 ) { warning( false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName ); manualPropTypeCallCache[cacheKey] = true; manualPropTypeWarningCount++; } } } if (props[propName] == null) { if (isRequired) { if (props[propName] === null) { return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); } return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); } return null; } else { return validate(props, propName, componentName, location, propFullName); } } var chainedCheckType = checkType.bind(null, false); chainedCheckType.isRequired = checkType.bind(null, true); return chainedCheckType; } function createPrimitiveTypeChecker(expectedType) { function validate(props, propName, componentName, location, propFullName, secret) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== expectedType) { // `propValue` being instance of, say, date/regexp, pass the 'object' // check, but we can offer a more precise error message here rather than // 'of type `object`'. var preciseType = getPreciseType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); } return null; } return createChainableTypeChecker(validate); } function createAnyTypeChecker() { return createChainableTypeChecker(emptyFunction.thatReturnsNull); } function createArrayOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); } var propValue = props[propName]; if (!Array.isArray(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); } for (var i = 0; i < propValue.length; i++) { var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); if (error instanceof Error) { return error; } } return null; } return createChainableTypeChecker(validate); } function createElementTypeChecker() { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!isValidElement(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); } return null; } return createChainableTypeChecker(validate); } function createInstanceTypeChecker(expectedClass) { function validate(props, propName, componentName, location, propFullName) { if (!(props[propName] instanceof expectedClass)) { var expectedClassName = expectedClass.name || ANONYMOUS; var actualClassName = getClassName(props[propName]); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); } return null; } return createChainableTypeChecker(validate); } function createEnumTypeChecker(expectedValues) { if (!Array.isArray(expectedValues)) { process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; return emptyFunction.thatReturnsNull; } function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; for (var i = 0; i < expectedValues.length; i++) { if (is(propValue, expectedValues[i])) { return null; } } var valuesString = JSON.stringify(expectedValues); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); } return createChainableTypeChecker(validate); } function createObjectOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); } var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); } for (var key in propValue) { if (propValue.hasOwnProperty(key)) { var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error instanceof Error) { return error; } } } return null; } return createChainableTypeChecker(validate); } function createUnionTypeChecker(arrayOfTypeCheckers) { if (!Array.isArray(arrayOfTypeCheckers)) { process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; return emptyFunction.thatReturnsNull; } function validate(props, propName, componentName, location, propFullName) { for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { return null; } } return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); } return createChainableTypeChecker(validate); } function createNodeChecker() { function validate(props, propName, componentName, location, propFullName) { if (!isNode(props[propName])) { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); } return null; } return createChainableTypeChecker(validate); } function createShapeTypeChecker(shapeTypes) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); } for (var key in shapeTypes) { var checker = shapeTypes[key]; if (!checker) { continue; } var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error) { return error; } } return null; } return createChainableTypeChecker(validate); } function isNode(propValue) { switch (typeof propValue) { case 'number': case 'string': case 'undefined': return true; case 'boolean': return !propValue; case 'object': if (Array.isArray(propValue)) { return propValue.every(isNode); } if (propValue === null || isValidElement(propValue)) { return true; } var iteratorFn = getIteratorFn(propValue); if (iteratorFn) { var iterator = iteratorFn.call(propValue); var step; if (iteratorFn !== propValue.entries) { while (!(step = iterator.next()).done) { if (!isNode(step.value)) { return false; } } } else { // Iterator will provide entry [k,v] tuples rather than values. while (!(step = iterator.next()).done) { var entry = step.value; if (entry) { if (!isNode(entry[1])) { return false; } } } } } else { return false; } return true; default: return false; } } function isSymbol(propType, propValue) { // Native Symbol. if (propType === 'symbol') { return true; } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' if (propValue['@@toStringTag'] === 'Symbol') { return true; } // Fallback for non-spec compliant Symbols which are polyfilled. if (typeof Symbol === 'function' && propValue instanceof Symbol) { return true; } return false; } // Equivalent of `typeof` but with special handling for array and regexp. function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ // passes PropTypes.object. return 'object'; } if (isSymbol(propType, propValue)) { return 'symbol'; } return propType; } // This handles more types than `getPropType`. Only used for error messages. // See `createPrimitiveTypeChecker`. function getPreciseType(propValue) { var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceof RegExp) { return 'regexp'; } } return propType; } // Returns class name of the object, if any. function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; } ReactPropTypes.checkPropTypes = checkPropTypes; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(89))) /***/ }), /* 91 */ /***/ (function(module, exports) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * */ function makeEmptyFunction(arg) { return function () { return arg; }; } /** * This function accepts and discards inputs; it has no side effects. This is * primarily useful idiomatically for overridable function endpoints which * always need to be callable, since JS lacks a null-call idiom ala Cocoa. */ var emptyFunction = function emptyFunction() {}; emptyFunction.thatReturns = makeEmptyFunction; emptyFunction.thatReturnsFalse = makeEmptyFunction(false); emptyFunction.thatReturnsTrue = makeEmptyFunction(true); emptyFunction.thatReturnsNull = makeEmptyFunction(null); emptyFunction.thatReturnsThis = function () { return this; }; emptyFunction.thatReturnsArgument = function (arg) { return arg; }; module.exports = emptyFunction; /***/ }), /* 92 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ 'use strict'; /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var validateFormat = function validateFormat(format) {}; if (process.env.NODE_ENV !== 'production') { validateFormat = function validateFormat(format) { if (format === undefined) { throw new Error('invariant requires an error message argument'); } }; } function invariant(condition, format, a, b, c, d, e, f) { validateFormat(format); if (!condition) { var error; if (format === undefined) { error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error(format.replace(/%s/g, function () { return args[argIndex++]; })); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } } module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(89))) /***/ }), /* 93 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ 'use strict'; var emptyFunction = __webpack_require__(91); /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var warning = emptyFunction; if (process.env.NODE_ENV !== 'production') { (function () { var printWarning = function printWarning(format) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; warning = function warning(condition, format) { if (format === undefined) { throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); } if (format.indexOf('Failed Composite propType: ') === 0) { return; // Ignore CompositeComponent proptype check. } if (!condition) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; } printWarning.apply(undefined, [format].concat(args)); } }; })(); } module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(89))) /***/ }), /* 94 */ /***/ (function(module, exports) { /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ 'use strict'; var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 95 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ 'use strict'; if (process.env.NODE_ENV !== 'production') { var invariant = __webpack_require__(92); var warning = __webpack_require__(93); var ReactPropTypesSecret = __webpack_require__(94); var loggedTypeFailures = {}; } /** * Assert that the values match with the type specs. * Error messages are memorized and will only be shown once. * * @param {object} typeSpecs Map of name to a ReactPropType * @param {object} values Runtime values that need to be type-checked * @param {string} location e.g. "prop", "context", "child context" * @param {string} componentName Name of the component for error messages. * @param {?Function} getStack Returns the component stack. * @private */ function checkPropTypes(typeSpecs, values, location, componentName, getStack) { if (process.env.NODE_ENV !== 'production') { for (var typeSpecName in typeSpecs) { if (typeSpecs.hasOwnProperty(typeSpecName)) { var error; // Prop type validation may throw. In case they do, we don't want to // fail the render phase where it didn't fail before. So we log it. // After these have been cleaned up, we'll let them throw. try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); } catch (ex) { error = ex; } warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); if (error instanceof Error && !(error.message in loggedTypeFailures)) { // Only monitor this failure once because there tends to be a lot of the // same error. loggedTypeFailures[error.message] = true; var stack = getStack ? getStack() : ''; warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); } } } } } module.exports = checkPropTypes; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(89))) /***/ }), /* 96 */ /***/ (function(module, exports, __webpack_require__) { /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ 'use strict'; var emptyFunction = __webpack_require__(91); var invariant = __webpack_require__(92); module.exports = function() { // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. function shim() { invariant( false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); }; shim.isRequired = shim; function getShim() { return shim; }; var ReactPropTypes = { array: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim }; ReactPropTypes.checkPropTypes = emptyFunction; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /***/ }), /* 97 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(4); var _extends3 = _interopRequireDefault(_extends2); var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Track = function Track(_ref) { var className = _ref.className, included = _ref.included, vertical = _ref.vertical, offset = _ref.offset, length = _ref.length, minimumTrackStyle = _ref.minimumTrackStyle; var style = { visibility: included ? 'visible' : 'hidden' }; if (vertical) { style.bottom = offset + '%'; style.height = length + '%'; } else { style.left = offset + '%'; style.width = length + '%'; } var elStyle = (0, _extends3.default)({}, style, minimumTrackStyle); return _react2.default.createElement('div', { className: className, style: elStyle }); }; exports.default = Track; module.exports = exports['default']; /***/ }), /* 98 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _objectWithoutProperties2 = __webpack_require__(99); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _extends2 = __webpack_require__(4); var _extends3 = _interopRequireDefault(_extends2); var _defineProperty2 = __webpack_require__(100); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _classCallCheck2 = __webpack_require__(42); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(43); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(79); var _inherits3 = _interopRequireDefault(_inherits2); exports.default = createSlider; var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(88); var _propTypes2 = _interopRequireDefault(_propTypes); var _addEventListener = __webpack_require__(104); var _addEventListener2 = _interopRequireDefault(_addEventListener); var _classnames = __webpack_require__(110); var _classnames2 = _interopRequireDefault(_classnames); var _warning = __webpack_require__(111); var _warning2 = _interopRequireDefault(_warning); var _Steps = __webpack_require__(112); var _Steps2 = _interopRequireDefault(_Steps); var _Marks = __webpack_require__(113); var _Marks2 = _interopRequireDefault(_Marks); var _Handle = __webpack_require__(114); var _Handle2 = _interopRequireDefault(_Handle); var _utils = __webpack_require__(115); var utils = _interopRequireWildcard(_utils); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function noop() {} function createSlider(Component) { var _class, _temp; return _temp = _class = function (_Component) { (0, _inherits3.default)(ComponentEnhancer, _Component); function ComponentEnhancer(props) { (0, _classCallCheck3.default)(this, ComponentEnhancer); var _this = (0, _possibleConstructorReturn3.default)(this, _Component.call(this, props)); _this.onMouseDown = function (e) { if (e.button !== 0) { return; } var isVertical = _this.props.vertical; var position = utils.getMousePosition(isVertical, e); if (!utils.isEventFromHandle(e, _this.handlesRefs)) { _this.dragOffset = 0; } else { var handlePosition = utils.getHandleCenterPosition(isVertical, e.target); _this.dragOffset = position - handlePosition; position = handlePosition; } _this.onStart(position); _this.addDocumentMouseEvents(); utils.pauseEvent(e); }; _this.onTouchStart = function (e) { if (utils.isNotTouchEvent(e)) return; var isVertical = _this.props.vertical; var position = utils.getTouchPosition(isVertical, e); if (!utils.isEventFromHandle(e, _this.handlesRefs)) { _this.dragOffset = 0; } else { var handlePosition = utils.getHandleCenterPosition(isVertical, e.target); _this.dragOffset = position - handlePosition; position = handlePosition; } _this.onStart(position); _this.addDocumentTouchEvents(); utils.pauseEvent(e); }; _this.onMouseMove = function (e) { if (!_this.sliderRef) { _this.onEnd(); return; } var position = utils.getMousePosition(_this.props.vertical, e); _this.onMove(e, position - _this.dragOffset); }; _this.onTouchMove = function (e) { if (utils.isNotTouchEvent(e) || !_this.sliderRef) { _this.onEnd(); return; } var position = utils.getTouchPosition(_this.props.vertical, e); _this.onMove(e, position - _this.dragOffset); }; _this.saveSlider = function (slider) { _this.sliderRef = slider; }; if (process.env.NODE_ENV !== 'production') { var step = props.step, max = props.max, min = props.min; (0, _warning2.default)(step && Math.floor(step) === step ? (max - min) % step === 0 : true, 'Slider[max] - Slider[min] (%s) should be a multiple of Slider[step] (%s)', max - min, step); } _this.handlesRefs = {}; return _this; } ComponentEnhancer.prototype.componentWillUnmount = function componentWillUnmount() { if (_Component.prototype.componentWillUnmount) _Component.prototype.componentWillUnmount.call(this); this.removeDocumentEvents(); }; ComponentEnhancer.prototype.addDocumentTouchEvents = function addDocumentTouchEvents() { // just work for Chrome iOS Safari and Android Browser this.onTouchMoveListener = (0, _addEventListener2.default)(document, 'touchmove', this.onTouchMove); this.onTouchUpListener = (0, _addEventListener2.default)(document, 'touchend', this.onEnd); }; ComponentEnhancer.prototype.addDocumentMouseEvents = function addDocumentMouseEvents() { this.onMouseMoveListener = (0, _addEventListener2.default)(document, 'mousemove', this.onMouseMove); this.onMouseUpListener = (0, _addEventListener2.default)(document, 'mouseup', this.onEnd); }; ComponentEnhancer.prototype.removeDocumentEvents = function removeDocumentEvents() { /* eslint-disable no-unused-expressions */ this.onTouchMoveListener && this.onTouchMoveListener.remove(); this.onTouchUpListener && this.onTouchUpListener.remove(); this.onMouseMoveListener && this.onMouseMoveListener.remove(); this.onMouseUpListener && this.onMouseUpListener.remove(); /* eslint-enable no-unused-expressions */ }; ComponentEnhancer.prototype.getSliderStart = function getSliderStart() { var slider = this.sliderRef; var rect = slider.getBoundingClientRect(); return this.props.vertical ? rect.top : rect.left; }; ComponentEnhancer.prototype.getSliderLength = function getSliderLength() { var slider = this.sliderRef; if (!slider) { return 0; } return this.props.vertical ? slider.clientHeight : slider.clientWidth; }; ComponentEnhancer.prototype.calcValue = function calcValue(offset) { var _props = this.props, vertical = _props.vertical, min = _props.min, max = _props.max; var ratio = Math.abs(Math.max(offset, 0) / this.getSliderLength()); var value = vertical ? (1 - ratio) * (max - min) + min : ratio * (max - min) + min; return value; }; ComponentEnhancer.prototype.calcValueByPos = function calcValueByPos(position) { var pixelOffset = position - this.getSliderStart(); var nextValue = this.trimAlignValue(this.calcValue(pixelOffset)); return nextValue; }; ComponentEnhancer.prototype.calcOffset = function calcOffset(value) { var _props2 = this.props, min = _props2.min, max = _props2.max; var ratio = (value - min) / (max - min); return ratio * 100; }; ComponentEnhancer.prototype.saveHandle = function saveHandle(index, handle) { this.handlesRefs[index] = handle; }; ComponentEnhancer.prototype.render = function render() { var _classNames; var _props3 = this.props, prefixCls = _props3.prefixCls, className = _props3.className, marks = _props3.marks, dots = _props3.dots, step = _props3.step, included = _props3.included, disabled = _props3.disabled, vertical = _props3.vertical, min = _props3.min, max = _props3.max, children = _props3.children, maximumTrackStyle = _props3.maximumTrackStyle, style = _props3.style; var _Component$prototype$ = _Component.prototype.render.call(this), tracks = _Component$prototype$.tracks, handles = _Component$prototype$.handles; var sliderClassName = (0, _classnames2.default)((_classNames = {}, (0, _defineProperty3.default)(_classNames, prefixCls, true), (0, _defineProperty3.default)(_classNames, prefixCls + '-with-marks', Object.keys(marks).length), (0, _defineProperty3.default)(_classNames, prefixCls + '-disabled', disabled), (0, _defineProperty3.default)(_classNames, prefixCls + '-vertical', vertical), (0, _defineProperty3.default)(_classNames, className, className), _classNames)); return _react2.default.createElement( 'div', { ref: this.saveSlider, className: sliderClassName, onTouchStart: disabled ? noop : this.onTouchStart, onMouseDown: disabled ? noop : this.onMouseDown, style: style }, _react2.default.createElement('div', { className: prefixCls + '-rail', style: maximumTrackStyle }), tracks, _react2.default.createElement(_Steps2.default, { prefixCls: prefixCls, vertical: vertical, marks: marks, dots: dots, step: step, included: included, lowerBound: this.getLowerBound(), upperBound: this.getUpperBound(), max: max, min: min }), handles, _react2.default.createElement(_Marks2.default, { className: prefixCls + '-mark', vertical: vertical, marks: marks, included: included, lowerBound: this.getLowerBound(), upperBound: this.getUpperBound(), max: max, min: min }), children ); }; return ComponentEnhancer; }(Component), _class.displayName = 'ComponentEnhancer(' + Component.displayName + ')', _class.propTypes = (0, _extends3.default)({}, Component.propTypes, { min: _propTypes2.default.number, max: _propTypes2.default.number, step: _propTypes2.default.number, marks: _propTypes2.default.object, included: _propTypes2.default.bool, className: _propTypes2.default.string, prefixCls: _propTypes2.default.string, disabled: _propTypes2.default.bool, children: _propTypes2.default.any, onBeforeChange: _propTypes2.default.func, onChange: _propTypes2.default.func, onAfterChange: _propTypes2.default.func, handle: _propTypes2.default.func, dots: _propTypes2.default.bool, vertical: _propTypes2.default.bool, style: _propTypes2.default.object, minimumTrackStyle: _propTypes2.default.object, maximumTrackStyle: _propTypes2.default.object, handleStyle: _propTypes2.default.object }), _class.defaultProps = (0, _extends3.default)({}, Component.defaultProps, { prefixCls: 'rc-slider', className: '', min: 0, max: 100, step: 1, marks: {}, handle: function handle(_ref) { var index = _ref.index, restProps = (0, _objectWithoutProperties3.default)(_ref, ['index']); delete restProps.dragging; delete restProps.value; return _react2.default.createElement(_Handle2.default, (0, _extends3.default)({}, restProps, { key: index })); }, onBeforeChange: noop, onChange: noop, onAfterChange: noop, included: true, disabled: false, dots: false, vertical: false, minimumTrackStyle: {}, maximumTrackStyle: {}, handleStyle: {} }), _temp; } module.exports = exports['default']; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(89))) /***/ }), /* 99 */ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports.default = function (obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }; /***/ }), /* 100 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(101); 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; }; /***/ }), /* 101 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(102), __esModule: true }; /***/ }), /* 102 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(103); var $Object = __webpack_require__(10).Object; module.exports = function defineProperty(it, key, desc){ return $Object.defineProperty(it, key, desc); }; /***/ }), /* 103 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(8); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__(18), 'Object', {defineProperty: __webpack_require__(14).f}); /***/ }), /* 104 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = addEventListenerWrap; var _addDomEventListener = __webpack_require__(105); var _addDomEventListener2 = _interopRequireDefault(_addDomEventListener); var _reactDom = __webpack_require__(109); var _reactDom2 = _interopRequireDefault(_reactDom); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function addEventListenerWrap(target, eventType, cb) { /* eslint camelcase: 2 */ var callback = _reactDom2["default"].unstable_batchedUpdates ? function run(e) { _reactDom2["default"].unstable_batchedUpdates(cb, e); } : cb; return (0, _addDomEventListener2["default"])(target, eventType, callback); } module.exports = exports['default']; /***/ }), /* 105 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = addEventListener; var _EventObject = __webpack_require__(106); var _EventObject2 = _interopRequireDefault(_EventObject); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function addEventListener(target, eventType, callback) { function wrapCallback(e) { var ne = new _EventObject2["default"](e); callback.call(target, ne); } if (target.addEventListener) { target.addEventListener(eventType, wrapCallback, false); return { remove: function remove() { target.removeEventListener(eventType, wrapCallback, false); } }; } else if (target.attachEvent) { target.attachEvent('on' + eventType, wrapCallback); return { remove: function remove() { target.detachEvent('on' + eventType, wrapCallback); } }; } } module.exports = exports['default']; /***/ }), /* 106 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _EventBaseObject = __webpack_require__(107); var _EventBaseObject2 = _interopRequireDefault(_EventBaseObject); var _objectAssign = __webpack_require__(108); var _objectAssign2 = _interopRequireDefault(_objectAssign); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * @ignore * event object for dom * @author yiminghe@gmail.com */ var TRUE = true; var FALSE = false; var commonProps = ['altKey', 'bubbles', 'cancelable', 'ctrlKey', 'currentTarget', 'eventPhase', 'metaKey', 'shiftKey', 'target', 'timeStamp', 'view', 'type']; function isNullOrUndefined(w) { return w === null || w === undefined; } var eventNormalizers = [{ reg: /^key/, props: ['char', 'charCode', 'key', 'keyCode', 'which'], fix: function fix(event, nativeEvent) { if (isNullOrUndefined(event.which)) { event.which = !isNullOrUndefined(nativeEvent.charCode) ? nativeEvent.charCode : nativeEvent.keyCode; } // add metaKey to non-Mac browsers (use ctrl for PC 's and Meta for Macs) if (event.metaKey === undefined) { event.metaKey = event.ctrlKey; } } }, { reg: /^touch/, props: ['touches', 'changedTouches', 'targetTouches'] }, { reg: /^hashchange$/, props: ['newURL', 'oldURL'] }, { reg: /^gesturechange$/i, props: ['rotation', 'scale'] }, { reg: /^(mousewheel|DOMMouseScroll)$/, props: [], fix: function fix(event, nativeEvent) { var deltaX = void 0; var deltaY = void 0; var delta = void 0; var wheelDelta = nativeEvent.wheelDelta; var axis = nativeEvent.axis; var wheelDeltaY = nativeEvent.wheelDeltaY; var wheelDeltaX = nativeEvent.wheelDeltaX; var detail = nativeEvent.detail; // ie/webkit if (wheelDelta) { delta = wheelDelta / 120; } // gecko if (detail) { // press control e.detail == 1 else e.detail == 3 delta = 0 - (detail % 3 === 0 ? detail / 3 : detail); } // Gecko if (axis !== undefined) { if (axis === event.HORIZONTAL_AXIS) { deltaY = 0; deltaX = 0 - delta; } else if (axis === event.VERTICAL_AXIS) { deltaX = 0; deltaY = delta; } } // Webkit if (wheelDeltaY !== undefined) { deltaY = wheelDeltaY / 120; } if (wheelDeltaX !== undefined) { deltaX = -1 * wheelDeltaX / 120; } // 默认 deltaY (ie) if (!deltaX && !deltaY) { deltaY = delta; } if (deltaX !== undefined) { /** * deltaX of mousewheel event * @property deltaX * @member Event.DomEvent.Object */ event.deltaX = deltaX; } if (deltaY !== undefined) { /** * deltaY of mousewheel event * @property deltaY * @member Event.DomEvent.Object */ event.deltaY = deltaY; } if (delta !== undefined) { /** * delta of mousewheel event * @property delta * @member Event.DomEvent.Object */ event.delta = delta; } } }, { reg: /^mouse|contextmenu|click|mspointer|(^DOMMouseScroll$)/i, props: ['buttons', 'clientX', 'clientY', 'button', 'offsetX', 'relatedTarget', 'which', 'fromElement', 'toElement', 'offsetY', 'pageX', 'pageY', 'screenX', 'screenY'], fix: function fix(event, nativeEvent) { var eventDoc = void 0; var doc = void 0; var body = void 0; var target = event.target; var button = nativeEvent.button; // Calculate pageX/Y if missing and clientX/Y available if (target && isNullOrUndefined(event.pageX) && !isNullOrUndefined(nativeEvent.clientX)) { eventDoc = target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = nativeEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); event.pageY = nativeEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); } // which for click: 1 === left; 2 === middle; 3 === right // do not use button if (!event.which && button !== undefined) { if (button & 1) { event.which = 1; } else if (button & 2) { event.which = 3; } else if (button & 4) { event.which = 2; } else { event.which = 0; } } // add relatedTarget, if necessary if (!event.relatedTarget && event.fromElement) { event.relatedTarget = event.fromElement === target ? event.toElement : event.fromElement; } return event; } }]; function retTrue() { return TRUE; } function retFalse() { return FALSE; } function DomEventObject(nativeEvent) { var type = nativeEvent.type; var isNative = typeof nativeEvent.stopPropagation === 'function' || typeof nativeEvent.cancelBubble === 'boolean'; _EventBaseObject2["default"].call(this); this.nativeEvent = nativeEvent; // in case dom event has been mark as default prevented by lower dom node var isDefaultPrevented = retFalse; if ('defaultPrevented' in nativeEvent) { isDefaultPrevented = nativeEvent.defaultPrevented ? retTrue : retFalse; } else if ('getPreventDefault' in nativeEvent) { // https://bugzilla.mozilla.org/show_bug.cgi?id=691151 isDefaultPrevented = nativeEvent.getPreventDefault() ? retTrue : retFalse; } else if ('returnValue' in nativeEvent) { isDefaultPrevented = nativeEvent.returnValue === FALSE ? retTrue : retFalse; } this.isDefaultPrevented = isDefaultPrevented; var fixFns = []; var fixFn = void 0; var l = void 0; var prop = void 0; var props = commonProps.concat(); eventNormalizers.forEach(function (normalizer) { if (type.match(normalizer.reg)) { props = props.concat(normalizer.props); if (normalizer.fix) { fixFns.push(normalizer.fix); } } }); l = props.length; // clone properties of the original event object while (l) { prop = props[--l]; this[prop] = nativeEvent[prop]; } // fix target property, if necessary if (!this.target && isNative) { this.target = nativeEvent.srcElement || document; // srcElement might not be defined either } // check if target is a text node (safari) if (this.target && this.target.nodeType === 3) { this.target = this.target.parentNode; } l = fixFns.length; while (l) { fixFn = fixFns[--l]; fixFn(this, nativeEvent); } this.timeStamp = nativeEvent.timeStamp || Date.now(); } var EventBaseObjectProto = _EventBaseObject2["default"].prototype; (0, _objectAssign2["default"])(DomEventObject.prototype, EventBaseObjectProto, { constructor: DomEventObject, preventDefault: function preventDefault() { var e = this.nativeEvent; // if preventDefault exists run it on the original event if (e.preventDefault) { e.preventDefault(); } else { // otherwise set the returnValue property of the original event to FALSE (IE) e.returnValue = FALSE; } EventBaseObjectProto.preventDefault.call(this); }, stopPropagation: function stopPropagation() { var e = this.nativeEvent; // if stopPropagation exists run it on the original event if (e.stopPropagation) { e.stopPropagation(); } else { // otherwise set the cancelBubble property of the original event to TRUE (IE) e.cancelBubble = TRUE; } EventBaseObjectProto.stopPropagation.call(this); } }); exports["default"] = DomEventObject; module.exports = exports['default']; /***/ }), /* 107 */ /***/ (function(module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * @ignore * base event object for custom and dom event. * @author yiminghe@gmail.com */ function returnFalse() { return false; } function returnTrue() { return true; } function EventBaseObject() { this.timeStamp = Date.now(); this.target = undefined; this.currentTarget = undefined; } EventBaseObject.prototype = { isEventObject: 1, constructor: EventBaseObject, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, preventDefault: function preventDefault() { this.isDefaultPrevented = returnTrue; }, stopPropagation: function stopPropagation() { this.isPropagationStopped = returnTrue; }, stopImmediatePropagation: function stopImmediatePropagation() { this.isImmediatePropagationStopped = returnTrue; // fixed 1.2 // call stopPropagation implicitly this.stopPropagation(); }, halt: function halt(immediate) { if (immediate) { this.stopImmediatePropagation(); } else { this.stopPropagation(); } this.preventDefault(); } }; exports["default"] = EventBaseObject; module.exports = exports['default']; /***/ }), /* 108 */ /***/ (function(module, exports) { /* object-assign (c) Sindre Sorhus @license MIT */ 'use strict'; /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { if (val === null || val === undefined) { throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } function shouldUseNative() { try { if (!Object.assign) { return false; } // Detect buggy property enumeration order in older V8 versions. // https://bugs.chromium.org/p/v8/issues/detail?id=4118 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers test1[5] = 'de'; if (Object.getOwnPropertyNames(test1)[0] === '5') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test2 = {}; for (var i = 0; i < 10; i++) { test2['_' + String.fromCharCode(i)] = i; } var order2 = Object.getOwnPropertyNames(test2).map(function (n) { return test2[n]; }); if (order2.join('') !== '0123456789') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test3 = {}; 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { test3[letter] = letter; }); if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { return false; } return true; } catch (err) { // We don't expect any of the above to throw, but better to be safe. return false; } } module.exports = shouldUseNative() ? Object.assign : function (target, source) { var from; var to = toObject(target); var symbols; for (var s = 1; s < arguments.length; s++) { from = Object(arguments[s]); for (var key in from) { if (hasOwnProperty.call(from, key)) { to[key] = from[key]; } } if (getOwnPropertySymbols) { symbols = getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]]; } } } } return to; }; /***/ }), /* 109 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_109__; /***/ }), /* 110 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2016 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)) { classes.push(classNames.apply(null, arg)); } 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) { 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; } }()); /***/ }), /* 111 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ 'use strict'; /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var warning = function() {}; if (process.env.NODE_ENV !== 'production') { warning = function(condition, format, args) { var len = arguments.length; args = new Array(len > 2 ? len - 2 : 0); for (var key = 2; key < len; key++) { args[key - 2] = arguments[key]; } if (format === undefined) { throw new Error( '`warning(condition, format, ...args)` requires a warning ' + 'message argument' ); } if (format.length < 10 || (/^[s\W]*$/).test(format)) { throw new Error( 'The warning format should be able to uniquely identify this ' + 'warning. Please, use a more descriptive format than: ' + format ); } if (!condition) { var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function() { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch(x) {} } }; } module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(89))) /***/ }), /* 112 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty2 = __webpack_require__(100); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); var _classnames = __webpack_require__(110); var _classnames2 = _interopRequireDefault(_classnames); var _warning = __webpack_require__(111); var _warning2 = _interopRequireDefault(_warning); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var calcPoints = function calcPoints(vertical, marks, dots, step, min, max) { (0, _warning2.default)(dots ? step > 0 : true, '`Slider[step]` should be a positive number in order to make Slider[dots] work.'); var points = Object.keys(marks).map(parseFloat); if (dots) { for (var i = min; i <= max; i = i + step) { if (points.indexOf(i) >= 0) continue; points.push(i); } } return points; }; var Steps = function Steps(_ref) { var prefixCls = _ref.prefixCls, vertical = _ref.vertical, marks = _ref.marks, dots = _ref.dots, step = _ref.step, included = _ref.included, lowerBound = _ref.lowerBound, upperBound = _ref.upperBound, max = _ref.max, min = _ref.min; var range = max - min; var elements = calcPoints(vertical, marks, dots, step, min, max).map(function (point) { var _classNames; var offset = Math.abs(point - min) / range * 100 + '%'; var style = vertical ? { bottom: offset } : { left: offset }; var isActived = !included && point === upperBound || included && point <= upperBound && point >= lowerBound; var pointClassName = (0, _classnames2.default)((_classNames = {}, (0, _defineProperty3.default)(_classNames, prefixCls + '-dot', true), (0, _defineProperty3.default)(_classNames, prefixCls + '-dot-active', isActived), _classNames)); return _react2.default.createElement('span', { className: pointClassName, style: style, key: point }); }); return _react2.default.createElement( 'div', { className: prefixCls + '-step' }, elements ); }; exports.default = Steps; module.exports = exports['default']; /***/ }), /* 113 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(4); var _extends3 = _interopRequireDefault(_extends2); var _typeof2 = __webpack_require__(44); var _typeof3 = _interopRequireDefault(_typeof2); var _defineProperty2 = __webpack_require__(100); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); var _classnames = __webpack_require__(110); var _classnames2 = _interopRequireDefault(_classnames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Marks = function Marks(_ref) { var className = _ref.className, vertical = _ref.vertical, marks = _ref.marks, included = _ref.included, upperBound = _ref.upperBound, lowerBound = _ref.lowerBound, max = _ref.max, min = _ref.min; var marksKeys = Object.keys(marks); var marksCount = marksKeys.length; var unit = 100 / (marksCount - 1); var markWidth = unit * 0.9; var range = max - min; var elements = marksKeys.map(parseFloat).sort(function (a, b) { return a - b; }).map(function (point) { var _classNames; var isActive = !included && point === upperBound || included && point <= upperBound && point >= lowerBound; var markClassName = (0, _classnames2.default)((_classNames = {}, (0, _defineProperty3.default)(_classNames, className + '-text', true), (0, _defineProperty3.default)(_classNames, className + '-text-active', isActive), _classNames)); var bottomStyle = { marginBottom: '-50%', bottom: (point - min) / range * 100 + '%' }; var leftStyle = { width: markWidth + '%', marginLeft: -markWidth / 2 + '%', left: (point - min) / range * 100 + '%' }; var style = vertical ? bottomStyle : leftStyle; var markPoint = marks[point]; var markPointIsObject = (typeof markPoint === 'undefined' ? 'undefined' : (0, _typeof3.default)(markPoint)) === 'object' && !_react2.default.isValidElement(markPoint); var markLabel = markPointIsObject ? markPoint.label : markPoint; var markStyle = markPointIsObject ? (0, _extends3.default)({}, style, markPoint.style) : style; return _react2.default.createElement( 'span', { className: markClassName, style: markStyle, key: point }, markLabel ); }); return _react2.default.createElement( 'div', { className: className }, elements ); }; exports.default = Marks; module.exports = exports['default']; /***/ }), /* 114 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(4); var _extends3 = _interopRequireDefault(_extends2); var _objectWithoutProperties2 = __webpack_require__(99); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _classCallCheck2 = __webpack_require__(42); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(43); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(79); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(88); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Handle = function (_React$Component) { (0, _inherits3.default)(Handle, _React$Component); function Handle() { (0, _classCallCheck3.default)(this, Handle); return (0, _possibleConstructorReturn3.default)(this, _React$Component.apply(this, arguments)); } Handle.prototype.render = function render() { var _props = this.props, className = _props.className, vertical = _props.vertical, offset = _props.offset, handleStyle = _props.handleStyle, restProps = (0, _objectWithoutProperties3.default)(_props, ['className', 'vertical', 'offset', 'handleStyle']); var style = vertical ? { bottom: offset + '%' } : { left: offset + '%' }; var elStyle = (0, _extends3.default)({}, style, handleStyle); return _react2.default.createElement('div', (0, _extends3.default)({}, restProps, { className: className, style: elStyle })); }; return Handle; }(_react2.default.Component); exports.default = Handle; Handle.propTypes = { className: _propTypes2.default.string, vertical: _propTypes2.default.bool, offset: _propTypes2.default.number, handleStyle: _propTypes2.default.object }; module.exports = exports['default']; /***/ }), /* 115 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _toConsumableArray2 = __webpack_require__(116); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); exports.isEventFromHandle = isEventFromHandle; exports.isValueOutOfRange = isValueOutOfRange; exports.isNotTouchEvent = isNotTouchEvent; exports.getClosestPoint = getClosestPoint; exports.getPrecision = getPrecision; exports.getMousePosition = getMousePosition; exports.getTouchPosition = getTouchPosition; exports.getHandleCenterPosition = getHandleCenterPosition; exports.ensureValueInRange = ensureValueInRange; exports.ensureValuePrecision = ensureValuePrecision; exports.pauseEvent = pauseEvent; var _reactDom = __webpack_require__(109); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function isEventFromHandle(e, handles) { return Object.keys(handles).some(function (key) { return e.target === (0, _reactDom.findDOMNode)(handles[key]); }); } function isValueOutOfRange(value, _ref) { var min = _ref.min, max = _ref.max; return value < min || value > max; } function isNotTouchEvent(e) { return e.touches.length > 1 || e.type.toLowerCase() === 'touchend' && e.touches.length > 0; } function getClosestPoint(val, _ref2) { var marks = _ref2.marks, step = _ref2.step, min = _ref2.min; var points = Object.keys(marks).map(parseFloat); if (step !== null) { var closestStep = Math.round((val - min) / step) * step + min; points.push(closestStep); } var diffs = points.map(function (point) { return Math.abs(val - point); }); return points[diffs.indexOf(Math.min.apply(Math, (0, _toConsumableArray3.default)(diffs)))]; } function getPrecision(step) { var stepString = step.toString(); var precision = 0; if (stepString.indexOf('.') >= 0) { precision = stepString.length - stepString.indexOf('.') - 1; } return precision; } function getMousePosition(vertical, e) { return vertical ? e.clientY : e.pageX; } function getTouchPosition(vertical, e) { return vertical ? e.touches[0].clientY : e.touches[0].pageX; } function getHandleCenterPosition(vertical, handle) { var coords = handle.getBoundingClientRect(); return vertical ? coords.top + coords.height * 0.5 : coords.left + coords.width * 0.5; } function ensureValueInRange(val, _ref3) { var max = _ref3.max, min = _ref3.min; if (val <= min) { return min; } if (val >= max) { return max; } return val; } function ensureValuePrecision(val, props) { var step = props.step; var closestPoint = getClosestPoint(val, props); return step === null ? closestPoint : parseFloat(closestPoint.toFixed(getPrecision(step))); } function pauseEvent(e) { e.stopPropagation(); e.preventDefault(); } /***/ }), /* 116 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _from = __webpack_require__(117); var _from2 = _interopRequireDefault(_from); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return (0, _from2.default)(arr); } }; /***/ }), /* 117 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(118), __esModule: true }; /***/ }), /* 118 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(47); __webpack_require__(119); module.exports = __webpack_require__(10).Array.from; /***/ }), /* 119 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var ctx = __webpack_require__(11) , $export = __webpack_require__(8) , toObject = __webpack_require__(41) , call = __webpack_require__(120) , isArrayIter = __webpack_require__(121) , toLength = __webpack_require__(32) , createProperty = __webpack_require__(122) , getIterFn = __webpack_require__(123); $export($export.S + $export.F * !__webpack_require__(125)(function(iter){ Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ var O = toObject(arrayLike) , C = typeof this == 'function' ? this : Array , aLen = arguments.length , mapfn = aLen > 1 ? arguments[1] : undefined , mapping = mapfn !== undefined , index = 0 , iterFn = getIterFn(O) , length, result, step, iterator; if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for(result = new C(length); length > index; index++){ createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); /***/ }), /* 120 */ /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error var anObject = __webpack_require__(15); module.exports = function(iterator, fn, value, entries){ try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch(e){ var ret = iterator['return']; if(ret !== undefined)anObject(ret.call(iterator)); throw e; } }; /***/ }), /* 121 */ /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator var Iterators = __webpack_require__(52) , ITERATOR = __webpack_require__(58)('iterator') , ArrayProto = Array.prototype; module.exports = function(it){ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }), /* 122 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var $defineProperty = __webpack_require__(14) , createDesc = __webpack_require__(22); module.exports = function(object, index, value){ if(index in object)$defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; /***/ }), /* 123 */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(124) , ITERATOR = __webpack_require__(58)('iterator') , Iterators = __webpack_require__(52); module.exports = __webpack_require__(10).getIteratorMethod = function(it){ if(it != undefined)return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }), /* 124 */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(29) , TAG = __webpack_require__(58)('toStringTag') // ES3 wrong here , ARG = cof(function(){ return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function(it, key){ try { return it[key]; } catch(e){ /* empty */ } }; module.exports = function(it){ var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }), /* 125 */ /***/ (function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(58)('iterator') , SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function(){ SAFE_CLOSING = true; }; Array.from(riter, function(){ throw 2; }); } catch(e){ /* empty */ } module.exports = function(exec, skipClosing){ if(!skipClosing && !SAFE_CLOSING)return false; var safe = false; try { var arr = [7] , iter = arr[ITERATOR](); iter.next = function(){ return {done: safe = true}; }; arr[ITERATOR] = function(){ return iter; }; exec(arr); } catch(e){ /* empty */ } return safe; }; /***/ }), /* 126 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty2 = __webpack_require__(100); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _toConsumableArray2 = __webpack_require__(116); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); var _extends2 = __webpack_require__(4); var _extends3 = _interopRequireDefault(_extends2); var _classCallCheck2 = __webpack_require__(42); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(43); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(79); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(88); var _propTypes2 = _interopRequireDefault(_propTypes); var _classnames = __webpack_require__(110); var _classnames2 = _interopRequireDefault(_classnames); var _Track = __webpack_require__(97); var _Track2 = _interopRequireDefault(_Track); var _createSlider = __webpack_require__(98); var _createSlider2 = _interopRequireDefault(_createSlider); var _utils = __webpack_require__(115); var utils = _interopRequireWildcard(_utils); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /* eslint-disable react/prop-types */ var Range = function (_React$Component) { (0, _inherits3.default)(Range, _React$Component); function Range(props) { (0, _classCallCheck3.default)(this, Range); var _this = (0, _possibleConstructorReturn3.default)(this, _React$Component.call(this, props)); _this.onEnd = function () { _this.setState({ handle: null }); _this.removeDocumentEvents(); _this.props.onAfterChange(_this.getValue()); }; var count = props.count, min = props.min, max = props.max; var initialValue = Array.apply(null, Array(count + 1)).map(function () { return min; }); var defaultValue = 'defaultValue' in props ? props.defaultValue : initialValue; var value = props.value !== undefined ? props.value : defaultValue; var bounds = value.map(function (v) { return _this.trimAlignValue(v); }); var recent = bounds[0] === max ? 0 : bounds.length - 1; _this.state = { handle: null, recent: recent, bounds: bounds }; return _this; } Range.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var _this2 = this; if (!('value' in nextProps || 'min' in nextProps || 'max' in nextProps)) return; var bounds = this.state.bounds; var value = nextProps.value || bounds; var nextBounds = value.map(function (v) { return _this2.trimAlignValue(v, nextProps); }); if (nextBounds.length === bounds.length && nextBounds.every(function (v, i) { return v === bounds[i]; })) return; this.setState({ bounds: nextBounds }); if (bounds.some(function (v) { return utils.isValueOutOfRange(v, nextProps); })) { this.props.onChange(nextBounds); } }; Range.prototype.onChange = function onChange(state) { var props = this.props; var isNotControlled = !('value' in props); if (isNotControlled) { this.setState(state); } else if (state.handle !== undefined) { this.setState({ handle: state.handle }); } var data = (0, _extends3.default)({}, this.state, state); var changedValue = data.bounds; props.onChange(changedValue); }; Range.prototype.onStart = function onStart(position) { var props = this.props; var state = this.state; var bounds = this.getValue(); props.onBeforeChange(bounds); var value = this.calcValueByPos(position); this.startValue = value; this.startPosition = position; var closestBound = this.getClosestBound(value); var boundNeedMoving = this.getBoundNeedMoving(value, closestBound); this.setState({ handle: boundNeedMoving, recent: boundNeedMoving }); var prevValue = bounds[boundNeedMoving]; if (value === prevValue) return; var nextBounds = [].concat((0, _toConsumableArray3.default)(state.bounds)); nextBounds[boundNeedMoving] = value; this.onChange({ bounds: nextBounds }); }; Range.prototype.onMove = function onMove(e, position) { utils.pauseEvent(e); var props = this.props; var state = this.state; var value = this.calcValueByPos(position); var oldValue = state.bounds[state.handle]; if (value === oldValue) return; var nextBounds = [].concat((0, _toConsumableArray3.default)(state.bounds)); nextBounds[state.handle] = value; var nextHandle = state.handle; if (props.pushable !== false) { var originalValue = state.bounds[nextHandle]; this.pushSurroundingHandles(nextBounds, nextHandle, originalValue); } else if (props.allowCross) { nextBounds.sort(function (a, b) { return a - b; }); nextHandle = nextBounds.indexOf(value); } this.onChange({ handle: nextHandle, bounds: nextBounds }); }; Range.prototype.getValue = function getValue() { return this.state.bounds; }; Range.prototype.getClosestBound = function getClosestBound(value) { var bounds = this.state.bounds; var closestBound = 0; for (var i = 1; i < bounds.length - 1; ++i) { if (value > bounds[i]) { closestBound = i; } } if (Math.abs(bounds[closestBound + 1] - value) < Math.abs(bounds[closestBound] - value)) { closestBound = closestBound + 1; } return closestBound; }; Range.prototype.getBoundNeedMoving = function getBoundNeedMoving(value, closestBound) { var _state = this.state, bounds = _state.bounds, recent = _state.recent; var boundNeedMoving = closestBound; var isAtTheSamePoint = bounds[closestBound + 1] === bounds[closestBound]; if (isAtTheSamePoint) { boundNeedMoving = recent; } if (isAtTheSamePoint && value !== bounds[closestBound + 1]) { boundNeedMoving = value < bounds[closestBound + 1] ? closestBound : closestBound + 1; } return boundNeedMoving; }; Range.prototype.getLowerBound = function getLowerBound() { return this.state.bounds[0]; }; Range.prototype.getUpperBound = function getUpperBound() { var bounds = this.state.bounds; return bounds[bounds.length - 1]; }; /** * Returns an array of possible slider points, taking into account both * `marks` and `step`. The result is cached. */ Range.prototype.getPoints = function getPoints() { var _props = this.props, marks = _props.marks, step = _props.step, min = _props.min, max = _props.max; var cache = this._getPointsCache; if (!cache || cache.marks !== marks || cache.step !== step) { var pointsObject = (0, _extends3.default)({}, marks); if (step !== null) { for (var point = min; point <= max; point += step) { pointsObject[point] = point; } } var points = Object.keys(pointsObject).map(parseFloat); points.sort(function (a, b) { return a - b; }); this._getPointsCache = { marks: marks, step: step, points: points }; } return this._getPointsCache.points; }; Range.prototype.pushSurroundingHandles = function pushSurroundingHandles(bounds, handle, originalValue) { var threshold = this.props.pushable; var value = bounds[handle]; var direction = 0; if (bounds[handle + 1] - value < threshold) { direction = +1; // push to right } if (value - bounds[handle - 1] < threshold) { direction = -1; // push to left } if (direction === 0) { return; } var nextHandle = handle + direction; var diffToNext = direction * (bounds[nextHandle] - value); if (!this.pushHandle(bounds, nextHandle, direction, threshold - diffToNext)) { // revert to original value if pushing is impossible bounds[handle] = originalValue; } }; Range.prototype.pushHandle = function pushHandle(bounds, handle, direction, amount) { var originalValue = bounds[handle]; var currentValue = bounds[handle]; while (direction * (currentValue - originalValue) < amount) { if (!this.pushHandleOnePoint(bounds, handle, direction)) { // can't push handle enough to create the needed `amount` gap, so we // revert its position to the original value bounds[handle] = originalValue; return false; } currentValue = bounds[handle]; } // the handle was pushed enough to create the needed `amount` gap return true; }; Range.prototype.pushHandleOnePoint = function pushHandleOnePoint(bounds, handle, direction) { var points = this.getPoints(); var pointIndex = points.indexOf(bounds[handle]); var nextPointIndex = pointIndex + direction; if (nextPointIndex >= points.length || nextPointIndex < 0) { // reached the minimum or maximum available point, can't push anymore return false; } var nextHandle = handle + direction; var nextValue = points[nextPointIndex]; var threshold = this.props.pushable; var diffToNext = direction * (bounds[nextHandle] - nextValue); if (!this.pushHandle(bounds, nextHandle, direction, threshold - diffToNext)) { // couldn't push next handle, so we won't push this one either return false; } // push the handle bounds[handle] = nextValue; return true; }; Range.prototype.trimAlignValue = function trimAlignValue(v) { var nextProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var mergedProps = (0, _extends3.default)({}, this.props, nextProps); var valInRange = utils.ensureValueInRange(v, mergedProps); var valNotConflict = this.ensureValueNotConflict(valInRange, mergedProps); return utils.ensureValuePrecision(valNotConflict, mergedProps); }; Range.prototype.ensureValueNotConflict = function ensureValueNotConflict(val, _ref) { var allowCross = _ref.allowCross; var state = this.state || {}; var handle = state.handle, bounds = state.bounds; /* eslint-disable eqeqeq */ if (!allowCross && handle != null) { if (handle > 0 && val <= bounds[handle - 1]) { return bounds[handle - 1]; } if (handle < bounds.length - 1 && val >= bounds[handle + 1]) { return bounds[handle + 1]; } } /* eslint-enable eqeqeq */ return val; }; Range.prototype.render = function render() { var _this3 = this; var _state2 = this.state, handle = _state2.handle, bounds = _state2.bounds; var _props2 = this.props, prefixCls = _props2.prefixCls, vertical = _props2.vertical, included = _props2.included, disabled = _props2.disabled, handleGenerator = _props2.handle; var offsets = bounds.map(function (v) { return _this3.calcOffset(v); }); var handleClassName = prefixCls + '-handle'; var handles = bounds.map(function (v, i) { var _classNames; return handleGenerator({ className: (0, _classnames2.default)((_classNames = {}, (0, _defineProperty3.default)(_classNames, handleClassName, true), (0, _defineProperty3.default)(_classNames, handleClassName + '-' + (i + 1), true), _classNames)), vertical: vertical, offset: offsets[i], value: v, dragging: handle === i, index: i, disabled: disabled, ref: function ref(h) { return _this3.saveHandle(i, h); } }); }); var tracks = bounds.slice(0, -1).map(function (_, index) { var _classNames2; var i = index + 1; var trackClassName = (0, _classnames2.default)((_classNames2 = {}, (0, _defineProperty3.default)(_classNames2, prefixCls + '-track', true), (0, _defineProperty3.default)(_classNames2, prefixCls + '-track-' + i, true), _classNames2)); return _react2.default.createElement(_Track2.default, { className: trackClassName, vertical: vertical, included: included, offset: offsets[i - 1], length: offsets[i] - offsets[i - 1], key: i }); }); return { tracks: tracks, handles: handles }; }; return Range; }(_react2.default.Component); Range.displayName = 'Range'; Range.propTypes = { defaultValue: _propTypes2.default.arrayOf(_propTypes2.default.number), value: _propTypes2.default.arrayOf(_propTypes2.default.number), count: _propTypes2.default.number, pushable: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.number]), allowCross: _propTypes2.default.bool, disabled: _propTypes2.default.bool }; Range.defaultProps = { count: 1, allowCross: true, pushable: false }; exports.default = (0, _createSlider2.default)(Range); module.exports = exports['default']; /***/ }), /* 127 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _objectWithoutProperties2 = __webpack_require__(99); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _defineProperty2 = __webpack_require__(100); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _extends3 = __webpack_require__(4); var _extends4 = _interopRequireDefault(_extends3); var _classCallCheck2 = __webpack_require__(42); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(43); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(79); var _inherits3 = _interopRequireDefault(_inherits2); exports.default = createSliderWithTooltip; var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(88); var _propTypes2 = _interopRequireDefault(_propTypes); var _rcTooltip = __webpack_require__(128); var _rcTooltip2 = _interopRequireDefault(_rcTooltip); var _Handle = __webpack_require__(114); var _Handle2 = _interopRequireDefault(_Handle); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function createSliderWithTooltip(Component) { var _class, _temp; return _temp = _class = function (_React$Component) { (0, _inherits3.default)(ComponentWrapper, _React$Component); function ComponentWrapper(props) { (0, _classCallCheck3.default)(this, ComponentWrapper); var _this = (0, _possibleConstructorReturn3.default)(this, _React$Component.call(this, props)); _this.handleTooltipVisibleChange = function (index, visible) { _this.setState({ visibles: (0, _extends4.default)({}, _this.state.visibles, (0, _defineProperty3.default)({}, index, visible)) }); }; _this.handleWithTooltip = function (_ref) { var value = _ref.value, dragging = _ref.dragging, index = _ref.index, disabled = _ref.disabled, restProps = (0, _objectWithoutProperties3.default)(_ref, ['value', 'dragging', 'index', 'disabled']); var tipFormatter = _this.props.tipFormatter; return _react2.default.createElement( _rcTooltip2.default, { prefixCls: 'rc-slider-tooltip', overlay: tipFormatter(value), visible: !disabled && (_this.state.visibles[index] || dragging), placement: 'top', key: index }, _react2.default.createElement(_Handle2.default, (0, _extends4.default)({}, restProps, { onMouseEnter: function onMouseEnter() { return _this.handleTooltipVisibleChange(index, true); }, onMouseLeave: function onMouseLeave() { return _this.handleTooltipVisibleChange(index, false); } })) ); }; _this.state = { visibles: {} }; return _this; } ComponentWrapper.prototype.render = function render() { return _react2.default.createElement(Component, (0, _extends4.default)({}, this.props, { handle: this.handleWithTooltip })); }; return ComponentWrapper; }(_react2.default.Component), _class.propTypes = { tipFormatter: _propTypes2.default.func }, _class.defaultProps = { tipFormatter: function tipFormatter(value) { return value; } }, _temp; } module.exports = exports['default']; /***/ }), /* 128 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; module.exports = __webpack_require__(129); /***/ }), /* 129 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(4); var _extends3 = _interopRequireDefault(_extends2); var _objectWithoutProperties2 = __webpack_require__(99); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _classCallCheck2 = __webpack_require__(42); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(43); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(79); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(88); var _propTypes2 = _interopRequireDefault(_propTypes); var _rcTrigger = __webpack_require__(130); var _rcTrigger2 = _interopRequireDefault(_rcTrigger); var _placements = __webpack_require__(162); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var Tooltip = function (_Component) { (0, _inherits3["default"])(Tooltip, _Component); function Tooltip() { var _temp, _this, _ret; (0, _classCallCheck3["default"])(this, Tooltip); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = (0, _possibleConstructorReturn3["default"])(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.getPopupElement = function () { var _this$props = _this.props, arrowContent = _this$props.arrowContent, overlay = _this$props.overlay, prefixCls = _this$props.prefixCls; return [_react2["default"].createElement( 'div', { className: prefixCls + '-arrow', key: 'arrow' }, arrowContent ), _react2["default"].createElement( 'div', { className: prefixCls + '-inner', key: 'content' }, typeof overlay === 'function' ? overlay() : overlay )]; }, _temp), (0, _possibleConstructorReturn3["default"])(_this, _ret); } Tooltip.prototype.getPopupDomNode = function getPopupDomNode() { return this.refs.trigger.getPopupDomNode(); }; Tooltip.prototype.render = function render() { var _props = this.props, overlayClassName = _props.overlayClassName, trigger = _props.trigger, mouseEnterDelay = _props.mouseEnterDelay, mouseLeaveDelay = _props.mouseLeaveDelay, overlayStyle = _props.overlayStyle, prefixCls = _props.prefixCls, children = _props.children, onVisibleChange = _props.onVisibleChange, transitionName = _props.transitionName, animation = _props.animation, placement = _props.placement, align = _props.align, destroyTooltipOnHide = _props.destroyTooltipOnHide, defaultVisible = _props.defaultVisible, getTooltipContainer = _props.getTooltipContainer, restProps = (0, _objectWithoutProperties3["default"])(_props, ['overlayClassName', 'trigger', 'mouseEnterDelay', 'mouseLeaveDelay', 'overlayStyle', 'prefixCls', 'children', 'onVisibleChange', 'transitionName', 'animation', 'placement', 'align', 'destroyTooltipOnHide', 'defaultVisible', 'getTooltipContainer']); var extraProps = (0, _extends3["default"])({}, restProps); if ('visible' in this.props) { extraProps.popupVisible = this.props.visible; } return _react2["default"].createElement( _rcTrigger2["default"], (0, _extends3["default"])({ popupClassName: overlayClassName, ref: 'trigger', prefixCls: prefixCls, popup: this.getPopupElement, action: trigger, builtinPlacements: _placements.placements, popupPlacement: placement, popupAlign: align, getPopupContainer: getTooltipContainer, onPopupVisibleChange: onVisibleChange, popupTransitionName: transitionName, popupAnimation: animation, defaultPopupVisible: defaultVisible, destroyPopupOnHide: destroyTooltipOnHide, mouseLeaveDelay: mouseLeaveDelay, popupStyle: overlayStyle, mouseEnterDelay: mouseEnterDelay }, extraProps), children ); }; return Tooltip; }(_react.Component); Tooltip.propTypes = { trigger: _propTypes2["default"].any, children: _propTypes2["default"].any, defaultVisible: _propTypes2["default"].bool, visible: _propTypes2["default"].bool, placement: _propTypes2["default"].string, transitionName: _propTypes2["default"].string, animation: _propTypes2["default"].any, onVisibleChange: _propTypes2["default"].func, afterVisibleChange: _propTypes2["default"].func, overlay: _propTypes2["default"].oneOfType([_propTypes2["default"].node, _propTypes2["default"].func]).isRequired, overlayStyle: _propTypes2["default"].object, overlayClassName: _propTypes2["default"].string, prefixCls: _propTypes2["default"].string, mouseEnterDelay: _propTypes2["default"].number, mouseLeaveDelay: _propTypes2["default"].number, getTooltipContainer: _propTypes2["default"].func, destroyTooltipOnHide: _propTypes2["default"].bool, align: _propTypes2["default"].object, arrowContent: _propTypes2["default"].any }; Tooltip.defaultProps = { prefixCls: 'rc-tooltip', mouseEnterDelay: 0, destroyTooltipOnHide: false, mouseLeaveDelay: 0.1, align: {}, placement: 'right', trigger: ['hover'], arrowContent: null }; exports["default"] = Tooltip; module.exports = exports['default']; /***/ }), /* 130 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; module.exports = __webpack_require__(131); /***/ }), /* 131 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(4); var _extends3 = _interopRequireDefault(_extends2); var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(88); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactDom = __webpack_require__(109); var _createReactClass = __webpack_require__(132); var _createReactClass2 = _interopRequireDefault(_createReactClass); var _contains = __webpack_require__(135); var _contains2 = _interopRequireDefault(_contains); var _addEventListener = __webpack_require__(104); var _addEventListener2 = _interopRequireDefault(_addEventListener); var _Popup = __webpack_require__(136); var _Popup2 = _interopRequireDefault(_Popup); var _utils = __webpack_require__(160); var _getContainerRenderMixin = __webpack_require__(161); var _getContainerRenderMixin2 = _interopRequireDefault(_getContainerRenderMixin); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function noop() {} function returnEmptyString() { return ''; } function returnDocument() { return window.document; } var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur']; var Trigger = (0, _createReactClass2["default"])({ displayName: 'Trigger', propTypes: { children: _propTypes2["default"].any, action: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].arrayOf(_propTypes2["default"].string)]), showAction: _propTypes2["default"].any, hideAction: _propTypes2["default"].any, getPopupClassNameFromAlign: _propTypes2["default"].any, onPopupVisibleChange: _propTypes2["default"].func, afterPopupVisibleChange: _propTypes2["default"].func, popup: _propTypes2["default"].oneOfType([_propTypes2["default"].node, _propTypes2["default"].func]).isRequired, popupStyle: _propTypes2["default"].object, prefixCls: _propTypes2["default"].string, popupClassName: _propTypes2["default"].string, popupPlacement: _propTypes2["default"].string, builtinPlacements: _propTypes2["default"].object, popupTransitionName: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].object]), popupAnimation: _propTypes2["default"].any, mouseEnterDelay: _propTypes2["default"].number, mouseLeaveDelay: _propTypes2["default"].number, zIndex: _propTypes2["default"].number, focusDelay: _propTypes2["default"].number, blurDelay: _propTypes2["default"].number, getPopupContainer: _propTypes2["default"].func, getDocument: _propTypes2["default"].func, destroyPopupOnHide: _propTypes2["default"].bool, mask: _propTypes2["default"].bool, maskClosable: _propTypes2["default"].bool, onPopupAlign: _propTypes2["default"].func, popupAlign: _propTypes2["default"].object, popupVisible: _propTypes2["default"].bool, maskTransitionName: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].object]), maskAnimation: _propTypes2["default"].string }, mixins: [(0, _getContainerRenderMixin2["default"])({ autoMount: false, isVisible: function isVisible(instance) { return instance.state.popupVisible; }, getContainer: function getContainer(instance) { var props = instance.props; var popupContainer = document.createElement('div'); // Make sure default popup container will never cause scrollbar appearing // https://github.com/react-component/trigger/issues/41 popupContainer.style.position = 'absolute'; popupContainer.style.top = '0'; popupContainer.style.left = '0'; popupContainer.style.width = '100%'; var mountNode = props.getPopupContainer ? props.getPopupContainer((0, _reactDom.findDOMNode)(instance)) : props.getDocument().body; mountNode.appendChild(popupContainer); return popupContainer; } })], getDefaultProps: function getDefaultProps() { return { prefixCls: 'rc-trigger-popup', getPopupClassNameFromAlign: returnEmptyString, getDocument: returnDocument, onPopupVisibleChange: noop, afterPopupVisibleChange: noop, onPopupAlign: noop, popupClassName: '', mouseEnterDelay: 0, mouseLeaveDelay: 0.1, focusDelay: 0, blurDelay: 0.15, popupStyle: {}, destroyPopupOnHide: false, popupAlign: {}, defaultPopupVisible: false, mask: false, maskClosable: true, action: [], showAction: [], hideAction: [] }; }, getInitialState: function getInitialState() { var props = this.props; var popupVisible = void 0; if ('popupVisible' in props) { popupVisible = !!props.popupVisible; } else { popupVisible = !!props.defaultPopupVisible; } return { popupVisible: popupVisible }; }, componentWillMount: function componentWillMount() { var _this = this; ALL_HANDLERS.forEach(function (h) { _this['fire' + h] = function (e) { _this.fireEvents(h, e); }; }); }, componentDidMount: function componentDidMount() { this.componentDidUpdate({}, { popupVisible: this.state.popupVisible }); }, componentWillReceiveProps: function componentWillReceiveProps(_ref) { var popupVisible = _ref.popupVisible; if (popupVisible !== undefined) { this.setState({ popupVisible: popupVisible }); } }, componentDidUpdate: function componentDidUpdate(_, prevState) { var props = this.props; var state = this.state; this.renderComponent(null, function () { if (prevState.popupVisible !== state.popupVisible) { props.afterPopupVisibleChange(state.popupVisible); } }); if (state.popupVisible) { var currentDocument = void 0; if (!this.clickOutsideHandler && this.isClickToHide()) { currentDocument = props.getDocument(); this.clickOutsideHandler = (0, _addEventListener2["default"])(currentDocument, 'mousedown', this.onDocumentClick); } // always hide on mobile if (!this.touchOutsideHandler) { currentDocument = currentDocument || props.getDocument(); this.touchOutsideHandler = (0, _addEventListener2["default"])(currentDocument, 'touchstart', this.onDocumentClick); } return; } this.clearOutsideHandler(); }, componentWillUnmount: function componentWillUnmount() { this.clearDelayTimer(); this.clearOutsideHandler(); }, onMouseEnter: function onMouseEnter(e) { this.fireEvents('onMouseEnter', e); this.delaySetPopupVisible(true, this.props.mouseEnterDelay); }, onMouseLeave: function onMouseLeave(e) { this.fireEvents('onMouseLeave', e); this.delaySetPopupVisible(false, this.props.mouseLeaveDelay); }, onPopupMouseEnter: function onPopupMouseEnter() { this.clearDelayTimer(); }, onPopupMouseLeave: function onPopupMouseLeave(e) { // https://github.com/react-component/trigger/pull/13 // react bug? if (e.relatedTarget && !e.relatedTarget.setTimeout && this._component && (0, _contains2["default"])(this._component.getPopupDomNode(), e.relatedTarget)) { return; } this.delaySetPopupVisible(false, this.props.mouseLeaveDelay); }, onFocus: function onFocus(e) { this.fireEvents('onFocus', e); // incase focusin and focusout this.clearDelayTimer(); if (this.isFocusToShow()) { this.focusTime = Date.now(); this.delaySetPopupVisible(true, this.props.focusDelay); } }, onMouseDown: function onMouseDown(e) { this.fireEvents('onMouseDown', e); this.preClickTime = Date.now(); }, onTouchStart: function onTouchStart(e) { this.fireEvents('onTouchStart', e); this.preTouchTime = Date.now(); }, onBlur: function onBlur(e) { this.fireEvents('onBlur', e); this.clearDelayTimer(); if (this.isBlurToHide()) { this.delaySetPopupVisible(false, this.props.blurDelay); } }, onClick: function onClick(event) { this.fireEvents('onClick', event); // focus will trigger click if (this.focusTime) { var preTime = void 0; if (this.preClickTime && this.preTouchTime) { preTime = Math.min(this.preClickTime, this.preTouchTime); } else if (this.preClickTime) { preTime = this.preClickTime; } else if (this.preTouchTime) { preTime = this.preTouchTime; } if (Math.abs(preTime - this.focusTime) < 20) { return; } this.focusTime = 0; } this.preClickTime = 0; this.preTouchTime = 0; event.preventDefault(); var nextVisible = !this.state.popupVisible; if (this.isClickToHide() && !nextVisible || nextVisible && this.isClickToShow()) { this.setPopupVisible(!this.state.popupVisible); } }, onDocumentClick: function onDocumentClick(event) { if (this.props.mask && !this.props.maskClosable) { return; } var target = event.target; var root = (0, _reactDom.findDOMNode)(this); var popupNode = this.getPopupDomNode(); if (!(0, _contains2["default"])(root, target) && !(0, _contains2["default"])(popupNode, target)) { this.close(); } }, getPopupDomNode: function getPopupDomNode() { // for test if (this._component && this._component.getPopupDomNode) { return this._component.getPopupDomNode(); } return null; }, getRootDomNode: function getRootDomNode() { return (0, _reactDom.findDOMNode)(this); }, getPopupClassNameFromAlign: function getPopupClassNameFromAlign(align) { var className = []; var props = this.props; var popupPlacement = props.popupPlacement, builtinPlacements = props.builtinPlacements, prefixCls = props.prefixCls; if (popupPlacement && builtinPlacements) { className.push((0, _utils.getPopupClassNameFromAlign)(builtinPlacements, prefixCls, align)); } if (props.getPopupClassNameFromAlign) { className.push(props.getPopupClassNameFromAlign(align)); } return className.join(' '); }, getPopupAlign: function getPopupAlign() { var props = this.props; var popupPlacement = props.popupPlacement, popupAlign = props.popupAlign, builtinPlacements = props.builtinPlacements; if (popupPlacement && builtinPlacements) { return (0, _utils.getAlignFromPlacement)(builtinPlacements, popupPlacement, popupAlign); } return popupAlign; }, getComponent: function getComponent() { var props = this.props, state = this.state; var mouseProps = {}; if (this.isMouseEnterToShow()) { mouseProps.onMouseEnter = this.onPopupMouseEnter; } if (this.isMouseLeaveToHide()) { mouseProps.onMouseLeave = this.onPopupMouseLeave; } return _react2["default"].createElement( _Popup2["default"], (0, _extends3["default"])({ prefixCls: props.prefixCls, destroyPopupOnHide: props.destroyPopupOnHide, visible: state.popupVisible, className: props.popupClassName, action: props.action, align: this.getPopupAlign(), onAlign: props.onPopupAlign, animation: props.popupAnimation, getClassNameFromAlign: this.getPopupClassNameFromAlign }, mouseProps, { getRootDomNode: this.getRootDomNode, style: props.popupStyle, mask: props.mask, zIndex: props.zIndex, transitionName: props.popupTransitionName, maskAnimation: props.maskAnimation, maskTransitionName: props.maskTransitionName }), typeof props.popup === 'function' ? props.popup() : props.popup ); }, setPopupVisible: function setPopupVisible(popupVisible) { this.clearDelayTimer(); if (this.state.popupVisible !== popupVisible) { if (!('popupVisible' in this.props)) { this.setState({ popupVisible: popupVisible }); } this.props.onPopupVisibleChange(popupVisible); } }, delaySetPopupVisible: function delaySetPopupVisible(visible, delayS) { var _this2 = this; var delay = delayS * 1000; this.clearDelayTimer(); if (delay) { this.delayTimer = setTimeout(function () { _this2.setPopupVisible(visible); _this2.clearDelayTimer(); }, delay); } else { this.setPopupVisible(visible); } }, clearDelayTimer: function clearDelayTimer() { if (this.delayTimer) { clearTimeout(this.delayTimer); this.delayTimer = null; } }, clearOutsideHandler: function clearOutsideHandler() { if (this.clickOutsideHandler) { this.clickOutsideHandler.remove(); this.clickOutsideHandler = null; } if (this.touchOutsideHandler) { this.touchOutsideHandler.remove(); this.touchOutsideHandler = null; } }, createTwoChains: function createTwoChains(event) { var childPros = this.props.children.props; var props = this.props; if (childPros[event] && props[event]) { return this['fire' + event]; } return childPros[event] || props[event]; }, isClickToShow: function isClickToShow() { var _props = this.props, action = _props.action, showAction = _props.showAction; return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1; }, isClickToHide: function isClickToHide() { var _props2 = this.props, action = _props2.action, hideAction = _props2.hideAction; return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1; }, isMouseEnterToShow: function isMouseEnterToShow() { var _props3 = this.props, action = _props3.action, showAction = _props3.showAction; return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1; }, isMouseLeaveToHide: function isMouseLeaveToHide() { var _props4 = this.props, action = _props4.action, hideAction = _props4.hideAction; return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1; }, isFocusToShow: function isFocusToShow() { var _props5 = this.props, action = _props5.action, showAction = _props5.showAction; return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1; }, isBlurToHide: function isBlurToHide() { var _props6 = this.props, action = _props6.action, hideAction = _props6.hideAction; return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1; }, forcePopupAlign: function forcePopupAlign() { if (this.state.popupVisible && this.popupInstance && this.popupInstance.alignInstance) { this.popupInstance.alignInstance.forceAlign(); } }, fireEvents: function fireEvents(type, e) { var childCallback = this.props.children.props[type]; if (childCallback) { childCallback(e); } var callback = this.props[type]; if (callback) { callback(e); } }, close: function close() { this.setPopupVisible(false); }, render: function render() { var props = this.props; var children = props.children; var child = _react2["default"].Children.only(children); var newChildProps = {}; if (this.isClickToHide() || this.isClickToShow()) { newChildProps.onClick = this.onClick; newChildProps.onMouseDown = this.onMouseDown; newChildProps.onTouchStart = this.onTouchStart; } else { newChildProps.onClick = this.createTwoChains('onClick'); newChildProps.onMouseDown = this.createTwoChains('onMouseDown'); newChildProps.onTouchStart = this.createTwoChains('onTouchStart'); } if (this.isMouseEnterToShow()) { newChildProps.onMouseEnter = this.onMouseEnter; } else { newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter'); } if (this.isMouseLeaveToHide()) { newChildProps.onMouseLeave = this.onMouseLeave; } else { newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave'); } if (this.isFocusToShow() || this.isBlurToHide()) { newChildProps.onFocus = this.onFocus; newChildProps.onBlur = this.onBlur; } else { newChildProps.onFocus = this.createTwoChains('onFocus'); newChildProps.onBlur = this.createTwoChains('onBlur'); } return _react2["default"].cloneElement(child, newChildProps); } }); exports["default"] = Trigger; module.exports = exports['default']; /***/ }), /* 132 */ /***/ (function(module, exports, __webpack_require__) { /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ 'use strict'; var React = __webpack_require__(87); var factory = __webpack_require__(133); // Hack to grab NoopUpdateQueue from isomorphic React var ReactNoopUpdateQueue = new React.Component().updater; module.exports = factory( React.Component, React.isValidElement, ReactNoopUpdateQueue ); /***/ }), /* 133 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ 'use strict'; var _assign = __webpack_require__(108); var emptyObject = __webpack_require__(134); var _invariant = __webpack_require__(92); if (process.env.NODE_ENV !== 'production') { var warning = __webpack_require__(93); } var MIXINS_KEY = 'mixins'; // Helper function to allow the creation of anonymous functions which do not // have .name set to the name of the variable being assigned to. function identity(fn) { return fn; } var ReactPropTypeLocationNames; if (process.env.NODE_ENV !== 'production') { ReactPropTypeLocationNames = { prop: 'prop', context: 'context', childContext: 'child context', }; } else { ReactPropTypeLocationNames = {}; } function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { /** * Policies that describe methods in `ReactClassInterface`. */ var injectedMixins = []; /** * Composite components are higher-level components that compose other composite * or host components. * * To create a new type of `ReactClass`, pass a specification of * your new class to `React.createClass`. The only requirement of your class * specification is that you implement a `render` method. * * var MyComponent = React.createClass({ * render: function() { * return
Hello World
; * } * }); * * The class specification supports a specific protocol of methods that have * special meaning (e.g. `render`). See `ReactClassInterface` for * more the comprehensive protocol. Any other properties and methods in the * class specification will be available on the prototype. * * @interface ReactClassInterface * @internal */ var ReactClassInterface = { /** * An array of Mixin objects to include when defining your component. * * @type {array} * @optional */ mixins: 'DEFINE_MANY', /** * An object containing properties and methods that should be defined on * the component's constructor instead of its prototype (static methods). * * @type {object} * @optional */ statics: 'DEFINE_MANY', /** * Definition of prop types for this component. * * @type {object} * @optional */ propTypes: 'DEFINE_MANY', /** * Definition of context types for this component. * * @type {object} * @optional */ contextTypes: 'DEFINE_MANY', /** * Definition of context types this component sets for its children. * * @type {object} * @optional */ childContextTypes: 'DEFINE_MANY', // ==== Definition methods ==== /** * Invoked when the component is mounted. Values in the mapping will be set on * `this.props` if that prop is not specified (i.e. using an `in` check). * * This method is invoked before `getInitialState` and therefore cannot rely * on `this.state` or use `this.setState`. * * @return {object} * @optional */ getDefaultProps: 'DEFINE_MANY_MERGED', /** * Invoked once before the component is mounted. The return value will be used * as the initial value of `this.state`. * * getInitialState: function() { * return { * isOn: false, * fooBaz: new BazFoo() * } * } * * @return {object} * @optional */ getInitialState: 'DEFINE_MANY_MERGED', /** * @return {object} * @optional */ getChildContext: 'DEFINE_MANY_MERGED', /** * Uses props from `this.props` and state from `this.state` to render the * structure of the component. * * No guarantees are made about when or how often this method is invoked, so * it must not have side effects. * * render: function() { * var name = this.props.name; * return
Hello, {name}!
; * } * * @return {ReactComponent} * @nosideeffects * @required */ render: 'DEFINE_ONCE', // ==== Delegate methods ==== /** * Invoked when the component is initially created and about to be mounted. * This may have side effects, but any external subscriptions or data created * by this method must be cleaned up in `componentWillUnmount`. * * @optional */ componentWillMount: 'DEFINE_MANY', /** * Invoked when the component has been mounted and has a DOM representation. * However, there is no guarantee that the DOM node is in the document. * * Use this as an opportunity to operate on the DOM when the component has * been mounted (initialized and rendered) for the first time. * * @param {DOMElement} rootNode DOM element representing the component. * @optional */ componentDidMount: 'DEFINE_MANY', /** * Invoked before the component receives new props. * * Use this as an opportunity to react to a prop transition by updating the * state using `this.setState`. Current props are accessed via `this.props`. * * componentWillReceiveProps: function(nextProps, nextContext) { * this.setState({ * likesIncreasing: nextProps.likeCount > this.props.likeCount * }); * } * * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop * transition may cause a state change, but the opposite is not true. If you * need it, you are probably looking for `componentWillUpdate`. * * @param {object} nextProps * @optional */ componentWillReceiveProps: 'DEFINE_MANY', /** * Invoked while deciding if the component should be updated as a result of * receiving new props, state and/or context. * * Use this as an opportunity to `return false` when you're certain that the * transition to the new props/state/context will not require a component * update. * * shouldComponentUpdate: function(nextProps, nextState, nextContext) { * return !equal(nextProps, this.props) || * !equal(nextState, this.state) || * !equal(nextContext, this.context); * } * * @param {object} nextProps * @param {?object} nextState * @param {?object} nextContext * @return {boolean} True if the component should update. * @optional */ shouldComponentUpdate: 'DEFINE_ONCE', /** * Invoked when the component is about to update due to a transition from * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` * and `nextContext`. * * Use this as an opportunity to perform preparation before an update occurs. * * NOTE: You **cannot** use `this.setState()` in this method. * * @param {object} nextProps * @param {?object} nextState * @param {?object} nextContext * @param {ReactReconcileTransaction} transaction * @optional */ componentWillUpdate: 'DEFINE_MANY', /** * Invoked when the component's DOM representation has been updated. * * Use this as an opportunity to operate on the DOM when the component has * been updated. * * @param {object} prevProps * @param {?object} prevState * @param {?object} prevContext * @param {DOMElement} rootNode DOM element representing the component. * @optional */ componentDidUpdate: 'DEFINE_MANY', /** * Invoked when the component is about to be removed from its parent and have * its DOM representation destroyed. * * Use this as an opportunity to deallocate any external resources. * * NOTE: There is no `componentDidUnmount` since your component will have been * destroyed by that point. * * @optional */ componentWillUnmount: 'DEFINE_MANY', // ==== Advanced methods ==== /** * Updates the component's currently mounted DOM representation. * * By default, this implements React's rendering and reconciliation algorithm. * Sophisticated clients may wish to override this. * * @param {ReactReconcileTransaction} transaction * @internal * @overridable */ updateComponent: 'OVERRIDE_BASE' }; /** * Mapping from class specification keys to special processing functions. * * Although these are declared like instance properties in the specification * when defining classes using `React.createClass`, they are actually static * and are accessible on the constructor instead of the prototype. Despite * being static, they must be defined outside of the "statics" key under * which all other static methods are defined. */ var RESERVED_SPEC_KEYS = { displayName: function (Constructor, displayName) { Constructor.displayName = displayName; }, mixins: function (Constructor, mixins) { if (mixins) { for (var i = 0; i < mixins.length; i++) { mixSpecIntoComponent(Constructor, mixins[i]); } } }, childContextTypes: function (Constructor, childContextTypes) { if (process.env.NODE_ENV !== 'production') { validateTypeDef(Constructor, childContextTypes, 'childContext'); } Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes); }, contextTypes: function (Constructor, contextTypes) { if (process.env.NODE_ENV !== 'production') { validateTypeDef(Constructor, contextTypes, 'context'); } Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); }, /** * Special case getDefaultProps which should move into statics but requires * automatic merging. */ getDefaultProps: function (Constructor, getDefaultProps) { if (Constructor.getDefaultProps) { Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps); } else { Constructor.getDefaultProps = getDefaultProps; } }, propTypes: function (Constructor, propTypes) { if (process.env.NODE_ENV !== 'production') { validateTypeDef(Constructor, propTypes, 'prop'); } Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); }, statics: function (Constructor, statics) { mixStaticSpecIntoComponent(Constructor, statics); }, autobind: function () {} }; function validateTypeDef(Constructor, typeDef, location) { for (var propName in typeDef) { if (typeDef.hasOwnProperty(propName)) { // use a warning instead of an _invariant so components // don't show up in prod but only in __DEV__ process.env.NODE_ENV !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0; } } } function validateMethodOverride(isAlreadyDefined, name) { var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; // Disallow overriding of base class methods unless explicitly allowed. if (ReactClassMixin.hasOwnProperty(name)) { _invariant(specPolicy === 'OVERRIDE_BASE', 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name); } // Disallow defining methods more than once unless explicitly allowed. if (isAlreadyDefined) { _invariant(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name); } } /** * Mixin helper which handles policy validation and reserved * specification keys when building React classes. */ function mixSpecIntoComponent(Constructor, spec) { if (!spec) { if (process.env.NODE_ENV !== 'production') { var typeofSpec = typeof spec; var isMixinValid = typeofSpec === 'object' && spec !== null; process.env.NODE_ENV !== 'production' ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0; } return; } _invariant(typeof spec !== 'function', 'ReactClass: You\'re attempting to ' + 'use a component class or function as a mixin. Instead, just use a ' + 'regular object.'); _invariant(!isValidElement(spec), 'ReactClass: You\'re attempting to ' + 'use a component as a mixin. Instead, just use a regular object.'); var proto = Constructor.prototype; var autoBindPairs = proto.__reactAutoBindPairs; // By handling mixins before any other properties, we ensure the same // chaining order is applied to methods with DEFINE_MANY policy, whether // mixins are listed before or after these methods in the spec. if (spec.hasOwnProperty(MIXINS_KEY)) { RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); } for (var name in spec) { if (!spec.hasOwnProperty(name)) { continue; } if (name === MIXINS_KEY) { // We have already handled mixins in a special case above. continue; } var property = spec[name]; var isAlreadyDefined = proto.hasOwnProperty(name); validateMethodOverride(isAlreadyDefined, name); if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { RESERVED_SPEC_KEYS[name](Constructor, property); } else { // Setup methods on prototype: // The following member methods should not be automatically bound: // 1. Expected ReactClass methods (in the "interface"). // 2. Overridden methods (that were mixed in). var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); var isFunction = typeof property === 'function'; var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; if (shouldAutoBind) { autoBindPairs.push(name, property); proto[name] = property; } else { if (isAlreadyDefined) { var specPolicy = ReactClassInterface[name]; // These cases should already be caught by validateMethodOverride. _invariant(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name); // For methods which are defined more than once, call the existing // methods before calling the new property, merging if appropriate. if (specPolicy === 'DEFINE_MANY_MERGED') { proto[name] = createMergedResultFunction(proto[name], property); } else if (specPolicy === 'DEFINE_MANY') { proto[name] = createChainedFunction(proto[name], property); } } else { proto[name] = property; if (process.env.NODE_ENV !== 'production') { // Add verbose displayName to the function, which helps when looking // at profiling tools. if (typeof property === 'function' && spec.displayName) { proto[name].displayName = spec.displayName + '_' + name; } } } } } } } function mixStaticSpecIntoComponent(Constructor, statics) { if (!statics) { return; } for (var name in statics) { var property = statics[name]; if (!statics.hasOwnProperty(name)) { continue; } var isReserved = name in RESERVED_SPEC_KEYS; _invariant(!isReserved, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name); var isInherited = name in Constructor; _invariant(!isInherited, 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name); Constructor[name] = property; } } /** * Merge two objects, but throw if both contain the same key. * * @param {object} one The first object, which is mutated. * @param {object} two The second object * @return {object} one after it has been mutated to contain everything in two. */ function mergeIntoWithNoDuplicateKeys(one, two) { _invariant(one && two && typeof one === 'object' && typeof two === 'object', 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'); for (var key in two) { if (two.hasOwnProperty(key)) { _invariant(one[key] === undefined, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key); one[key] = two[key]; } } return one; } /** * Creates a function that invokes two functions and merges their return values. * * @param {function} one Function to invoke first. * @param {function} two Function to invoke second. * @return {function} Function that invokes the two argument functions. * @private */ function createMergedResultFunction(one, two) { return function mergedResult() { var a = one.apply(this, arguments); var b = two.apply(this, arguments); if (a == null) { return b; } else if (b == null) { return a; } var c = {}; mergeIntoWithNoDuplicateKeys(c, a); mergeIntoWithNoDuplicateKeys(c, b); return c; }; } /** * Creates a function that invokes two functions and ignores their return vales. * * @param {function} one Function to invoke first. * @param {function} two Function to invoke second. * @return {function} Function that invokes the two argument functions. * @private */ function createChainedFunction(one, two) { return function chainedFunction() { one.apply(this, arguments); two.apply(this, arguments); }; } /** * Binds a method to the component. * * @param {object} component Component whose method is going to be bound. * @param {function} method Method to be bound. * @return {function} The bound method. */ function bindAutoBindMethod(component, method) { var boundMethod = method.bind(component); if (process.env.NODE_ENV !== 'production') { boundMethod.__reactBoundContext = component; boundMethod.__reactBoundMethod = method; boundMethod.__reactBoundArguments = null; var componentName = component.constructor.displayName; var _bind = boundMethod.bind; boundMethod.bind = function (newThis) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } // User is trying to bind() an autobound method; we effectively will // ignore the value of "this" that the user is trying to use, so // let's warn. if (newThis !== component && newThis !== null) { process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0; } else if (!args.length) { process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0; return boundMethod; } var reboundMethod = _bind.apply(boundMethod, arguments); reboundMethod.__reactBoundContext = component; reboundMethod.__reactBoundMethod = method; reboundMethod.__reactBoundArguments = args; return reboundMethod; }; } return boundMethod; } /** * Binds all auto-bound methods in a component. * * @param {object} component Component whose method is going to be bound. */ function bindAutoBindMethods(component) { var pairs = component.__reactAutoBindPairs; for (var i = 0; i < pairs.length; i += 2) { var autoBindKey = pairs[i]; var method = pairs[i + 1]; component[autoBindKey] = bindAutoBindMethod(component, method); } } var IsMountedMixin = { componentDidMount: function () { this.__isMounted = true; }, componentWillUnmount: function () { this.__isMounted = false; } }; /** * Add more to the ReactClass base class. These are all legacy features and * therefore not already part of the modern ReactComponent. */ var ReactClassMixin = { /** * TODO: This will be deprecated because state should always keep a consistent * type signature and the only use case for this, is to avoid that. */ replaceState: function (newState, callback) { this.updater.enqueueReplaceState(this, newState, callback); }, /** * Checks whether or not this composite component is mounted. * @return {boolean} True if mounted, false otherwise. * @protected * @final */ isMounted: function () { if (process.env.NODE_ENV !== 'production') { process.env.NODE_ENV !== 'production' ? warning(this.__didWarnIsMounted, '%s: isMounted is deprecated. Instead, make sure to clean up ' + 'subscriptions and pending requests in componentWillUnmount to ' + 'prevent memory leaks.', this.constructor && this.constructor.displayName || this.name || 'Component') : void 0; this.__didWarnIsMounted = true; } return !!this.__isMounted; } }; var ReactClassComponent = function () {}; _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); /** * Creates a composite component class given a class specification. * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass * * @param {object} spec Class specification (which must define `render`). * @return {function} Component constructor function. * @public */ function createClass(spec) { // To keep our warnings more understandable, we'll use a little hack here to // ensure that Constructor.name !== 'Constructor'. This makes sure we don't // unnecessarily identify a class without displayName as 'Constructor'. var Constructor = identity(function (props, context, updater) { // This constructor gets overridden by mocks. The argument is used // by mocks to assert on what gets mounted. if (process.env.NODE_ENV !== 'production') { process.env.NODE_ENV !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0; } // Wire up auto-binding if (this.__reactAutoBindPairs.length) { bindAutoBindMethods(this); } this.props = props; this.context = context; this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; this.state = null; // ReactClasses doesn't have constructors. Instead, they use the // getInitialState and componentWillMount methods for initialization. var initialState = this.getInitialState ? this.getInitialState() : null; if (process.env.NODE_ENV !== 'production') { // We allow auto-mocks to proceed as if they're returning null. if (initialState === undefined && this.getInitialState._isMockFunction) { // This is probably bad practice. Consider warning here and // deprecating this convenience. initialState = null; } } _invariant(typeof initialState === 'object' && !Array.isArray(initialState), '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent'); this.state = initialState; }); Constructor.prototype = new ReactClassComponent(); Constructor.prototype.constructor = Constructor; Constructor.prototype.__reactAutoBindPairs = []; injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); mixSpecIntoComponent(Constructor, IsMountedMixin); mixSpecIntoComponent(Constructor, spec); // Initialize the defaultProps property after all mixins have been merged. if (Constructor.getDefaultProps) { Constructor.defaultProps = Constructor.getDefaultProps(); } if (process.env.NODE_ENV !== 'production') { // This is a tag to indicate that the use of these method names is ok, // since it's used with createClass. If it's not, then it's likely a // mistake so we'll warn you to use the static property, property // initializer or constructor respectively. if (Constructor.getDefaultProps) { Constructor.getDefaultProps.isReactClassApproved = {}; } if (Constructor.prototype.getInitialState) { Constructor.prototype.getInitialState.isReactClassApproved = {}; } } _invariant(Constructor.prototype.render, 'createClass(...): Class specification must implement a `render` method.'); if (process.env.NODE_ENV !== 'production') { process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0; process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0; } // Reduce time spent doing lookups by setting these on the prototype. for (var methodName in ReactClassInterface) { if (!Constructor.prototype[methodName]) { Constructor.prototype[methodName] = null; } } return Constructor; } return createClass; } module.exports = factory; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(89))) /***/ }), /* 134 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ 'use strict'; var emptyObject = {}; if (process.env.NODE_ENV !== 'production') { Object.freeze(emptyObject); } module.exports = emptyObject; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(89))) /***/ }), /* 135 */ /***/ (function(module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = contains; function contains(root, n) { var node = n; while (node) { if (node === root) { return true; } node = node.parentNode; } return false; } module.exports = exports['default']; /***/ }), /* 136 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(4); var _extends3 = _interopRequireDefault(_extends2); var _classCallCheck2 = __webpack_require__(42); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(43); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(79); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(88); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactDom = __webpack_require__(109); var _reactDom2 = _interopRequireDefault(_reactDom); var _rcAlign = __webpack_require__(137); var _rcAlign2 = _interopRequireDefault(_rcAlign); var _rcAnimate = __webpack_require__(149); var _rcAnimate2 = _interopRequireDefault(_rcAnimate); var _PopupInner = __webpack_require__(158); var _PopupInner2 = _interopRequireDefault(_PopupInner); var _LazyRenderBox = __webpack_require__(159); var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var Popup = function (_Component) { (0, _inherits3["default"])(Popup, _Component); function Popup() { var _temp, _this, _ret; (0, _classCallCheck3["default"])(this, Popup); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = (0, _possibleConstructorReturn3["default"])(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.onAlign = function (popupDomNode, align) { var props = _this.props; var alignClassName = props.getClassNameFromAlign(props.align); var currentAlignClassName = props.getClassNameFromAlign(align); if (alignClassName !== currentAlignClassName) { _this.currentAlignClassName = currentAlignClassName; popupDomNode.className = _this.getClassName(currentAlignClassName); } props.onAlign(popupDomNode, align); }, _this.getTarget = function () { return _this.props.getRootDomNode(); }, _this.saveAlign = function (align) { _this.alignInstance = align; }, _temp), (0, _possibleConstructorReturn3["default"])(_this, _ret); } Popup.prototype.componentDidMount = function componentDidMount() { this.rootNode = this.getPopupDomNode(); }; Popup.prototype.getPopupDomNode = function getPopupDomNode() { return _reactDom2["default"].findDOMNode(this.refs.popup); }; Popup.prototype.getMaskTransitionName = function getMaskTransitionName() { var props = this.props; var transitionName = props.maskTransitionName; var animation = props.maskAnimation; if (!transitionName && animation) { transitionName = props.prefixCls + '-' + animation; } return transitionName; }; Popup.prototype.getTransitionName = function getTransitionName() { var props = this.props; var transitionName = props.transitionName; if (!transitionName && props.animation) { transitionName = props.prefixCls + '-' + props.animation; } return transitionName; }; Popup.prototype.getClassName = function getClassName(currentAlignClassName) { return this.props.prefixCls + ' ' + this.props.className + ' ' + currentAlignClassName; }; Popup.prototype.getPopupElement = function getPopupElement() { var props = this.props; var align = props.align, style = props.style, visible = props.visible, prefixCls = props.prefixCls, destroyPopupOnHide = props.destroyPopupOnHide; var className = this.getClassName(this.currentAlignClassName || props.getClassNameFromAlign(align)); var hiddenClassName = prefixCls + '-hidden'; if (!visible) { this.currentAlignClassName = null; } var newStyle = (0, _extends3["default"])({}, style, this.getZIndexStyle()); var popupInnerProps = { className: className, prefixCls: prefixCls, ref: 'popup', onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave, style: newStyle }; if (destroyPopupOnHide) { return _react2["default"].createElement( _rcAnimate2["default"], { component: '', exclusive: true, transitionAppear: true, transitionName: this.getTransitionName() }, visible ? _react2["default"].createElement( _rcAlign2["default"], { target: this.getTarget, key: 'popup', ref: this.saveAlign, monitorWindowResize: true, align: align, onAlign: this.onAlign }, _react2["default"].createElement( _PopupInner2["default"], (0, _extends3["default"])({ visible: true }, popupInnerProps), props.children ) ) : null ); } return _react2["default"].createElement( _rcAnimate2["default"], { component: '', exclusive: true, transitionAppear: true, transitionName: this.getTransitionName(), showProp: 'xVisible' }, _react2["default"].createElement( _rcAlign2["default"], { target: this.getTarget, key: 'popup', ref: this.saveAlign, monitorWindowResize: true, xVisible: visible, childrenProps: { visible: 'xVisible' }, disabled: !visible, align: align, onAlign: this.onAlign }, _react2["default"].createElement( _PopupInner2["default"], (0, _extends3["default"])({ hiddenClassName: hiddenClassName }, popupInnerProps), props.children ) ) ); }; Popup.prototype.getZIndexStyle = function getZIndexStyle() { var style = {}; var props = this.props; if (props.zIndex !== undefined) { style.zIndex = props.zIndex; } return style; }; Popup.prototype.getMaskElement = function getMaskElement() { var props = this.props; var maskElement = void 0; if (props.mask) { var maskTransition = this.getMaskTransitionName(); maskElement = _react2["default"].createElement(_LazyRenderBox2["default"], { style: this.getZIndexStyle(), key: 'mask', className: props.prefixCls + '-mask', hiddenClassName: props.prefixCls + '-mask-hidden', visible: props.visible }); if (maskTransition) { maskElement = _react2["default"].createElement( _rcAnimate2["default"], { key: 'mask', showProp: 'visible', transitionAppear: true, component: '', transitionName: maskTransition }, maskElement ); } } return maskElement; }; Popup.prototype.render = function render() { return _react2["default"].createElement( 'div', null, this.getMaskElement(), this.getPopupElement() ); }; return Popup; }(_react.Component); Popup.propTypes = { visible: _propTypes2["default"].bool, style: _propTypes2["default"].object, getClassNameFromAlign: _propTypes2["default"].func, onAlign: _propTypes2["default"].func, getRootDomNode: _propTypes2["default"].func, onMouseEnter: _propTypes2["default"].func, align: _propTypes2["default"].any, destroyPopupOnHide: _propTypes2["default"].bool, className: _propTypes2["default"].string, prefixCls: _propTypes2["default"].string, onMouseLeave: _propTypes2["default"].func }; exports["default"] = Popup; module.exports = exports['default']; /***/ }), /* 137 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Align = __webpack_require__(138); var _Align2 = _interopRequireDefault(_Align); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _Align2["default"]; // export this package's api module.exports = exports['default']; /***/ }), /* 138 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(88); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactDom = __webpack_require__(109); var _reactDom2 = _interopRequireDefault(_reactDom); var _domAlign = __webpack_require__(139); var _domAlign2 = _interopRequireDefault(_domAlign); var _addEventListener = __webpack_require__(104); var _addEventListener2 = _interopRequireDefault(_addEventListener); var _isWindow = __webpack_require__(148); var _isWindow2 = _interopRequireDefault(_isWindow); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } function buffer(fn, ms) { var timer = void 0; function clear() { if (timer) { clearTimeout(timer); timer = null; } } function bufferFn() { clear(); timer = setTimeout(fn, ms); } bufferFn.clear = clear; return bufferFn; } var Align = function (_Component) { _inherits(Align, _Component); function Align() { var _temp, _this, _ret; _classCallCheck(this, Align); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.forceAlign = function () { var props = _this.props; if (!props.disabled) { var source = _reactDom2["default"].findDOMNode(_this); props.onAlign(source, (0, _domAlign2["default"])(source, props.target(), props.align)); } }, _temp), _possibleConstructorReturn(_this, _ret); } Align.prototype.componentDidMount = function componentDidMount() { var props = this.props; // if parent ref not attached .... use document.getElementById this.forceAlign(); if (!props.disabled && props.monitorWindowResize) { this.startMonitorWindowResize(); } }; Align.prototype.componentDidUpdate = function componentDidUpdate(prevProps) { var reAlign = false; var props = this.props; if (!props.disabled) { if (prevProps.disabled || prevProps.align !== props.align) { reAlign = true; } else { var lastTarget = prevProps.target(); var currentTarget = props.target(); if ((0, _isWindow2["default"])(lastTarget) && (0, _isWindow2["default"])(currentTarget)) { reAlign = false; } else if (lastTarget !== currentTarget) { reAlign = true; } } } if (reAlign) { this.forceAlign(); } if (props.monitorWindowResize && !props.disabled) { this.startMonitorWindowResize(); } else { this.stopMonitorWindowResize(); } }; Align.prototype.componentWillUnmount = function componentWillUnmount() { this.stopMonitorWindowResize(); }; Align.prototype.startMonitorWindowResize = function startMonitorWindowResize() { if (!this.resizeHandler) { this.bufferMonitor = buffer(this.forceAlign, this.props.monitorBufferTime); this.resizeHandler = (0, _addEventListener2["default"])(window, 'resize', this.bufferMonitor); } }; Align.prototype.stopMonitorWindowResize = function stopMonitorWindowResize() { if (this.resizeHandler) { this.bufferMonitor.clear(); this.resizeHandler.remove(); this.resizeHandler = null; } }; Align.prototype.render = function render() { var _props = this.props, childrenProps = _props.childrenProps, children = _props.children; var child = _react2["default"].Children.only(children); if (childrenProps) { var newProps = {}; for (var prop in childrenProps) { if (childrenProps.hasOwnProperty(prop)) { newProps[prop] = this.props[childrenProps[prop]]; } } return _react2["default"].cloneElement(child, newProps); } return child; }; return Align; }(_react.Component); Align.propTypes = { childrenProps: _propTypes2["default"].object, align: _propTypes2["default"].object.isRequired, target: _propTypes2["default"].func, onAlign: _propTypes2["default"].func, monitorBufferTime: _propTypes2["default"].number, monitorWindowResize: _propTypes2["default"].bool, disabled: _propTypes2["default"].bool, children: _propTypes2["default"].any }; Align.defaultProps = { target: function target() { return window; }, onAlign: function onAlign() {}, monitorBufferTime: 50, monitorWindowResize: false, disabled: false }; exports["default"] = Align; module.exports = exports['default']; /***/ }), /* 139 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(140); var _utils2 = _interopRequireDefault(_utils); var _getOffsetParent = __webpack_require__(142); var _getOffsetParent2 = _interopRequireDefault(_getOffsetParent); var _getVisibleRectForElement = __webpack_require__(143); var _getVisibleRectForElement2 = _interopRequireDefault(_getVisibleRectForElement); var _adjustForViewport = __webpack_require__(144); var _adjustForViewport2 = _interopRequireDefault(_adjustForViewport); var _getRegion = __webpack_require__(145); var _getRegion2 = _interopRequireDefault(_getRegion); var _getElFuturePos = __webpack_require__(146); var _getElFuturePos2 = _interopRequireDefault(_getElFuturePos); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } // http://yiminghe.iteye.com/blog/1124720 /** * align dom node flexibly * @author yiminghe@gmail.com */ function isFailX(elFuturePos, elRegion, visibleRect) { return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right; } function isFailY(elFuturePos, elRegion, visibleRect) { return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom; } function isCompleteFailX(elFuturePos, elRegion, visibleRect) { return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left; } function isCompleteFailY(elFuturePos, elRegion, visibleRect) { return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top; } function flip(points, reg, map) { var ret = []; _utils2["default"].each(points, function (p) { ret.push(p.replace(reg, function (m) { return map[m]; })); }); return ret; } function flipOffset(offset, index) { offset[index] = -offset[index]; return offset; } function convertOffset(str, offsetLen) { var n = void 0; if (/%$/.test(str)) { n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen; } else { n = parseInt(str, 10); } return n || 0; } function normalizeOffset(offset, el) { offset[0] = convertOffset(offset[0], el.width); offset[1] = convertOffset(offset[1], el.height); } function domAlign(el, refNode, align) { var points = align.points; var offset = align.offset || [0, 0]; var targetOffset = align.targetOffset || [0, 0]; var overflow = align.overflow; var target = align.target || refNode; var source = align.source || el; offset = [].concat(offset); targetOffset = [].concat(targetOffset); overflow = overflow || {}; var newOverflowCfg = {}; var fail = 0; // 当前节点可以被放置的显示区域 var visibleRect = (0, _getVisibleRectForElement2["default"])(source); // 当前节点所占的区域, left/top/width/height var elRegion = (0, _getRegion2["default"])(source); // 参照节点所占的区域, left/top/width/height var refNodeRegion = (0, _getRegion2["default"])(target); // 将 offset 转换成数值,支持百分比 normalizeOffset(offset, elRegion); normalizeOffset(targetOffset, refNodeRegion); // 当前节点将要被放置的位置 var elFuturePos = (0, _getElFuturePos2["default"])(elRegion, refNodeRegion, points, offset, targetOffset); // 当前节点将要所处的区域 var newElRegion = _utils2["default"].merge(elRegion, elFuturePos); // 如果可视区域不能完全放置当前节点时允许调整 if (visibleRect && (overflow.adjustX || overflow.adjustY)) { if (overflow.adjustX) { // 如果横向不能放下 if (isFailX(elFuturePos, elRegion, visibleRect)) { // 对齐位置反下 var newPoints = flip(points, /[lr]/ig, { l: 'r', r: 'l' }); // 偏移量也反下 var newOffset = flipOffset(offset, 0); var newTargetOffset = flipOffset(targetOffset, 0); var newElFuturePos = (0, _getElFuturePos2["default"])(elRegion, refNodeRegion, newPoints, newOffset, newTargetOffset); if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) { fail = 1; points = newPoints; offset = newOffset; targetOffset = newTargetOffset; } } } if (overflow.adjustY) { // 如果纵向不能放下 if (isFailY(elFuturePos, elRegion, visibleRect)) { // 对齐位置反下 var _newPoints = flip(points, /[tb]/ig, { t: 'b', b: 't' }); // 偏移量也反下 var _newOffset = flipOffset(offset, 1); var _newTargetOffset = flipOffset(targetOffset, 1); var _newElFuturePos = (0, _getElFuturePos2["default"])(elRegion, refNodeRegion, _newPoints, _newOffset, _newTargetOffset); if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) { fail = 1; points = _newPoints; offset = _newOffset; targetOffset = _newTargetOffset; } } } // 如果失败,重新计算当前节点将要被放置的位置 if (fail) { elFuturePos = (0, _getElFuturePos2["default"])(elRegion, refNodeRegion, points, offset, targetOffset); _utils2["default"].mix(newElRegion, elFuturePos); } // 检查反下后的位置是否可以放下了 // 如果仍然放不下只有指定了可以调整当前方向才调整 newOverflowCfg.adjustX = overflow.adjustX && isFailX(elFuturePos, elRegion, visibleRect); newOverflowCfg.adjustY = overflow.adjustY && isFailY(elFuturePos, elRegion, visibleRect); // 确实要调整,甚至可能会调整高度宽度 if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) { newElRegion = (0, _adjustForViewport2["default"])(elFuturePos, elRegion, visibleRect, newOverflowCfg); } } // need judge to in case set fixed with in css on height auto element if (newElRegion.width !== elRegion.width) { _utils2["default"].css(source, 'width', _utils2["default"].width(source) + newElRegion.width - elRegion.width); } if (newElRegion.height !== elRegion.height) { _utils2["default"].css(source, 'height', _utils2["default"].height(source) + newElRegion.height - elRegion.height); } // https://github.com/kissyteam/kissy/issues/190 // 相对于屏幕位置没变,而 left/top 变了 // 例如
_utils2["default"].offset(source, { left: newElRegion.left, top: newElRegion.top }, { useCssRight: align.useCssRight, useCssBottom: align.useCssBottom, useCssTransform: align.useCssTransform }); return { points: points, offset: offset, targetOffset: targetOffset, overflow: newOverflowCfg }; } domAlign.__getOffsetParent = _getOffsetParent2["default"]; domAlign.__getVisibleRectForElement = _getVisibleRectForElement2["default"]; exports["default"] = domAlign; /** * 2012-04-26 yiminghe@gmail.com * - 优化智能对齐算法 * - 慎用 resizeXX * * 2011-07-13 yiminghe@gmail.com note: * - 增加智能对齐,以及大小调整选项 **/ module.exports = exports['default']; /***/ }), /* 140 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _propertyUtils = __webpack_require__(141); var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; var getComputedStyleX = void 0; function force(x, y) { return x + y; } function css(el, name, v) { var value = v; if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') { for (var i in name) { if (name.hasOwnProperty(i)) { css(el, i, name[i]); } } return undefined; } if (typeof value !== 'undefined') { if (typeof value === 'number') { value = value + 'px'; } el.style[name] = value; return undefined; } return getComputedStyleX(el, name); } function getClientPosition(elem) { var box = void 0; var x = void 0; var y = void 0; var doc = elem.ownerDocument; var body = doc.body; var docElem = doc && doc.documentElement; // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 box = elem.getBoundingClientRect(); // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin x = box.left; y = box.top; // In IE, most of the time, 2 extra pixels are added to the top and left // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and // IE6 standards mode, this border can be overridden by setting the // document element's border to zero -- thus, we cannot rely on the // offset always being 2 pixels. // In quirks mode, the offset can be determined by querying the body's // clientLeft/clientTop, but in standards mode, it is found by querying // the document element's clientLeft/clientTop. Since we already called // getClientBoundingRect we have already forced a reflow, so it is not // too expensive just to query them all. // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 // 窗口边框标准是设 documentElement ,quirks 时设置 body // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 // 标准 ie 下 docElem.clientTop 就是 border-top // ie7 html 即窗口边框改变不了。永远为 2 // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 x -= docElem.clientLeft || body.clientLeft || 0; y -= docElem.clientTop || body.clientTop || 0; return { left: x, top: y }; } function getScroll(w, top) { var ret = w['page' + (top ? 'Y' : 'X') + 'Offset']; var method = 'scroll' + (top ? 'Top' : 'Left'); if (typeof ret !== 'number') { var d = w.document; // ie6,7,8 standard mode ret = d.documentElement[method]; if (typeof ret !== 'number') { // quirks mode ret = d.body[method]; } } return ret; } function getScrollLeft(w) { return getScroll(w); } function getScrollTop(w) { return getScroll(w, true); } function getOffset(el) { var pos = getClientPosition(el); var doc = el.ownerDocument; var w = doc.defaultView || doc.parentWindow; pos.left += getScrollLeft(w); pos.top += getScrollTop(w); return pos; } function _getComputedStyle(elem, name, cs) { var computedStyle = cs; var val = ''; var d = elem.ownerDocument; computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null); // https://github.com/kissyteam/kissy/issues/61 if (computedStyle) { val = computedStyle.getPropertyValue(name) || computedStyle[name]; } return val; } var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i'); var RE_POS = /^(top|right|bottom|left)$/; var CURRENT_STYLE = 'currentStyle'; var RUNTIME_STYLE = 'runtimeStyle'; var LEFT = 'left'; var PX = 'px'; function _getComputedStyleIE(elem, name) { // currentStyle maybe null // http://msdn.microsoft.com/en-us/library/ms535231.aspx var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 // 在 ie 下不对,需要直接用 offset 方式 // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // exclude left right for relativity if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { // Remember the original values var style = elem.style; var left = style[LEFT]; var rsLeft = elem[RUNTIME_STYLE][LEFT]; // prevent flashing of content elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; // Put in the new values to get a computed value out style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; ret = style.pixelLeft + PX; // Revert the changed values style[LEFT] = left; elem[RUNTIME_STYLE][LEFT] = rsLeft; } return ret === '' ? 'auto' : ret; } if (typeof window !== 'undefined') { getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; } function getOffsetDirection(dir, option) { if (dir === 'left') { return option.useCssRight ? 'right' : dir; } return option.useCssBottom ? 'bottom' : dir; } function oppositeOffsetDirection(dir) { if (dir === 'left') { return 'right'; } else if (dir === 'right') { return 'left'; } else if (dir === 'top') { return 'bottom'; } else if (dir === 'bottom') { return 'top'; } } // 设置 elem 相对 elem.ownerDocument 的坐标 function setLeftTop(elem, offset, option) { // set position first, in-case top/left are set even on static elem if (css(elem, 'position') === 'static') { elem.style.position = 'relative'; } var presetH = -999; var presetV = -999; var horizontalProperty = getOffsetDirection('left', option); var verticalProperty = getOffsetDirection('top', option); var oppositeHorizontalProperty = oppositeOffsetDirection(horizontalProperty); var oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty); if (horizontalProperty !== 'left') { presetH = 999; } if (verticalProperty !== 'top') { presetV = 999; } var originalTransition = ''; var originalOffset = getOffset(elem); if ('left' in offset || 'top' in offset) { originalTransition = (0, _propertyUtils.getTransitionProperty)(elem) || ''; (0, _propertyUtils.setTransitionProperty)(elem, 'none'); } if ('left' in offset) { elem.style[oppositeHorizontalProperty] = ''; elem.style[horizontalProperty] = presetH + 'px'; } if ('top' in offset) { elem.style[oppositeVerticalProperty] = ''; elem.style[verticalProperty] = presetV + 'px'; } var old = getOffset(elem); var originalStyle = {}; for (var key in offset) { if (offset.hasOwnProperty(key)) { var dir = getOffsetDirection(key, option); var preset = key === 'left' ? presetH : presetV; var off = originalOffset[key] - old[key]; if (dir === key) { originalStyle[dir] = preset + off; } else { originalStyle[dir] = preset - off; } } } css(elem, originalStyle); // force relayout force(elem.offsetTop, elem.offsetLeft); if ('left' in offset || 'top' in offset) { (0, _propertyUtils.setTransitionProperty)(elem, originalTransition); } var ret = {}; for (var _key in offset) { if (offset.hasOwnProperty(_key)) { var _dir = getOffsetDirection(_key, option); var _off = offset[_key] - originalOffset[_key]; if (_key === _dir) { ret[_dir] = originalStyle[_dir] + _off; } else { ret[_dir] = originalStyle[_dir] - _off; } } } css(elem, ret); } function setTransform(elem, offset) { var originalOffset = getOffset(elem); var originalXY = (0, _propertyUtils.getTransformXY)(elem); var resultXY = { x: originalXY.x, y: originalXY.y }; if ('left' in offset) { resultXY.x = originalXY.x + offset.left - originalOffset.left; } if ('top' in offset) { resultXY.y = originalXY.y + offset.top - originalOffset.top; } (0, _propertyUtils.setTransformXY)(elem, resultXY); } function setOffset(elem, offset, option) { if (option.useCssRight || option.useCssBottom) { setLeftTop(elem, offset, option); } else if (option.useCssTransform && (0, _propertyUtils.getTransformName)() in document.body.style) { setTransform(elem, offset, option); } else { setLeftTop(elem, offset, option); } } function each(arr, fn) { for (var i = 0; i < arr.length; i++) { fn(arr[i]); } } function isBorderBoxFn(elem) { return getComputedStyleX(elem, 'boxSizing') === 'border-box'; } var BOX_MODELS = ['margin', 'border', 'padding']; var CONTENT_INDEX = -1; var PADDING_INDEX = 2; var BORDER_INDEX = 1; var MARGIN_INDEX = 0; function swap(elem, options, callback) { var old = {}; var style = elem.style; var name = void 0; // Remember the old values, and insert the new ones for (name in options) { if (options.hasOwnProperty(name)) { old[name] = style[name]; style[name] = options[name]; } } callback.call(elem); // Revert the old values for (name in options) { if (options.hasOwnProperty(name)) { style[name] = old[name]; } } } function getPBMWidth(elem, props, which) { var value = 0; var prop = void 0; var j = void 0; var i = void 0; for (j = 0; j < props.length; j++) { prop = props[j]; if (prop) { for (i = 0; i < which.length; i++) { var cssProp = void 0; if (prop === 'border') { cssProp = '' + prop + which[i] + 'Width'; } else { cssProp = prop + which[i]; } value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; } } } return value; } /** * A crude way of determining if an object is a window * @member util */ function isWindow(obj) { // must use == for ie8 /* eslint eqeqeq:0 */ return obj !== null && obj !== undefined && obj == obj.window; } var domUtils = {}; each(['Width', 'Height'], function (name) { domUtils['doc' + name] = function (refWin) { var d = refWin.document; return Math.max( // firefox chrome documentElement.scrollHeight< body.scrollHeight // ie standard mode : documentElement.scrollHeight> body.scrollHeight d.documentElement['scroll' + name], // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? d.body['scroll' + name], domUtils['viewport' + name](d)); }; domUtils['viewport' + name] = function (win) { // pc browser includes scrollbar in window.innerWidth var prop = 'client' + name; var doc = win.document; var body = doc.body; var documentElement = doc.documentElement; var documentElementProp = documentElement[prop]; // 标准模式取 documentElement // backcompat 取 body return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; }; }); /* 得到元素的大小信息 @param elem @param name @param {String} [extra] 'padding' : (css width) + padding 'border' : (css width) + padding + border 'margin' : (css width) + padding + border + margin */ function getWH(elem, name, ex) { var extra = ex; if (isWindow(elem)) { return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); } else if (elem.nodeType === 9) { return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); } var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight; var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem, computedStyle); var cssBoxValue = 0; if (borderBoxValue === null || borderBoxValue === undefined || borderBoxValue <= 0) { borderBoxValue = undefined; // Fall back to computed then un computed css if necessary cssBoxValue = getComputedStyleX(elem, name); if (cssBoxValue === null || cssBoxValue === undefined || Number(cssBoxValue) < 0) { cssBoxValue = elem.style[name] || 0; } // Normalize '', auto, and prepare for extra cssBoxValue = parseFloat(cssBoxValue) || 0; } if (extra === undefined) { extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; } var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; var val = borderBoxValue || cssBoxValue; if (extra === CONTENT_INDEX) { if (borderBoxValueOrIsBorderBox) { return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle); } return cssBoxValue; } else if (borderBoxValueOrIsBorderBox) { if (extra === BORDER_INDEX) { return val; } return val + (extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle)); } return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle); } var cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' }; // fix #119 : https://github.com/kissyteam/kissy/issues/119 function getWHIgnoreDisplay() { for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) { args[_key2] = arguments[_key2]; } var val = void 0; var elem = args[0]; // in case elem is window // elem.offsetWidth === undefined if (elem.offsetWidth !== 0) { val = getWH.apply(undefined, args); } else { swap(elem, cssShow, function () { val = getWH.apply(undefined, args); }); } return val; } each(['width', 'height'], function (name) { var first = name.charAt(0).toUpperCase() + name.slice(1); domUtils['outer' + first] = function (el, includeMargin) { return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); }; var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; domUtils[name] = function (elem, v) { var val = v; if (val !== undefined) { if (elem) { var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem); if (isBorderBox) { val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle); } return css(elem, name, val); } return undefined; } return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); }; }); function mix(to, from) { for (var i in from) { if (from.hasOwnProperty(i)) { to[i] = from[i]; } } return to; } var utils = { getWindow: function getWindow(node) { if (node && node.document && node.setTimeout) { return node; } var doc = node.ownerDocument || node; return doc.defaultView || doc.parentWindow; }, offset: function offset(el, value, option) { if (typeof value !== 'undefined') { setOffset(el, value, option || {}); } else { return getOffset(el); } }, isWindow: isWindow, each: each, css: css, clone: function clone(obj) { var i = void 0; var ret = {}; for (i in obj) { if (obj.hasOwnProperty(i)) { ret[i] = obj[i]; } } var overflow = obj.overflow; if (overflow) { for (i in obj) { if (obj.hasOwnProperty(i)) { ret.overflow[i] = obj.overflow[i]; } } } return ret; }, mix: mix, getWindowScrollLeft: function getWindowScrollLeft(w) { return getScrollLeft(w); }, getWindowScrollTop: function getWindowScrollTop(w) { return getScrollTop(w); }, merge: function merge() { var ret = {}; for (var _len2 = arguments.length, args = Array(_len2), _key3 = 0; _key3 < _len2; _key3++) { args[_key3] = arguments[_key3]; } for (var i = 0; i < args.length; i++) { utils.mix(ret, args[i]); } return ret; }, viewportWidth: 0, viewportHeight: 0 }; mix(utils, domUtils); exports["default"] = utils; module.exports = exports['default']; /***/ }), /* 141 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.getTransformName = getTransformName; exports.setTransitionProperty = setTransitionProperty; exports.getTransitionProperty = getTransitionProperty; exports.getTransformXY = getTransformXY; exports.setTransformXY = setTransformXY; var vendorPrefix = void 0; var jsCssMap = { Webkit: '-webkit-', Moz: '-moz-', // IE did it wrong again ... ms: '-ms-', O: '-o-' }; function getVendorPrefix() { if (vendorPrefix !== undefined) { return vendorPrefix; } vendorPrefix = ''; var style = document.createElement('p').style; var testProp = 'Transform'; for (var key in jsCssMap) { if (key + testProp in style) { vendorPrefix = key; } } return vendorPrefix; } function getTransitionName() { return getVendorPrefix() ? getVendorPrefix() + 'TransitionProperty' : 'transitionProperty'; } function getTransformName() { return getVendorPrefix() ? getVendorPrefix() + 'Transform' : 'transform'; } function setTransitionProperty(node, value) { var name = getTransitionName(); if (name) { node.style[name] = value; if (name !== 'transitionProperty') { node.style.transitionProperty = value; } } } function setTransform(node, value) { var name = getTransformName(); if (name) { node.style[name] = value; if (name !== 'transform') { node.style.transform = value; } } } function getTransitionProperty(node) { return node.style.transitionProperty || node.style[getTransitionName()]; } function getTransformXY(node) { var style = window.getComputedStyle(node, null); var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); if (transform && transform !== 'none') { var matrix = transform.replace(/[^0-9\-.,]/g, '').split(','); return { x: parseFloat(matrix[12] || matrix[4], 0), y: parseFloat(matrix[13] || matrix[5], 0) }; } return { x: 0, y: 0 }; } var matrix2d = /matrix\((.*)\)/; var matrix3d = /matrix3d\((.*)\)/; function setTransformXY(node, xy) { var style = window.getComputedStyle(node, null); var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); if (transform && transform !== 'none') { var arr = void 0; var match2d = transform.match(matrix2d); if (match2d) { match2d = match2d[1]; arr = match2d.split(',').map(function (item) { return parseFloat(item, 10); }); arr[4] = xy.x; arr[5] = xy.y; setTransform(node, 'matrix(' + arr.join(',') + ')'); } else { var match3d = transform.match(matrix3d)[1]; arr = match3d.split(',').map(function (item) { return parseFloat(item, 10); }); arr[12] = xy.x; arr[13] = xy.y; setTransform(node, 'matrix3d(' + arr.join(',') + ')'); } } else { setTransform(node, 'translateX(' + xy.x + 'px) translateY(' + xy.y + 'px) translateZ(0)'); } } /***/ }), /* 142 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(140); var _utils2 = _interopRequireDefault(_utils); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * 得到会导致元素显示不全的祖先元素 */ function getOffsetParent(element) { // ie 这个也不是完全可行 /*
元素 6 高 100px 宽 50px
*/ // element.offsetParent does the right thing in ie7 and below. Return parent with layout! // In other browsers it only includes elements with position absolute, relative or // fixed, not elements with overflow set to auto or scroll. // if (UA.ie && ieMode < 8) { // return element.offsetParent; // } // 统一的 offsetParent 方法 var doc = element.ownerDocument; var body = doc.body; var parent = void 0; var positionStyle = _utils2["default"].css(element, 'position'); var skipStatic = positionStyle === 'fixed' || positionStyle === 'absolute'; if (!skipStatic) { return element.nodeName.toLowerCase() === 'html' ? null : element.parentNode; } for (parent = element.parentNode; parent && parent !== body; parent = parent.parentNode) { positionStyle = _utils2["default"].css(parent, 'position'); if (positionStyle !== 'static') { return parent; } } return null; } exports["default"] = getOffsetParent; module.exports = exports['default']; /***/ }), /* 143 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(140); var _utils2 = _interopRequireDefault(_utils); var _getOffsetParent = __webpack_require__(142); var _getOffsetParent2 = _interopRequireDefault(_getOffsetParent); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * 获得元素的显示部分的区域 */ function getVisibleRectForElement(element) { var visibleRect = { left: 0, right: Infinity, top: 0, bottom: Infinity }; var el = (0, _getOffsetParent2["default"])(element); var scrollX = void 0; var scrollY = void 0; var winSize = void 0; var doc = element.ownerDocument; var win = doc.defaultView || doc.parentWindow; var body = doc.body; var documentElement = doc.documentElement; // Determine the size of the visible rect by climbing the dom accounting for // all scrollable containers. while (el) { // clientWidth is zero for inline block elements in ie. if ((navigator.userAgent.indexOf('MSIE') === -1 || el.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire // viewport. In some browsers, el.offsetParent may be // document.documentElement, so check for that too. el !== body && el !== documentElement && _utils2["default"].css(el, 'overflow') !== 'visible') { var pos = _utils2["default"].offset(el); // add border pos.left += el.clientLeft; pos.top += el.clientTop; visibleRect.top = Math.max(visibleRect.top, pos.top); visibleRect.right = Math.min(visibleRect.right, // consider area without scrollBar pos.left + el.clientWidth); visibleRect.bottom = Math.min(visibleRect.bottom, pos.top + el.clientHeight); visibleRect.left = Math.max(visibleRect.left, pos.left); } else if (el === body || el === documentElement) { break; } el = (0, _getOffsetParent2["default"])(el); } // Clip by window's viewport. scrollX = _utils2["default"].getWindowScrollLeft(win); scrollY = _utils2["default"].getWindowScrollTop(win); visibleRect.left = Math.max(visibleRect.left, scrollX); visibleRect.top = Math.max(visibleRect.top, scrollY); winSize = { width: _utils2["default"].viewportWidth(win), height: _utils2["default"].viewportHeight(win) }; visibleRect.right = Math.min(visibleRect.right, scrollX + winSize.width); visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + winSize.height); return visibleRect.top >= 0 && visibleRect.left >= 0 && visibleRect.bottom > visibleRect.top && visibleRect.right > visibleRect.left ? visibleRect : null; } exports["default"] = getVisibleRectForElement; module.exports = exports['default']; /***/ }), /* 144 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(140); var _utils2 = _interopRequireDefault(_utils); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) { var pos = _utils2["default"].clone(elFuturePos); var size = { width: elRegion.width, height: elRegion.height }; if (overflow.adjustX && pos.left < visibleRect.left) { pos.left = visibleRect.left; } // Left edge inside and right edge outside viewport, try to resize it. if (overflow.resizeWidth && pos.left >= visibleRect.left && pos.left + size.width > visibleRect.right) { size.width -= pos.left + size.width - visibleRect.right; } // Right edge outside viewport, try to move it. if (overflow.adjustX && pos.left + size.width > visibleRect.right) { // 保证左边界和可视区域左边界对齐 pos.left = Math.max(visibleRect.right - size.width, visibleRect.left); } // Top edge outside viewport, try to move it. if (overflow.adjustY && pos.top < visibleRect.top) { pos.top = visibleRect.top; } // Top edge inside and bottom edge outside viewport, try to resize it. if (overflow.resizeHeight && pos.top >= visibleRect.top && pos.top + size.height > visibleRect.bottom) { size.height -= pos.top + size.height - visibleRect.bottom; } // Bottom edge outside viewport, try to move it. if (overflow.adjustY && pos.top + size.height > visibleRect.bottom) { // 保证上边界和可视区域上边界对齐 pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top); } return _utils2["default"].mix(pos, size); } exports["default"] = adjustForViewport; module.exports = exports['default']; /***/ }), /* 145 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(140); var _utils2 = _interopRequireDefault(_utils); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function getRegion(node) { var offset = void 0; var w = void 0; var h = void 0; if (!_utils2["default"].isWindow(node) && node.nodeType !== 9) { offset = _utils2["default"].offset(node); w = _utils2["default"].outerWidth(node); h = _utils2["default"].outerHeight(node); } else { var win = _utils2["default"].getWindow(node); offset = { left: _utils2["default"].getWindowScrollLeft(win), top: _utils2["default"].getWindowScrollTop(win) }; w = _utils2["default"].viewportWidth(win); h = _utils2["default"].viewportHeight(win); } offset.width = w; offset.height = h; return offset; } exports["default"] = getRegion; module.exports = exports['default']; /***/ }), /* 146 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _getAlignOffset = __webpack_require__(147); var _getAlignOffset2 = _interopRequireDefault(_getAlignOffset); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) { var xy = void 0; var diff = void 0; var p1 = void 0; var p2 = void 0; xy = { left: elRegion.left, top: elRegion.top }; p1 = (0, _getAlignOffset2["default"])(refNodeRegion, points[1]); p2 = (0, _getAlignOffset2["default"])(elRegion, points[0]); diff = [p2.left - p1.left, p2.top - p1.top]; return { left: xy.left - diff[0] + offset[0] - targetOffset[0], top: xy.top - diff[1] + offset[1] - targetOffset[1] }; } exports["default"] = getElFuturePos; module.exports = exports['default']; /***/ }), /* 147 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); /** * 获取 node 上的 align 对齐点 相对于页面的坐标 */ function getAlignOffset(region, align) { var V = align.charAt(0); var H = align.charAt(1); var w = region.width; var h = region.height; var x = void 0; var y = void 0; x = region.left; y = region.top; if (V === 'c') { y += h / 2; } else if (V === 'b') { y += h; } if (H === 'c') { x += w / 2; } else if (H === 'r') { x += w; } return { left: x, top: y }; } exports["default"] = getAlignOffset; module.exports = exports['default']; /***/ }), /* 148 */ /***/ (function(module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = isWindow; function isWindow(obj) { /* eslint no-eq-null: 0 */ /* eslint eqeqeq: 0 */ return obj != null && obj == obj.window; } module.exports = exports['default']; /***/ }), /* 149 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; // export this package's api module.exports = __webpack_require__(150); /***/ }), /* 150 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || 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; }; var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(88); var _propTypes2 = _interopRequireDefault(_propTypes); var _ChildrenUtils = __webpack_require__(151); var _AnimateChild = __webpack_require__(152); var _AnimateChild2 = _interopRequireDefault(_AnimateChild); var _util = __webpack_require__(157); var _util2 = _interopRequireDefault(_util); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } var defaultKey = 'rc_animate_' + Date.now(); function getChildrenFromProps(props) { var children = props.children; if (_react2["default"].isValidElement(children)) { if (!children.key) { return _react2["default"].cloneElement(children, { key: defaultKey }); } } return children; } function noop() {} var Animate = function (_React$Component) { _inherits(Animate, _React$Component); function Animate(props) { _classCallCheck(this, Animate); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _initialiseProps.call(_this); _this.currentlyAnimatingKeys = {}; _this.keysToEnter = []; _this.keysToLeave = []; _this.state = { children: (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(_this.props)) }; return _this; } Animate.prototype.componentDidMount = function componentDidMount() { var _this2 = this; var showProp = this.props.showProp; var children = this.state.children; if (showProp) { children = children.filter(function (child) { return !!child.props[showProp]; }); } children.forEach(function (child) { if (child) { _this2.performAppear(child.key); } }); }; Animate.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var _this3 = this; this.nextProps = nextProps; var nextChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(nextProps)); var props = this.props; // exclusive needs immediate response if (props.exclusive) { Object.keys(this.currentlyAnimatingKeys).forEach(function (key) { _this3.stop(key); }); } var showProp = props.showProp; var currentlyAnimatingKeys = this.currentlyAnimatingKeys; // last props children if exclusive var currentChildren = props.exclusive ? (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)) : this.state.children; // in case destroy in showProp mode var newChildren = []; if (showProp) { currentChildren.forEach(function (currentChild) { var nextChild = currentChild && (0, _ChildrenUtils.findChildInChildrenByKey)(nextChildren, currentChild.key); var newChild = void 0; if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) { newChild = _react2["default"].cloneElement(nextChild || currentChild, _defineProperty({}, showProp, true)); } else { newChild = nextChild; } if (newChild) { newChildren.push(newChild); } }); nextChildren.forEach(function (nextChild) { if (!nextChild || !(0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, nextChild.key)) { newChildren.push(nextChild); } }); } else { newChildren = (0, _ChildrenUtils.mergeChildren)(currentChildren, nextChildren); } // need render to avoid update this.setState({ children: newChildren }); nextChildren.forEach(function (child) { var key = child && child.key; if (child && currentlyAnimatingKeys[key]) { return; } var hasPrev = child && (0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, key); if (showProp) { var showInNext = child.props[showProp]; if (hasPrev) { var showInNow = (0, _ChildrenUtils.findShownChildInChildrenByKey)(currentChildren, key, showProp); if (!showInNow && showInNext) { _this3.keysToEnter.push(key); } } else if (showInNext) { _this3.keysToEnter.push(key); } } else if (!hasPrev) { _this3.keysToEnter.push(key); } }); currentChildren.forEach(function (child) { var key = child && child.key; if (child && currentlyAnimatingKeys[key]) { return; } var hasNext = child && (0, _ChildrenUtils.findChildInChildrenByKey)(nextChildren, key); if (showProp) { var showInNow = child.props[showProp]; if (hasNext) { var showInNext = (0, _ChildrenUtils.findShownChildInChildrenByKey)(nextChildren, key, showProp); if (!showInNext && showInNow) { _this3.keysToLeave.push(key); } } else if (showInNow) { _this3.keysToLeave.push(key); } } else if (!hasNext) { _this3.keysToLeave.push(key); } }); }; Animate.prototype.componentDidUpdate = function componentDidUpdate() { var keysToEnter = this.keysToEnter; this.keysToEnter = []; keysToEnter.forEach(this.performEnter); var keysToLeave = this.keysToLeave; this.keysToLeave = []; keysToLeave.forEach(this.performLeave); }; Animate.prototype.isValidChildByKey = function isValidChildByKey(currentChildren, key) { var showProp = this.props.showProp; if (showProp) { return (0, _ChildrenUtils.findShownChildInChildrenByKey)(currentChildren, key, showProp); } return (0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, key); }; Animate.prototype.stop = function stop(key) { delete this.currentlyAnimatingKeys[key]; var component = this.refs[key]; if (component) { component.stop(); } }; Animate.prototype.render = function render() { var props = this.props; this.nextProps = props; var stateChildren = this.state.children; var children = null; if (stateChildren) { children = stateChildren.map(function (child) { if (child === null || child === undefined) { return child; } if (!child.key) { throw new Error('must set key for children'); } return _react2["default"].createElement( _AnimateChild2["default"], { key: child.key, ref: child.key, animation: props.animation, transitionName: props.transitionName, transitionEnter: props.transitionEnter, transitionAppear: props.transitionAppear, transitionLeave: props.transitionLeave }, child ); }); } var Component = props.component; if (Component) { var passedProps = props; if (typeof Component === 'string') { passedProps = _extends({ className: props.className, style: props.style }, props.componentProps); } return _react2["default"].createElement( Component, passedProps, children ); } return children[0] || null; }; return Animate; }(_react2["default"].Component); Animate.propTypes = { component: _propTypes2["default"].any, componentProps: _propTypes2["default"].object, animation: _propTypes2["default"].object, transitionName: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].object]), transitionEnter: _propTypes2["default"].bool, transitionAppear: _propTypes2["default"].bool, exclusive: _propTypes2["default"].bool, transitionLeave: _propTypes2["default"].bool, onEnd: _propTypes2["default"].func, onEnter: _propTypes2["default"].func, onLeave: _propTypes2["default"].func, onAppear: _propTypes2["default"].func, showProp: _propTypes2["default"].string }; Animate.defaultProps = { animation: {}, component: 'span', componentProps: {}, transitionEnter: true, transitionLeave: true, transitionAppear: false, onEnd: noop, onEnter: noop, onLeave: noop, onAppear: noop }; var _initialiseProps = function _initialiseProps() { var _this4 = this; this.performEnter = function (key) { // may already remove by exclusive if (_this4.refs[key]) { _this4.currentlyAnimatingKeys[key] = true; _this4.refs[key].componentWillEnter(_this4.handleDoneAdding.bind(_this4, key, 'enter')); } }; this.performAppear = function (key) { if (_this4.refs[key]) { _this4.currentlyAnimatingKeys[key] = true; _this4.refs[key].componentWillAppear(_this4.handleDoneAdding.bind(_this4, key, 'appear')); } }; this.handleDoneAdding = function (key, type) { var props = _this4.props; delete _this4.currentlyAnimatingKeys[key]; // if update on exclusive mode, skip check if (props.exclusive && props !== _this4.nextProps) { return; } var currentChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)); if (!_this4.isValidChildByKey(currentChildren, key)) { // exclusive will not need this _this4.performLeave(key); } else { if (type === 'appear') { if (_util2["default"].allowAppearCallback(props)) { props.onAppear(key); props.onEnd(key, true); } } else { if (_util2["default"].allowEnterCallback(props)) { props.onEnter(key); props.onEnd(key, true); } } } }; this.performLeave = function (key) { // may already remove by exclusive if (_this4.refs[key]) { _this4.currentlyAnimatingKeys[key] = true; _this4.refs[key].componentWillLeave(_this4.handleDoneLeaving.bind(_this4, key)); } }; this.handleDoneLeaving = function (key) { var props = _this4.props; delete _this4.currentlyAnimatingKeys[key]; // if update on exclusive mode, skip check if (props.exclusive && props !== _this4.nextProps) { return; } var currentChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)); // in case state change is too fast if (_this4.isValidChildByKey(currentChildren, key)) { _this4.performEnter(key); } else { var end = function end() { if (_util2["default"].allowLeaveCallback(props)) { props.onLeave(key); props.onEnd(key, false); } }; if (!(0, _ChildrenUtils.isSameChildren)(_this4.state.children, currentChildren, props.showProp)) { _this4.setState({ children: currentChildren }, end); } else { end(); } } }; }; exports["default"] = Animate; module.exports = exports['default']; /***/ }), /* 151 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.toArrayChildren = toArrayChildren; exports.findChildInChildrenByKey = findChildInChildrenByKey; exports.findShownChildInChildrenByKey = findShownChildInChildrenByKey; exports.findHiddenChildInChildrenByKey = findHiddenChildInChildrenByKey; exports.isSameChildren = isSameChildren; exports.mergeChildren = mergeChildren; var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function toArrayChildren(children) { var ret = []; _react2["default"].Children.forEach(children, function (child) { ret.push(child); }); return ret; } function findChildInChildrenByKey(children, key) { var ret = null; if (children) { children.forEach(function (child) { if (ret) { return; } if (child && child.key === key) { ret = child; } }); } return ret; } function findShownChildInChildrenByKey(children, key, showProp) { var ret = null; if (children) { children.forEach(function (child) { if (child && child.key === key && child.props[showProp]) { if (ret) { throw new Error('two child with same key for children'); } ret = child; } }); } return ret; } function findHiddenChildInChildrenByKey(children, key, showProp) { var found = 0; if (children) { children.forEach(function (child) { if (found) { return; } found = child && child.key === key && !child.props[showProp]; }); } return found; } function isSameChildren(c1, c2, showProp) { var same = c1.length === c2.length; if (same) { c1.forEach(function (child, index) { var child2 = c2[index]; if (child && child2) { if (child && !child2 || !child && child2) { same = false; } else if (child.key !== child2.key) { same = false; } else if (showProp && child.props[showProp] !== child2.props[showProp]) { same = false; } } }); } return same; } function mergeChildren(prev, next) { var ret = []; // For each key of `next`, the list of keys to insert before that key in // the combined list var nextChildrenPending = {}; var pendingChildren = []; prev.forEach(function (child) { if (child && findChildInChildrenByKey(next, child.key)) { if (pendingChildren.length) { nextChildrenPending[child.key] = pendingChildren; pendingChildren = []; } } else { pendingChildren.push(child); } }); next.forEach(function (child) { if (child && nextChildrenPending.hasOwnProperty(child.key)) { ret = ret.concat(nextChildrenPending[child.key]); } ret.push(child); }); ret = ret.concat(pendingChildren); return ret; } /***/ }), /* 152 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(109); var _reactDom2 = _interopRequireDefault(_reactDom); var _propTypes = __webpack_require__(88); var _propTypes2 = _interopRequireDefault(_propTypes); var _cssAnimation = __webpack_require__(153); var _cssAnimation2 = _interopRequireDefault(_cssAnimation); var _util = __webpack_require__(157); var _util2 = _interopRequireDefault(_util); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } var transitionMap = { enter: 'transitionEnter', appear: 'transitionAppear', leave: 'transitionLeave' }; var AnimateChild = function (_React$Component) { _inherits(AnimateChild, _React$Component); function AnimateChild() { _classCallCheck(this, AnimateChild); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } AnimateChild.prototype.componentWillUnmount = function componentWillUnmount() { this.stop(); }; AnimateChild.prototype.componentWillEnter = function componentWillEnter(done) { if (_util2["default"].isEnterSupported(this.props)) { this.transition('enter', done); } else { done(); } }; AnimateChild.prototype.componentWillAppear = function componentWillAppear(done) { if (_util2["default"].isAppearSupported(this.props)) { this.transition('appear', done); } else { done(); } }; AnimateChild.prototype.componentWillLeave = function componentWillLeave(done) { if (_util2["default"].isLeaveSupported(this.props)) { this.transition('leave', done); } else { // always sync, do not interupt with react component life cycle // update hidden -> animate hidden -> // didUpdate -> animate leave -> unmount (if animate is none) done(); } }; AnimateChild.prototype.transition = function transition(animationType, finishCallback) { var _this2 = this; var node = _reactDom2["default"].findDOMNode(this); var props = this.props; var transitionName = props.transitionName; var nameIsObj = (typeof transitionName === 'undefined' ? 'undefined' : _typeof(transitionName)) === 'object'; this.stop(); var end = function end() { _this2.stopper = null; finishCallback(); }; if ((_cssAnimation.isCssAnimationSupported || !props.animation[animationType]) && transitionName && props[transitionMap[animationType]]) { var name = nameIsObj ? transitionName[animationType] : transitionName + '-' + animationType; var activeName = name + '-active'; if (nameIsObj && transitionName[animationType + 'Active']) { activeName = transitionName[animationType + 'Active']; } this.stopper = (0, _cssAnimation2["default"])(node, { name: name, active: activeName }, end); } else { this.stopper = props.animation[animationType](node, end); } }; AnimateChild.prototype.stop = function stop() { var stopper = this.stopper; if (stopper) { this.stopper = null; stopper.stop(); } }; AnimateChild.prototype.render = function render() { return this.props.children; }; return AnimateChild; }(_react2["default"].Component); AnimateChild.propTypes = { children: _propTypes2["default"].any }; exports["default"] = AnimateChild; module.exports = exports['default']; /***/ }), /* 153 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _Event = __webpack_require__(154); var _Event2 = _interopRequireDefault(_Event); var _componentClasses = __webpack_require__(155); var _componentClasses2 = _interopRequireDefault(_componentClasses); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var isCssAnimationSupported = _Event2["default"].endEvents.length !== 0; var capitalPrefixes = ['Webkit', 'Moz', 'O', // ms is special .... ! 'ms']; var prefixes = ['-webkit-', '-moz-', '-o-', 'ms-', '']; function getStyleProperty(node, name) { // old ff need null, https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle var style = window.getComputedStyle(node, null); var ret = ''; for (var i = 0; i < prefixes.length; i++) { ret = style.getPropertyValue(prefixes[i] + name); if (ret) { break; } } return ret; } function fixBrowserByTimeout(node) { if (isCssAnimationSupported) { var transitionDelay = parseFloat(getStyleProperty(node, 'transition-delay')) || 0; var transitionDuration = parseFloat(getStyleProperty(node, 'transition-duration')) || 0; var animationDelay = parseFloat(getStyleProperty(node, 'animation-delay')) || 0; var animationDuration = parseFloat(getStyleProperty(node, 'animation-duration')) || 0; var time = Math.max(transitionDuration + transitionDelay, animationDuration + animationDelay); // sometimes, browser bug node.rcEndAnimTimeout = setTimeout(function () { node.rcEndAnimTimeout = null; if (node.rcEndListener) { node.rcEndListener(); } }, time * 1000 + 200); } } function clearBrowserBugTimeout(node) { if (node.rcEndAnimTimeout) { clearTimeout(node.rcEndAnimTimeout); node.rcEndAnimTimeout = null; } } var cssAnimation = function cssAnimation(node, transitionName, endCallback) { var nameIsObj = (typeof transitionName === 'undefined' ? 'undefined' : _typeof(transitionName)) === 'object'; var className = nameIsObj ? transitionName.name : transitionName; var activeClassName = nameIsObj ? transitionName.active : transitionName + '-active'; var end = endCallback; var start = void 0; var active = void 0; var nodeClasses = (0, _componentClasses2["default"])(node); if (endCallback && Object.prototype.toString.call(endCallback) === '[object Object]') { end = endCallback.end; start = endCallback.start; active = endCallback.active; } if (node.rcEndListener) { node.rcEndListener(); } node.rcEndListener = function (e) { if (e && e.target !== node) { return; } if (node.rcAnimTimeout) { clearTimeout(node.rcAnimTimeout); node.rcAnimTimeout = null; } clearBrowserBugTimeout(node); nodeClasses.remove(className); nodeClasses.remove(activeClassName); _Event2["default"].removeEndEventListener(node, node.rcEndListener); node.rcEndListener = null; // Usually this optional end is used for informing an owner of // a leave animation and telling it to remove the child. if (end) { end(); } }; _Event2["default"].addEndEventListener(node, node.rcEndListener); if (start) { start(); } nodeClasses.add(className); node.rcAnimTimeout = setTimeout(function () { node.rcAnimTimeout = null; nodeClasses.add(activeClassName); if (active) { setTimeout(active, 0); } fixBrowserByTimeout(node); // 30ms for firefox }, 30); return { stop: function stop() { if (node.rcEndListener) { node.rcEndListener(); } } }; }; cssAnimation.style = function (node, style, callback) { if (node.rcEndListener) { node.rcEndListener(); } node.rcEndListener = function (e) { if (e && e.target !== node) { return; } if (node.rcAnimTimeout) { clearTimeout(node.rcAnimTimeout); node.rcAnimTimeout = null; } clearBrowserBugTimeout(node); _Event2["default"].removeEndEventListener(node, node.rcEndListener); node.rcEndListener = null; // Usually this optional callback is used for informing an owner of // a leave animation and telling it to remove the child. if (callback) { callback(); } }; _Event2["default"].addEndEventListener(node, node.rcEndListener); node.rcAnimTimeout = setTimeout(function () { for (var s in style) { if (style.hasOwnProperty(s)) { node.style[s] = style[s]; } } node.rcAnimTimeout = null; fixBrowserByTimeout(node); }, 0); }; cssAnimation.setTransition = function (node, p, value) { var property = p; var v = value; if (value === undefined) { v = property; property = ''; } property = property || ''; capitalPrefixes.forEach(function (prefix) { node.style[prefix + 'Transition' + property] = v; }); }; cssAnimation.isCssAnimationSupported = isCssAnimationSupported; exports["default"] = cssAnimation; module.exports = exports['default']; /***/ }), /* 154 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var EVENT_NAME_MAP = { transitionend: { transition: 'transitionend', WebkitTransition: 'webkitTransitionEnd', MozTransition: 'mozTransitionEnd', OTransition: 'oTransitionEnd', msTransition: 'MSTransitionEnd' }, animationend: { animation: 'animationend', WebkitAnimation: 'webkitAnimationEnd', MozAnimation: 'mozAnimationEnd', OAnimation: 'oAnimationEnd', msAnimation: 'MSAnimationEnd' } }; var endEvents = []; function detectEvents() { var testEl = document.createElement('div'); var style = testEl.style; if (!('AnimationEvent' in window)) { delete EVENT_NAME_MAP.animationend.animation; } if (!('TransitionEvent' in window)) { delete EVENT_NAME_MAP.transitionend.transition; } for (var baseEventName in EVENT_NAME_MAP) { if (EVENT_NAME_MAP.hasOwnProperty(baseEventName)) { var baseEvents = EVENT_NAME_MAP[baseEventName]; for (var styleName in baseEvents) { if (styleName in style) { endEvents.push(baseEvents[styleName]); break; } } } } } if (typeof window !== 'undefined' && typeof document !== 'undefined') { detectEvents(); } function addEventListener(node, eventName, eventListener) { node.addEventListener(eventName, eventListener, false); } function removeEventListener(node, eventName, eventListener) { node.removeEventListener(eventName, eventListener, false); } var TransitionEvents = { addEndEventListener: function addEndEventListener(node, eventListener) { if (endEvents.length === 0) { window.setTimeout(eventListener, 0); return; } endEvents.forEach(function (endEvent) { addEventListener(node, endEvent, eventListener); }); }, endEvents: endEvents, removeEndEventListener: function removeEndEventListener(node, eventListener) { if (endEvents.length === 0) { return; } endEvents.forEach(function (endEvent) { removeEventListener(node, endEvent, eventListener); }); } }; exports["default"] = TransitionEvents; module.exports = exports['default']; /***/ }), /* 155 */ /***/ (function(module, exports, __webpack_require__) { /** * Module dependencies. */ try { var index = __webpack_require__(156); } catch (err) { var index = __webpack_require__(156); } /** * Whitespace regexp. */ var re = /\s+/; /** * toString reference. */ var toString = Object.prototype.toString; /** * Wrap `el` in a `ClassList`. * * @param {Element} el * @return {ClassList} * @api public */ module.exports = function(el){ return new ClassList(el); }; /** * Initialize a new ClassList for `el`. * * @param {Element} el * @api private */ function ClassList(el) { if (!el || !el.nodeType) { throw new Error('A DOM element reference is required'); } this.el = el; this.list = el.classList; } /** * Add class `name` if not already present. * * @param {String} name * @return {ClassList} * @api public */ ClassList.prototype.add = function(name){ // classList if (this.list) { this.list.add(name); return this; } // fallback var arr = this.array(); var i = index(arr, name); if (!~i) arr.push(name); this.el.className = arr.join(' '); return this; }; /** * Remove class `name` when present, or * pass a regular expression to remove * any which match. * * @param {String|RegExp} name * @return {ClassList} * @api public */ ClassList.prototype.remove = function(name){ if ('[object RegExp]' == toString.call(name)) { return this.removeMatching(name); } // classList if (this.list) { this.list.remove(name); return this; } // fallback var arr = this.array(); var i = index(arr, name); if (~i) arr.splice(i, 1); this.el.className = arr.join(' '); return this; }; /** * Remove all classes matching `re`. * * @param {RegExp} re * @return {ClassList} * @api private */ ClassList.prototype.removeMatching = function(re){ var arr = this.array(); for (var i = 0; i < arr.length; i++) { if (re.test(arr[i])) { this.remove(arr[i]); } } return this; }; /** * Toggle class `name`, can force state via `force`. * * For browsers that support classList, but do not support `force` yet, * the mistake will be detected and corrected. * * @param {String} name * @param {Boolean} force * @return {ClassList} * @api public */ ClassList.prototype.toggle = function(name, force){ // classList if (this.list) { if ("undefined" !== typeof force) { if (force !== this.list.toggle(name, force)) { this.list.toggle(name); // toggle again to correct } } else { this.list.toggle(name); } return this; } // fallback if ("undefined" !== typeof force) { if (!force) { this.remove(name); } else { this.add(name); } } else { if (this.has(name)) { this.remove(name); } else { this.add(name); } } return this; }; /** * Return an array of classes. * * @return {Array} * @api public */ ClassList.prototype.array = function(){ var className = this.el.getAttribute('class') || ''; var str = className.replace(/^\s+|\s+$/g, ''); var arr = str.split(re); if ('' === arr[0]) arr.shift(); return arr; }; /** * Check if class `name` is present. * * @param {String} name * @return {ClassList} * @api public */ ClassList.prototype.has = ClassList.prototype.contains = function(name){ return this.list ? this.list.contains(name) : !! ~index(this.array(), name); }; /***/ }), /* 156 */ /***/ (function(module, exports) { module.exports = function(arr, obj){ if (arr.indexOf) return arr.indexOf(obj); for (var i = 0; i < arr.length; ++i) { if (arr[i] === obj) return i; } return -1; }; /***/ }), /* 157 */ /***/ (function(module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var util = { isAppearSupported: function isAppearSupported(props) { return props.transitionName && props.transitionAppear || props.animation.appear; }, isEnterSupported: function isEnterSupported(props) { return props.transitionName && props.transitionEnter || props.animation.enter; }, isLeaveSupported: function isLeaveSupported(props) { return props.transitionName && props.transitionLeave || props.animation.leave; }, allowAppearCallback: function allowAppearCallback(props) { return props.transitionAppear || props.animation.appear; }, allowEnterCallback: function allowEnterCallback(props) { return props.transitionEnter || props.animation.enter; }, allowLeaveCallback: function allowLeaveCallback(props) { return props.transitionLeave || props.animation.leave; } }; exports["default"] = util; module.exports = exports['default']; /***/ }), /* 158 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _classCallCheck2 = __webpack_require__(42); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(43); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(79); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(88); var _propTypes2 = _interopRequireDefault(_propTypes); var _LazyRenderBox = __webpack_require__(159); var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var PopupInner = function (_Component) { (0, _inherits3["default"])(PopupInner, _Component); function PopupInner() { (0, _classCallCheck3["default"])(this, PopupInner); return (0, _possibleConstructorReturn3["default"])(this, _Component.apply(this, arguments)); } PopupInner.prototype.render = function render() { var props = this.props; var className = props.className; if (!props.visible) { className += ' ' + props.hiddenClassName; } return _react2["default"].createElement( 'div', { className: className, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave, style: props.style }, _react2["default"].createElement( _LazyRenderBox2["default"], { className: props.prefixCls + '-content', visible: props.visible }, props.children ) ); }; return PopupInner; }(_react.Component); PopupInner.propTypes = { hiddenClassName: _propTypes2["default"].string, className: _propTypes2["default"].string, prefixCls: _propTypes2["default"].string, onMouseEnter: _propTypes2["default"].func, onMouseLeave: _propTypes2["default"].func, children: _propTypes2["default"].any }; exports["default"] = PopupInner; module.exports = exports['default']; /***/ }), /* 159 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _objectWithoutProperties2 = __webpack_require__(99); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _classCallCheck2 = __webpack_require__(42); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(43); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(79); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(87); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(88); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var LazyRenderBox = function (_Component) { (0, _inherits3["default"])(LazyRenderBox, _Component); function LazyRenderBox() { (0, _classCallCheck3["default"])(this, LazyRenderBox); return (0, _possibleConstructorReturn3["default"])(this, _Component.apply(this, arguments)); } LazyRenderBox.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { return nextProps.hiddenClassName || nextProps.visible; }; LazyRenderBox.prototype.render = function render() { var _props = this.props, hiddenClassName = _props.hiddenClassName, visible = _props.visible, props = (0, _objectWithoutProperties3["default"])(_props, ['hiddenClassName', 'visible']); if (hiddenClassName || _react2["default"].Children.count(props.children) > 1) { if (!visible && hiddenClassName) { props.className += ' ' + hiddenClassName; } return _react2["default"].createElement('div', props); } return _react2["default"].Children.only(props.children); }; return LazyRenderBox; }(_react.Component); LazyRenderBox.propTypes = { children: _propTypes2["default"].any, className: _propTypes2["default"].string, visible: _propTypes2["default"].bool, hiddenClassName: _propTypes2["default"].string }; exports["default"] = LazyRenderBox; module.exports = exports['default']; /***/ }), /* 160 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(4); var _extends3 = _interopRequireDefault(_extends2); exports.getAlignFromPlacement = getAlignFromPlacement; exports.getPopupClassNameFromAlign = getPopupClassNameFromAlign; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function isPointsEq(a1, a2) { return a1[0] === a2[0] && a1[1] === a2[1]; } function getAlignFromPlacement(builtinPlacements, placementStr, align) { var baseAlign = builtinPlacements[placementStr] || {}; return (0, _extends3["default"])({}, baseAlign, align); } function getPopupClassNameFromAlign(builtinPlacements, prefixCls, align) { var points = align.points; for (var placement in builtinPlacements) { if (builtinPlacements.hasOwnProperty(placement)) { if (isPointsEq(builtinPlacements[placement].points, points)) { return prefixCls + '-placement-' + placement; } } } return ''; } /***/ }), /* 161 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || 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; }; exports["default"] = getContainerRenderMixin; var _reactDom = __webpack_require__(109); var _reactDom2 = _interopRequireDefault(_reactDom); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function defaultGetContainer() { var container = document.createElement('div'); document.body.appendChild(container); return container; } function getContainerRenderMixin(config) { var _config$autoMount = config.autoMount, autoMount = _config$autoMount === undefined ? true : _config$autoMount, _config$autoDestroy = config.autoDestroy, autoDestroy = _config$autoDestroy === undefined ? true : _config$autoDestroy, isVisible = config.isVisible, getComponent = config.getComponent, _config$getContainer = config.getContainer, getContainer = _config$getContainer === undefined ? defaultGetContainer : _config$getContainer; var mixin = void 0; function _renderComponent(instance, componentArg, ready) { if (!isVisible || instance._component || isVisible(instance)) { if (!instance._container) { instance._container = getContainer(instance); } var component = void 0; if (instance.getComponent) { component = instance.getComponent(componentArg); } else { component = getComponent(instance, componentArg); } _reactDom2["default"].unstable_renderSubtreeIntoContainer(instance, component, instance._container, function callback() { instance._component = this; if (ready) { ready.call(this); } }); } } if (autoMount) { mixin = _extends({}, mixin, { componentDidMount: function componentDidMount() { _renderComponent(this); }, componentDidUpdate: function componentDidUpdate() { _renderComponent(this); } }); } if (!autoMount || !autoDestroy) { mixin = _extends({}, mixin, { renderComponent: function renderComponent(componentArg, ready) { _renderComponent(this, componentArg, ready); } }); } function _removeContainer(instance) { if (instance._container) { var container = instance._container; _reactDom2["default"].unmountComponentAtNode(container); container.parentNode.removeChild(container); instance._container = null; } } if (autoDestroy) { mixin = _extends({}, mixin, { componentWillUnmount: function componentWillUnmount() { _removeContainer(this); } }); } else { mixin = _extends({}, mixin, { removeContainer: function removeContainer() { _removeContainer(this); } }); } return mixin; } module.exports = exports['default']; /***/ }), /* 162 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var targetOffset = [0, 0]; var placements = exports.placements = { left: { points: ['cr', 'cl'], overflow: autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset }, right: { points: ['cl', 'cr'], overflow: autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, top: { points: ['bc', 'tc'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, bottom: { points: ['tc', 'bc'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, topLeft: { points: ['bl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, leftTop: { points: ['tr', 'tl'], overflow: autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset }, topRight: { points: ['br', 'tr'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, rightTop: { points: ['tl', 'tr'], overflow: autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, bottomRight: { points: ['tr', 'br'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, rightBottom: { points: ['bl', 'br'], overflow: autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, bottomLeft: { points: ['tl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, leftBottom: { points: ['br', 'bl'], overflow: autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset } }; exports["default"] = placements; /***/ }) /******/ ]) }); ; //# sourceMappingURL=rc-slider.js.map