diff --git a/dist/react-leaflet.js b/dist/react-leaflet.js index cb1a6626..1ebf6a89 100644 --- a/dist/react-leaflet.js +++ b/dist/react-leaflet.js @@ -7,7 +7,7 @@ exports["ReactLeaflet"] = factory(require("leaflet"), require("react"), require("react-dom")); else root["ReactLeaflet"] = factory(root["L"], root["React"], root["ReactDOM"]); -})(this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_178__) { +})(this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_175__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -59,7 +59,7 @@ return /******/ (function(modules) { // webpackBootstrap Object.defineProperty(exports, "__esModule", { value: true }); - exports.setIconDefaultImagePath = exports.ZoomControl = exports.WMSTileLayer = exports.TileLayer = exports.ScaleControl = exports.Rectangle = exports.Popup = exports.Polyline = exports.Polygon = exports.Path = exports.MultiPolyline = exports.MultiPolygon = exports.Marker = exports.MapLayer = exports.MapControl = exports.MapComponent = exports.Map = exports.LayersControl = exports.LayerGroup = exports.ImageOverlay = exports.GeoJson = exports.FeatureGroup = exports.CircleMarker = exports.Circle = exports.CanvasTileLayer = exports.BaseTileLayer = exports.AttributionControl = exports.PropTypes = undefined; + exports.setIconDefaultImagePath = exports.ZoomControl = exports.WMSTileLayer = exports.TileLayer = exports.ScaleControl = exports.Rectangle = exports.Popup = exports.Polyline = exports.Polygon = exports.Path = exports.Marker = exports.MapLayer = exports.MapControl = exports.MapComponent = exports.Map = exports.LayersControl = exports.LayerGroup = exports.ImageOverlay = exports.GeoJson = exports.FeatureGroup = exports.CircleMarker = exports.Circle = exports.BaseTileLayer = exports.AttributionControl = exports.PropTypes = undefined; var _leaflet = __webpack_require__(1); @@ -77,39 +77,35 @@ return /******/ (function(modules) { // webpackBootstrap var _BaseTileLayer3 = _interopRequireDefault(_BaseTileLayer2); - var _CanvasTileLayer2 = __webpack_require__(155); - - var _CanvasTileLayer3 = _interopRequireDefault(_CanvasTileLayer2); - - var _Circle2 = __webpack_require__(156); + var _Circle2 = __webpack_require__(155); var _Circle3 = _interopRequireDefault(_Circle2); - var _CircleMarker2 = __webpack_require__(163); + var _CircleMarker2 = __webpack_require__(162); var _CircleMarker3 = _interopRequireDefault(_CircleMarker2); - var _FeatureGroup2 = __webpack_require__(164); + var _FeatureGroup2 = __webpack_require__(163); var _FeatureGroup3 = _interopRequireDefault(_FeatureGroup2); - var _GeoJson2 = __webpack_require__(165); + var _GeoJson2 = __webpack_require__(164); var _GeoJson3 = _interopRequireDefault(_GeoJson2); - var _ImageOverlay2 = __webpack_require__(166); + var _ImageOverlay2 = __webpack_require__(165); var _ImageOverlay3 = _interopRequireDefault(_ImageOverlay2); - var _LayerGroup2 = __webpack_require__(167); + var _LayerGroup2 = __webpack_require__(166); var _LayerGroup3 = _interopRequireDefault(_LayerGroup2); - var _LayersControl2 = __webpack_require__(168); + var _LayersControl2 = __webpack_require__(167); var _LayersControl3 = _interopRequireDefault(_LayersControl2); - var _Map2 = __webpack_require__(169); + var _Map2 = __webpack_require__(168); var _Map3 = _interopRequireDefault(_Map2); @@ -125,51 +121,43 @@ return /******/ (function(modules) { // webpackBootstrap var _MapLayer3 = _interopRequireDefault(_MapLayer2); - var _Marker2 = __webpack_require__(172); + var _Marker2 = __webpack_require__(171); var _Marker3 = _interopRequireDefault(_Marker2); - var _MultiPolygon2 = __webpack_require__(173); - - var _MultiPolygon3 = _interopRequireDefault(_MultiPolygon2); - - var _MultiPolyline2 = __webpack_require__(174); - - var _MultiPolyline3 = _interopRequireDefault(_MultiPolyline2); - - var _Path2 = __webpack_require__(157); + var _Path2 = __webpack_require__(156); var _Path3 = _interopRequireDefault(_Path2); - var _Polygon2 = __webpack_require__(175); + var _Polygon2 = __webpack_require__(172); var _Polygon3 = _interopRequireDefault(_Polygon2); - var _Polyline2 = __webpack_require__(176); + var _Polyline2 = __webpack_require__(173); var _Polyline3 = _interopRequireDefault(_Polyline2); - var _Popup2 = __webpack_require__(177); + var _Popup2 = __webpack_require__(174); var _Popup3 = _interopRequireDefault(_Popup2); - var _Rectangle2 = __webpack_require__(179); + var _Rectangle2 = __webpack_require__(176); var _Rectangle3 = _interopRequireDefault(_Rectangle2); - var _ScaleControl2 = __webpack_require__(180); + var _ScaleControl2 = __webpack_require__(177); var _ScaleControl3 = _interopRequireDefault(_ScaleControl2); - var _TileLayer2 = __webpack_require__(181); + var _TileLayer2 = __webpack_require__(178); var _TileLayer3 = _interopRequireDefault(_TileLayer2); - var _WMSTileLayer2 = __webpack_require__(182); + var _WMSTileLayer2 = __webpack_require__(179); var _WMSTileLayer3 = _interopRequireDefault(_WMSTileLayer2); - var _ZoomControl2 = __webpack_require__(183); + var _ZoomControl2 = __webpack_require__(180); var _ZoomControl3 = _interopRequireDefault(_ZoomControl2); @@ -180,7 +168,6 @@ return /******/ (function(modules) { // webpackBootstrap exports.PropTypes = _PropTypes; exports.AttributionControl = _AttributionControl3.default; exports.BaseTileLayer = _BaseTileLayer3.default; - exports.CanvasTileLayer = _CanvasTileLayer3.default; exports.Circle = _Circle3.default; exports.CircleMarker = _CircleMarker3.default; exports.FeatureGroup = _FeatureGroup3.default; @@ -193,8 +180,6 @@ return /******/ (function(modules) { // webpackBootstrap exports.MapControl = _MapControl3.default; exports.MapLayer = _MapLayer3.default; exports.Marker = _Marker3.default; - exports.MultiPolygon = _MultiPolygon3.default; - exports.MultiPolyline = _MultiPolyline3.default; exports.Path = _Path3.default; exports.Polygon = _Polygon3.default; exports.Polyline = _Polyline3.default; @@ -481,7 +466,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'componentWillUnmount', value: function componentWillUnmount() { - this.leafletElement.removeFrom(this.props.map); + this.leafletElement.remove(); } }, { key: 'getLeafletElement', @@ -5826,64 +5811,6 @@ return /******/ (function(modules) { // webpackBootstrap var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; - var _leaflet = __webpack_require__(1); - - var _BaseTileLayer2 = __webpack_require__(12); - - var _BaseTileLayer3 = _interopRequireDefault(_BaseTileLayer2); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _objectWithoutProperties(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; } - - 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) : subClass.__proto__ = superClass; } - - var CanvasTileLayer = function (_BaseTileLayer) { - _inherits(CanvasTileLayer, _BaseTileLayer); - - function CanvasTileLayer() { - _classCallCheck(this, CanvasTileLayer); - - return _possibleConstructorReturn(this, Object.getPrototypeOf(CanvasTileLayer).apply(this, arguments)); - } - - _createClass(CanvasTileLayer, [{ - key: 'componentWillMount', - value: function componentWillMount() { - _get(Object.getPrototypeOf(CanvasTileLayer.prototype), 'componentWillMount', this).call(this); - var _props = this.props; - var _map = _props.map; - var _lc = _props.layerContainer; - - var props = _objectWithoutProperties(_props, ['map', 'layerContainer']); - - this.leafletElement = _leaflet.tileLayer.canvas(props); - } - }]); - - return CanvasTileLayer; - }(_BaseTileLayer3.default); - - exports.default = CanvasTileLayer; - -/***/ }, -/* 156 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; - var _react = __webpack_require__(4); var _leaflet = __webpack_require__(1); @@ -5892,7 +5819,7 @@ return /******/ (function(modules) { // webpackBootstrap var _latlng2 = _interopRequireDefault(_latlng); - var _Path2 = __webpack_require__(157); + var _Path2 = __webpack_require__(156); var _Path3 = _interopRequireDefault(_Path2); @@ -5923,11 +5850,10 @@ return /******/ (function(modules) { // webpackBootstrap var center = _props.center; var _map = _props.map; var _lc = _props.layerContainer; - var radius = _props.radius; - var props = _objectWithoutProperties(_props, ['center', 'map', 'layerContainer', 'radius']); + var props = _objectWithoutProperties(_props, ['center', 'map', 'layerContainer']); - this.leafletElement = (0, _leaflet.circle)(center, radius, props); + this.leafletElement = (0, _leaflet.circle)(center, props); } }, { key: 'componentDidUpdate', @@ -5952,7 +5878,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Circle; /***/ }, -/* 157 */ +/* 156 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -5961,11 +5887,11 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _pick2 = __webpack_require__(158); + var _pick2 = __webpack_require__(157); var _pick3 = _interopRequireDefault(_pick2); - var _isEqual2 = __webpack_require__(162); + var _isEqual2 = __webpack_require__(161); var _isEqual3 = _interopRequireDefault(_isEqual2); @@ -6029,12 +5955,12 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Path; /***/ }, -/* 158 */ +/* 157 */ /***/ function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(107), - baseFlatten = __webpack_require__(159), - basePick = __webpack_require__(161), + baseFlatten = __webpack_require__(158), + basePick = __webpack_require__(160), rest = __webpack_require__(27), toKey = __webpack_require__(118); @@ -6063,11 +5989,11 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 159 */ +/* 158 */ /***/ function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(137), - isFlattenable = __webpack_require__(160); + isFlattenable = __webpack_require__(159); /** * The base implementation of `_.flatten` with support for restricting flattening. @@ -6107,7 +6033,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 160 */ +/* 159 */ /***/ function(module, exports, __webpack_require__) { var isArguments = __webpack_require__(40), @@ -6129,7 +6055,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 161 */ +/* 160 */ /***/ function(module, exports, __webpack_require__) { var arrayReduce = __webpack_require__(46); @@ -6157,7 +6083,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 162 */ +/* 161 */ /***/ function(module, exports, __webpack_require__) { var baseIsEqual = __webpack_require__(87); @@ -6199,7 +6125,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 163 */ +/* 162 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -6220,7 +6146,7 @@ return /******/ (function(modules) { // webpackBootstrap var _latlng2 = _interopRequireDefault(_latlng); - var _Path2 = __webpack_require__(157); + var _Path2 = __webpack_require__(156); var _Path3 = _interopRequireDefault(_Path2); @@ -6279,7 +6205,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = CircleMarker; /***/ }, -/* 164 */ +/* 163 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -6294,7 +6220,7 @@ return /******/ (function(modules) { // webpackBootstrap var _leaflet = __webpack_require__(1); - var _Path2 = __webpack_require__(157); + var _Path2 = __webpack_require__(156); var _Path3 = _interopRequireDefault(_Path2); @@ -6347,7 +6273,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = FeatureGroup; /***/ }, -/* 165 */ +/* 164 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -6364,7 +6290,7 @@ return /******/ (function(modules) { // webpackBootstrap var _leaflet = __webpack_require__(1); - var _Path2 = __webpack_require__(157); + var _Path2 = __webpack_require__(156); var _Path3 = _interopRequireDefault(_Path2); @@ -6416,7 +6342,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = GeoJson; /***/ }, -/* 166 */ +/* 165 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -6503,7 +6429,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = ImageOverlay; /***/ }, -/* 167 */ +/* 166 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -6560,7 +6486,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = LayerGroup; /***/ }, -/* 168 */ +/* 167 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -6829,7 +6755,7 @@ return /******/ (function(modules) { // webpackBootstrap LayersControl.Overlay = Overlay; /***/ }, -/* 169 */ +/* 168 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -6838,11 +6764,11 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _uniqueId2 = __webpack_require__(170); + var _uniqueId2 = __webpack_require__(169); var _uniqueId3 = _interopRequireDefault(_uniqueId2); - var _isUndefined2 = __webpack_require__(171); + var _isUndefined2 = __webpack_require__(170); var _isUndefined3 = _interopRequireDefault(_isUndefined2); @@ -6996,7 +6922,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Map; /***/ }, -/* 170 */ +/* 169 */ /***/ function(module, exports, __webpack_require__) { var toString = __webpack_require__(115); @@ -7030,7 +6956,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 171 */ +/* 170 */ /***/ function(module, exports) { /** @@ -7058,7 +6984,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 172 */ +/* 171 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -7159,159 +7085,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Marker; /***/ }, -/* 173 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; - - var _react = __webpack_require__(4); - - var _leaflet = __webpack_require__(1); - - var _latlngList = __webpack_require__(5); - - var _latlngList2 = _interopRequireDefault(_latlngList); - - var _Path2 = __webpack_require__(157); - - var _Path3 = _interopRequireDefault(_Path2); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _objectWithoutProperties(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; } - - 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) : subClass.__proto__ = superClass; } - - var MultiPolygon = function (_Path) { - _inherits(MultiPolygon, _Path); - - function MultiPolygon() { - _classCallCheck(this, MultiPolygon); - - return _possibleConstructorReturn(this, Object.getPrototypeOf(MultiPolygon).apply(this, arguments)); - } - - _createClass(MultiPolygon, [{ - key: 'componentWillMount', - value: function componentWillMount() { - _get(Object.getPrototypeOf(MultiPolygon.prototype), 'componentWillMount', this).call(this); - var _props = this.props; - var _map = _props.map; - var _lc = _props.layerContainer; - var polygons = _props.polygons; - - var props = _objectWithoutProperties(_props, ['map', 'layerContainer', 'polygons']); - - this.leafletElement = (0, _leaflet.multiPolygon)(polygons, props); - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate(prevProps) { - if (this.props.polygons !== prevProps.polygons) { - this.leafletElement.setLatLngs(this.props.polygons); - } - this.setStyleIfChanged(prevProps, this.props); - } - }]); - - return MultiPolygon; - }(_Path3.default); - - MultiPolygon.propTypes = { - polygons: _react.PropTypes.arrayOf(_latlngList2.default).isRequired - }; - exports.default = MultiPolygon; - -/***/ }, -/* 174 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; - - var _react = __webpack_require__(4); - - var _leaflet = __webpack_require__(1); - - var _latlngList = __webpack_require__(5); - - var _latlngList2 = _interopRequireDefault(_latlngList); - - var _Path2 = __webpack_require__(157); - - var _Path3 = _interopRequireDefault(_Path2); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _objectWithoutProperties(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; } - - 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) : subClass.__proto__ = superClass; } - - var MultiPolyline = function (_Path) { - _inherits(MultiPolyline, _Path); - - function MultiPolyline() { - _classCallCheck(this, MultiPolyline); - - return _possibleConstructorReturn(this, Object.getPrototypeOf(MultiPolyline).apply(this, arguments)); - } - - _createClass(MultiPolyline, [{ - key: 'componentWillMount', - value: function componentWillMount() { - _get(Object.getPrototypeOf(MultiPolyline.prototype), 'componentWillMount', this).call(this); - var _props = this.props; - var _map = _props.map; - var _lc = _props.layerContainer; - var polylines = _props.polylines; - - var props = _objectWithoutProperties(_props, ['map', 'layerContainer', 'polylines']); - - this.leafletElement = (0, _leaflet.multiPolyline)(polylines, props); - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate(prevProps) { - if (this.props.polylines !== prevProps.polylines) { - this.leafletElement.setLatLngs(this.props.polylines); - } - this.setStyleIfChanged(prevProps, this.props); - } - }]); - - return MultiPolyline; - }(_Path3.default); - - MultiPolyline.propTypes = { - polylines: _react.PropTypes.arrayOf(_latlngList2.default).isRequired - }; - exports.default = MultiPolyline; - -/***/ }, -/* 175 */ +/* 172 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -7332,7 +7106,7 @@ return /******/ (function(modules) { // webpackBootstrap var _latlngList2 = _interopRequireDefault(_latlngList); - var _Path2 = __webpack_require__(157); + var _Path2 = __webpack_require__(156); var _Path3 = _interopRequireDefault(_Path2); @@ -7387,7 +7161,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Polygon; /***/ }, -/* 176 */ +/* 173 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -7400,13 +7174,15 @@ return /******/ (function(modules) { // webpackBootstrap var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _react = __webpack_require__(4); + var _leaflet = __webpack_require__(1); var _latlngList = __webpack_require__(5); var _latlngList2 = _interopRequireDefault(_latlngList); - var _Path2 = __webpack_require__(157); + var _Path2 = __webpack_require__(156); var _Path3 = _interopRequireDefault(_Path2); @@ -7456,12 +7232,12 @@ return /******/ (function(modules) { // webpackBootstrap }(_Path3.default); Polyline.propTypes = { - positions: _latlngList2.default.isRequired + positions: _react.PropTypes.oneOfType([_latlngList2.default, _react.PropTypes.arrayOf(_latlngList2.default)]).isRequired }; exports.default = Polyline; /***/ }, -/* 177 */ +/* 174 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -7476,7 +7252,7 @@ return /******/ (function(modules) { // webpackBootstrap var _react = __webpack_require__(4); - var _reactDom = __webpack_require__(178); + var _reactDom = __webpack_require__(175); var _leaflet = __webpack_require__(1); @@ -7603,13 +7379,13 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Popup; /***/ }, -/* 178 */ +/* 175 */ /***/ function(module, exports) { - module.exports = __WEBPACK_EXTERNAL_MODULE_178__; + module.exports = __WEBPACK_EXTERNAL_MODULE_175__; /***/ }, -/* 179 */ +/* 176 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -7628,7 +7404,7 @@ return /******/ (function(modules) { // webpackBootstrap var _bounds2 = _interopRequireDefault(_bounds); - var _Path2 = __webpack_require__(157); + var _Path2 = __webpack_require__(156); var _Path3 = _interopRequireDefault(_Path2); @@ -7683,7 +7459,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Rectangle; /***/ }, -/* 180 */ +/* 177 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -7738,7 +7514,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = ZoomControl; /***/ }, -/* 181 */ +/* 178 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -7811,7 +7587,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = TileLayer; /***/ }, -/* 182 */ +/* 179 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -7875,7 +7651,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = WMSTileLayer; /***/ }, -/* 183 */ +/* 180 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; diff --git a/dist/react-leaflet.min.js b/dist/react-leaflet.min.js index 63ac8e84..15b9b003 100644 --- a/dist/react-leaflet.min.js +++ b/dist/react-leaflet.min.js @@ -1,3 +1,3 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("leaflet"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","leaflet","react-dom"],t):"object"==typeof exports?exports.ReactLeaflet=t(require("react"),require("leaflet"),require("react-dom")):e.ReactLeaflet=t(e.React,e.L,e.ReactDOM)}(this,function(e,t,n){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.setIconDefaultImagePath=t.ZoomControl=t.WMSTileLayer=t.TileLayer=t.ScaleControl=t.Rectangle=t.Popup=t.Polyline=t.Polygon=t.Path=t.MultiPolyline=t.MultiPolygon=t.Marker=t.MapLayer=t.MapControl=t.MapComponent=t.Map=t.LayersControl=t.LayerGroup=t.ImageOverlay=t.GeoJson=t.FeatureGroup=t.CircleMarker=t.Circle=t.CanvasTileLayer=t.BaseTileLayer=t.AttributionControl=t.PropTypes=void 0;var i=n(2),u=o(i),a=n(95),l=r(a),c=n(74),f=o(c),p=n(17),s=o(p),y=n(75),v=o(y),d=n(76),h=o(d),b=n(77),O=o(b),m=n(78),j=o(m),g=n(79),P=o(g),w=n(80),_=o(w),x=n(81),E=o(x),T=n(82),C=o(T),M=n(83),k=o(M),L=n(18),S=o(L),W=n(13),R=o(W),D=n(9),A=o(D),I=n(84),U=o(I),F=n(85),B=o(F),q=n(86),z=o(q),N=n(4),$=o(N),G=n(87),V=o(G),Z=n(88),J=o(Z),Y=n(89),H=o(Y),K=n(90),Q=o(K),X=n(91),ee=o(X),te=n(92),ne=o(te),re=n(93),oe=o(re),ie=n(94),ue=o(ie);t.PropTypes=l,t.AttributionControl=f["default"],t.BaseTileLayer=s["default"],t.CanvasTileLayer=v["default"],t.Circle=h["default"],t.CircleMarker=O["default"],t.FeatureGroup=j["default"],t.GeoJson=P["default"],t.ImageOverlay=_["default"],t.LayerGroup=E["default"],t.LayersControl=C["default"],t.Map=k["default"],t.MapComponent=S["default"],t.MapControl=R["default"],t.MapLayer=A["default"],t.Marker=U["default"],t.MultiPolygon=B["default"],t.MultiPolyline=z["default"],t.Path=$["default"],t.Polygon=V["default"],t.Polyline=J["default"],t.Popup=H["default"],t.Rectangle=Q["default"],t.ScaleControl=ee["default"],t.TileLayer=ne["default"],t.WMSTileLayer=oe["default"],t.ZoomControl=ue["default"];var ae=t.setIconDefaultImagePath=function(e){u["default"].Icon.Default.imagePath=e};ae("//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images")},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(175),l=r(a),c=n(170),f=r(c),p=function(){function e(e,t){for(var n=0;n-1&&e%1==0&&r>=e}var r=9007199254740991;e.exports=n},function(e,t,n){function r(e){return"symbol"==typeof e||o(e)&&a.call(e)==i}var o=n(16),i="[object Symbol]",u=Object.prototype,a=u.toString;e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t["default"]=r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.node),r.PropTypes.node])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t["default"]=r.PropTypes.shape({addLayer:r.PropTypes.func.isRequired,removeLayer:r.PropTypes.func.isRequired})},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1&&e%1==0&&t>e}var r=9007199254740991,o=/^(?:0|[1-9]\d*)$/;e.exports=n},function(e,t){function n(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||r;return e===n}var r=Object.prototype;e.exports=n},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t,n){function r(e){return o(e)&&a.call(e,"callee")&&(!c.call(e,"callee")||l.call(e)==i)}var o=n(68),i="[object Arguments]",u=Object.prototype,a=u.hasOwnProperty,l=u.toString,c=u.propertyIsEnumerable;e.exports=r},function(e,t,n){function r(e){var t=o(e)?l.call(e):"";return t==i||t==u}var o=n(6),i="[object Function]",u="[object GeneratorFunction]",a=Object.prototype,l=a.toString;e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t["default"]=r.PropTypes.oneOf(["topleft","topright","bottomleft","bottomright"])},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++tn)return!1;var r=e.length-1;return n==r?e.pop():u.call(e,n,1),!0}var o=n(21),i=Array.prototype,u=i.splice;e.exports=r},function(e,t,n){function r(e,t){var n=o(e,t);return 0>n?void 0:e[n][1]}var o=n(21);e.exports=r},function(e,t,n){function r(e,t){return o(e,t)>-1}var o=n(21);e.exports=r},function(e,t,n){function r(e,t,n){var r=o(e,t);0>r?e.push([t,n]):e[r][1]=n}var o=n(21);e.exports=r},function(e,t,n){var r=n(110),o=n(135),i=o(r);e.exports=i},function(e,t,n){function r(e,t){t=i(t,e)?[t]:o(t);for(var n=0,r=t.length;null!=e&&r>n;)e=e[u(t[n++])];return n&&n==r?e:void 0}var o=n(56),i=n(22),u=n(14);e.exports=r},function(e,t,n){function r(e,t){return u.call(e,t)||"object"==typeof e&&t in e&&null===o(e)}var o=n(58),i=Object.prototype,u=i.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){return"function"==typeof e?e:null==e?u:"object"==typeof e?a(e)?i(e[0],e[1]):o(e):l(e)}var o=n(116),i=n(117),u=n(168),a=n(3),l=n(176);e.exports=r},function(e,t){function n(e){return function(t){return null==t?void 0:t[e]}}e.exports=n},function(e,t,n){function r(e){return o(e)?e:i(e)}var o=n(3),i=n(162);e.exports=r},function(e,t,n){function r(e,t,n,r,a,l){var c=-1,f=a&u,p=a&i,s=e.length,y=t.length;if(s!=y&&!(f&&y>s))return!1;var v=l.get(e);if(v)return v==t;var d=!0;for(l.set(e,t);++c2?r-2:0);for(var o=2;r>o;o++)n[o-2]=arguments[o];if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(t.length<10||/^[s\W]*$/.test(t))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+t);if(!e){var i=0,u="Warning: "+t.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.error(u);try{throw new Error(u)}catch(a){}}}),e.exports=n}).call(t,n(182))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=n(67),c=r(l),f=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n0&&n(f)?t>1?r(f,t-1,n,u,a):o(a,f):u||(a[a.length]=f)}return a}var o=n(46),i=n(150);e.exports=r},function(e,t,n){var r=n(136),o=r();e.exports=o},function(e,t,n){function r(e,t){return e&&o(e,t,i)}var o=n(109),i=n(7);e.exports=r},function(e,t,n){function r(e,t,n){var r=t(e);return i(e)?r:o(r,n(e))}var o=n(46),i=n(3);e.exports=r},function(e,t){function n(e,t){return t in Object(e)}e.exports=n},function(e,t,n){function r(e,t,n,r,h,O){var m=c(e),j=c(t),g=v,P=v;m||(g=l(e),g=g==y?d:g),j||(P=l(t),P=P==y?d:P);var w=g==d&&!f(e),_=P==d&&!f(t),x=g==P;if(x&&!w)return O||(O=new o),m||p(e)?i(e,t,n,r,h,O):u(e,t,g,n,r,h,O);if(!(h&s)){var E=w&&b.call(e,"__wrapped__"),T=_&&b.call(t,"__wrapped__");if(E||T){var C=E?e.value():e,M=T?t.value():t;return O||(O=new o),n(C,M,r,h,O)}}return x?(O||(O=new o),a(e,t,n,r,h,O)):!1}var o=n(29),i=n(57),u=n(137),a=n(138),l=n(60),c=n(3),f=n(35),p=n(172),s=2,y="[object Arguments]",v="[object Array]",d="[object Object]",h=Object.prototype,b=h.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t,n,r){var l=n.length,c=l,f=!r;if(null==e)return!c;for(e=Object(e);l--;){var p=n[l];if(f&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++l1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(u="function"==typeof u?(i--,u):void 0,a&&o(n[0],n[1],a)&&(u=3>i?void 0:u,i=1),t=Object(t);++re?-1:1;return t*u}var n=e%1;return e===e?n?e-n:e:0}var o=n(179),i=1/0,u=1.7976931348623157e308;e.exports=r},function(e,t,n){function r(e){if("number"==typeof e)return e;if(u(e))return a;if(i(e)){var t=o(e.valueOf)?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=f.test(e);return n||p.test(e)?s(e.slice(2),n?2:8):c.test(e)?a:+e}var o=n(40),i=n(6),u=n(26),a=NaN,l=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,p=/^0o[0-7]+$/i,s=parseInt;e.exports=r},function(e,t,n){function r(e){return o(e,i(e))}var o=n(122),i=n(7);e.exports=r},function(e,t,n){function r(e){var t=++i;return o(e)+t}var o=n(71),i=0;e.exports=r},function(e,t){function n(){c=!1,u.length?l=u.concat(l):f=-1,l.length&&r()}function r(){if(!c){var e=setTimeout(n);c=!0;for(var t=l.length;t;){for(u=l,l=[];++f1)for(var n=1;n-1&&e%1==0&&r>=e}var r=9007199254740991;e.exports=n},function(e,t,n){function r(e){return"symbol"==typeof e||o(e)&&a.call(e)==i}var o=n(15),i="[object Symbol]",u=Object.prototype,a=u.toString;e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n-1&&e%1==0&&t>e}var r=9007199254740991,o=/^(?:0|[1-9]\d*)$/;e.exports=n},function(e,t){function n(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||r;return e===n}var r=Object.prototype;e.exports=n},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t,n){function r(e){return o(e)&&a.call(e,"callee")&&(!l.call(e,"callee")||c.call(e)==i)}var o=n(68),i="[object Arguments]",u=Object.prototype,a=u.hasOwnProperty,c=u.toString,l=u.propertyIsEnumerable;e.exports=r},function(e,t,n){function r(e){var t=o(e)?c.call(e):"";return t==i||t==u}var o=n(6),i="[object Function]",u="[object GeneratorFunction]",a=Object.prototype,c=a.toString;e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t["default"]=r.PropTypes.oneOf(["topleft","topright","bottomleft","bottomright"])},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++tn)return!1;var r=e.length-1;return n==r?e.pop():u.call(e,n,1),!0}var o=n(20),i=Array.prototype,u=i.splice;e.exports=r},function(e,t,n){function r(e,t){var n=o(e,t);return 0>n?void 0:e[n][1]}var o=n(20);e.exports=r},function(e,t,n){function r(e,t){return o(e,t)>-1}var o=n(20);e.exports=r},function(e,t,n){function r(e,t,n){var r=o(e,t);0>r?e.push([t,n]):e[r][1]=n}var o=n(20);e.exports=r},function(e,t,n){var r=n(107),o=n(132),i=o(r);e.exports=i},function(e,t,n){function r(e,t){t=i(t,e)?[t]:o(t);for(var n=0,r=t.length;null!=e&&r>n;)e=e[u(t[n++])];return n&&n==r?e:void 0}var o=n(56),i=n(21),u=n(13);e.exports=r},function(e,t,n){function r(e,t){return u.call(e,t)||"object"==typeof e&&t in e&&null===o(e)}var o=n(58),i=Object.prototype,u=i.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){return"function"==typeof e?e:null==e?u:"object"==typeof e?a(e)?i(e[0],e[1]):o(e):c(e)}var o=n(113),i=n(114),u=n(165),a=n(3),c=n(173);e.exports=r},function(e,t){function n(e){return function(t){return null==t?void 0:t[e]}}e.exports=n},function(e,t,n){function r(e){return o(e)?e:i(e)}var o=n(3),i=n(159);e.exports=r},function(e,t,n){function r(e,t,n,r,a,c){var l=-1,f=a&u,p=a&i,s=e.length,y=t.length;if(s!=y&&!(f&&y>s))return!1;var d=c.get(e);if(d)return d==t;var v=!0;for(c.set(e,t);++l2?r-2:0);for(var o=2;r>o;o++)n[o-2]=arguments[o];if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(t.length<10||/^[s\W]*$/.test(t))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+t);if(!e){var i=0,u="Warning: "+t.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.error(u);try{throw new Error(u)}catch(a){}}}),e.exports=n}).call(t,n(179))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=n(67),l=r(c),f=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n0&&n(f)?t>1?r(f,t-1,n,u,a):o(a,f):u||(a[a.length]=f)}return a}var o=n(46),i=n(147);e.exports=r},function(e,t,n){var r=n(133),o=r();e.exports=o},function(e,t,n){function r(e,t){return e&&o(e,t,i)}var o=n(106),i=n(7);e.exports=r},function(e,t,n){function r(e,t,n){var r=t(e);return i(e)?r:o(r,n(e))}var o=n(46),i=n(3);e.exports=r},function(e,t){function n(e,t){return t in Object(e)}e.exports=n},function(e,t,n){function r(e,t,n,r,h,O){var m=l(e),j=l(t),g=d,P=d;m||(g=c(e),g=g==y?v:g),j||(P=c(t),P=P==y?v:P);var w=g==v&&!f(e),_=P==v&&!f(t),x=g==P;if(x&&!w)return O||(O=new o),m||p(e)?i(e,t,n,r,h,O):u(e,t,g,n,r,h,O);if(!(h&s)){var E=w&&b.call(e,"__wrapped__"),T=_&&b.call(t,"__wrapped__");if(E||T){var C=E?e.value():e,M=T?t.value():t;return O||(O=new o),n(C,M,r,h,O)}}return x?(O||(O=new o),a(e,t,n,r,h,O)):!1}var o=n(29),i=n(57),u=n(134),a=n(135),c=n(60),l=n(3),f=n(35),p=n(169),s=2,y="[object Arguments]",d="[object Array]",v="[object Object]",h=Object.prototype,b=h.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t,n,r){var c=n.length,l=c,f=!r;if(null==e)return!l;for(e=Object(e);c--;){var p=n[c];if(f&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++c1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(u="function"==typeof u?(i--,u):void 0,a&&o(n[0],n[1],a)&&(u=3>i?void 0:u,i=1),t=Object(t);++re?-1:1;return t*u}var n=e%1;return e===e?n?e-n:e:0}var o=n(176),i=1/0,u=1.7976931348623157e308;e.exports=r},function(e,t,n){function r(e){if("number"==typeof e)return e;if(u(e))return a;if(i(e)){var t=o(e.valueOf)?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(c,"");var n=f.test(e);return n||p.test(e)?s(e.slice(2),n?2:8):l.test(e)?a:+e}var o=n(40),i=n(6),u=n(25),a=NaN,c=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,p=/^0o[0-7]+$/i,s=parseInt;e.exports=r},function(e,t,n){function r(e){return o(e,i(e))}var o=n(119),i=n(7);e.exports=r},function(e,t,n){function r(e){var t=++i;return o(e)+t}var o=n(71),i=0;e.exports=r},function(e,t){function n(){l=!1,u.length?c=u.concat(c):f=-1,c.length&&r()}function r(){if(!l){var e=setTimeout(n);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f1)for(var n=1;n= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -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) : subClass.__proto__ = superClass; } - -var CanvasTileLayer = function (_BaseTileLayer) { - _inherits(CanvasTileLayer, _BaseTileLayer); - - function CanvasTileLayer() { - _classCallCheck(this, CanvasTileLayer); - - return _possibleConstructorReturn(this, Object.getPrototypeOf(CanvasTileLayer).apply(this, arguments)); - } - - _createClass(CanvasTileLayer, [{ - key: 'componentWillMount', - value: function componentWillMount() { - _get(Object.getPrototypeOf(CanvasTileLayer.prototype), 'componentWillMount', this).call(this); - var _props = this.props; - var _map = _props.map; - var _lc = _props.layerContainer; - - var props = _objectWithoutProperties(_props, ['map', 'layerContainer']); - - this.leafletElement = _leaflet.tileLayer.canvas(props); - } - }]); - - return CanvasTileLayer; -}(_BaseTileLayer3.default); - -exports.default = CanvasTileLayer; \ No newline at end of file diff --git a/lib/Circle.js b/lib/Circle.js index 8a29aefa..58255054 100644 --- a/lib/Circle.js +++ b/lib/Circle.js @@ -47,11 +47,10 @@ var Circle = function (_Path) { var center = _props.center; var _map = _props.map; var _lc = _props.layerContainer; - var radius = _props.radius; - var props = _objectWithoutProperties(_props, ['center', 'map', 'layerContainer', 'radius']); + var props = _objectWithoutProperties(_props, ['center', 'map', 'layerContainer']); - this.leafletElement = (0, _leaflet.circle)(center, radius, props); + this.leafletElement = (0, _leaflet.circle)(center, props); } }, { key: 'componentDidUpdate', diff --git a/lib/MapControl.js b/lib/MapControl.js index 7051d1e0..74ca4708 100644 --- a/lib/MapControl.js +++ b/lib/MapControl.js @@ -44,7 +44,7 @@ var MapControl = function (_Component) { }, { key: 'componentWillUnmount', value: function componentWillUnmount() { - this.leafletElement.removeFrom(this.props.map); + this.leafletElement.remove(); } }, { key: 'getLeafletElement', diff --git a/lib/MultiPolygon.js b/lib/MultiPolygon.js deleted file mode 100644 index 308e08ca..00000000 --- a/lib/MultiPolygon.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; - -var _react = require('react'); - -var _leaflet = require('leaflet'); - -var _latlngList = require('./types/latlngList'); - -var _latlngList2 = _interopRequireDefault(_latlngList); - -var _Path2 = require('./Path'); - -var _Path3 = _interopRequireDefault(_Path2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _objectWithoutProperties(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; } - -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) : subClass.__proto__ = superClass; } - -var MultiPolygon = function (_Path) { - _inherits(MultiPolygon, _Path); - - function MultiPolygon() { - _classCallCheck(this, MultiPolygon); - - return _possibleConstructorReturn(this, Object.getPrototypeOf(MultiPolygon).apply(this, arguments)); - } - - _createClass(MultiPolygon, [{ - key: 'componentWillMount', - value: function componentWillMount() { - _get(Object.getPrototypeOf(MultiPolygon.prototype), 'componentWillMount', this).call(this); - var _props = this.props; - var _map = _props.map; - var _lc = _props.layerContainer; - var polygons = _props.polygons; - - var props = _objectWithoutProperties(_props, ['map', 'layerContainer', 'polygons']); - - this.leafletElement = (0, _leaflet.multiPolygon)(polygons, props); - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate(prevProps) { - if (this.props.polygons !== prevProps.polygons) { - this.leafletElement.setLatLngs(this.props.polygons); - } - this.setStyleIfChanged(prevProps, this.props); - } - }]); - - return MultiPolygon; -}(_Path3.default); - -MultiPolygon.propTypes = { - polygons: _react.PropTypes.arrayOf(_latlngList2.default).isRequired -}; -exports.default = MultiPolygon; \ No newline at end of file diff --git a/lib/MultiPolyline.js b/lib/MultiPolyline.js deleted file mode 100644 index 27f40227..00000000 --- a/lib/MultiPolyline.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; - -var _react = require('react'); - -var _leaflet = require('leaflet'); - -var _latlngList = require('./types/latlngList'); - -var _latlngList2 = _interopRequireDefault(_latlngList); - -var _Path2 = require('./Path'); - -var _Path3 = _interopRequireDefault(_Path2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _objectWithoutProperties(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; } - -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) : subClass.__proto__ = superClass; } - -var MultiPolyline = function (_Path) { - _inherits(MultiPolyline, _Path); - - function MultiPolyline() { - _classCallCheck(this, MultiPolyline); - - return _possibleConstructorReturn(this, Object.getPrototypeOf(MultiPolyline).apply(this, arguments)); - } - - _createClass(MultiPolyline, [{ - key: 'componentWillMount', - value: function componentWillMount() { - _get(Object.getPrototypeOf(MultiPolyline.prototype), 'componentWillMount', this).call(this); - var _props = this.props; - var _map = _props.map; - var _lc = _props.layerContainer; - var polylines = _props.polylines; - - var props = _objectWithoutProperties(_props, ['map', 'layerContainer', 'polylines']); - - this.leafletElement = (0, _leaflet.multiPolyline)(polylines, props); - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate(prevProps) { - if (this.props.polylines !== prevProps.polylines) { - this.leafletElement.setLatLngs(this.props.polylines); - } - this.setStyleIfChanged(prevProps, this.props); - } - }]); - - return MultiPolyline; -}(_Path3.default); - -MultiPolyline.propTypes = { - polylines: _react.PropTypes.arrayOf(_latlngList2.default).isRequired -}; -exports.default = MultiPolyline; \ No newline at end of file diff --git a/lib/Polyline.js b/lib/Polyline.js index 3774a38e..ce3c9b69 100644 --- a/lib/Polyline.js +++ b/lib/Polyline.js @@ -8,6 +8,8 @@ var _createClass = function () { function defineProperties(target, props) { for var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; +var _react = require('react'); + var _leaflet = require('leaflet'); var _latlngList = require('./types/latlngList'); @@ -64,6 +66,6 @@ var Polyline = function (_Path) { }(_Path3.default); Polyline.propTypes = { - positions: _latlngList2.default.isRequired + positions: _react.PropTypes.oneOfType([_latlngList2.default, _react.PropTypes.arrayOf(_latlngList2.default)]).isRequired }; exports.default = Polyline; \ No newline at end of file diff --git a/lib/index.js b/lib/index.js index 0aac2b4c..a9dbc039 100644 --- a/lib/index.js +++ b/lib/index.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.setIconDefaultImagePath = exports.ZoomControl = exports.WMSTileLayer = exports.TileLayer = exports.ScaleControl = exports.Rectangle = exports.Popup = exports.Polyline = exports.Polygon = exports.Path = exports.MultiPolyline = exports.MultiPolygon = exports.Marker = exports.MapLayer = exports.MapControl = exports.MapComponent = exports.Map = exports.LayersControl = exports.LayerGroup = exports.ImageOverlay = exports.GeoJson = exports.FeatureGroup = exports.CircleMarker = exports.Circle = exports.CanvasTileLayer = exports.BaseTileLayer = exports.AttributionControl = exports.PropTypes = undefined; +exports.setIconDefaultImagePath = exports.ZoomControl = exports.WMSTileLayer = exports.TileLayer = exports.ScaleControl = exports.Rectangle = exports.Popup = exports.Polyline = exports.Polygon = exports.Path = exports.Marker = exports.MapLayer = exports.MapControl = exports.MapComponent = exports.Map = exports.LayersControl = exports.LayerGroup = exports.ImageOverlay = exports.GeoJson = exports.FeatureGroup = exports.CircleMarker = exports.Circle = exports.BaseTileLayer = exports.AttributionControl = exports.PropTypes = undefined; var _leaflet = require('leaflet'); @@ -21,10 +21,6 @@ var _BaseTileLayer2 = require('./BaseTileLayer'); var _BaseTileLayer3 = _interopRequireDefault(_BaseTileLayer2); -var _CanvasTileLayer2 = require('./CanvasTileLayer'); - -var _CanvasTileLayer3 = _interopRequireDefault(_CanvasTileLayer2); - var _Circle2 = require('./Circle'); var _Circle3 = _interopRequireDefault(_Circle2); @@ -73,14 +69,6 @@ var _Marker2 = require('./Marker'); var _Marker3 = _interopRequireDefault(_Marker2); -var _MultiPolygon2 = require('./MultiPolygon'); - -var _MultiPolygon3 = _interopRequireDefault(_MultiPolygon2); - -var _MultiPolyline2 = require('./MultiPolyline'); - -var _MultiPolyline3 = _interopRequireDefault(_MultiPolyline2); - var _Path2 = require('./Path'); var _Path3 = _interopRequireDefault(_Path2); @@ -124,7 +112,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de exports.PropTypes = _PropTypes; exports.AttributionControl = _AttributionControl3.default; exports.BaseTileLayer = _BaseTileLayer3.default; -exports.CanvasTileLayer = _CanvasTileLayer3.default; exports.Circle = _Circle3.default; exports.CircleMarker = _CircleMarker3.default; exports.FeatureGroup = _FeatureGroup3.default; @@ -137,8 +124,6 @@ exports.MapComponent = _MapComponent3.default; exports.MapControl = _MapControl3.default; exports.MapLayer = _MapLayer3.default; exports.Marker = _Marker3.default; -exports.MultiPolygon = _MultiPolygon3.default; -exports.MultiPolyline = _MultiPolyline3.default; exports.Path = _Path3.default; exports.Polygon = _Polygon3.default; exports.Polyline = _Polyline3.default; diff --git a/src/CanvasTileLayer.js b/src/CanvasTileLayer.js deleted file mode 100644 index 7a1f5aab..00000000 --- a/src/CanvasTileLayer.js +++ /dev/null @@ -1,11 +0,0 @@ -import { tileLayer } from 'leaflet'; - -import BaseTileLayer from './BaseTileLayer'; - -export default class CanvasTileLayer extends BaseTileLayer { - componentWillMount() { - super.componentWillMount(); - const { map: _map, layerContainer: _lc, ...props } = this.props; - this.leafletElement = tileLayer.canvas(props); - } -} diff --git a/src/Circle.js b/src/Circle.js index 31e13506..19441dcd 100644 --- a/src/Circle.js +++ b/src/Circle.js @@ -12,8 +12,8 @@ export default class Circle extends Path { componentWillMount() { super.componentWillMount(); - const { center, map: _map, layerContainer: _lc, radius, ...props } = this.props; - this.leafletElement = circle(center, radius, props); + const { center, map: _map, layerContainer: _lc, ...props } = this.props; + this.leafletElement = circle(center, props); } componentDidUpdate(prevProps) { diff --git a/src/MapControl.js b/src/MapControl.js index 6e16ea88..f97cb048 100644 --- a/src/MapControl.js +++ b/src/MapControl.js @@ -19,7 +19,7 @@ export default class MapControl extends Component { } componentWillUnmount() { - this.leafletElement.removeFrom(this.props.map); + this.leafletElement.remove(); } getLeafletElement() { diff --git a/src/MultiPolygon.js b/src/MultiPolygon.js deleted file mode 100644 index 114036e6..00000000 --- a/src/MultiPolygon.js +++ /dev/null @@ -1,24 +0,0 @@ -import { PropTypes } from 'react'; -import { multiPolygon } from 'leaflet'; - -import latlngListType from './types/latlngList'; -import Path from './Path'; - -export default class MultiPolygon extends Path { - static propTypes = { - polygons: PropTypes.arrayOf(latlngListType).isRequired, - }; - - componentWillMount() { - super.componentWillMount(); - const { map: _map, layerContainer: _lc, polygons, ...props } = this.props; - this.leafletElement = multiPolygon(polygons, props); - } - - componentDidUpdate(prevProps) { - if (this.props.polygons !== prevProps.polygons) { - this.leafletElement.setLatLngs(this.props.polygons); - } - this.setStyleIfChanged(prevProps, this.props); - } -} diff --git a/src/MultiPolyline.js b/src/MultiPolyline.js deleted file mode 100644 index a1b14e36..00000000 --- a/src/MultiPolyline.js +++ /dev/null @@ -1,24 +0,0 @@ -import { PropTypes } from 'react'; -import { multiPolyline } from 'leaflet'; - -import latlngListType from './types/latlngList'; -import Path from './Path'; - -export default class MultiPolyline extends Path { - static propTypes = { - polylines: PropTypes.arrayOf(latlngListType).isRequired, - }; - - componentWillMount() { - super.componentWillMount(); - const {map: _map, layerContainer: _lc, polylines, ...props} = this.props; - this.leafletElement = multiPolyline(polylines, props); - } - - componentDidUpdate(prevProps) { - if (this.props.polylines !== prevProps.polylines) { - this.leafletElement.setLatLngs(this.props.polylines); - } - this.setStyleIfChanged(prevProps, this.props); - } -} diff --git a/src/Polyline.js b/src/Polyline.js index 83c3ac6b..221ec5e6 100644 --- a/src/Polyline.js +++ b/src/Polyline.js @@ -1,3 +1,4 @@ +import { PropTypes } from 'react'; import { polyline } from 'leaflet'; import latlngListType from './types/latlngList'; @@ -5,7 +6,10 @@ import Path from './Path'; export default class Polyline extends Path { static propTypes = { - positions: latlngListType.isRequired, + positions: PropTypes.oneOfType([ + latlngListType, + PropTypes.arrayOf(latlngListType), + ]).isRequired, }; componentWillMount() { diff --git a/src/index.js b/src/index.js index 8b7e4dcc..ed1ee161 100644 --- a/src/index.js +++ b/src/index.js @@ -4,7 +4,6 @@ export * as PropTypes from './types'; export AttributionControl from './AttributionControl'; export BaseTileLayer from './BaseTileLayer'; -export CanvasTileLayer from './CanvasTileLayer'; export Circle from './Circle'; export CircleMarker from './CircleMarker'; export FeatureGroup from './FeatureGroup'; @@ -17,8 +16,6 @@ export MapComponent from './MapComponent'; export MapControl from './MapControl'; export MapLayer from './MapLayer'; export Marker from './Marker'; -export MultiPolygon from './MultiPolygon'; -export MultiPolyline from './MultiPolyline'; export Path from './Path'; export Polygon from './Polygon'; export Polyline from './Polyline';