diff --git a/.eslintrc.json b/.eslintrc.json
index d2011ef0..d77188c6 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -6,7 +6,7 @@
"extends": ["standard", "standard-react"],
"parser": "babel-eslint",
"parserOptions": {
- "ecmaVersion": 6,
+ "ecmaVersion": 7,
"jsx": true,
"sourceType": "module"
},
@@ -15,6 +15,7 @@
],
"rules": {
"comma-dangle": [1, "always-multiline"],
+ "jsx-quotes": [2, "prefer-single"],
"no-duplicate-imports": [0],
"no-unused-vars": [2, { "varsIgnorePattern": "^_" }],
"space-infix-ops": [0]
diff --git a/.flowconfig b/.flowconfig
index 7b1024df..28c732f5 100644
--- a/.flowconfig
+++ b/.flowconfig
@@ -1,9 +1,12 @@
[ignore]
+.*/node_modules/fbjs/.*
[include]
+./node_modules/react
[libs]
[options]
+esproposal.class_instance_fields=enable
esproposal.class_static_fields=enable
unsafe.enable_getters_and_setters=true
diff --git a/.travis.yml b/.travis.yml
index 9ecbf0be..04da2f07 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,3 +2,6 @@ sudo: false
language: node_js
node_js:
- 6
+cache:
+ directories:
+ - node_modules
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1c1ab671..692039c7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,65 @@
+## v1.0.0 (2016-11-14)
+
+Changes from v0.12.3:
+
+- [BREAKING] Updated Leaflet dependency requirement to v1.0.0.
+- [BREAKING] Renamed `GeoJson` to `GeoJSON` to match Leaflet's change.
+- [BREAKING] Removed `MultiPolygon` and `MultiPolyline`, now supported by `Polygon` and `Polyline` respectively.
+- [BREAKING] Removed `CanvasTileLayer`, replaced by `GridLayer`. See [Leaflet's documentation](http://leafletjs.com/reference-1.0.0.html#gridlayer).
+- [BREAKING] Removed `getLeafletElement()` method in `MapComponent` and `MapControl`, deprecated since v0.12.0.
+- [BREAKING] Removed `setIconDefaultImagePath()` helper, set `Leaflet.Icon.Default.imagePath` directly using Leaflet if you need.
+- `Leaflet.Icon.Default.imagePath` is no longer set by default, as per Leaflet v1.0.0 it should be auto-detected.
+- The `Map` component no longer creates an unique ID for its container if none is provided.
+- Added `useFlyTo: bool` property to `Map` to use `flyTo` instead of `setView` and `flyToBounds` instead of `fitBounds` when changing the map's view or bounds ([PR #148](https://github.com/PaulLeCam/react-leaflet/pull/192) by *jgimbel*).
+- Added `GridLayer`.
+- Added `Pane` component introduced in Leaflet v1. ([PR #227](https://github.com/PaulLeCam/react-leaflet/pull/227) by *rjdestigter*).
+- Added `Tooltip` component introduced in Leaflet v1. See [Leaflet's documentation](http://leafletjs.com/reference-1.0.0.html#tooltip) for usage.
+- Added support for IE9 and IE10 ([PR #235](https://github.com/PaulLeCam/react-leaflet/pull/235) by *dettier*).
+- Updated `WMSTileLayer` to support dynamic `url` and parameters.
+- [internal] Fixed Flow errors ([PR #251](https://github.com/PaulLeCam/react-leaflet/pull/251) by *joeyrosztoczy*).
+- [internal] Updated `MapLayer` to only create divs when necessary.
+- [internal] Removed `BaseTileLayer`, replaced by `GridLayer`.
+- [internal] Removed `bower.json` file.
+
+## v1.0.0-rc.3 (2016-11-04)
+
+Updated `WMSTileLayer` to support dynamic `url` property.
+
+## v1.0.0-rc.2 (2016-10-20)
+
+- Added `Pane` component introduced in Leaflet v1. ([PR #227](https://github.com/PaulLeCam/react-leaflet/pull/227) by *rjdestigter*).
+- Added support for IE9 and IE10 ([PR #235](https://github.com/PaulLeCam/react-leaflet/pull/235) by *dettier*).
+- Updated `WMSTileLayer` to support dynamic parameters.
+
+## v1.0.0-rc.1 (2016-09-28)
+
+- [BREAKING] Removed `setIconDefaultImagePath()` helper, set `Leaflet.Icon.Default.imagePath` directly using Leaflet if you need.
+- Updated Leaflet dependency requirement to v1.0.0.
+- `Leaflet.Icon.Default.imagePath` is no longer set by default, as per Leaflet v1.0.0 it should be auto-detected.
+
+## v1.0.0-beta.3 (2016-08-26)
+
+Fixed `Tooltip` removal handling.
+
+## v1.0.0-beta.2 (2016-08-20)
+
+- Added `Tooltip` component introduced in Leaflet v1.0.0-rc.2. See [Leaflet's documentation](http://leafletjs.com/reference-1.0.0.html#tooltip) for usage.
+- Updated Leaflet dependency to v1.0.0-rc.3.
+- Reverted basing components on `React.PureComponent`, they are now based on `React.Component`.
+
+## v1.0.0-beta.1 (2016-07-30)
+
+- [BREAKING] Renamed `GeoJson` to `GeoJSON` to match Leaflet's change.
+- [BREAKING] Removed `MultiPolygon` and `MultiPolyline`, now supported by `Polygon` and `Polyline` respectively.
+- [BREAKING] Removed `CanvasTileLayer`, replaced by `GridLayer`. See [Leaflet's documentation](http://leafletjs.com/reference-1.0.0.html#gridlayer).
+- [BREAKING] Removed `getLeafletElement()` method in `MapComponent` and `MapControl`, deprecated since v0.12.0.
+- Removed `BaseTileLayer`, replaced by `GridLayer`.
+- Removed `bower.json` file.
+- The `Map` component no longer creates an unique ID for its container if none is provided.
+- All components now extend from `React.PureComponent` instead of `React.Component`, as such React v15.3.0+ is now required.
+- Added `GridLayer`.
+- Added `useFlyTo: bool` property to `Map` to use `flyTo` instead of `setView` and `flyToBounds` instead of `fitBounds` when changing the map's view or bounds ([PR #148](https://github.com/PaulLeCam/react-leaflet/pull/192) by *jgimbel*).
+
## v0.12.3 (2016-09-21)
Fixed events bindind in UMD build.
@@ -20,7 +82,7 @@ Fixed events bindind in UMD build.
## v0.11.7 (2016-06-14)
-- Fixed removing layers from `LayersControl`.
+Fixed removing layers from `LayersControl`.
## v0.11.6 (2016-06-09)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 0aee9678..1ddd3a11 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -18,7 +18,7 @@ However, please **do not** send pull requests to add features that are not suppo
## Features requests
This library aims only to support the features provided by Leaflet. If any of these features is not implemented yet, please submit a feature request to add it.
-If you are looking for implementations of features provided by plugins, they will not be provided by this library. Please read the [creating custom components](#creating-custom-components) section of the documentation to see how to implement plugins in your own code.
+If you are looking for implementations of features provided by plugins, they will not be provided by this library. Please read the [extending](https://github.com/PaulLeCam/react-leaflet/blob/next/docs/Extending.md) section of the documentation to see how to implement plugins in your own code.
## Other issues
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md
index 5877b7b4..1f6d14c6 100644
--- a/ISSUE_TEMPLATE.md
+++ b/ISSUE_TEMPLATE.md
@@ -1,15 +1,19 @@
Please make sure to check the following boxes before submitting an issue. Thanks!
- [ ] Check that all peer dependencies are installed: React, ReactDOM and Leaflet.
-- [ ] Check that you are using a supported version of React (v0.14 or v15).
-- [ ] Check that you are using a supported version of Leaflet (v.0.7)
+- [ ] Check that you are using a supported version of React and ReactDOM (v15.0.0+).
+- [ ] Check that you are using the supported version of Leaflet (v.1.0.0) and its corresponding CSS file is loaded.
- [ ] Make sure you have followed the [quick start guide](http://leafletjs.com/examples/quick-start.html) for Leaflet.
-- [ ] Make sure you have fully read the [documentation](https://github.com/PaulLeCam/react-leaflet/blob/master/README.md) and that you understand the [technical considerations](https://github.com/PaulLeCam/react-leaflet/blob/master/README.md#technical-considerations).
+- [ ] Make sure you have fully read the [documentation](https://github.com/PaulLeCam/react-leaflet/blob/next/docs/README.md) and that you understand the [technical considerations](https://github.com/PaulLeCam/react-leaflet/blob/next/docs/How%20it%20works.md#limitations).
### Expected behavior
+Please describe.
+
### Actual behavior
+Please describe.
+
### Steps to reproduce
Please provide the simplest example possible to reproduce the issue, based on [this jsfiddle](https://jsfiddle.net/paul_lecam/q2v7t59h/).
diff --git a/README.md b/README.md
index 3b74a7e3..d64c0496 100644
--- a/README.md
+++ b/README.md
@@ -1,21 +1,25 @@
-# React-Leaflet [![Build Status](https://img.shields.io/travis/PaulLeCam/react-leaflet/master.svg)](https://travis-ci.org/PaulLeCam/react-leaflet) [![npm version](https://img.shields.io/npm/v/react-leaflet.svg)](https://www.npmjs.com/package/react-leaflet)
+# React-Leaflet [![Build Status](https://img.shields.io/travis/PaulLeCam/react-leaflet/next.svg)](https://travis-ci.org/PaulLeCam/react-leaflet) [![npm version](https://img.shields.io/npm/v/react-leaflet.svg)](https://www.npmjs.com/package/react-leaflet)
React components for Leaflet maps.
-## [Documentation](https://github.com/PaulLeCam/react-leaflet/blob/master/docs/README.md)
+## Disclaimer
-- [Getting started](https://github.com/PaulLeCam/react-leaflet/blob/master/docs/Getting%20started.md)
-- [How it works](https://github.com/PaulLeCam/react-leaflet/blob/master/docs/How%20it%20works.md)
-- [API](https://github.com/PaulLeCam/react-leaflet/blob/master/docs/API.md)
-- [Extending](https://github.com/PaulLeCam/react-leaflet/blob/master/docs/Extending.md)
+This is a development branch in preparation for a future v1 release. Code can be unstable and APIs can be changed between releases without other warnings than the [CHANGELOG](CHANGELOG.md). Please try it and report any issue you have upgrading, but be aware it should not be considered stable in any way.
+
+## [Documentation](docs/README.md)
+
+- [Getting started](docs/Getting%20started.md)
+- [How it works](docs/How%20it%20works.md)
+- [API](docs/API.md)
+- [Extending](docs/Extending.md)
## Changes
-See the [CHANGELOG](https://github.com/PaulLeCam/react-leaflet/blob/master/CHANGELOG.md) and [UPGRADING](https://github.com/PaulLeCam/react-leaflet/blob/master/UPGRADING.md) files.
+See the [CHANGELOG](CHANGELOG.md) and [UPGRADING](UPGRADING.md) files.
## Contributing
-See [CONTRIBUTING](https://github.com/PaulLeCam/react-leaflet/blob/master/CONTRIBUTING.md) file.
+See [CONTRIBUTING](CONTRIBUTING.md) file.
## Support
@@ -24,4 +28,4 @@ Please **do not** use GitHub issues for support, but instead post your questions
## License
MIT
-See [LICENSE](https://github.com/PaulLeCam/react-leaflet/blob/master/LICENSE) file.
+See [LICENSE](LICENSE) file.
diff --git a/UPGRADING.md b/UPGRADING.md
index 8c724ed2..675f26f9 100644
--- a/UPGRADING.md
+++ b/UPGRADING.md
@@ -1,5 +1,20 @@
# Upgrading
+## v1.0
+
+React-Leaflet v1 requires Leaflet v1.0.0 and therefore contains breaking changes from v0.12, based on Leaflet v0.7.
+Make sure to update your Leaflet dependency to v1.0.0, as well as its CSS file.
+
+The following list includes breaking changes upgrading to React-Leaflet v1.0 from v0.12, it may not be exhaustive:
+
+- Renamed `GeoJson` to `GeoJSON` to match Leaflet's change.
+- Removed `MultiPolygon` and `MultiPolyline`, now supported by `Polygon` and `Polyline` respectively.
+- Removed `CanvasTileLayer`, replaced by `GridLayer`. See [Leaflet's documentation](http://leafletjs.com/reference-1.0.0.html#gridlayer).
+- Removed `getLeafletElement()` method in `MapComponent` and `MapControl`, deprecated since v0.12.0.
+- Removed `setIconDefaultImagePath()` helper, set `Leaflet.Icon.Default.imagePath` directly using Leaflet if you need.
+
+Read the [changelog](CHANGELOG.md) for more details about these changes.
+
## v0.12.0
**Drop support for IE <= 10** as explained in [this comment](https://github.com/PaulLeCam/react-leaflet/issues/215#issuecomment-243996907).
diff --git a/__tests__/Map.js b/__tests__/Map.js
index 2e0139d4..3c5719c4 100644
--- a/__tests__/Map.js
+++ b/__tests__/Map.js
@@ -16,7 +16,7 @@ describe('Map', () => {
const component =
const html = renderToStaticMarkup(component)
- expect(html).toBe('
')
+ expect(html).toBe('')
})
it('sets center and zoom props', () => {
@@ -35,7 +35,7 @@ describe('Map', () => {
const bounds = [[0, 0], [2, 2]]
const map = renderIntoDocument()
const mapBounds = map.leafletElement.getBounds()
- expect(mapBounds).toBe(bounds)
+ expect(mapBounds).toEqual(bounds)
})
it('updates center and zoom props', () => {
@@ -101,8 +101,8 @@ describe('Map', () => {
const component = renderIntoDocument()
const mapLeaflet = component.getLeafletMap()
- expect(mapLeaflet.getBounds()).toBe(firstBounds)
+ expect(mapLeaflet.getBounds()).toEqual(firstBounds)
component.updatePosition()
- expect(mapLeaflet.getBounds()).toBe(secondBounds)
+ expect(mapLeaflet.getBounds()).toEqual(secondBounds)
})
})
diff --git a/bower.json b/bower.json
deleted file mode 100644
index 030b41e8..00000000
--- a/bower.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "react-leaflet",
- "version": "0.12.2",
- "homepage": "https://github.com/PaulLeCam/react-leaflet",
- "authors": [
- "Paul Le Cam "
- ],
- "description": "React components for Leaflet maps",
- "main": "lib/index.js",
- "dependencies": {
- "lodash": "~4.0.0",
- "leaflet": "~0.7.0",
- "react": "~0.14.0 || ~15.0.0"
- },
- "keywords": [
- "react-component",
- "react",
- "leaflet",
- "map"
- ],
- "moduleType": [
- "node"
- ],
- "license": "MIT",
- "ignore": [
- "node_modules",
- "bower_components"
- ]
-}
diff --git a/dist/react-leaflet.js b/dist/react-leaflet.js
index b8d4f071..f04e992c 100644
--- a/dist/react-leaflet.js
+++ b/dist/react-leaflet.js
@@ -1,13 +1,13 @@
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory(require("leaflet"), require("react"), require("react-dom"));
+ module.exports = factory(require("react"), require("leaflet"), require("react-dom"));
else if(typeof define === 'function' && define.amd)
- define(["leaflet", "react", "react-dom"], factory);
+ define(["react", "leaflet", "react-dom"], factory);
else if(typeof exports === 'object')
- exports["ReactLeaflet"] = factory(require("leaflet"), require("react"), require("react-dom"));
+ exports["ReactLeaflet"] = factory(require("react"), require("leaflet"), 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_137__) {
+ root["ReactLeaflet"] = factory(root["React"], root["L"], root["ReactDOM"]);
+})(this, function(__WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_143__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@@ -57,13 +57,9 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
exports.__esModule = 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.ZoomControl = exports.WMSTileLayer = exports.Tooltip = exports.TileLayer = exports.ScaleControl = exports.Rectangle = exports.Popup = exports.Polyline = exports.Polygon = exports.Path = exports.Pane = exports.Marker = exports.MapLayer = exports.MapControl = exports.MapComponent = exports.Map = exports.LayersControl = exports.LayerGroup = exports.ImageOverlay = exports.GridLayer = exports.GeoJSON = exports.FeatureGroup = exports.CircleMarker = exports.Circle = exports.AttributionControl = exports.PropTypes = undefined;
- var _leaflet = __webpack_require__(1);
-
- var _leaflet2 = _interopRequireDefault(_leaflet);
-
- var _types = __webpack_require__(2);
+ var _types = __webpack_require__(1);
var _PropTypes = _interopRequireWildcard(_types);
@@ -71,47 +67,43 @@ return /******/ (function(modules) { // webpackBootstrap
var _AttributionControl3 = _interopRequireDefault(_AttributionControl2);
- var _BaseTileLayer2 = __webpack_require__(14);
-
- var _BaseTileLayer3 = _interopRequireDefault(_BaseTileLayer2);
-
- var _CanvasTileLayer2 = __webpack_require__(89);
-
- var _CanvasTileLayer3 = _interopRequireDefault(_CanvasTileLayer2);
-
- var _Circle2 = __webpack_require__(90);
+ var _Circle2 = __webpack_require__(13);
var _Circle3 = _interopRequireDefault(_Circle2);
- var _CircleMarker2 = __webpack_require__(111);
+ var _CircleMarker2 = __webpack_require__(121);
var _CircleMarker3 = _interopRequireDefault(_CircleMarker2);
- var _FeatureGroup2 = __webpack_require__(112);
+ var _FeatureGroup2 = __webpack_require__(122);
var _FeatureGroup3 = _interopRequireDefault(_FeatureGroup2);
- var _GeoJson2 = __webpack_require__(113);
+ var _GeoJSON2 = __webpack_require__(123);
+
+ var _GeoJSON3 = _interopRequireDefault(_GeoJSON2);
- var _GeoJson3 = _interopRequireDefault(_GeoJson2);
+ var _GridLayer2 = __webpack_require__(124);
- var _ImageOverlay2 = __webpack_require__(114);
+ var _GridLayer3 = _interopRequireDefault(_GridLayer2);
+
+ var _ImageOverlay2 = __webpack_require__(125);
var _ImageOverlay3 = _interopRequireDefault(_ImageOverlay2);
- var _LayerGroup2 = __webpack_require__(115);
+ var _LayerGroup2 = __webpack_require__(126);
var _LayerGroup3 = _interopRequireDefault(_LayerGroup2);
- var _LayersControl2 = __webpack_require__(116);
+ var _LayersControl2 = __webpack_require__(127);
var _LayersControl3 = _interopRequireDefault(_LayersControl2);
- var _Map2 = __webpack_require__(117);
+ var _Map2 = __webpack_require__(128);
var _Map3 = _interopRequireDefault(_Map2);
- var _MapComponent2 = __webpack_require__(16);
+ var _MapComponent2 = __webpack_require__(83);
var _MapComponent3 = _interopRequireDefault(_MapComponent2);
@@ -119,70 +111,69 @@ return /******/ (function(modules) { // webpackBootstrap
var _MapControl3 = _interopRequireDefault(_MapControl2);
- var _MapLayer2 = __webpack_require__(15);
+ var _MapLayer2 = __webpack_require__(82);
var _MapLayer3 = _interopRequireDefault(_MapLayer2);
- var _Marker2 = __webpack_require__(131);
+ var _Marker2 = __webpack_require__(135);
var _Marker3 = _interopRequireDefault(_Marker2);
- var _MultiPolygon2 = __webpack_require__(132);
-
- var _MultiPolygon3 = _interopRequireDefault(_MultiPolygon2);
+ var _Pane2 = __webpack_require__(136);
- var _MultiPolyline2 = __webpack_require__(133);
+ var _Pane3 = _interopRequireDefault(_Pane2);
- var _MultiPolyline3 = _interopRequireDefault(_MultiPolyline2);
-
- var _Path2 = __webpack_require__(91);
+ var _Path2 = __webpack_require__(14);
var _Path3 = _interopRequireDefault(_Path2);
- var _Polygon2 = __webpack_require__(134);
+ var _Polygon2 = __webpack_require__(140);
var _Polygon3 = _interopRequireDefault(_Polygon2);
- var _Polyline2 = __webpack_require__(135);
+ var _Polyline2 = __webpack_require__(141);
var _Polyline3 = _interopRequireDefault(_Polyline2);
- var _Popup2 = __webpack_require__(136);
+ var _Popup2 = __webpack_require__(142);
var _Popup3 = _interopRequireDefault(_Popup2);
- var _Rectangle2 = __webpack_require__(138);
+ var _Rectangle2 = __webpack_require__(144);
var _Rectangle3 = _interopRequireDefault(_Rectangle2);
- var _ScaleControl2 = __webpack_require__(139);
+ var _ScaleControl2 = __webpack_require__(145);
var _ScaleControl3 = _interopRequireDefault(_ScaleControl2);
- var _TileLayer2 = __webpack_require__(140);
+ var _TileLayer2 = __webpack_require__(146);
var _TileLayer3 = _interopRequireDefault(_TileLayer2);
- var _WMSTileLayer2 = __webpack_require__(141);
+ var _Tooltip2 = __webpack_require__(147);
+
+ var _Tooltip3 = _interopRequireDefault(_Tooltip2);
+
+ var _WMSTileLayer2 = __webpack_require__(148);
var _WMSTileLayer3 = _interopRequireDefault(_WMSTileLayer2);
- var _ZoomControl2 = __webpack_require__(142);
+ var _ZoomControl2 = __webpack_require__(149);
var _ZoomControl3 = _interopRequireDefault(_ZoomControl2);
- 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 _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; } }
+
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;
- exports.GeoJson = _GeoJson3.default;
+ exports.GeoJSON = _GeoJSON3.default;
+ exports.GridLayer = _GridLayer3.default;
exports.ImageOverlay = _ImageOverlay3.default;
exports.LayerGroup = _LayerGroup3.default;
exports.LayersControl = _LayersControl3.default;
@@ -191,8 +182,7 @@ 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.Pane = _Pane3.default;
exports.Path = _Path3.default;
exports.Polygon = _Polygon3.default;
exports.Polyline = _Polyline3.default;
@@ -200,22 +190,12 @@ return /******/ (function(modules) { // webpackBootstrap
exports.Rectangle = _Rectangle3.default;
exports.ScaleControl = _ScaleControl3.default;
exports.TileLayer = _TileLayer3.default;
+ exports.Tooltip = _Tooltip3.default;
exports.WMSTileLayer = _WMSTileLayer3.default;
exports.ZoomControl = _ZoomControl3.default;
- var setIconDefaultImagePath = exports.setIconDefaultImagePath = function setIconDefaultImagePath(path) {
- _leaflet2.default.Icon.Default.imagePath = path;
- };
-
- setIconDefaultImagePath('//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images');
/***/ },
/* 1 */
-/***/ function(module, exports) {
-
- module.exports = __WEBPACK_EXTERNAL_MODULE_1__;
-
-/***/ },
-/* 2 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
@@ -223,7 +203,7 @@ return /******/ (function(modules) { // webpackBootstrap
exports.__esModule = true;
exports.map = exports.layerContainer = exports.latlngList = exports.latlng = exports.controlPosition = exports.children = exports.bounds = undefined;
- var _bounds2 = __webpack_require__(3);
+ var _bounds2 = __webpack_require__(2);
var _bounds3 = _interopRequireDefault(_bounds2);
@@ -262,16 +242,16 @@ return /******/ (function(modules) { // webpackBootstrap
exports.map = _map3.default;
/***/ },
-/* 3 */
+/* 2 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _react = __webpack_require__(4);
+ var _react = __webpack_require__(3);
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
var _latlngList = __webpack_require__(5);
@@ -281,6 +261,12 @@ return /******/ (function(modules) { // webpackBootstrap
exports.default = _react.PropTypes.oneOfType([_react.PropTypes.instanceOf(_leaflet.LatLngBounds), _latlngList2.default]);
+/***/ },
+/* 3 */
+/***/ function(module, exports) {
+
+ module.exports = __WEBPACK_EXTERNAL_MODULE_3__;
+
/***/ },
/* 4 */
/***/ function(module, exports) {
@@ -295,7 +281,7 @@ return /******/ (function(modules) { // webpackBootstrap
exports.__esModule = true;
- var _react = __webpack_require__(4);
+ var _react = __webpack_require__(3);
var _latlng = __webpack_require__(6);
@@ -313,7 +299,7 @@ return /******/ (function(modules) { // webpackBootstrap
exports.__esModule = true;
- var _react = __webpack_require__(4);
+ var _react = __webpack_require__(3);
exports.default = _react.PropTypes.oneOfType([
// [Number, Number]
@@ -337,7 +323,7 @@ return /******/ (function(modules) { // webpackBootstrap
exports.__esModule = true;
- var _react = __webpack_require__(4);
+ var _react = __webpack_require__(3);
exports.default = _react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.node), _react.PropTypes.node]);
@@ -349,7 +335,7 @@ return /******/ (function(modules) { // webpackBootstrap
exports.__esModule = true;
- var _react = __webpack_require__(4);
+ var _react = __webpack_require__(3);
exports.default = _react.PropTypes.oneOf(['topleft', 'topright', 'bottomleft', 'bottomright']);
@@ -361,7 +347,7 @@ return /******/ (function(modules) { // webpackBootstrap
exports.__esModule = true;
- var _react = __webpack_require__(4);
+ var _react = __webpack_require__(3);
exports.default = _react.PropTypes.shape({
addLayer: _react.PropTypes.func.isRequired,
@@ -376,9 +362,9 @@ return /******/ (function(modules) { // webpackBootstrap
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
- var _react = __webpack_require__(4);
+ var _react = __webpack_require__(3);
exports.default = _react.PropTypes.instanceOf(_leaflet.Map);
@@ -390,9 +376,13 @@ return /******/ (function(modules) { // webpackBootstrap
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
+
+ var _react = __webpack_require__(3);
- var _react = __webpack_require__(4);
+ var _controlPosition = __webpack_require__(8);
+
+ var _controlPosition2 = _interopRequireDefault(_controlPosition);
var _MapControl2 = __webpack_require__(12);
@@ -425,6 +415,7 @@ return /******/ (function(modules) { // webpackBootstrap
}(_MapControl3.default);
AttributionControl.propTypes = {
+ position: _controlPosition2.default,
prefix: _react.PropTypes.string
};
exports.default = AttributionControl;
@@ -437,11 +428,9 @@ return /******/ (function(modules) { // webpackBootstrap
exports.__esModule = true;
- var _react = __webpack_require__(4);
-
- var _warning = __webpack_require__(13);
+ var _react = __webpack_require__(3);
- var _warning2 = _interopRequireDefault(_warning);
+ var _react2 = _interopRequireDefault(_react);
var _controlPosition = __webpack_require__(8);
@@ -481,12 +470,7 @@ return /******/ (function(modules) { // webpackBootstrap
};
MapControl.prototype.componentWillUnmount = function componentWillUnmount() {
- this.leafletElement.removeFrom(this.context.map);
- };
-
- MapControl.prototype.getLeafletElement = function getLeafletElement() {
- true ? (0, _warning2.default)(false, 'The "getLeafletElement()" method is deprecated and will be removed in the next version, simply use the "leafletElement" property instead.') : void 0;
- return this.leafletElement;
+ this.leafletElement.remove();
};
MapControl.prototype.render = function render() {
@@ -508,156 +492,103 @@ return /******/ (function(modules) { // webpackBootstrap
/* 13 */
/***/ function(module, exports, __webpack_require__) {
- /**
- * 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 (true) {
- 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) {}
- }
- };
- }
+ exports.__esModule = true;
- module.exports = warning;
+ var _leaflet = __webpack_require__(4);
+ var _react = __webpack_require__(3);
-/***/ },
-/* 14 */
-/***/ function(module, exports, __webpack_require__) {
+ var _children = __webpack_require__(7);
- 'use strict';
+ var _children2 = _interopRequireDefault(_children);
- exports.__esModule = true;
+ var _latlng = __webpack_require__(6);
- var _react = __webpack_require__(4);
+ var _latlng2 = _interopRequireDefault(_latlng);
- var _MapLayer2 = __webpack_require__(15);
+ var _Path2 = __webpack_require__(14);
- var _MapLayer3 = _interopRequireDefault(_MapLayer2);
+ var _Path3 = _interopRequireDefault(_Path2);
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 _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) : _defaults(subClass, superClass); }
- var BaseTileLayer = function (_MapLayer) {
- _inherits(BaseTileLayer, _MapLayer);
+ var Circle = function (_Path) {
+ _inherits(Circle, _Path);
- function BaseTileLayer() {
- _classCallCheck(this, BaseTileLayer);
+ function Circle() {
+ _classCallCheck(this, Circle);
- return _possibleConstructorReturn(this, _MapLayer.apply(this, arguments));
+ return _possibleConstructorReturn(this, _Path.apply(this, arguments));
}
- BaseTileLayer.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
+ Circle.prototype.componentWillMount = function componentWillMount() {
+ _Path.prototype.componentWillMount.call(this);
+
var _props = this.props,
- opacity = _props.opacity,
- zIndex = _props.zIndex;
+ center = _props.center,
+ radius = _props.radius,
+ props = _objectWithoutProperties(_props, ['center', 'radius']);
- if (opacity !== prevProps.opacity) {
- this.leafletElement.setOpacity(opacity);
- }
- if (zIndex !== prevProps.zIndex) {
- this.leafletElement.setZIndex(zIndex);
- }
+ this.leafletElement = (0, _leaflet.circle)(center, radius, this.getOptions(props));
};
- BaseTileLayer.prototype.render = function render() {
- return null;
+ Circle.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
+ if (this.props.center !== prevProps.center) {
+ this.leafletElement.setLatLng(this.props.center);
+ }
+ if (this.props.radius !== prevProps.radius) {
+ this.leafletElement.setRadius(this.props.radius);
+ }
+ this.setStyleIfChanged(prevProps, this.props);
};
- return BaseTileLayer;
- }(_MapLayer3.default);
+ return Circle;
+ }(_Path3.default);
- BaseTileLayer.propTypes = {
- opacity: _react.PropTypes.number,
- zIndex: _react.PropTypes.number
+ Circle.propTypes = {
+ center: _latlng2.default.isRequired,
+ children: _children2.default,
+ radius: _react.PropTypes.number.isRequired
};
- exports.default = BaseTileLayer;
+ exports.default = Circle;
/***/ },
-/* 15 */
+/* 14 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = 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 _react = __webpack_require__(4);
-
- var _react2 = _interopRequireDefault(_react);
+ var _pick2 = __webpack_require__(15);
- var _children = __webpack_require__(7);
+ var _pick3 = _interopRequireDefault(_pick2);
- var _children2 = _interopRequireDefault(_children);
+ var _isEqual2 = __webpack_require__(33);
- var _layerContainer = __webpack_require__(9);
+ var _isEqual3 = _interopRequireDefault(_isEqual2);
- var _layerContainer2 = _interopRequireDefault(_layerContainer);
+ var _react = __webpack_require__(3);
- var _map = __webpack_require__(10);
+ var _children = __webpack_require__(7);
- var _map2 = _interopRequireDefault(_map);
+ var _children2 = _interopRequireDefault(_children);
- var _MapComponent2 = __webpack_require__(16);
+ var _MapLayer2 = __webpack_require__(82);
- var _MapComponent3 = _interopRequireDefault(_MapComponent2);
+ var _MapLayer3 = _interopRequireDefault(_MapLayer2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -669,374 +600,323 @@ return /******/ (function(modules) { // webpackBootstrap
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 MapLayer = function (_MapComponent) {
- _inherits(MapLayer, _MapComponent);
+ var OPTIONS = ['stroke', 'color', 'weight', 'opacity', 'fill', 'fillColor', 'fillOpacity', 'fillRule', 'dashArray', 'lineCap', 'lineJoin', 'clickable', 'pointerEvents', 'className'];
- function MapLayer() {
- _classCallCheck(this, MapLayer);
+ var Path = function (_MapLayer) {
+ _inherits(Path, _MapLayer);
- return _possibleConstructorReturn(this, _MapComponent.apply(this, arguments));
+ function Path() {
+ _classCallCheck(this, Path);
+
+ return _possibleConstructorReturn(this, _MapLayer.apply(this, arguments));
}
- MapLayer.prototype.componentDidMount = function componentDidMount() {
- _MapComponent.prototype.componentDidMount.call(this);
- this.layerContainer.addLayer(this.leafletElement);
+ Path.prototype.getChildContext = function getChildContext() {
+ return {
+ popupContainer: this.leafletElement
+ };
};
- MapLayer.prototype.componentWillUnmount = function componentWillUnmount() {
- _MapComponent.prototype.componentWillUnmount.call(this);
- this.layerContainer.removeLayer(this.leafletElement);
+ Path.prototype.getPathOptions = function getPathOptions(props) {
+ return (0, _pick3.default)(props, OPTIONS);
};
- MapLayer.prototype.render = function render() {
- return _react2.default.createElement(
- 'div',
- { style: { display: 'none' } },
- this.props.children
- );
+ Path.prototype.setStyle = function setStyle() {
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+ this.leafletElement.setStyle(options);
};
- _createClass(MapLayer, [{
- key: 'layerContainer',
- get: function get() {
- return this.context.layerContainer || this.context.map;
+ Path.prototype.setStyleIfChanged = function setStyleIfChanged(fromProps, toProps) {
+ var nextStyle = this.getPathOptions(toProps);
+ if (!(0, _isEqual3.default)(nextStyle, this.getPathOptions(fromProps))) {
+ this.setStyle(nextStyle);
}
- }]);
+ };
- return MapLayer;
- }(_MapComponent3.default);
+ return Path;
+ }(_MapLayer3.default);
- MapLayer.propTypes = {
- children: _children2.default
- };
- MapLayer.contextTypes = {
- layerContainer: _layerContainer2.default,
- map: _map2.default
+ Path.childContextTypes = {
+ children: _children2.default,
+ popupContainer: _react.PropTypes.object
};
- exports.default = MapLayer;
+ exports.default = Path;
/***/ },
-/* 16 */
+/* 15 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
-
- exports.__esModule = true;
+ var arrayMap = __webpack_require__(16),
+ basePick = __webpack_require__(17),
+ flatRest = __webpack_require__(32),
+ toKey = __webpack_require__(30);
- var _reduce2 = __webpack_require__(17);
+ /**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var pick = flatRest(function(object, paths) {
+ return object == null ? {} : basePick(object, arrayMap(paths, toKey));
+ });
- var _reduce3 = _interopRequireDefault(_reduce2);
+ module.exports = pick;
- var _keys2 = __webpack_require__(23);
- var _keys3 = _interopRequireDefault(_keys2);
+/***/ },
+/* 16 */
+/***/ function(module, exports) {
- var _forEach2 = __webpack_require__(33);
-
- var _forEach3 = _interopRequireDefault(_forEach2);
-
- var _clone2 = __webpack_require__(35);
-
- var _clone3 = _interopRequireDefault(_clone2);
-
- var _react = __webpack_require__(4);
-
- var _warning = __webpack_require__(13);
-
- var _warning2 = _interopRequireDefault(_warning);
-
- 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 EVENTS_RE = /^on(.+)$/i;
-
- var MapComponent = function (_Component) {
- _inherits(MapComponent, _Component);
-
- function MapComponent(props, context) {
- _classCallCheck(this, MapComponent);
-
- var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
+ /**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ result = Array(length);
- _this._leafletEvents = {};
- return _this;
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
}
+ return result;
+ }
- MapComponent.prototype.componentWillMount = function componentWillMount() {
- this._leafletEvents = this.extractLeafletEvents(this.props);
- };
-
- MapComponent.prototype.componentDidMount = function componentDidMount() {
- this.bindLeafletEvents(this._leafletEvents, {});
- };
-
- MapComponent.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- var next = this.extractLeafletEvents(nextProps);
- this._leafletEvents = this.bindLeafletEvents(next, this._leafletEvents);
- };
-
- MapComponent.prototype.componentWillUnmount = function componentWillUnmount() {
- var el = this.leafletElement;
- if (!el) return;
-
- (0, _forEach3.default)(this._leafletEvents, function (cb, ev) {
- el.off(ev, cb);
- });
- };
-
- MapComponent.prototype.getLeafletElement = function getLeafletElement() {
- true ? (0, _warning2.default)(false, 'The "getLeafletElement()" method is deprecated and will be removed in the next version, simply use the "leafletElement" property instead.') : void 0;
- return this.leafletElement;
- };
-
- MapComponent.prototype.extractLeafletEvents = function extractLeafletEvents(props) {
- return (0, _reduce3.default)((0, _keys3.default)(props), function (res, prop) {
- if (EVENTS_RE.test(prop)) {
- var key = prop.replace(EVENTS_RE, function (match, p) {
- return p.toLowerCase();
- });
- res[key] = props[prop];
- }
- return res;
- }, {});
- };
-
- MapComponent.prototype.bindLeafletEvents = function bindLeafletEvents() {
- var next = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- var prev = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- var el = this.leafletElement;
- if (!el || !el.on) return {};
-
- var diff = (0, _clone3.default)(prev);
- (0, _forEach3.default)(prev, function (cb, ev) {
- if (!next[ev] || cb !== next[ev]) {
- delete diff[ev];
- el.off(ev, cb);
- }
- });
-
- (0, _forEach3.default)(next, function (cb, ev) {
- if (!prev[ev] || cb !== prev[ev]) {
- diff[ev] = cb;
- el.on(ev, cb);
- }
- });
-
- return diff;
- };
-
- MapComponent.prototype.fireLeafletEvent = function fireLeafletEvent(type, data) {
- var el = this.leafletElement;
- if (el) el.fire(type, data);
- };
-
- return MapComponent;
- }(_react.Component);
+ module.exports = arrayMap;
- exports.default = MapComponent;
/***/ },
/* 17 */
/***/ function(module, exports, __webpack_require__) {
- var arrayReduce = __webpack_require__(18),
- baseEach = __webpack_require__(19),
- baseIteratee = __webpack_require__(30),
- baseReduce = __webpack_require__(31),
- isArray = __webpack_require__(32);
+ var basePickBy = __webpack_require__(18),
+ hasIn = __webpack_require__(31);
/**
- * Reduces `collection` to a value which is the accumulated result of running
- * each element in `collection` thru `iteratee`, where each successive
- * invocation is supplied the return value of the previous. If `accumulator`
- * is not given, the first element of `collection` is used as the initial
- * value. The iteratee is invoked with four arguments:
- * (accumulator, value, index|key, collection).
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.reduce`, `_.reduceRight`, and `_.transform`.
- *
- * The guarded methods are:
- * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
- * and `sortBy`
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @returns {*} Returns the accumulated value.
- * @see _.reduceRight
- * @example
- *
- * _.reduce([1, 2], function(sum, n) {
- * return sum + n;
- * }, 0);
- * // => 3
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
*
- * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
- * (result[value] || (result[value] = [])).push(key);
- * return result;
- * }, {});
- * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Object} Returns the new object.
*/
- function reduce(collection, iteratee, accumulator) {
- var func = isArray(collection) ? arrayReduce : baseReduce,
- initAccum = arguments.length < 3;
-
- return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);
+ function basePick(object, paths) {
+ object = Object(object);
+ return basePickBy(object, paths, function(value, path) {
+ return hasIn(object, path);
+ });
}
- module.exports = reduce;
+ module.exports = basePick;
/***/ },
/* 18 */
-/***/ function(module, exports) {
+/***/ function(module, exports, __webpack_require__) {
+
+ var baseGet = __webpack_require__(19),
+ baseSet = __webpack_require__(20);
/**
- * A specialized version of `_.reduce` for arrays without support for
- * iteratee shorthands.
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
*
* @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initAccum] Specify using the first element of `array` as
- * the initial value.
- * @returns {*} Returns the accumulated value.
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @param {Function} predicate The function invoked per property.
+ * @returns {Object} Returns the new object.
*/
- function arrayReduce(array, iteratee, accumulator, initAccum) {
+ function basePickBy(object, paths, predicate) {
var index = -1,
- length = array ? array.length : 0;
+ length = paths.length,
+ result = {};
- if (initAccum && length) {
- accumulator = array[++index];
- }
while (++index < length) {
- accumulator = iteratee(accumulator, array[index], index, array);
+ var path = paths[index],
+ value = baseGet(object, path);
+
+ if (predicate(value, path)) {
+ baseSet(result, path, value);
+ }
}
- return accumulator;
+ return result;
}
- module.exports = arrayReduce;
+ module.exports = basePickBy;
/***/ },
/* 19 */
-/***/ function(module, exports, __webpack_require__) {
-
- var baseForOwn = __webpack_require__(20),
- createBaseEach = __webpack_require__(25);
+/***/ function(module, exports) {
/**
- * The base implementation of `_.forEach` without support for iteratee shorthands.
+ * Gets the value at `key` of `object`.
*
* @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
*/
- var baseEach = createBaseEach(baseForOwn);
+ function getValue(object, key) {
+ return object == null ? undefined : object[key];
+ }
- module.exports = baseEach;
+ module.exports = getValue;
/***/ },
/* 20 */
/***/ function(module, exports, __webpack_require__) {
- var baseFor = __webpack_require__(21),
- keys = __webpack_require__(23);
+ var assignValue = __webpack_require__(21),
+ castPath = __webpack_require__(26),
+ isIndex = __webpack_require__(27),
+ isKey = __webpack_require__(28),
+ isObject = __webpack_require__(29),
+ toKey = __webpack_require__(30);
/**
- * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ * The base implementation of `_.set`.
*
* @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize path creation.
* @returns {Object} Returns `object`.
*/
- function baseForOwn(object, iteratee) {
- return object && baseFor(object, iteratee, keys);
+ function baseSet(object, path, value, customizer) {
+ if (!isObject(object)) {
+ return object;
+ }
+ path = isKey(path, object) ? [path] : castPath(path);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = toKey(path[index]),
+ newValue = value;
+
+ if (index != lastIndex) {
+ var objValue = nested[key];
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
+ if (newValue === undefined) {
+ newValue = isObject(objValue)
+ ? objValue
+ : (isIndex(path[index + 1]) ? [] : {});
+ }
+ }
+ assignValue(nested, key, newValue);
+ nested = nested[key];
+ }
+ return object;
}
- module.exports = baseForOwn;
+ module.exports = baseSet;
/***/ },
/* 21 */
/***/ function(module, exports, __webpack_require__) {
- var createBaseFor = __webpack_require__(22);
+ var baseAssignValue = __webpack_require__(22),
+ eq = __webpack_require__(25);
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * The base implementation of `baseForOwn` which iterates over `object`
- * properties returned by `keysFunc` and invokes `iteratee` for each property.
- * Iteratee functions may exit iteration early by explicitly returning `false`.
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
*
* @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
*/
- var baseFor = createBaseFor();
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+ }
- module.exports = baseFor;
+ module.exports = assignValue;
/***/ },
/* 22 */
-/***/ function(module, exports) {
+/***/ function(module, exports, __webpack_require__) {
+
+ var defineProperty = __webpack_require__(23);
/**
- * Creates a base function for methods like `_.forIn` and `_.forOwn`.
- *
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
* @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
*/
- function createBaseFor(fromRight) {
- return function(object, iteratee, keysFunc) {
- var index = -1,
- iterable = Object(object),
- props = keysFunc(object),
- length = props.length;
-
- while (length--) {
- var key = props[fromRight ? length : ++index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
- }
- return object;
- };
+ function baseAssignValue(object, key, value) {
+ if (key == '__proto__' && defineProperty) {
+ defineProperty(object, key, {
+ 'configurable': true,
+ 'enumerable': true,
+ 'value': value,
+ 'writable': true
+ });
+ } else {
+ object[key] = value;
+ }
}
- module.exports = createBaseFor;
+ module.exports = baseAssignValue;
/***/ },
/* 23 */
/***/ function(module, exports, __webpack_require__) {
- var overArg = __webpack_require__(24);
+ var getNative = __webpack_require__(24);
- /* Built-in method references for those with the same name as other `lodash` methods. */
- var nativeKeys = overArg(Object.keys, Object);
+ var defineProperty = (function() {
+ try {
+ var func = getNative(Object, 'defineProperty');
+ func({}, '', {});
+ return func;
+ } catch (e) {}
+ }());
- module.exports = nativeKeys;
+ module.exports = defineProperty;
/***/ },
@@ -1044,149 +924,147 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ function(module, exports) {
/**
- * Creates a unary function that invokes `func` with its argument transformed.
+ * Gets the value at `key` of `object`.
*
* @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
*/
- function overArg(func, transform) {
- return function(arg) {
- return func(transform(arg));
- };
+ function getValue(object, key) {
+ return object == null ? undefined : object[key];
}
- module.exports = overArg;
+ module.exports = getValue;
/***/ },
/* 25 */
-/***/ function(module, exports, __webpack_require__) {
-
- var isArrayLike = __webpack_require__(26);
+/***/ function(module, exports) {
/**
- * Creates a `baseEach` or `baseEachRight` function.
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
*
- * @private
- * @param {Function} eachFunc The function to iterate over a collection.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
*/
- function createBaseEach(eachFunc, fromRight) {
- return function(collection, iteratee) {
- if (collection == null) {
- return collection;
- }
- if (!isArrayLike(collection)) {
- return eachFunc(collection, iteratee);
- }
- var length = collection.length,
- index = fromRight ? length : -1,
- iterable = Object(collection);
-
- while ((fromRight ? index-- : ++index < length)) {
- if (iteratee(iterable[index], index, iterable) === false) {
- break;
- }
- }
- return collection;
- };
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
}
- module.exports = createBaseEach;
+ module.exports = eq;
/***/ },
/* 26 */
-/***/ function(module, exports, __webpack_require__) {
-
- var isFunction = __webpack_require__(27),
- isLength = __webpack_require__(29);
+/***/ function(module, exports) {
/**
- * Checks if `value` is array-like. A value is considered array-like if it's
- * not a function and has a `value.length` that's an integer greater than or
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ * This method returns the first argument it receives.
*
* @static
+ * @since 0.1.0
* @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
* @example
*
- * _.isArrayLike([1, 2, 3]);
- * // => true
- *
- * _.isArrayLike(document.body.children);
- * // => true
+ * var object = { 'a': 1 };
*
- * _.isArrayLike('abc');
+ * console.log(_.identity(object) === object);
* // => true
- *
- * _.isArrayLike(_.noop);
- * // => false
*/
- function isArrayLike(value) {
- return value != null && isLength(value.length) && !isFunction(value);
+ function identity(value) {
+ return value;
}
- module.exports = isArrayLike;
+ module.exports = identity;
/***/ },
/* 27 */
-/***/ function(module, exports, __webpack_require__) {
-
- var isObject = __webpack_require__(28);
+/***/ function(module, exports) {
- /** `Object#toString` result references. */
- var funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- proxyTag = '[object Proxy]';
+ /** Used as references for various `Number` constants. */
+ var MAX_SAFE_INTEGER = 9007199254740991;
- /** Used for built-in method references. */
- var objectProto = Object.prototype;
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
- var objectToString = objectProto.toString;
+ function isIndex(value, length) {
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+ }
+
+ module.exports = isIndex;
+
+
+/***/ },
+/* 28 */
+/***/ function(module, exports) {
/**
- * Checks if `value` is classified as a `Function` object.
+ * This method returns the first argument it receives.
*
* @static
- * @memberOf _
* @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
* @example
*
- * _.isFunction(_);
- * // => true
+ * var object = { 'a': 1 };
*
- * _.isFunction(/abc/);
- * // => false
+ * console.log(_.identity(object) === object);
+ * // => true
*/
- function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 9 which returns 'object' for typed array and other constructors.
- var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag || tag == proxyTag;
+ function identity(value) {
+ return value;
}
- module.exports = isFunction;
+ module.exports = identity;
/***/ },
-/* 28 */
+/* 29 */
/***/ function(module, exports) {
/**
@@ -1223,48 +1101,53 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 29 */
+/* 30 */
/***/ function(module, exports) {
- /** Used as references for various `Number` constants. */
- var MAX_SAFE_INTEGER = 9007199254740991;
-
/**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This method is loosely based on
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ * This method returns the first argument it receives.
*
* @static
+ * @since 0.1.0
* @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
* @example
*
- * _.isLength(3);
- * // => true
- *
- * _.isLength(Number.MIN_VALUE);
- * // => false
+ * var object = { 'a': 1 };
*
- * _.isLength(Infinity);
- * // => false
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
+
+ module.exports = identity;
+
+
+/***/ },
+/* 31 */
+/***/ function(module, exports) {
+
+ /**
+ * The base implementation of `_.hasIn` without support for deep paths.
*
- * _.isLength('3');
- * // => false
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
- function isLength(value) {
- return typeof value == 'number' &&
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ function baseHasIn(object, key) {
+ return object != null && key in Object(object);
}
- module.exports = isLength;
+ module.exports = baseHasIn;
/***/ },
-/* 30 */
+/* 32 */
/***/ function(module, exports) {
/**
@@ -1291,361 +1174,217 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 31 */
-/***/ function(module, exports) {
-
- /**
- * The base implementation of `_.reduce` and `_.reduceRight`, without support
- * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} accumulator The initial value.
- * @param {boolean} initAccum Specify using the first or last element of
- * `collection` as the initial value.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @returns {*} Returns the accumulated value.
- */
- function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
- eachFunc(collection, function(value, index, collection) {
- accumulator = initAccum
- ? (initAccum = false, value)
- : iteratee(accumulator, value, index, collection);
- });
- return accumulator;
- }
-
- module.exports = baseReduce;
-
+/* 33 */
+/***/ function(module, exports, __webpack_require__) {
-/***/ },
-/* 32 */
-/***/ function(module, exports) {
+ var baseIsEqual = __webpack_require__(34);
/**
- * Checks if `value` is classified as an `Array` object.
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are **not** supported.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(document.body.children);
- * // => false
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
*
- * _.isArray('abc');
- * // => false
+ * _.isEqual(object, other);
+ * // => true
*
- * _.isArray(_.noop);
+ * object === other;
* // => false
*/
- var isArray = Array.isArray;
+ function isEqual(value, other) {
+ return baseIsEqual(value, other);
+ }
- module.exports = isArray;
+ module.exports = isEqual;
/***/ },
-/* 33 */
+/* 34 */
/***/ function(module, exports, __webpack_require__) {
- var arrayEach = __webpack_require__(34),
- baseEach = __webpack_require__(19),
- baseIteratee = __webpack_require__(30),
- isArray = __webpack_require__(32);
+ var baseIsEqualDeep = __webpack_require__(35),
+ isObject = __webpack_require__(29),
+ isObjectLike = __webpack_require__(81);
/**
- * Iterates over elements of `collection` and invokes `iteratee` for each element.
- * The iteratee is invoked with three arguments: (value, index|key, collection).
- * Iteratee functions may exit iteration early by explicitly returning `false`.
- *
- * **Note:** As with other "Collections" methods, objects with a "length"
- * property are iterated like arrays. To avoid this behavior use `_.forIn`
- * or `_.forOwn` for object iteration.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @alias each
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- * @see _.forEachRight
- * @example
- *
- * _.forEach([1, 2], function(value) {
- * console.log(value);
- * });
- * // => Logs `1` then `2`.
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
*
- * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
- * console.log(key);
- * });
- * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
- function forEach(collection, iteratee) {
- var func = isArray(collection) ? arrayEach : baseEach;
- return func(collection, baseIteratee(iteratee, 3));
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}
- module.exports = forEach;
+ module.exports = baseIsEqual;
/***/ },
-/* 34 */
-/***/ function(module, exports) {
+/* 35 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var Stack = __webpack_require__(36),
+ equalArrays = __webpack_require__(67),
+ equalByTag = __webpack_require__(73),
+ equalObjects = __webpack_require__(74),
+ getTag = __webpack_require__(77),
+ isArray = __webpack_require__(78),
+ isBuffer = __webpack_require__(79),
+ isTypedArray = __webpack_require__(80);
+
+ /** Used to compose bitmasks for value comparisons. */
+ var COMPARE_PARTIAL_FLAG = 1;
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ objectTag = '[object Object]';
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * A specialized version of `_.forEach` for arrays without support for
- * iteratee shorthands.
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
*
* @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
- function arrayEach(array, iteratee) {
- var index = -1,
- length = array ? array.length : 0;
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
- while (++index < length) {
- if (iteratee(array[index], index, array) === false) {
- break;
+ if (!objIsArr) {
+ objTag = getTag(object);
+ objTag = objTag == argsTag ? objectTag : objTag;
+ }
+ if (!othIsArr) {
+ othTag = getTag(other);
+ othTag = othTag == argsTag ? objectTag : othTag;
+ }
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && isBuffer(object)) {
+ if (!isBuffer(other)) {
+ return false;
}
+ objIsArr = true;
+ objIsObj = false;
}
- return array;
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+ }
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new Stack);
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
}
- module.exports = arrayEach;
+ module.exports = baseIsEqualDeep;
/***/ },
-/* 35 */
+/* 36 */
/***/ function(module, exports, __webpack_require__) {
- var baseClone = __webpack_require__(36);
+ var ListCache = __webpack_require__(37),
+ stackClear = __webpack_require__(44),
+ stackDelete = __webpack_require__(45),
+ stackGet = __webpack_require__(46),
+ stackHas = __webpack_require__(47),
+ stackSet = __webpack_require__(48);
/**
- * Creates a shallow clone of `value`.
- *
- * **Note:** This method is loosely based on the
- * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
- * and supports cloning arrays, array buffers, booleans, date objects, maps,
- * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
- * arrays. The own enumerable properties of `arguments` objects are cloned
- * as plain objects. An empty object is returned for uncloneable values such
- * as error objects, functions, DOM nodes, and WeakMaps.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to clone.
- * @returns {*} Returns the cloned value.
- * @see _.cloneDeep
- * @example
- *
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ * Creates a stack cache object to store key-value pairs.
*
- * var shallow = _.clone(objects);
- * console.log(shallow[0] === objects[0]);
- * // => true
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
*/
- function clone(value) {
- return baseClone(value, false, true);
+ function Stack(entries) {
+ var data = this.__data__ = new ListCache(entries);
+ this.size = data.size;
}
- module.exports = clone;
+ // Add methods to `Stack`.
+ Stack.prototype.clear = stackClear;
+ Stack.prototype['delete'] = stackDelete;
+ Stack.prototype.get = stackGet;
+ Stack.prototype.has = stackHas;
+ Stack.prototype.set = stackSet;
+
+ module.exports = Stack;
/***/ },
-/* 36 */
+/* 37 */
/***/ function(module, exports, __webpack_require__) {
- var Stack = __webpack_require__(37),
- arrayEach = __webpack_require__(34),
- assignValue = __webpack_require__(70),
- baseAssign = __webpack_require__(73),
- cloneBuffer = __webpack_require__(75),
- copyArray = __webpack_require__(77),
- copySymbols = __webpack_require__(78),
- getAllKeys = __webpack_require__(80),
- getTag = __webpack_require__(81),
- initCloneArray = __webpack_require__(82),
- initCloneByTag = __webpack_require__(83),
- initCloneObject = __webpack_require__(84),
- isArray = __webpack_require__(32),
- isBuffer = __webpack_require__(88),
- isObject = __webpack_require__(28),
- keys = __webpack_require__(23);
-
- /** `Object#toString` result references. */
- var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- objectTag = '[object Object]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- symbolTag = '[object Symbol]',
- weakMapTag = '[object WeakMap]';
-
- var arrayBufferTag = '[object ArrayBuffer]',
- dataViewTag = '[object DataView]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
-
- /** Used to identify `toStringTag` values supported by `_.clone`. */
- var cloneableTags = {};
- cloneableTags[argsTag] = cloneableTags[arrayTag] =
- cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
- cloneableTags[boolTag] = cloneableTags[dateTag] =
- cloneableTags[float32Tag] = cloneableTags[float64Tag] =
- cloneableTags[int8Tag] = cloneableTags[int16Tag] =
- cloneableTags[int32Tag] = cloneableTags[mapTag] =
- cloneableTags[numberTag] = cloneableTags[objectTag] =
- cloneableTags[regexpTag] = cloneableTags[setTag] =
- cloneableTags[stringTag] = cloneableTags[symbolTag] =
- cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
- cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
- cloneableTags[errorTag] = cloneableTags[funcTag] =
- cloneableTags[weakMapTag] = false;
-
- /**
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
- * traversed objects.
- *
- * @private
- * @param {*} value The value to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @param {boolean} [isFull] Specify a clone including symbols.
- * @param {Function} [customizer] The function to customize cloning.
- * @param {string} [key] The key of `value`.
- * @param {Object} [object] The parent object of `value`.
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
- * @returns {*} Returns the cloned value.
- */
- function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
- var result;
- if (customizer) {
- result = object ? customizer(value, key, object, stack) : customizer(value);
- }
- if (result !== undefined) {
- return result;
- }
- if (!isObject(value)) {
- return value;
- }
- var isArr = isArray(value);
- if (isArr) {
- result = initCloneArray(value);
- if (!isDeep) {
- return copyArray(value, result);
- }
- } else {
- var tag = getTag(value),
- isFunc = tag == funcTag || tag == genTag;
-
- if (isBuffer(value)) {
- return cloneBuffer(value, isDeep);
- }
- if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
- result = initCloneObject(isFunc ? {} : value);
- if (!isDeep) {
- return copySymbols(value, baseAssign(result, value));
- }
- } else {
- if (!cloneableTags[tag]) {
- return object ? value : {};
- }
- result = initCloneByTag(value, tag, baseClone, isDeep);
- }
- }
- // Check for circular references and return its corresponding clone.
- stack || (stack = new Stack);
- var stacked = stack.get(value);
- if (stacked) {
- return stacked;
- }
- stack.set(value, result);
-
- var props = isArr ? undefined : (isFull ? getAllKeys : keys)(value);
- arrayEach(props || value, function(subValue, key) {
- if (props) {
- key = subValue;
- subValue = value[key];
- }
- // Recursively populate clone (susceptible to call stack limits).
- assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
- });
- return result;
- }
-
- module.exports = baseClone;
-
-
-/***/ },
-/* 37 */
-/***/ function(module, exports, __webpack_require__) {
-
- var ListCache = __webpack_require__(38),
- stackClear = __webpack_require__(46),
- stackDelete = __webpack_require__(47),
- stackGet = __webpack_require__(48),
- stackHas = __webpack_require__(49),
- stackSet = __webpack_require__(50);
-
- /**
- * Creates a stack cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function Stack(entries) {
- var data = this.__data__ = new ListCache(entries);
- this.size = data.size;
- }
-
- // Add methods to `Stack`.
- Stack.prototype.clear = stackClear;
- Stack.prototype['delete'] = stackDelete;
- Stack.prototype.get = stackGet;
- Stack.prototype.has = stackHas;
- Stack.prototype.set = stackSet;
-
- module.exports = Stack;
-
-
-/***/ },
-/* 38 */
-/***/ function(module, exports, __webpack_require__) {
-
- var listCacheClear = __webpack_require__(39),
- listCacheDelete = __webpack_require__(40),
- listCacheGet = __webpack_require__(43),
- listCacheHas = __webpack_require__(44),
- listCacheSet = __webpack_require__(45);
+ var listCacheClear = __webpack_require__(38),
+ listCacheDelete = __webpack_require__(39),
+ listCacheGet = __webpack_require__(41),
+ listCacheHas = __webpack_require__(42),
+ listCacheSet = __webpack_require__(43);
/**
* Creates an list cache object.
@@ -1656,7 +1395,7 @@ return /******/ (function(modules) { // webpackBootstrap
*/
function ListCache(entries) {
var index = -1,
- length = entries ? entries.length : 0;
+ length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
@@ -1676,7 +1415,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 39 */
+/* 38 */
/***/ function(module, exports) {
/**
@@ -1695,10 +1434,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 40 */
+/* 39 */
/***/ function(module, exports, __webpack_require__) {
- var assocIndexOf = __webpack_require__(41);
+ var assocIndexOf = __webpack_require__(40);
/** Used for built-in method references. */
var arrayProto = Array.prototype;
@@ -1736,10 +1475,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 41 */
+/* 40 */
/***/ function(module, exports, __webpack_require__) {
- var eq = __webpack_require__(42);
+ var eq = __webpack_require__(25);
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
@@ -1763,53 +1502,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 42 */
-/***/ function(module, exports) {
-
- /**
- * Performs a
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
- function eq(value, other) {
- return value === other || (value !== value && other !== other);
- }
-
- module.exports = eq;
-
-
-/***/ },
-/* 43 */
+/* 41 */
/***/ function(module, exports, __webpack_require__) {
- var assocIndexOf = __webpack_require__(41);
+ var assocIndexOf = __webpack_require__(40);
/**
* Gets the list cache value for `key`.
@@ -1831,10 +1527,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 44 */
+/* 42 */
/***/ function(module, exports, __webpack_require__) {
- var assocIndexOf = __webpack_require__(41);
+ var assocIndexOf = __webpack_require__(40);
/**
* Checks if a list cache value for `key` exists.
@@ -1853,10 +1549,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 45 */
+/* 43 */
/***/ function(module, exports, __webpack_require__) {
- var assocIndexOf = __webpack_require__(41);
+ var assocIndexOf = __webpack_require__(40);
/**
* Sets the list cache `key` to `value`.
@@ -1885,10 +1581,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 46 */
+/* 44 */
/***/ function(module, exports, __webpack_require__) {
- var ListCache = __webpack_require__(38);
+ var ListCache = __webpack_require__(37);
/**
* Removes all key-value entries from the stack.
@@ -1906,7 +1602,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 47 */
+/* 45 */
/***/ function(module, exports) {
/**
@@ -1930,7 +1626,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 48 */
+/* 46 */
/***/ function(module, exports) {
/**
@@ -1950,7 +1646,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 49 */
+/* 47 */
/***/ function(module, exports) {
/**
@@ -1970,12 +1666,12 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 50 */
+/* 48 */
/***/ function(module, exports, __webpack_require__) {
- var ListCache = __webpack_require__(38),
- Map = __webpack_require__(51),
- MapCache = __webpack_require__(55);
+ var ListCache = __webpack_require__(37),
+ Map = __webpack_require__(49),
+ MapCache = __webpack_require__(52);
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
@@ -2010,11 +1706,11 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 51 */
+/* 49 */
/***/ function(module, exports, __webpack_require__) {
- var getNative = __webpack_require__(52),
- root = __webpack_require__(53);
+ var getNative = __webpack_require__(24),
+ root = __webpack_require__(50);
/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map');
@@ -2023,29 +1719,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 52 */
-/***/ function(module, exports) {
-
- /**
- * Gets the value at `key` of `object`.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
- */
- function getValue(object, key) {
- return object == null ? undefined : object[key];
- }
-
- module.exports = getValue;
-
-
-/***/ },
-/* 53 */
+/* 50 */
/***/ function(module, exports, __webpack_require__) {
- var freeGlobal = __webpack_require__(54);
+ var freeGlobal = __webpack_require__(51);
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
@@ -2057,7 +1734,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 54 */
+/* 51 */
/***/ function(module, exports) {
/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
@@ -2068,14 +1745,14 @@ return /******/ (function(modules) { // webpackBootstrap
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },
-/* 55 */
+/* 52 */
/***/ function(module, exports, __webpack_require__) {
- var mapCacheClear = __webpack_require__(56),
- mapCacheDelete = __webpack_require__(64),
- mapCacheGet = __webpack_require__(67),
- mapCacheHas = __webpack_require__(68),
- mapCacheSet = __webpack_require__(69);
+ var mapCacheClear = __webpack_require__(53),
+ mapCacheDelete = __webpack_require__(61),
+ mapCacheGet = __webpack_require__(64),
+ mapCacheHas = __webpack_require__(65),
+ mapCacheSet = __webpack_require__(66);
/**
* Creates a map cache object to store key-value pairs.
@@ -2086,7 +1763,7 @@ return /******/ (function(modules) { // webpackBootstrap
*/
function MapCache(entries) {
var index = -1,
- length = entries ? entries.length : 0;
+ length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
@@ -2106,12 +1783,12 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 56 */
+/* 53 */
/***/ function(module, exports, __webpack_require__) {
- var Hash = __webpack_require__(57),
- ListCache = __webpack_require__(38),
- Map = __webpack_require__(51);
+ var Hash = __webpack_require__(54),
+ ListCache = __webpack_require__(37),
+ Map = __webpack_require__(49);
/**
* Removes all key-value entries from the map.
@@ -2133,14 +1810,14 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 57 */
+/* 54 */
/***/ function(module, exports, __webpack_require__) {
- var hashClear = __webpack_require__(58),
- hashDelete = __webpack_require__(60),
- hashGet = __webpack_require__(61),
- hashHas = __webpack_require__(62),
- hashSet = __webpack_require__(63);
+ var hashClear = __webpack_require__(55),
+ hashDelete = __webpack_require__(57),
+ hashGet = __webpack_require__(58),
+ hashHas = __webpack_require__(59),
+ hashSet = __webpack_require__(60);
/**
* Creates a hash object.
@@ -2151,7 +1828,7 @@ return /******/ (function(modules) { // webpackBootstrap
*/
function Hash(entries) {
var index = -1,
- length = entries ? entries.length : 0;
+ length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
@@ -2171,10 +1848,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 58 */
+/* 55 */
/***/ function(module, exports, __webpack_require__) {
- var nativeCreate = __webpack_require__(59);
+ var nativeCreate = __webpack_require__(56);
/**
* Removes all key-value entries from the hash.
@@ -2192,10 +1869,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 59 */
+/* 56 */
/***/ function(module, exports, __webpack_require__) {
- var getNative = __webpack_require__(52);
+ var getNative = __webpack_require__(24);
/* Built-in method references that are verified to be native. */
var nativeCreate = getNative(Object, 'create');
@@ -2204,7 +1881,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 60 */
+/* 57 */
/***/ function(module, exports) {
/**
@@ -2227,10 +1904,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 61 */
+/* 58 */
/***/ function(module, exports, __webpack_require__) {
- var nativeCreate = __webpack_require__(59);
+ var nativeCreate = __webpack_require__(56);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
@@ -2263,10 +1940,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 62 */
+/* 59 */
/***/ function(module, exports, __webpack_require__) {
- var nativeCreate = __webpack_require__(59);
+ var nativeCreate = __webpack_require__(56);
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -2292,10 +1969,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 63 */
+/* 60 */
/***/ function(module, exports, __webpack_require__) {
- var nativeCreate = __webpack_require__(59);
+ var nativeCreate = __webpack_require__(56);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
@@ -2321,10 +1998,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 64 */
+/* 61 */
/***/ function(module, exports, __webpack_require__) {
- var getMapData = __webpack_require__(65);
+ var getMapData = __webpack_require__(62);
/**
* Removes `key` and its value from the map.
@@ -2345,10 +2022,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 65 */
+/* 62 */
/***/ function(module, exports, __webpack_require__) {
- var isKeyable = __webpack_require__(66);
+ var isKeyable = __webpack_require__(63);
/**
* Gets the data for `map`.
@@ -2369,7 +2046,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 66 */
+/* 63 */
/***/ function(module, exports) {
/**
@@ -2390,10 +2067,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 67 */
+/* 64 */
/***/ function(module, exports, __webpack_require__) {
- var getMapData = __webpack_require__(65);
+ var getMapData = __webpack_require__(62);
/**
* Gets the map value for `key`.
@@ -2412,10 +2089,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 68 */
+/* 65 */
/***/ function(module, exports, __webpack_require__) {
- var getMapData = __webpack_require__(65);
+ var getMapData = __webpack_require__(62);
/**
* Checks if a map value for `key` exists.
@@ -2434,10 +2111,10 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 69 */
+/* 66 */
/***/ function(module, exports, __webpack_require__) {
- var getMapData = __webpack_require__(65);
+ var getMapData = __webpack_require__(62);
/**
* Sets the map `key` to `value`.
@@ -2462,296 +2139,363 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 70 */
+/* 67 */
/***/ function(module, exports, __webpack_require__) {
- var baseAssignValue = __webpack_require__(71),
- eq = __webpack_require__(42);
-
- /** Used for built-in method references. */
- var objectProto = Object.prototype;
+ var SetCache = __webpack_require__(68),
+ arraySome = __webpack_require__(71),
+ cacheHas = __webpack_require__(72);
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
+ /** Used to compose bitmasks for value comparisons. */
+ var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
/**
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons.
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
*
* @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function assignValue(object, key, value) {
- var objValue = object[key];
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
- (value === undefined && !(key in object))) {
- baseAssignValue(object, key, value);
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(array);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
+
+ stack.set(array, other);
+ stack.set(other, array);
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!arraySome(other, function(othValue, othIndex) {
+ if (!cacheHas(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
}
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
}
- module.exports = assignValue;
+ module.exports = equalArrays;
/***/ },
-/* 71 */
+/* 68 */
/***/ function(module, exports, __webpack_require__) {
- var defineProperty = __webpack_require__(72);
+ var MapCache = __webpack_require__(52),
+ setCacheAdd = __webpack_require__(69),
+ setCacheHas = __webpack_require__(70);
/**
- * The base implementation of `assignValue` and `assignMergeValue` without
- * value checks.
+ *
+ * Creates an array cache object to store unique values.
*
* @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
+ * @constructor
+ * @param {Array} [values] The values to cache.
*/
- function baseAssignValue(object, key, value) {
- if (key == '__proto__' && defineProperty) {
- defineProperty(object, key, {
- 'configurable': true,
- 'enumerable': true,
- 'value': value,
- 'writable': true
- });
- } else {
- object[key] = value;
+ function SetCache(values) {
+ var index = -1,
+ length = values == null ? 0 : values.length;
+
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.add(values[index]);
}
}
- module.exports = baseAssignValue;
+ // Add methods to `SetCache`.
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+ SetCache.prototype.has = setCacheHas;
+
+ module.exports = SetCache;
/***/ },
-/* 72 */
-/***/ function(module, exports, __webpack_require__) {
+/* 69 */
+/***/ function(module, exports) {
- var getNative = __webpack_require__(52);
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
- var defineProperty = (function() {
- try {
- var func = getNative(Object, 'defineProperty');
- func({}, '', {});
- return func;
- } catch (e) {}
- }());
+ /**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+ function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+ }
- module.exports = defineProperty;
+ module.exports = setCacheAdd;
/***/ },
-/* 73 */
-/***/ function(module, exports, __webpack_require__) {
-
- var copyObject = __webpack_require__(74),
- keys = __webpack_require__(23);
+/* 70 */
+/***/ function(module, exports) {
/**
- * The base implementation of `_.assign` without support for multiple sources
- * or `customizer` functions.
+ * Checks if `value` is in the array cache.
*
* @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
+ * @name has
+ * @memberOf SetCache
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
*/
- function baseAssign(object, source) {
- return object && copyObject(source, keys(source), object);
+ function setCacheHas(value) {
+ return this.__data__.has(value);
}
- module.exports = baseAssign;
+ module.exports = setCacheHas;
/***/ },
-/* 74 */
-/***/ function(module, exports, __webpack_require__) {
-
- var assignValue = __webpack_require__(70),
- baseAssignValue = __webpack_require__(71);
+/* 71 */
+/***/ function(module, exports) {
/**
- * Copies properties of `source` to `object`.
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
*
* @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property identifiers to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @param {Function} [customizer] The function to customize copied values.
- * @returns {Object} Returns `object`.
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
*/
- function copyObject(source, props, object, customizer) {
- var isNew = !object;
- object || (object = {});
-
+ function arraySome(array, predicate) {
var index = -1,
- length = props.length;
+ length = array == null ? 0 : array.length;
while (++index < length) {
- var key = props[index];
-
- var newValue = customizer
- ? customizer(object[key], source[key], key, object, source)
- : undefined;
-
- if (newValue === undefined) {
- newValue = source[key];
- }
- if (isNew) {
- baseAssignValue(object, key, newValue);
- } else {
- assignValue(object, key, newValue);
+ if (predicate(array[index], index, array)) {
+ return true;
}
}
- return object;
+ return false;
}
- module.exports = copyObject;
+ module.exports = arraySome;
/***/ },
-/* 75 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(53);
-
- /** Detect free variable `exports`. */
- var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
-
- /** Detect free variable `module`. */
- var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
-
- /** Detect the popular CommonJS extension `module.exports`. */
- var moduleExports = freeModule && freeModule.exports === freeExports;
-
- /** Built-in value references. */
- var Buffer = moduleExports ? root.Buffer : undefined,
- allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
+/* 72 */
+/***/ function(module, exports) {
/**
- * Creates a clone of `buffer`.
+ * Checks if a `cache` value for `key` exists.
*
* @private
- * @param {Buffer} buffer The buffer to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Buffer} Returns the cloned buffer.
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
- function cloneBuffer(buffer, isDeep) {
- if (isDeep) {
- return buffer.slice();
- }
- var length = buffer.length,
- result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
-
- buffer.copy(result);
- return result;
+ function cacheHas(cache, key) {
+ return cache.has(key);
}
- module.exports = cloneBuffer;
-
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(76)(module)))
-
-/***/ },
-/* 76 */
-/***/ function(module, exports) {
-
- module.exports = function(module) {
- if(!module.webpackPolyfill) {
- module.deprecate = function() {};
- module.paths = [];
- // module.parent = undefined by default
- module.children = [];
- module.webpackPolyfill = 1;
- }
- return module;
- }
+ module.exports = cacheHas;
/***/ },
-/* 77 */
+/* 73 */
/***/ function(module, exports) {
/**
- * Copies the values of `source` to `array`.
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
*
- * @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
*/
- function copyArray(source, array) {
- var index = -1,
- length = source.length;
-
- array || (array = Array(length));
- while (++index < length) {
- array[index] = source[index];
- }
- return array;
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
}
- module.exports = copyArray;
+ module.exports = eq;
/***/ },
-/* 78 */
+/* 74 */
/***/ function(module, exports, __webpack_require__) {
- var copyObject = __webpack_require__(74),
- getSymbols = __webpack_require__(79);
+ var keys = __webpack_require__(75);
+
+ /** Used to compose bitmasks for value comparisons. */
+ var COMPARE_PARTIAL_FLAG = 1;
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * Copies own symbol properties of `source` to `object`.
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
*
* @private
- * @param {Object} source The object to copy symbols from.
- * @param {Object} [object={}] The object to copy symbols to.
- * @returns {Object} Returns `object`.
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
- function copySymbols(source, object) {
- return copyObject(source, getSymbols(source), object);
- }
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
- module.exports = copySymbols;
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
-/***/ },
-/* 79 */
-/***/ function(module, exports) {
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
- /**
- * This method returns a new empty array.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {Array} Returns the new empty array.
- * @example
- *
- * var arrays = _.times(2, _.stubArray);
- *
- * console.log(arrays);
- * // => [[], []]
- *
- * console.log(arrays[0] === arrays[1]);
- * // => false
- */
- function stubArray() {
- return [];
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
}
- module.exports = stubArray;
+ module.exports = equalObjects;
/***/ },
-/* 80 */
+/* 75 */
/***/ function(module, exports, __webpack_require__) {
- var overArg = __webpack_require__(24);
+ var overArg = __webpack_require__(76);
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = overArg(Object.keys, Object);
@@ -2760,167 +2504,113 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 81 */
+/* 76 */
/***/ function(module, exports) {
- /** Used for built-in method references. */
- var objectProto = Object.prototype;
-
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objectToString = objectProto.toString;
-
/**
- * The base implementation of `getTag`.
+ * Creates a unary function that invokes `func` with its argument transformed.
*
* @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
*/
- function baseGetTag(value) {
- return objectToString.call(value);
+ function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
}
- module.exports = baseGetTag;
+ module.exports = overArg;
/***/ },
-/* 82 */
+/* 77 */
/***/ function(module, exports) {
/** Used for built-in method references. */
var objectProto = Object.prototype;
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var nativeObjectToString = objectProto.toString;
/**
- * Initializes an array clone.
+ * Converts `value` to a string using `Object.prototype.toString`.
*
* @private
- * @param {Array} array The array to clone.
- * @returns {Array} Returns the initialized clone.
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
*/
- function initCloneArray(array) {
- var length = array.length,
- result = array.constructor(length);
-
- // Add properties assigned by `RegExp#exec`.
- if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
- result.index = array.index;
- result.input = array.input;
- }
- return result;
+ function objectToString(value) {
+ return nativeObjectToString.call(value);
}
- module.exports = initCloneArray;
+ module.exports = objectToString;
/***/ },
-/* 83 */
+/* 78 */
/***/ function(module, exports) {
/**
- * This method returns the first argument it receives.
+ * Checks if `value` is classified as an `Array` object.
*
* @static
- * @since 0.1.0
* @memberOf _
- * @category Util
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
- * var object = { 'a': 1 };
- *
- * console.log(_.identity(object) === object);
+ * _.isArray([1, 2, 3]);
* // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
*/
- function identity(value) {
- return value;
- }
+ var isArray = Array.isArray;
- module.exports = identity;
+ module.exports = isArray;
/***/ },
-/* 84 */
-/***/ function(module, exports, __webpack_require__) {
-
- var baseCreate = __webpack_require__(85),
- getPrototype = __webpack_require__(86),
- isPrototype = __webpack_require__(87);
+/* 79 */
+/***/ function(module, exports) {
/**
- * Initializes an object clone.
+ * This method returns `false`.
*
- * @private
- * @param {Object} object The object to clone.
- * @returns {Object} Returns the initialized clone.
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `false`.
+ * @example
+ *
+ * _.times(2, _.stubFalse);
+ * // => [false, false]
*/
- function initCloneObject(object) {
- return (typeof object.constructor == 'function' && !isPrototype(object))
- ? baseCreate(getPrototype(object))
- : {};
+ function stubFalse() {
+ return false;
}
- module.exports = initCloneObject;
+ module.exports = stubFalse;
/***/ },
-/* 85 */
-/***/ function(module, exports, __webpack_require__) {
-
- var isObject = __webpack_require__(28);
-
- /** Built-in value references. */
- var objectCreate = Object.create;
-
- /**
- * The base implementation of `_.create` without support for assigning
- * properties to the created object.
- *
- * @private
- * @param {Object} proto The object to inherit from.
- * @returns {Object} Returns the new object.
- */
- var baseCreate = (function() {
- function object() {}
- return function(proto) {
- if (!isObject(proto)) {
- return {};
- }
- if (objectCreate) {
- return objectCreate(proto);
- }
- object.prototype = proto;
- var result = new object;
- object.prototype = undefined;
- return result;
- };
- }());
-
- module.exports = baseCreate;
-
-
-/***/ },
-/* 86 */
-/***/ function(module, exports, __webpack_require__) {
-
- var overArg = __webpack_require__(24);
-
- /** Built-in value references. */
- var getPrototype = overArg(Object.getPrototypeOf, Object);
-
- module.exports = getPrototype;
-
-
-/***/ },
-/* 87 */
-/***/ function(module, exports) {
+/* 80 */
+/***/ function(module, exports) {
/**
* This method returns `false`.
@@ -2943,164 +2633,154 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 88 */
+/* 81 */
/***/ function(module, exports) {
/**
- * This method returns `false`.
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
*
* @static
* @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {boolean} Returns `false`.
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
- * _.times(2, _.stubFalse);
- * // => [false, false]
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
*/
- function stubFalse() {
- return false;
+ function isObjectLike(value) {
+ return value != null && typeof value == 'object';
}
- module.exports = stubFalse;
+ module.exports = isObjectLike;
/***/ },
-/* 89 */
+/* 82 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
-
- var _BaseTileLayer2 = __webpack_require__(14);
-
- var _BaseTileLayer3 = _interopRequireDefault(_BaseTileLayer2);
-
- 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 CanvasTileLayer = function (_BaseTileLayer) {
- _inherits(CanvasTileLayer, _BaseTileLayer);
-
- function CanvasTileLayer() {
- _classCallCheck(this, CanvasTileLayer);
-
- return _possibleConstructorReturn(this, _BaseTileLayer.apply(this, arguments));
- }
-
- CanvasTileLayer.prototype.componentWillMount = function componentWillMount() {
- _BaseTileLayer.prototype.componentWillMount.call(this);
- this.leafletElement = _leaflet.tileLayer.canvas(this.props);
- };
-
- return CanvasTileLayer;
- }(_BaseTileLayer3.default);
+ 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; }; }();
- exports.default = CanvasTileLayer;
+ var _react = __webpack_require__(3);
-/***/ },
-/* 90 */
-/***/ function(module, exports, __webpack_require__) {
+ var _react2 = _interopRequireDefault(_react);
- 'use strict';
+ var _children = __webpack_require__(7);
- exports.__esModule = true;
+ var _children2 = _interopRequireDefault(_children);
- var _leaflet = __webpack_require__(1);
+ var _layerContainer = __webpack_require__(9);
- var _react = __webpack_require__(4);
+ var _layerContainer2 = _interopRequireDefault(_layerContainer);
- var _latlng = __webpack_require__(6);
+ var _map = __webpack_require__(10);
- var _latlng2 = _interopRequireDefault(_latlng);
+ var _map2 = _interopRequireDefault(_map);
- var _Path2 = __webpack_require__(91);
+ var _MapComponent2 = __webpack_require__(83);
- var _Path3 = _interopRequireDefault(_Path2);
+ var _MapComponent3 = _interopRequireDefault(_MapComponent2);
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 _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) : _defaults(subClass, superClass); }
- var Circle = function (_Path) {
- _inherits(Circle, _Path);
+ var MapLayer = function (_MapComponent) {
+ _inherits(MapLayer, _MapComponent);
- function Circle() {
- _classCallCheck(this, Circle);
+ function MapLayer() {
+ _classCallCheck(this, MapLayer);
- return _possibleConstructorReturn(this, _Path.apply(this, arguments));
+ return _possibleConstructorReturn(this, _MapComponent.apply(this, arguments));
}
- Circle.prototype.componentWillMount = function componentWillMount() {
- _Path.prototype.componentWillMount.call(this);
+ MapLayer.prototype.componentDidMount = function componentDidMount() {
+ _MapComponent.prototype.componentDidMount.call(this);
+ this.layerContainer.addLayer(this.leafletElement);
+ };
- var _props = this.props,
- center = _props.center,
- radius = _props.radius,
- props = _objectWithoutProperties(_props, ['center', 'radius']);
+ MapLayer.prototype.componentWillUnmount = function componentWillUnmount() {
+ _MapComponent.prototype.componentWillUnmount.call(this);
+ this.layerContainer.removeLayer(this.leafletElement);
+ };
- this.leafletElement = (0, _leaflet.circle)(center, radius, props);
+ MapLayer.prototype.render = function render() {
+ return Array.isArray(this.props.children) ? _react2.default.createElement(
+ 'div',
+ { style: { display: 'none' } },
+ this.props.children
+ ) : this.props.children || null;
};
- Circle.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
- if (this.props.center !== prevProps.center) {
- this.leafletElement.setLatLng(this.props.center);
- }
- if (this.props.radius !== prevProps.radius) {
- this.leafletElement.setRadius(this.props.radius);
+ _createClass(MapLayer, [{
+ key: 'layerContainer',
+ get: function get() {
+ return this.context.layerContainer || this.context.map;
}
- this.setStyleIfChanged(prevProps, this.props);
- };
+ }]);
- return Circle;
- }(_Path3.default);
+ return MapLayer;
+ }(_MapComponent3.default);
- Circle.propTypes = {
- center: _latlng2.default.isRequired,
- radius: _react.PropTypes.number.isRequired
+ MapLayer.propTypes = {
+ children: _children2.default
};
- exports.default = Circle;
+ MapLayer.contextTypes = {
+ layerContainer: _layerContainer2.default,
+ map: _map2.default,
+ pane: _react2.default.PropTypes.string
+ };
+ exports.default = MapLayer;
/***/ },
-/* 91 */
+/* 83 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _pick2 = __webpack_require__(92);
+ var _reduce2 = __webpack_require__(84);
- var _pick3 = _interopRequireDefault(_pick2);
+ var _reduce3 = _interopRequireDefault(_reduce2);
- var _isEqual2 = __webpack_require__(98);
+ var _keys2 = __webpack_require__(75);
- var _isEqual3 = _interopRequireDefault(_isEqual2);
+ var _keys3 = _interopRequireDefault(_keys2);
+
+ var _forEach2 = __webpack_require__(97);
- var _react = __webpack_require__(4);
+ var _forEach3 = _interopRequireDefault(_forEach2);
- var _MapLayer2 = __webpack_require__(15);
+ var _clone2 = __webpack_require__(100);
- var _MapLayer3 = _interopRequireDefault(_MapLayer2);
+ var _clone3 = _interopRequireDefault(_clone2);
+
+ 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__(3);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -3112,824 +2792,1346 @@ return /******/ (function(modules) { // webpackBootstrap
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 OPTIONS = ['stroke', 'color', 'weight', 'opacity', 'fill', 'fillColor', 'fillOpacity', 'fillRule', 'dashArray', 'lineCap', 'lineJoin', 'clickable', 'pointerEvents', 'className'];
+ var EVENTS_RE = /^on(.+)$/i;
- var Path = function (_MapLayer) {
- _inherits(Path, _MapLayer);
+ var MapComponent = function (_Component) {
+ _inherits(MapComponent, _Component);
- function Path() {
- _classCallCheck(this, Path);
+ function MapComponent(props, context) {
+ _classCallCheck(this, MapComponent);
- return _possibleConstructorReturn(this, _MapLayer.apply(this, arguments));
+ var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
+
+ _this._leafletEvents = {};
+ return _this;
}
- Path.prototype.getChildContext = function getChildContext() {
- return {
- popupContainer: this.leafletElement
- };
+ MapComponent.prototype.componentWillMount = function componentWillMount() {
+ this._leafletEvents = this.extractLeafletEvents(this.props);
};
- Path.prototype.getPathOptions = function getPathOptions(props) {
- return (0, _pick3.default)(props, OPTIONS);
+ MapComponent.prototype.componentDidMount = function componentDidMount() {
+ this.bindLeafletEvents(this._leafletEvents);
};
- Path.prototype.setStyle = function setStyle() {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-
- this.leafletElement.setStyle(options);
+ MapComponent.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+ var next = this.extractLeafletEvents(nextProps);
+ this._leafletEvents = this.bindLeafletEvents(next, this._leafletEvents);
};
- Path.prototype.setStyleIfChanged = function setStyleIfChanged(fromProps, toProps) {
- var nextStyle = this.getPathOptions(toProps);
- if (!(0, _isEqual3.default)(nextStyle, this.getPathOptions(fromProps))) {
- this.setStyle(nextStyle);
- }
+ MapComponent.prototype.componentWillUnmount = function componentWillUnmount() {
+ var el = this.leafletElement;
+ if (!el) return;
+
+ (0, _forEach3.default)(this._leafletEvents, function (cb, ev) {
+ el.off(ev, cb);
+ });
};
- return Path;
- }(_MapLayer3.default);
+ MapComponent.prototype.extractLeafletEvents = function extractLeafletEvents(props) {
+ return (0, _reduce3.default)((0, _keys3.default)(props), function (res, prop) {
+ if (EVENTS_RE.test(prop)) {
+ var _key = prop.replace(EVENTS_RE, function (match, p) {
+ return p.toLowerCase();
+ });
+ res[_key] = props[prop];
+ }
+ return res;
+ }, {});
+ };
- Path.childContextTypes = {
- popupContainer: _react.PropTypes.object
- };
- exports.default = Path;
+ MapComponent.prototype.bindLeafletEvents = function bindLeafletEvents() {
+ var next = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+ var prev = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-/***/ },
-/* 92 */
-/***/ function(module, exports, __webpack_require__) {
+ var el = this.leafletElement;
+ if (!el || !el.on) return {};
- var arrayMap = __webpack_require__(93),
- basePick = __webpack_require__(94),
- flatRest = __webpack_require__(96),
- toKey = __webpack_require__(97);
+ var diff = (0, _clone3.default)(prev);
+ (0, _forEach3.default)(prev, function (cb, ev) {
+ if (!next[ev] || cb !== next[ev]) {
+ delete diff[ev];
+ el.off(ev, cb);
+ }
+ });
- /**
- * Creates an object composed of the picked `object` properties.
- *
- * @static
- * @since 0.1.0
+ (0, _forEach3.default)(next, function (cb, ev) {
+ if (!prev[ev] || cb !== prev[ev]) {
+ diff[ev] = cb;
+ el.on(ev, cb);
+ }
+ });
+
+ return diff;
+ };
+
+ MapComponent.prototype.fireLeafletEvent = function fireLeafletEvent(type, data) {
+ var el = this.leafletElement;
+ if (el) el.fire(type, data);
+ };
+
+ MapComponent.prototype.getOptions = function getOptions() {
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+ var pane = props.pane || this.context.pane;
+ return pane ? _extends({}, props, { pane: pane }) : props;
+ };
+
+ return MapComponent;
+ }(_react.Component);
+
+ exports.default = MapComponent;
+
+/***/ },
+/* 84 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var arrayReduce = __webpack_require__(85),
+ baseEach = __webpack_require__(86),
+ baseIteratee = __webpack_require__(95),
+ baseReduce = __webpack_require__(96),
+ isArray = __webpack_require__(78);
+
+ /**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
* @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {...(string|string[])} [props] The property identifiers to pick.
- * @returns {Object} Returns the new object.
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
* @example
*
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
*
- * _.pick(object, ['a', 'c']);
- * // => { 'a': 1, 'c': 3 }
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
*/
- var pick = flatRest(function(object, props) {
- return object == null ? {} : basePick(object, arrayMap(props, toKey));
- });
+ function reduce(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduce : baseReduce,
+ initAccum = arguments.length < 3;
- module.exports = pick;
+ return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);
+ }
+
+ module.exports = reduce;
/***/ },
-/* 93 */
+/* 85 */
/***/ function(module, exports) {
/**
- * A specialized version of `_.map` for arrays without support for iteratee
- * shorthands.
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
*/
- function arrayMap(array, iteratee) {
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
var index = -1,
- length = array ? array.length : 0,
- result = Array(length);
+ length = array == null ? 0 : array.length;
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
while (++index < length) {
- result[index] = iteratee(array[index], index, array);
+ accumulator = iteratee(accumulator, array[index], index, array);
}
- return result;
+ return accumulator;
}
- module.exports = arrayMap;
+ module.exports = arrayReduce;
/***/ },
-/* 94 */
+/* 86 */
/***/ function(module, exports, __webpack_require__) {
- var basePickBy = __webpack_require__(95);
+ var baseForOwn = __webpack_require__(87),
+ createBaseEach = __webpack_require__(90);
/**
- * The base implementation of `_.pick` without support for individual
- * property identifiers.
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
*
* @private
- * @param {Object} object The source object.
- * @param {string[]} props The property identifiers to pick.
- * @returns {Object} Returns the new object.
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
*/
- function basePick(object, props) {
- object = Object(object);
- return basePickBy(object, props, function(value, key) {
- return key in object;
- });
- }
+ var baseEach = createBaseEach(baseForOwn);
- module.exports = basePick;
+ module.exports = baseEach;
/***/ },
-/* 95 */
+/* 87 */
/***/ function(module, exports, __webpack_require__) {
- var baseAssignValue = __webpack_require__(71);
+ var baseFor = __webpack_require__(88),
+ keys = __webpack_require__(75);
/**
- * The base implementation of `_.pickBy` without support for iteratee shorthands.
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
*
* @private
- * @param {Object} object The source object.
- * @param {string[]} props The property identifiers to pick from.
- * @param {Function} predicate The function invoked per property.
- * @returns {Object} Returns the new object.
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
*/
- function basePickBy(object, props, predicate) {
- var index = -1,
- length = props.length,
- result = {};
+ function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+ }
- while (++index < length) {
- var key = props[index],
- value = object[key];
+ module.exports = baseForOwn;
- if (predicate(value, key)) {
- baseAssignValue(result, key, value);
- }
- }
- return result;
- }
- module.exports = basePickBy;
+/***/ },
+/* 88 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var createBaseFor = __webpack_require__(89);
+
+ /**
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseFor = createBaseFor();
+
+ module.exports = baseFor;
/***/ },
-/* 96 */
+/* 89 */
/***/ function(module, exports) {
/**
- * This method returns the first argument it receives.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'a': 1 };
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
*
- * console.log(_.identity(object) === object);
- * // => true
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
*/
- function identity(value) {
- return value;
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
}
- module.exports = identity;
+ module.exports = createBaseFor;
/***/ },
-/* 97 */
-/***/ function(module, exports) {
+/* 90 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isArrayLike = __webpack_require__(91);
/**
- * This method returns the first argument it receives.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'a': 1 };
+ * Creates a `baseEach` or `baseEachRight` function.
*
- * console.log(_.identity(object) === object);
- * // => true
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
*/
- function identity(value) {
- return value;
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
}
- module.exports = identity;
+ module.exports = createBaseEach;
/***/ },
-/* 98 */
+/* 91 */
/***/ function(module, exports, __webpack_require__) {
- var baseIsEqual = __webpack_require__(99);
+ var isFunction = __webpack_require__(92),
+ isLength = __webpack_require__(94);
/**
- * Performs a deep comparison between two values to determine if they are
- * equivalent.
- *
- * **Note:** This method supports comparing arrays, array buffers, booleans,
- * date objects, error objects, maps, numbers, `Object` objects, regexes,
- * sets, strings, symbols, and typed arrays. `Object` objects are compared
- * by their own, not inherited, enumerable properties. Functions and DOM
- * nodes are **not** supported.
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
- * @since 0.1.0
+ * @since 4.0.0
* @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+ }
+
+ module.exports = isArrayLike;
+
+
+/***/ },
+/* 92 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var baseGetTag = __webpack_require__(93),
+ isObject = __webpack_require__(29);
+
+ /** `Object#toString` result references. */
+ var asyncTag = '[object AsyncFunction]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ proxyTag = '[object Proxy]';
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
+ }
+
+ module.exports = isFunction;
+
+
+/***/ },
+/* 93 */
+/***/ function(module, exports) {
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var nativeObjectToString = objectProto.toString;
+
+ /**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+ function objectToString(value) {
+ return nativeObjectToString.call(value);
+ }
+
+ module.exports = objectToString;
+
+
+/***/ },
+/* 94 */
+/***/ function(module, exports) {
+
+ /** Used as references for various `Number` constants. */
+ var MAX_SAFE_INTEGER = 9007199254740991;
+
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ module.exports = isLength;
+
+
+/***/ },
+/* 95 */
+/***/ function(module, exports) {
+
+ /**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
+
+ module.exports = identity;
+
+
+/***/ },
+/* 96 */
+/***/ function(module, exports) {
+
+ /**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+
+ module.exports = baseReduce;
+
+
+/***/ },
+/* 97 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var arrayEach = __webpack_require__(98),
+ baseEach = __webpack_require__(86),
+ castFunction = __webpack_require__(99),
+ isArray = __webpack_require__(78);
+
+ /**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _.forEach([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forEach(collection, iteratee) {
+ var func = isArray(collection) ? arrayEach : baseEach;
+ return func(collection, castFunction(iteratee));
+ }
+
+ module.exports = forEach;
+
+
+/***/ },
+/* 98 */
+/***/ function(module, exports) {
+
+ /**
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ module.exports = arrayEach;
+
+
+/***/ },
+/* 99 */
+/***/ function(module, exports) {
+
+ /**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
+
+ module.exports = identity;
+
+
+/***/ },
+/* 100 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var baseClone = __webpack_require__(101);
+
+ /** Used to compose bitmasks for cloning. */
+ var CLONE_SYMBOLS_FLAG = 4;
+
+ /**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
* @example
*
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
*
- * _.isEqual(object, other);
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
* // => true
- *
- * object === other;
- * // => false
*/
- function isEqual(value, other) {
- return baseIsEqual(value, other);
+ function clone(value) {
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
}
- module.exports = isEqual;
+ module.exports = clone;
/***/ },
-/* 99 */
+/* 101 */
/***/ function(module, exports, __webpack_require__) {
- var baseIsEqualDeep = __webpack_require__(100),
- isObject = __webpack_require__(28),
- isObjectLike = __webpack_require__(110);
+ var Stack = __webpack_require__(36),
+ arrayEach = __webpack_require__(98),
+ assignValue = __webpack_require__(21),
+ baseAssign = __webpack_require__(102),
+ baseAssignIn = __webpack_require__(104),
+ cloneBuffer = __webpack_require__(106),
+ copyArray = __webpack_require__(108),
+ copySymbols = __webpack_require__(109),
+ copySymbolsIn = __webpack_require__(111),
+ getAllKeys = __webpack_require__(113),
+ getAllKeysIn = __webpack_require__(114),
+ getTag = __webpack_require__(77),
+ initCloneArray = __webpack_require__(115),
+ initCloneByTag = __webpack_require__(116),
+ initCloneObject = __webpack_require__(117),
+ isArray = __webpack_require__(78),
+ isBuffer = __webpack_require__(79),
+ isObject = __webpack_require__(29),
+ keys = __webpack_require__(75);
+
+ /** Used to compose bitmasks for cloning. */
+ var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ weakMapTag = '[object WeakMap]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[weakMapTag] = false;
/**
- * The base implementation of `_.isEqual` which supports partial comparisons
- * and tracks traversed objects.
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
*
* @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {boolean} [bitmask] The bitmask of comparison flags.
- * The bitmask may be composed of the following flags:
- * 1 - Unordered comparison
- * 2 - Partial comparison
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @param {*} value The value to clone.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Deep clone
+ * 2 - Flatten inherited properties
+ * 4 - Clone symbols
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
*/
- function baseIsEqual(value, other, customizer, bitmask, stack) {
- if (value === other) {
- return true;
+ function baseClone(value, bitmask, customizer, key, object, stack) {
+ var result,
+ isDeep = bitmask & CLONE_DEEP_FLAG,
+ isFlat = bitmask & CLONE_FLAT_FLAG,
+ isFull = bitmask & CLONE_SYMBOLS_FLAG;
+
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
}
- if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
- return value !== value && other !== other;
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
+ if (!isDeep) {
+ return isFlat
+ ? copySymbolsIn(value, baseAssignIn(result, value))
+ : copySymbols(value, baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, baseClone, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
}
- return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
+ stack.set(value, result);
+
+ var keysFunc = isFull
+ ? (isFlat ? getAllKeysIn : getAllKeys)
+ : (isFlat ? keysIn : keys);
+
+ var props = isArr ? undefined : keysFunc(value);
+ arrayEach(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ return result;
}
- module.exports = baseIsEqual;
+ module.exports = baseClone;
/***/ },
-/* 100 */
+/* 102 */
/***/ function(module, exports, __webpack_require__) {
- var Stack = __webpack_require__(37),
- equalArrays = __webpack_require__(101),
- equalByTag = __webpack_require__(107),
- equalObjects = __webpack_require__(108),
- getTag = __webpack_require__(81),
- isArray = __webpack_require__(32),
- isBuffer = __webpack_require__(88),
- isTypedArray = __webpack_require__(109);
+ var copyObject = __webpack_require__(103),
+ keys = __webpack_require__(75);
+
+ /**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+ }
- /** Used to compose bitmasks for comparison styles. */
- var PARTIAL_COMPARE_FLAG = 2;
+ module.exports = baseAssign;
- /** `Object#toString` result references. */
- var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- objectTag = '[object Object]';
- /** Used for built-in method references. */
- var objectProto = Object.prototype;
+/***/ },
+/* 103 */
+/***/ function(module, exports, __webpack_require__) {
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
+ var assignValue = __webpack_require__(21),
+ baseAssignValue = __webpack_require__(22);
/**
- * A specialized version of `baseIsEqual` for arrays and objects which performs
- * deep comparisons and tracks traversed objects enabling objects with circular
- * references to be compared.
+ * Copies properties of `source` to `object`.
*
* @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
- * for more details.
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
*/
- function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
- var objIsArr = isArray(object),
- othIsArr = isArray(other),
- objTag = arrayTag,
- othTag = arrayTag;
+ function copyObject(source, props, object, customizer) {
+ var isNew = !object;
+ object || (object = {});
- if (!objIsArr) {
- objTag = getTag(object);
- objTag = objTag == argsTag ? objectTag : objTag;
- }
- if (!othIsArr) {
- othTag = getTag(other);
- othTag = othTag == argsTag ? objectTag : othTag;
- }
- var objIsObj = objTag == objectTag,
- othIsObj = othTag == objectTag,
- isSameTag = objTag == othTag;
+ var index = -1,
+ length = props.length;
- if (isSameTag && isBuffer(object)) {
- if (!isBuffer(other)) {
- return false;
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
}
- objIsArr = true;
- objIsObj = false;
- }
- if (isSameTag && !objIsObj) {
- stack || (stack = new Stack);
- return (objIsArr || isTypedArray(object))
- ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
- : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
}
- if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
- othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+ return object;
+ }
+
+ module.exports = copyObject;
+
+
+/***/ },
+/* 104 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var copyObject = __webpack_require__(103),
+ keysIn = __webpack_require__(105);
+
+ /**
+ * The base implementation of `_.assignIn` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssignIn(object, source) {
+ return object && copyObject(source, keysIn(source), object);
+ }
- if (objIsWrapped || othIsWrapped) {
- var objUnwrapped = objIsWrapped ? object.value() : object,
- othUnwrapped = othIsWrapped ? other.value() : other;
+ module.exports = baseAssignIn;
- stack || (stack = new Stack);
- return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
+
+/***/ },
+/* 105 */
+/***/ function(module, exports) {
+
+ /**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
}
}
- if (!isSameTag) {
- return false;
- }
- stack || (stack = new Stack);
- return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
+ return result;
}
- module.exports = baseIsEqualDeep;
+ module.exports = nativeKeysIn;
/***/ },
-/* 101 */
+/* 106 */
/***/ function(module, exports, __webpack_require__) {
- var SetCache = __webpack_require__(102),
- arraySome = __webpack_require__(105),
- cacheHas = __webpack_require__(106);
+ /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(50);
+
+ /** Detect free variable `exports`. */
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+ /** Detect free variable `module`. */
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = freeModule && freeModule.exports === freeExports;
- /** Used to compose bitmasks for comparison styles. */
- var UNORDERED_COMPARE_FLAG = 1,
- PARTIAL_COMPARE_FLAG = 2;
+ /** Built-in value references. */
+ var Buffer = moduleExports ? root.Buffer : undefined,
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
/**
- * A specialized version of `baseIsEqualDeep` for arrays with support for
- * partial deep comparisons.
+ * Creates a clone of `buffer`.
*
* @private
- * @param {Array} array The array to compare.
- * @param {Array} other The other array to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} customizer The function to customize comparisons.
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
- * for more details.
- * @param {Object} stack Tracks traversed `array` and `other` objects.
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
*/
- function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
- arrLength = array.length,
- othLength = other.length;
-
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
- return false;
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(array);
- if (stacked && stack.get(other)) {
- return stacked == other;
+ function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
}
- var index = -1,
- result = true,
- seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;
-
- stack.set(array, other);
- stack.set(other, array);
-
- // Ignore non-index properties.
- while (++index < arrLength) {
- var arrValue = array[index],
- othValue = other[index];
+ var length = buffer.length,
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, arrValue, index, other, array, stack)
- : customizer(arrValue, othValue, index, array, other, stack);
- }
- if (compared !== undefined) {
- if (compared) {
- continue;
- }
- result = false;
- break;
- }
- // Recursively compare arrays (susceptible to call stack limits).
- if (seen) {
- if (!arraySome(other, function(othValue, othIndex) {
- if (!cacheHas(seen, othIndex) &&
- (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
- return seen.push(othIndex);
- }
- })) {
- result = false;
- break;
- }
- } else if (!(
- arrValue === othValue ||
- equalFunc(arrValue, othValue, customizer, bitmask, stack)
- )) {
- result = false;
- break;
- }
- }
- stack['delete'](array);
- stack['delete'](other);
+ buffer.copy(result);
return result;
}
- module.exports = equalArrays;
+ module.exports = cloneBuffer;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(107)(module)))
/***/ },
-/* 102 */
-/***/ function(module, exports, __webpack_require__) {
+/* 107 */
+/***/ function(module, exports) {
+
+ module.exports = function(module) {
+ if(!module.webpackPolyfill) {
+ module.deprecate = function() {};
+ module.paths = [];
+ // module.parent = undefined by default
+ module.children = [];
+ module.webpackPolyfill = 1;
+ }
+ return module;
+ }
+
- var MapCache = __webpack_require__(55),
- setCacheAdd = __webpack_require__(103),
- setCacheHas = __webpack_require__(104);
+/***/ },
+/* 108 */
+/***/ function(module, exports) {
/**
- *
- * Creates an array cache object to store unique values.
+ * Copies the values of `source` to `array`.
*
* @private
- * @constructor
- * @param {Array} [values] The values to cache.
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
*/
- function SetCache(values) {
+ function copyArray(source, array) {
var index = -1,
- length = values ? values.length : 0;
+ length = source.length;
- this.__data__ = new MapCache;
+ array || (array = Array(length));
while (++index < length) {
- this.add(values[index]);
+ array[index] = source[index];
}
+ return array;
}
- // Add methods to `SetCache`.
- SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
- SetCache.prototype.has = setCacheHas;
+ module.exports = copyArray;
- module.exports = SetCache;
+
+/***/ },
+/* 109 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var copyObject = __webpack_require__(103),
+ getSymbols = __webpack_require__(110);
+
+ /**
+ * Copies own symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+ function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+ }
+
+ module.exports = copySymbols;
/***/ },
-/* 103 */
+/* 110 */
/***/ function(module, exports) {
- /** Used to stand-in for `undefined` hash values. */
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
+ /**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+ function stubArray() {
+ return [];
+ }
+
+ module.exports = stubArray;
+
+
+/***/ },
+/* 111 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var copyObject = __webpack_require__(103),
+ getSymbolsIn = __webpack_require__(112);
/**
- * Adds `value` to the array cache.
+ * Copies own and inherited symbols of `source` to `object`.
*
* @private
- * @name add
- * @memberOf SetCache
- * @alias push
- * @param {*} value The value to cache.
- * @returns {Object} Returns the cache instance.
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
*/
- function setCacheAdd(value) {
- this.__data__.set(value, HASH_UNDEFINED);
- return this;
+ function copySymbolsIn(source, object) {
+ return copyObject(source, getSymbolsIn(source), object);
}
- module.exports = setCacheAdd;
+ module.exports = copySymbolsIn;
/***/ },
-/* 104 */
+/* 112 */
/***/ function(module, exports) {
/**
- * Checks if `value` is in the array cache.
+ * This method returns a new empty array.
*
- * @private
- * @name has
- * @memberOf SetCache
- * @param {*} value The value to search for.
- * @returns {number} Returns `true` if `value` is found, else `false`.
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
*/
- function setCacheHas(value) {
- return this.__data__.has(value);
+ function stubArray() {
+ return [];
}
- module.exports = setCacheHas;
+ module.exports = stubArray;
+
+
+/***/ },
+/* 113 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var overArg = __webpack_require__(76);
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeKeys = overArg(Object.keys, Object);
+
+ module.exports = nativeKeys;
/***/ },
-/* 105 */
+/* 114 */
/***/ function(module, exports) {
/**
- * A specialized version of `_.some` for arrays without support for iteratee
- * shorthands.
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
*
* @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
*/
- function arraySome(array, predicate) {
- var index = -1,
- length = array ? array.length : 0;
-
- while (++index < length) {
- if (predicate(array[index], index, array)) {
- return true;
+ function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
}
}
- return false;
+ return result;
}
- module.exports = arraySome;
+ module.exports = nativeKeysIn;
/***/ },
-/* 106 */
+/* 115 */
/***/ function(module, exports) {
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
/**
- * Checks if a `cache` value for `key` exists.
+ * Initializes an array clone.
*
* @private
- * @param {Object} cache The cache to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
*/
- function cacheHas(cache, key) {
- return cache.has(key);
+ function initCloneArray(array) {
+ var length = array.length,
+ result = array.constructor(length);
+
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
}
- module.exports = cacheHas;
+ module.exports = initCloneArray;
/***/ },
-/* 107 */
+/* 116 */
/***/ function(module, exports) {
/**
- * Performs a
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
+ * This method returns the first argument it receives.
*
* @static
+ * @since 0.1.0
* @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
* @example
*
* var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
*
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
+ * console.log(_.identity(object) === object);
* // => true
*/
- function eq(value, other) {
- return value === other || (value !== value && other !== other);
+ function identity(value) {
+ return value;
}
- module.exports = eq;
+ module.exports = identity;
/***/ },
-/* 108 */
+/* 117 */
/***/ function(module, exports, __webpack_require__) {
- var keys = __webpack_require__(23);
-
- /** Used to compose bitmasks for comparison styles. */
- var PARTIAL_COMPARE_FLAG = 2;
-
- /** Used for built-in method references. */
- var objectProto = Object.prototype;
-
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
+ var baseCreate = __webpack_require__(118),
+ getPrototype = __webpack_require__(119),
+ isPrototype = __webpack_require__(120);
/**
- * A specialized version of `baseIsEqualDeep` for objects with support for
- * partial deep comparisons.
+ * Initializes an object clone.
*
* @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} customizer The function to customize comparisons.
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
- * for more details.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
*/
- function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
- objProps = keys(object),
- objLength = objProps.length,
- othProps = keys(other),
- othLength = othProps.length;
+ function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototype(object))
+ : {};
+ }
- if (objLength != othLength && !isPartial) {
- return false;
- }
- var index = objLength;
- while (index--) {
- var key = objProps[index];
- if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
- return false;
- }
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(object);
- if (stacked && stack.get(other)) {
- return stacked == other;
- }
- var result = true;
- stack.set(object, other);
- stack.set(other, object);
+ module.exports = initCloneObject;
- var skipCtor = isPartial;
- while (++index < objLength) {
- key = objProps[index];
- var objValue = object[key],
- othValue = other[key];
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, objValue, key, other, object, stack)
- : customizer(objValue, othValue, key, object, other, stack);
- }
- // Recursively compare objects (susceptible to call stack limits).
- if (!(compared === undefined
- ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
- : compared
- )) {
- result = false;
- break;
- }
- skipCtor || (skipCtor = key == 'constructor');
- }
- if (result && !skipCtor) {
- var objCtor = object.constructor,
- othCtor = other.constructor;
+/***/ },
+/* 118 */
+/***/ function(module, exports, __webpack_require__) {
- // Non `Object` object instances with different constructors are not equal.
- if (objCtor != othCtor &&
- ('constructor' in object && 'constructor' in other) &&
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
- result = false;
+ var isObject = __webpack_require__(29);
+
+ /** Built-in value references. */
+ var objectCreate = Object.create;
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
}
- }
- stack['delete'](object);
- stack['delete'](other);
- return result;
- }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+ }());
- module.exports = equalObjects;
+ module.exports = baseCreate;
/***/ },
-/* 109 */
-/***/ function(module, exports) {
+/* 119 */
+/***/ function(module, exports, __webpack_require__) {
- /**
- * This method returns `false`.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {boolean} Returns `false`.
- * @example
- *
- * _.times(2, _.stubFalse);
- * // => [false, false]
- */
- function stubFalse() {
- return false;
- }
+ var overArg = __webpack_require__(76);
- module.exports = stubFalse;
+ /** Built-in value references. */
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
+
+ module.exports = getPrototype;
/***/ },
-/* 110 */
+/* 120 */
/***/ function(module, exports) {
/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
+ * This method returns `false`.
*
* @static
* @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `false`.
+ * @example
*
- * _.isObjectLike(null);
- * // => false
+ * _.times(2, _.stubFalse);
+ * // => [false, false]
*/
- function isObjectLike(value) {
- return value != null && typeof value == 'object';
+ function stubFalse() {
+ return false;
}
- module.exports = isObjectLike;
+ module.exports = stubFalse;
/***/ },
-/* 111 */
+/* 121 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
+
+ var _react = __webpack_require__(3);
- var _react = __webpack_require__(4);
+ var _children = __webpack_require__(7);
+
+ var _children2 = _interopRequireDefault(_children);
var _latlng = __webpack_require__(6);
var _latlng2 = _interopRequireDefault(_latlng);
- var _Path2 = __webpack_require__(91);
+ var _Path2 = __webpack_require__(14);
var _Path3 = _interopRequireDefault(_Path2);
@@ -3961,7 +4163,7 @@ return /******/ (function(modules) { // webpackBootstrap
center = _props.center,
props = _objectWithoutProperties(_props, ['center']);
- this.leafletElement = (0, _leaflet.circleMarker)(center, props);
+ this.leafletElement = (0, _leaflet.circleMarker)(center, this.getOptions(props));
};
CircleMarker.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
@@ -3979,27 +4181,32 @@ return /******/ (function(modules) { // webpackBootstrap
CircleMarker.propTypes = {
center: _latlng2.default.isRequired,
+ children: _children2.default,
radius: _react.PropTypes.number
};
exports.default = CircleMarker;
/***/ },
-/* 112 */
+/* 122 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
+
+ var _react = __webpack_require__(3);
+
+ var _children = __webpack_require__(7);
- var _react = __webpack_require__(4);
+ var _children2 = _interopRequireDefault(_children);
var _layerContainer = __webpack_require__(9);
var _layerContainer2 = _interopRequireDefault(_layerContainer);
- var _Path2 = __webpack_require__(91);
+ var _Path2 = __webpack_require__(14);
var _Path3 = _interopRequireDefault(_Path2);
@@ -4030,7 +4237,7 @@ return /******/ (function(modules) { // webpackBootstrap
};
FeatureGroup.prototype.componentWillMount = function componentWillMount() {
- this.leafletElement = (0, _leaflet.featureGroup)();
+ this.leafletElement = (0, _leaflet.featureGroup)(this.getOptions(this.props));
};
FeatureGroup.prototype.componentDidMount = function componentDidMount() {
@@ -4046,28 +4253,33 @@ return /******/ (function(modules) { // webpackBootstrap
}(_Path3.default);
FeatureGroup.childContextTypes = {
+ children: _children2.default,
layerContainer: _layerContainer2.default,
popupContainer: _react.PropTypes.object
};
exports.default = FeatureGroup;
/***/ },
-/* 113 */
+/* 123 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _isFunction2 = __webpack_require__(27);
+ var _isFunction2 = __webpack_require__(92);
var _isFunction3 = _interopRequireDefault(_isFunction2);
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
+
+ var _react = __webpack_require__(3);
+
+ var _children = __webpack_require__(7);
- var _react = __webpack_require__(4);
+ var _children2 = _interopRequireDefault(_children);
- var _Path2 = __webpack_require__(91);
+ var _Path2 = __webpack_require__(14);
var _Path3 = _interopRequireDefault(_Path2);
@@ -4083,26 +4295,26 @@ return /******/ (function(modules) { // webpackBootstrap
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 GeoJson = function (_Path) {
- _inherits(GeoJson, _Path);
+ var GeoJSON = function (_Path) {
+ _inherits(GeoJSON, _Path);
- function GeoJson() {
- _classCallCheck(this, GeoJson);
+ function GeoJSON() {
+ _classCallCheck(this, GeoJSON);
return _possibleConstructorReturn(this, _Path.apply(this, arguments));
}
- GeoJson.prototype.componentWillMount = function componentWillMount() {
+ GeoJSON.prototype.componentWillMount = function componentWillMount() {
_Path.prototype.componentWillMount.call(this);
var _props = this.props,
data = _props.data,
props = _objectWithoutProperties(_props, ['data']);
- this.leafletElement = (0, _leaflet.geoJson)(data, props);
+ this.leafletElement = (0, _leaflet.geoJSON)(data, this.getOptions(props));
};
- GeoJson.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
+ GeoJSON.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
if ((0, _isFunction3.default)(this.props.style)) {
this.setStyle(this.props.style);
} else {
@@ -4110,31 +4322,107 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
- return GeoJson;
+ return GeoJSON;
}(_Path3.default);
- GeoJson.propTypes = {
+ GeoJSON.propTypes = {
+ children: _children2.default,
data: _react.PropTypes.oneOfType([_react.PropTypes.array, _react.PropTypes.object]).isRequired
};
- exports.default = GeoJson;
+ exports.default = GeoJSON;
/***/ },
-/* 114 */
+/* 124 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ exports.__esModule = true;
+
+ var _leaflet = __webpack_require__(4);
+
+ var _react = __webpack_require__(3);
+
+ var _children = __webpack_require__(7);
+
+ var _children2 = _interopRequireDefault(_children);
+
+ var _MapLayer2 = __webpack_require__(82);
+
+ var _MapLayer3 = _interopRequireDefault(_MapLayer2);
+
+ 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 GridLayer = function (_MapLayer) {
+ _inherits(GridLayer, _MapLayer);
+
+ function GridLayer() {
+ _classCallCheck(this, GridLayer);
+
+ return _possibleConstructorReturn(this, _MapLayer.apply(this, arguments));
+ }
+
+ GridLayer.prototype.componentWillMount = function componentWillMount() {
+ _MapLayer.prototype.componentWillMount.call(this);
+ this.leafletElement = (0, _leaflet.gridLayer)(this.getOptions(this.props));
+ };
+
+ GridLayer.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
+ var _props = this.props,
+ opacity = _props.opacity,
+ zIndex = _props.zIndex;
+
+ if (opacity !== prevProps.opacity) {
+ this.leafletElement.setOpacity(opacity);
+ }
+ if (zIndex !== prevProps.zIndex) {
+ this.leafletElement.setZIndex(zIndex);
+ }
+ };
+
+ GridLayer.prototype.render = function render() {
+ return null;
+ };
+
+ return GridLayer;
+ }(_MapLayer3.default);
+
+ GridLayer.propTypes = {
+ children: _children2.default,
+ opacity: _react.PropTypes.number,
+ zIndex: _react.PropTypes.number
+ };
+ exports.default = GridLayer;
+
+/***/ },
+/* 125 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
- var _react = __webpack_require__(4);
+ var _react = __webpack_require__(3);
- var _bounds = __webpack_require__(3);
+ var _bounds = __webpack_require__(2);
var _bounds2 = _interopRequireDefault(_bounds);
- var _MapLayer2 = __webpack_require__(15);
+ var _children = __webpack_require__(7);
+
+ var _children2 = _interopRequireDefault(_children);
+
+ var _MapLayer2 = __webpack_require__(82);
var _MapLayer3 = _interopRequireDefault(_MapLayer2);
@@ -4167,7 +4455,7 @@ return /******/ (function(modules) { // webpackBootstrap
url = _props.url,
props = _objectWithoutProperties(_props, ['bounds', 'url']);
- this.leafletElement = (0, _leaflet.imageOverlay)(url, bounds, props);
+ this.leafletElement = (0, _leaflet.imageOverlay)(url, bounds, this.getOptions(props));
};
ImageOverlay.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
@@ -4189,26 +4477,27 @@ return /******/ (function(modules) { // webpackBootstrap
ImageOverlay.propTypes = {
attribution: _react.PropTypes.string,
bounds: _bounds2.default.isRequired,
+ children: _children2.default,
opacity: _react.PropTypes.number,
url: _react.PropTypes.string.isRequired
};
exports.default = ImageOverlay;
/***/ },
-/* 115 */
+/* 126 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
var _layerContainer = __webpack_require__(9);
var _layerContainer2 = _interopRequireDefault(_layerContainer);
- var _MapLayer2 = __webpack_require__(15);
+ var _MapLayer2 = __webpack_require__(82);
var _MapLayer3 = _interopRequireDefault(_MapLayer2);
@@ -4239,7 +4528,7 @@ return /******/ (function(modules) { // webpackBootstrap
LayerGroup.prototype.componentWillMount = function componentWillMount() {
_MapLayer.prototype.componentWillMount.call(this);
- this.leafletElement = (0, _leaflet.layerGroup)();
+ this.leafletElement = (0, _leaflet.layerGroup)(this.getOptions());
};
return LayerGroup;
@@ -4251,16 +4540,16 @@ return /******/ (function(modules) { // webpackBootstrap
exports.default = LayerGroup;
/***/ },
-/* 116 */
+/* 127 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
- var _react = __webpack_require__(4);
+ var _react = __webpack_require__(3);
var _react2 = _interopRequireDefault(_react);
@@ -4268,6 +4557,10 @@ return /******/ (function(modules) { // webpackBootstrap
var _children3 = _interopRequireDefault(_children2);
+ var _controlPosition = __webpack_require__(8);
+
+ var _controlPosition2 = _interopRequireDefault(_controlPosition);
+
var _layerContainer = __webpack_require__(9);
var _layerContainer2 = _interopRequireDefault(_layerContainer);
@@ -4484,7 +4777,8 @@ return /******/ (function(modules) { // webpackBootstrap
LayersControl.propTypes = {
baseLayers: _react.PropTypes.object,
children: _children3.default,
- overlays: _react.PropTypes.object
+ overlays: _react.PropTypes.object,
+ position: _controlPosition2.default
};
LayersControl.contextTypes = {
layerContainer: _layerContainer2.default,
@@ -4497,34 +4791,30 @@ return /******/ (function(modules) { // webpackBootstrap
LayersControl.Overlay = Overlay;
/***/ },
-/* 117 */
+/* 128 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _uniqueId2 = __webpack_require__(118);
-
- var _uniqueId3 = _interopRequireDefault(_uniqueId2);
-
- var _omit2 = __webpack_require__(120);
+ var _omit2 = __webpack_require__(129);
var _omit3 = _interopRequireDefault(_omit2);
- var _isUndefined2 = __webpack_require__(130);
+ var _isUndefined2 = __webpack_require__(134);
var _isUndefined3 = _interopRequireDefault(_isUndefined2);
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
var _leaflet2 = _interopRequireDefault(_leaflet);
- var _react = __webpack_require__(4);
+ var _react = __webpack_require__(3);
var _react2 = _interopRequireDefault(_react);
- var _bounds = __webpack_require__(3);
+ var _bounds = __webpack_require__(2);
var _bounds2 = _interopRequireDefault(_bounds);
@@ -4536,7 +4826,7 @@ return /******/ (function(modules) { // webpackBootstrap
var _latlng2 = _interopRequireDefault(_latlng);
- var _MapComponent2 = __webpack_require__(16);
+ var _MapComponent2 = __webpack_require__(83);
var _MapComponent3 = _interopRequireDefault(_MapComponent2);
@@ -4558,26 +4848,29 @@ return /******/ (function(modules) { // webpackBootstrap
var Map = function (_MapComponent) {
_inherits(Map, _MapComponent);
- Map.prototype.getChildContext = function getChildContext() {
- return {
- map: this.leafletElement
- };
- };
+ function Map() {
+ var _temp, _this, _ret;
- function Map(props, context) {
_classCallCheck(this, Map);
- var _this = _possibleConstructorReturn(this, _MapComponent.call(this, props, context));
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
- _this.state = {
- id: props.id || (0, _uniqueId3.default)('map')
- };
- return _this;
+ return _ret = (_temp = (_this = _possibleConstructorReturn(this, _MapComponent.call.apply(_MapComponent, [this].concat(args))), _this), _this.bindContainer = function (container) {
+ _this.container = container;
+ }, _temp), _possibleConstructorReturn(_this, _ret);
}
+ Map.prototype.getChildContext = function getChildContext() {
+ return {
+ map: this.leafletElement
+ };
+ };
+
Map.prototype.componentDidMount = function componentDidMount() {
var props = (0, _omit3.default)(this.props, ['children', 'className', 'id', 'style']);
- this.leafletElement = _leaflet2.default.map(this.state.id, props);
+ this.leafletElement = _leaflet2.default.map(this.container, props);
_MapComponent.prototype.componentDidMount.call(this);
this.setState({ map: this.leafletElement });
if (!(0, _isUndefined3.default)(props.bounds)) {
@@ -4587,23 +4880,35 @@ return /******/ (function(modules) { // webpackBootstrap
Map.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
var _props = this.props,
+ animate = _props.animate,
bounds = _props.bounds,
boundsOptions = _props.boundsOptions,
center = _props.center,
maxBounds = _props.maxBounds,
- zoom = _props.zoom,
- animate = _props.animate;
+ useFlyTo = _props.useFlyTo,
+ zoom = _props.zoom;
+
if (center && this.shouldUpdateCenter(center, prevProps.center)) {
- this.leafletElement.setView(center, zoom, { animate: animate });
+ if (useFlyTo) {
+ this.leafletElement.flyTo(center, zoom, { animate: animate });
+ } else {
+ this.leafletElement.setView(center, zoom, { animate: animate });
+ }
} else if (zoom && zoom !== prevProps.zoom) {
this.leafletElement.setZoom(zoom);
}
+
if (maxBounds && this.shouldUpdateBounds(maxBounds, prevProps.maxBounds)) {
this.leafletElement.setMaxBounds(maxBounds);
}
+
if (bounds && (this.shouldUpdateBounds(bounds, prevProps.bounds) || boundsOptions !== prevProps.boundsOptions)) {
- this.leafletElement.fitBounds(bounds, boundsOptions);
+ if (useFlyTo) {
+ this.leafletElement.flyToBounds(bounds, boundsOptions);
+ } else {
+ this.leafletElement.fitBounds(bounds, boundsOptions);
+ }
}
};
@@ -4636,7 +4941,8 @@ return /******/ (function(modules) { // webpackBootstrap
'div',
{
className: this.props.className,
- id: this.state.id,
+ id: this.props.id,
+ ref: this.bindContainer,
style: this.props.style },
children
);
@@ -4657,393 +4963,193 @@ return /******/ (function(modules) { // webpackBootstrap
maxZoom: _react.PropTypes.number,
minZoom: _react.PropTypes.number,
style: _react.PropTypes.object,
+ useFlyTo: _react.PropTypes.bool,
zoom: _react.PropTypes.number
};
Map.defaultProps = {
- animate: false
- };
- Map.childContextTypes = {
- map: _react.PropTypes.instanceOf(_leaflet2.default.Map)
+ animate: false,
+ useFlyTo: false
};
- exports.default = Map;
-
-/***/ },
-/* 118 */
-/***/ function(module, exports, __webpack_require__) {
-
- var toString = __webpack_require__(119);
-
- /** Used to generate unique IDs. */
- var idCounter = 0;
-
- /**
- * Generates a unique ID. If `prefix` is given, the ID is appended to it.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {string} [prefix=''] The value to prefix the ID with.
- * @returns {string} Returns the unique ID.
- * @example
- *
- * _.uniqueId('contact_');
- * // => 'contact_104'
- *
- * _.uniqueId();
- * // => '105'
- */
- function uniqueId(prefix) {
- var id = ++idCounter;
- return toString(prefix) + id;
- }
-
- module.exports = uniqueId;
-
-
-/***/ },
-/* 119 */
-/***/ function(module, exports) {
-
- /**
- * This method returns the first argument it receives.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'a': 1 };
- *
- * console.log(_.identity(object) === object);
- * // => true
- */
- function identity(value) {
- return value;
- }
-
- module.exports = identity;
-
-
-/***/ },
-/* 120 */
-/***/ function(module, exports, __webpack_require__) {
-
- var arrayMap = __webpack_require__(93),
- baseDifference = __webpack_require__(121),
- basePick = __webpack_require__(94),
- flatRest = __webpack_require__(96),
- getAllKeysIn = __webpack_require__(129),
- toKey = __webpack_require__(97);
-
- /**
- * The opposite of `_.pick`; this method creates an object composed of the
- * own and inherited enumerable string keyed properties of `object` that are
- * not omitted.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {...(string|string[])} [props] The property identifiers to omit.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.omit(object, ['a', 'c']);
- * // => { 'b': '2' }
- */
- var omit = flatRest(function(object, props) {
- if (object == null) {
- return {};
- }
- props = arrayMap(props, toKey);
- return basePick(object, baseDifference(getAllKeysIn(object), props));
- });
-
- module.exports = omit;
-
-
-/***/ },
-/* 121 */
-/***/ function(module, exports, __webpack_require__) {
-
- var SetCache = __webpack_require__(102),
- arrayIncludes = __webpack_require__(122),
- arrayIncludesWith = __webpack_require__(127),
- arrayMap = __webpack_require__(93),
- baseUnary = __webpack_require__(128),
- cacheHas = __webpack_require__(106);
-
- /** Used as the size to enable large array optimizations. */
- var LARGE_ARRAY_SIZE = 200;
-
- /**
- * The base implementation of methods like `_.difference` without support
- * for excluding multiple arrays or iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Array} values The values to exclude.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of filtered values.
- */
- function baseDifference(array, values, iteratee, comparator) {
- var index = -1,
- includes = arrayIncludes,
- isCommon = true,
- length = array.length,
- result = [],
- valuesLength = values.length;
-
- if (!length) {
- return result;
- }
- if (iteratee) {
- values = arrayMap(values, baseUnary(iteratee));
- }
- if (comparator) {
- includes = arrayIncludesWith;
- isCommon = false;
- }
- else if (values.length >= LARGE_ARRAY_SIZE) {
- includes = cacheHas;
- isCommon = false;
- values = new SetCache(values);
- }
- outer:
- while (++index < length) {
- var value = array[index],
- computed = iteratee ? iteratee(value) : value;
-
- value = (comparator || value !== 0) ? value : 0;
- if (isCommon && computed === computed) {
- var valuesIndex = valuesLength;
- while (valuesIndex--) {
- if (values[valuesIndex] === computed) {
- continue outer;
- }
- }
- result.push(value);
- }
- else if (!includes(values, computed, comparator)) {
- result.push(value);
- }
- }
- return result;
- }
-
- module.exports = baseDifference;
-
+ Map.childContextTypes = {
+ map: _react.PropTypes.instanceOf(_leaflet2.default.Map)
+ };
+ exports.default = Map;
/***/ },
-/* 122 */
+/* 129 */
/***/ function(module, exports, __webpack_require__) {
- var baseIndexOf = __webpack_require__(123);
+ var baseClone = __webpack_require__(101),
+ baseUnset = __webpack_require__(130),
+ copyObject = __webpack_require__(103),
+ flatRest = __webpack_require__(32),
+ getAllKeysIn = __webpack_require__(114);
+
+ /** Used to compose bitmasks for cloning. */
+ var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
/**
- * A specialized version of `_.includes` for arrays without support for
- * specifying an index to search from.
+ * The opposite of `_.pick`; this method creates an object composed of the
+ * own and inherited enumerable property paths of `object` that are not omitted.
*
- * @private
- * @param {Array} [array] The array to inspect.
- * @param {*} target The value to search for.
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ * **Note:** This method is considerably slower than `_.pick`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to omit.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omit(object, ['a', 'c']);
+ * // => { 'b': '2' }
*/
- function arrayIncludes(array, value) {
- var length = array ? array.length : 0;
- return !!length && baseIndexOf(array, value, 0) > -1;
- }
+ var omit = flatRest(function(object, paths) {
+ var result = {};
+ if (object == null) {
+ return result;
+ }
+ copyObject(object, getAllKeysIn(object), result);
+ result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG);
+
+ var length = paths.length;
+ while (length--) {
+ baseUnset(result, paths[length]);
+ }
+ return result;
+ });
- module.exports = arrayIncludes;
+ module.exports = omit;
/***/ },
-/* 123 */
+/* 130 */
/***/ function(module, exports, __webpack_require__) {
- var baseFindIndex = __webpack_require__(124),
- baseIsNaN = __webpack_require__(125),
- strictIndexOf = __webpack_require__(126);
-
- /**
- * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseIndexOf(array, value, fromIndex) {
- return value === value
- ? strictIndexOf(array, value, fromIndex)
- : baseFindIndex(array, baseIsNaN, fromIndex);
- }
-
- module.exports = baseIndexOf;
+ var castPath = __webpack_require__(26),
+ isKey = __webpack_require__(28),
+ last = __webpack_require__(131),
+ parent = __webpack_require__(132),
+ toKey = __webpack_require__(30);
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
-/***/ },
-/* 124 */
-/***/ function(module, exports) {
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
- * support for iteratee shorthands.
+ * The base implementation of `_.unset`.
*
* @private
- * @param {Array} array The array to inspect.
- * @param {Function} predicate The function invoked per iteration.
- * @param {number} fromIndex The index to search from.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched value, else `-1`.
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The property path to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
*/
- function baseFindIndex(array, predicate, fromIndex, fromRight) {
- var length = array.length,
- index = fromIndex + (fromRight ? 1 : -1);
+ function baseUnset(object, path) {
+ path = isKey(path, object) ? [path] : castPath(path);
+ object = parent(object, path);
- while ((fromRight ? index-- : ++index < length)) {
- if (predicate(array[index], index, array)) {
- return index;
- }
- }
- return -1;
+ var key = toKey(last(path));
+ return !(object != null && hasOwnProperty.call(object, key)) || delete object[key];
}
- module.exports = baseFindIndex;
+ module.exports = baseUnset;
/***/ },
-/* 125 */
+/* 131 */
/***/ function(module, exports) {
/**
- * The base implementation of `_.isNaN` without support for number objects.
+ * Gets the last element of `array`.
*
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
*/
- function baseIsNaN(value) {
- return value !== value;
+ function last(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined;
}
- module.exports = baseIsNaN;
+ module.exports = last;
/***/ },
-/* 126 */
-/***/ function(module, exports) {
+/* 132 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var baseGet = __webpack_require__(19),
+ baseSlice = __webpack_require__(133);
/**
- * A specialized version of `_.indexOf` which performs strict equality
- * comparisons of values, i.e. `===`.
+ * Gets the parent value at `path` of `object`.
*
* @private
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
+ * @param {Object} object The object to query.
+ * @param {Array} path The path to get the parent value of.
+ * @returns {*} Returns the parent value.
*/
- function strictIndexOf(array, value, fromIndex) {
- var index = fromIndex - 1,
- length = array.length;
-
- while (++index < length) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
+ function parent(object, path) {
+ return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
}
- module.exports = strictIndexOf;
+ module.exports = parent;
/***/ },
-/* 127 */
+/* 133 */
/***/ function(module, exports) {
/**
- * This function is like `arrayIncludes` except that it accepts a comparator.
+ * The base implementation of `_.slice` without an iteratee call guard.
*
* @private
- * @param {Array} [array] The array to inspect.
- * @param {*} target The value to search for.
- * @param {Function} comparator The comparator invoked per element.
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
*/
- function arrayIncludesWith(array, value, comparator) {
+ function baseSlice(array, start, end) {
var index = -1,
- length = array ? array.length : 0;
+ length = array.length;
- while (++index < length) {
- if (comparator(value, array[index])) {
- return true;
- }
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
}
- return false;
- }
-
- module.exports = arrayIncludesWith;
-
-
-/***/ },
-/* 128 */
-/***/ function(module, exports) {
-
- /**
- * The base implementation of `_.unary` without support for storing metadata.
- *
- * @private
- * @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new capped function.
- */
- function baseUnary(func) {
- return function(value) {
- return func(value);
- };
- }
-
- module.exports = baseUnary;
-
-
-/***/ },
-/* 129 */
-/***/ function(module, exports) {
+ end = end > length ? length : end;
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
- /**
- * This function is like
- * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * except that it includes inherited enumerable properties.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function nativeKeysIn(object) {
- var result = [];
- if (object != null) {
- for (var key in Object(object)) {
- result.push(key);
- }
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
}
return result;
}
- module.exports = nativeKeysIn;
+ module.exports = baseSlice;
/***/ },
-/* 130 */
+/* 134 */
/***/ function(module, exports) {
/**
@@ -5071,22 +5177,28 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 131 */
+/* 135 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
+
+ var _react = __webpack_require__(3);
- var _react = __webpack_require__(4);
+ var _react2 = _interopRequireDefault(_react);
+
+ var _children = __webpack_require__(7);
+
+ var _children2 = _interopRequireDefault(_children);
var _latlng = __webpack_require__(6);
var _latlng2 = _interopRequireDefault(_latlng);
- var _MapLayer2 = __webpack_require__(15);
+ var _MapLayer2 = __webpack_require__(82);
var _MapLayer3 = _interopRequireDefault(_MapLayer2);
@@ -5124,7 +5236,7 @@ return /******/ (function(modules) { // webpackBootstrap
position = _props.position,
props = _objectWithoutProperties(_props, ['position']);
- this.leafletElement = (0, _leaflet.marker)(position, props);
+ this.leafletElement = (0, _leaflet.marker)(position, this.getOptions(props));
};
Marker.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
@@ -5157,6 +5269,7 @@ return /******/ (function(modules) { // webpackBootstrap
}(_MapLayer3.default);
Marker.propTypes = {
+ children: _children2.default,
icon: _react.PropTypes.instanceOf(_leaflet.Icon),
opacity: _react.PropTypes.number,
position: _latlng2.default.isRequired,
@@ -5168,154 +5281,358 @@ return /******/ (function(modules) { // webpackBootstrap
exports.default = Marker;
/***/ },
-/* 132 */
+/* 136 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _uniqueId2 = __webpack_require__(137);
- var _react = __webpack_require__(4);
+ var _uniqueId3 = _interopRequireDefault(_uniqueId2);
- var _latlngList = __webpack_require__(5);
+ var _omit2 = __webpack_require__(129);
- var _latlngList2 = _interopRequireDefault(_latlngList);
+ var _omit3 = _interopRequireDefault(_omit2);
- var _Path2 = __webpack_require__(91);
+ var _forEach2 = __webpack_require__(97);
- var _Path3 = _interopRequireDefault(_Path2);
+ var _forEach3 = _interopRequireDefault(_forEach2);
+
+ var _react = __webpack_require__(3);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _warning = __webpack_require__(139);
+
+ var _warning2 = _interopRequireDefault(_warning);
+
+ var _children = __webpack_require__(7);
+
+ var _children2 = _interopRequireDefault(_children);
+
+ var _map = __webpack_require__(10);
+
+ var _map2 = _interopRequireDefault(_map);
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 _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) : _defaults(subClass, superClass); }
- var MultiPolygon = function (_Path) {
- _inherits(MultiPolygon, _Path);
+ var LEAFLET_PANES = ['tile', 'shadow', 'overlay', 'map', 'marker', 'tooltip', 'popup'];
- function MultiPolygon() {
- _classCallCheck(this, MultiPolygon);
+ var isLeafletPane = function isLeafletPane(name) {
+ return LEAFLET_PANES.indexOf(name.replace(/-*pane/gi, '')) !== -1;
+ };
- return _possibleConstructorReturn(this, _Path.apply(this, arguments));
+ var paneStyles = {
+ position: 'absolute',
+ top: 0,
+ right: 0,
+ bottom: 0,
+ left: 0
+ };
+
+ var Pane = function (_Component) {
+ _inherits(Pane, _Component);
+
+ function Pane() {
+ var _temp, _this, _ret;
+
+ _classCallCheck(this, Pane);
+
+ 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.state = {
+ name: undefined
+ }, _this.setStyle = function () {
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.props,
+ style = _ref.style,
+ className = _ref.className;
+
+ var pane = _this.getPane(_this.state.name);
+ if (pane) {
+ if (className) {
+ pane.classList.add(className);
+ }
+ if (style) {
+ (0, _forEach3.default)(style, function (value, key) {
+ pane.style[key] = value;
+ });
+ }
+ }
+ }, _temp), _possibleConstructorReturn(_this, _ret);
}
- MultiPolygon.prototype.componentWillMount = function componentWillMount() {
- _Path.prototype.componentWillMount.call(this);
+ Pane.prototype.getChildContext = function getChildContext() {
+ return {
+ pane: this.state.name
+ };
+ };
- var _props = this.props,
- polygons = _props.polygons,
- props = _objectWithoutProperties(_props, ['polygons']);
+ Pane.prototype.componentDidMount = function componentDidMount() {
+ this.createPane(this.props);
+ };
+
+ Pane.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+ if (!this.state.name) {
+ // Do nothing if this.state.name is undefined due to errors or
+ // an invalid props.name value
+ return;
+ }
+
+ // If the 'name' prop has changed the current pane is unmounted and a new
+ // pane is created.
+ if (nextProps.name !== this.props.name) {
+ this.removePane();
+ this.createPane(nextProps);
+ } else {
+ // Remove the previous css class name from the pane if it has changed.
+ // setStyle will take care of adding in the updated className
+ if (this.props.className && nextProps.className !== this.props.className) {
+ var _pane = this.getPane();
+ if (_pane) _pane.classList.remove(this.props.className);
+ }
+
+ // Update the pane's DOM node style and class
+ this.setStyle(nextProps);
+ }
+ };
- this.leafletElement = (0, _leaflet.multiPolygon)(polygons, props);
+ Pane.prototype.componentWillUnmount = function componentWillUnmount() {
+ this.removePane();
};
- MultiPolygon.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
- if (this.props.polygons !== prevProps.polygons) {
- this.leafletElement.setLatLngs(this.props.polygons);
+ Pane.prototype.createPane = function createPane(props) {
+ var map = this.context.map;
+ var name = props.name || 'pane-' + (0, _uniqueId3.default)();
+
+ if (map && map.createPane) {
+ var isDefault = isLeafletPane(name);
+ var existing = isDefault || this.getPane(name);
+
+ if (!existing) {
+ map.createPane(name, this.getParentPane());
+ } else {
+ var message = isDefault ? 'You must use a unique name for a pane that is not a default leaflet pane (' + name + ')' : 'A pane with this name already exists. (' + name + ')';
+ true ? (0, _warning2.default)(false, message) : void 0;
+ }
+
+ this.setState({ name: name }, this.setStyle);
}
- this.setStyleIfChanged(prevProps, this.props);
};
- return MultiPolygon;
- }(_Path3.default);
+ Pane.prototype.removePane = function removePane() {
+ // Remove the created pane
+ var name = this.state.name;
- MultiPolygon.propTypes = {
- polygons: _react.PropTypes.arrayOf(_react.PropTypes.oneOfType([_latlngList2.default, _react.PropTypes.arrayOf(_latlngList2.default)])).isRequired
- };
- exports.default = MultiPolygon;
+ if (name) {
+ var _pane2 = this.getPane(name);
+ if (_pane2 && _pane2.remove) _pane2.remove();
-/***/ },
-/* 133 */
-/***/ function(module, exports, __webpack_require__) {
+ var map = this.context.map;
+ if (map && map._panes) {
+ map._panes = (0, _omit3.default)(map._panes, name);
+ map._paneRenderers = (0, _omit3.default)(map._paneRenderers, name);
+ }
- 'use strict';
+ this.setState({ name: undefined });
+ }
+ };
- exports.__esModule = true;
+ Pane.prototype.getParentPane = function getParentPane() {
+ return this.getPane(this.props.pane || this.context.pane);
+ };
- var _leaflet = __webpack_require__(1);
+ Pane.prototype.getPane = function getPane(name) {
+ return name ? this.context.map.getPane(name) : undefined;
+ };
- var _react = __webpack_require__(4);
+ Pane.prototype.render = function render() {
+ return this.state.name ? _react2.default.createElement(
+ 'div',
+ { style: paneStyles },
+ this.props.children
+ ) : null;
+ };
- var _latlngList = __webpack_require__(5);
+ return Pane;
+ }(_react.Component);
- var _latlngList2 = _interopRequireDefault(_latlngList);
+ Pane.propTypes = {
+ name: _react.PropTypes.string,
+ children: _children2.default,
+ map: _map2.default,
+ className: _react.PropTypes.string,
+ style: _react.PropTypes.object,
+ pane: _react.PropTypes.string
+ };
+ Pane.contextTypes = {
+ map: _map2.default,
+ pane: _react.PropTypes.string
+ };
+ Pane.childContextTypes = {
+ pane: _react.PropTypes.string
+ };
+ exports.default = Pane;
- var _Path2 = __webpack_require__(91);
+/***/ },
+/* 137 */
+/***/ function(module, exports, __webpack_require__) {
- var _Path3 = _interopRequireDefault(_Path2);
+ var toString = __webpack_require__(138);
+
+ /** Used to generate unique IDs. */
+ var idCounter = 0;
+
+ /**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+ function uniqueId(prefix) {
+ var id = ++idCounter;
+ return toString(prefix) + id;
+ }
+
+ module.exports = uniqueId;
- 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; }
+/***/ },
+/* 138 */
+/***/ function(module, exports) {
- 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; }
+ /**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+ module.exports = identity;
- 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); }
+/***/ },
+/* 139 */
+/***/ function(module, exports, __webpack_require__) {
- var MultiPolyline = function (_Path) {
- _inherits(MultiPolyline, _Path);
+ /**
+ * 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.
+ */
- function MultiPolyline() {
- _classCallCheck(this, MultiPolyline);
+ 'use strict';
- return _possibleConstructorReturn(this, _Path.apply(this, arguments));
- }
+ /**
+ * 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.
+ */
- MultiPolyline.prototype.componentWillMount = function componentWillMount() {
- _Path.prototype.componentWillMount.call(this);
+ var warning = function() {};
- var _props = this.props,
- polylines = _props.polylines,
- props = _objectWithoutProperties(_props, ['polylines']);
+ if (true) {
+ 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'
+ );
+ }
- this.leafletElement = (0, _leaflet.multiPolyline)(polylines, props);
- };
+ 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
+ );
+ }
- MultiPolyline.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
- if (this.props.polylines !== prevProps.polylines) {
- this.leafletElement.setLatLngs(this.props.polylines);
+ 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) {}
}
- this.setStyleIfChanged(prevProps, this.props);
};
+ }
- return MultiPolyline;
- }(_Path3.default);
+ module.exports = warning;
- MultiPolyline.propTypes = {
- polylines: _react.PropTypes.arrayOf(_latlngList2.default).isRequired
- };
- exports.default = MultiPolyline;
/***/ },
-/* 134 */
+/* 140 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
- var _react = __webpack_require__(4);
+ var _react = __webpack_require__(3);
+
+ var _children = __webpack_require__(7);
+
+ var _children2 = _interopRequireDefault(_children);
var _latlngList = __webpack_require__(5);
var _latlngList2 = _interopRequireDefault(_latlngList);
- var _Path2 = __webpack_require__(91);
+ var _Path2 = __webpack_require__(14);
var _Path3 = _interopRequireDefault(_Path2);
@@ -5331,6 +5648,8 @@ return /******/ (function(modules) { // webpackBootstrap
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 multiLatLngListType = _react.PropTypes.arrayOf(_latlngList2.default);
+
var Polygon = function (_Path) {
_inherits(Polygon, _Path);
@@ -5347,7 +5666,7 @@ return /******/ (function(modules) { // webpackBootstrap
positions = _props.positions,
props = _objectWithoutProperties(_props, ['positions']);
- this.leafletElement = (0, _leaflet.polygon)(positions, props);
+ this.leafletElement = (0, _leaflet.polygon)(positions, this.getOptions(props));
};
Polygon.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
@@ -5361,25 +5680,33 @@ return /******/ (function(modules) { // webpackBootstrap
}(_Path3.default);
Polygon.propTypes = {
- positions: _react.PropTypes.oneOfType([_latlngList2.default, _react.PropTypes.arrayOf(_latlngList2.default)]).isRequired
+ children: _children2.default,
+ popupContainer: _react.PropTypes.object,
+ positions: _react.PropTypes.oneOfType([_latlngList2.default, multiLatLngListType, _react.PropTypes.arrayOf(multiLatLngListType)]).isRequired
};
exports.default = Polygon;
/***/ },
-/* 135 */
+/* 141 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
+
+ var _react = __webpack_require__(3);
+
+ var _children = __webpack_require__(7);
+
+ var _children2 = _interopRequireDefault(_children);
var _latlngList = __webpack_require__(5);
var _latlngList2 = _interopRequireDefault(_latlngList);
- var _Path2 = __webpack_require__(91);
+ var _Path2 = __webpack_require__(14);
var _Path3 = _interopRequireDefault(_Path2);
@@ -5411,7 +5738,7 @@ return /******/ (function(modules) { // webpackBootstrap
positions = _props.positions,
props = _objectWithoutProperties(_props, ['positions']);
- this.leafletElement = (0, _leaflet.polyline)(positions, props);
+ this.leafletElement = (0, _leaflet.polyline)(positions, this.getOptions(props));
};
Polyline.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
@@ -5425,23 +5752,24 @@ return /******/ (function(modules) { // webpackBootstrap
}(_Path3.default);
Polyline.propTypes = {
- positions: _latlngList2.default.isRequired
+ children: _children2.default,
+ positions: _react.PropTypes.oneOfType([_latlngList2.default, _react.PropTypes.arrayOf(_latlngList2.default)]).isRequired
};
exports.default = Polyline;
/***/ },
-/* 136 */
+/* 142 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
- var _react = __webpack_require__(4);
+ var _react = __webpack_require__(3);
- var _reactDom = __webpack_require__(137);
+ var _reactDom = __webpack_require__(143);
var _latlng = __webpack_require__(6);
@@ -5451,7 +5779,7 @@ return /******/ (function(modules) { // webpackBootstrap
var _map2 = _interopRequireDefault(_map);
- var _MapComponent2 = __webpack_require__(16);
+ var _MapComponent2 = __webpack_require__(83);
var _MapComponent3 = _interopRequireDefault(_MapComponent2);
@@ -5471,9 +5799,38 @@ return /******/ (function(modules) { // webpackBootstrap
_inherits(Popup, _MapComponent);
function Popup() {
+ var _temp, _this, _ret;
+
_classCallCheck(this, Popup);
- return _possibleConstructorReturn(this, _MapComponent.apply(this, arguments));
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = _possibleConstructorReturn(this, _MapComponent.call.apply(_MapComponent, [this].concat(args))), _this), _this.onPopupOpen = function (_ref) {
+ var popup = _ref.popup;
+
+ if (popup === _this.leafletElement) {
+ _this.renderPopupContent();
+ }
+ }, _this.onPopupClose = function (_ref2) {
+ var popup = _ref2.popup;
+
+ if (popup === _this.leafletElement) {
+ _this.removePopupContent();
+ }
+ }, _this.renderPopupContent = function () {
+ if (_this.props.children) {
+ (0, _reactDom.render)(_react.Children.only(_this.props.children), _this.leafletElement._contentNode);
+ _this.leafletElement.update();
+ } else {
+ _this.removePopupContent();
+ }
+ }, _this.removePopupContent = function () {
+ if (_this.leafletElement._contentNode) {
+ (0, _reactDom.unmountComponentAtNode)(_this.leafletElement._contentNode);
+ }
+ }, _temp), _possibleConstructorReturn(_this, _ret);
}
Popup.prototype.componentWillMount = function componentWillMount() {
@@ -5483,9 +5840,12 @@ return /******/ (function(modules) { // webpackBootstrap
_children = _props.children,
props = _objectWithoutProperties(_props, ['children']);
- this.leafletElement = (0, _leaflet.popup)(props, this.context.popupContainer);
- this.leafletElement.on('open', this.renderPopupContent.bind(this));
- this.leafletElement.on('close', this.removePopupContent.bind(this));
+ this.leafletElement = (0, _leaflet.popup)(this.getOptions(props), this.context.popupContainer);
+
+ this.context.map.on({
+ popupopen: this.onPopupOpen,
+ popupclose: this.onPopupClose
+ });
};
Popup.prototype.componentDidMount = function componentDidMount() {
@@ -5516,33 +5876,18 @@ return /******/ (function(modules) { // webpackBootstrap
this.leafletElement.setLatLng(position);
}
- if (this.leafletElement._isOpen) {
+ if (this.leafletElement.isOpen()) {
this.renderPopupContent();
}
};
Popup.prototype.componentWillUnmount = function componentWillUnmount() {
- _MapComponent.prototype.componentWillUnmount.call(this);
- this.removePopupContent();
+ this.context.map.off({
+ popupopen: this.onPopupOpen,
+ popupclose: this.onPopupClose
+ });
this.context.map.removeLayer(this.leafletElement);
- };
-
- Popup.prototype.renderPopupContent = function renderPopupContent() {
- if (this.props.children) {
- (0, _reactDom.render)(_react.Children.only(this.props.children), this.leafletElement._contentNode);
-
- this.leafletElement._updateLayout();
- this.leafletElement._updatePosition();
- this.leafletElement._adjustPan();
- } else {
- this.removePopupContent();
- }
- };
-
- Popup.prototype.removePopupContent = function removePopupContent() {
- if (this.leafletElement._contentNode) {
- (0, _reactDom.unmountComponentAtNode)(this.leafletElement._contentNode);
- }
+ _MapComponent.prototype.componentWillUnmount.call(this);
};
Popup.prototype.render = function render() {
@@ -5558,31 +5903,38 @@ return /******/ (function(modules) { // webpackBootstrap
};
Popup.contextTypes = {
map: _map2.default,
- popupContainer: _react.PropTypes.object
+ popupContainer: _react.PropTypes.object,
+ pane: _react.PropTypes.string
};
exports.default = Popup;
/***/ },
-/* 137 */
+/* 143 */
/***/ function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE_137__;
+ module.exports = __WEBPACK_EXTERNAL_MODULE_143__;
/***/ },
-/* 138 */
+/* 144 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
+
+ var _react = __webpack_require__(3);
- var _bounds = __webpack_require__(3);
+ var _bounds = __webpack_require__(2);
var _bounds2 = _interopRequireDefault(_bounds);
- var _Path2 = __webpack_require__(91);
+ var _children = __webpack_require__(7);
+
+ var _children2 = _interopRequireDefault(_children);
+
+ var _Path2 = __webpack_require__(14);
var _Path3 = _interopRequireDefault(_Path2);
@@ -5614,7 +5966,7 @@ return /******/ (function(modules) { // webpackBootstrap
bounds = _props.bounds,
props = _objectWithoutProperties(_props, ['bounds']);
- this.leafletElement = (0, _leaflet.rectangle)(bounds, props);
+ this.leafletElement = (0, _leaflet.rectangle)(bounds, this.getOptions(props));
};
Rectangle.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
@@ -5628,21 +5980,27 @@ return /******/ (function(modules) { // webpackBootstrap
}(_Path3.default);
Rectangle.propTypes = {
- bounds: _bounds2.default.isRequired
+ children: _children2.default,
+ bounds: _bounds2.default.isRequired,
+ popupContainer: _react.PropTypes.object
};
exports.default = Rectangle;
/***/ },
-/* 139 */
+/* 145 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
+
+ var _react = __webpack_require__(3);
+
+ var _controlPosition = __webpack_require__(8);
- var _react = __webpack_require__(4);
+ var _controlPosition2 = _interopRequireDefault(_controlPosition);
var _MapControl2 = __webpack_require__(12);
@@ -5678,25 +6036,30 @@ return /******/ (function(modules) { // webpackBootstrap
imperial: _react.PropTypes.bool,
maxWidth: _react.PropTypes.number,
metric: _react.PropTypes.bool,
+ position: _controlPosition2.default,
updateWhenIdle: _react.PropTypes.bool
};
exports.default = ScaleControl;
/***/ },
-/* 140 */
+/* 146 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
+
+ var _react = __webpack_require__(3);
- var _react = __webpack_require__(4);
+ var _children = __webpack_require__(7);
+
+ var _children2 = _interopRequireDefault(_children);
- var _BaseTileLayer2 = __webpack_require__(14);
+ var _GridLayer2 = __webpack_require__(124);
- var _BaseTileLayer3 = _interopRequireDefault(_BaseTileLayer2);
+ var _GridLayer3 = _interopRequireDefault(_GridLayer2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -5710,27 +6073,27 @@ return /******/ (function(modules) { // webpackBootstrap
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 TileLayer = function (_BaseTileLayer) {
- _inherits(TileLayer, _BaseTileLayer);
+ var TileLayer = function (_GridLayer) {
+ _inherits(TileLayer, _GridLayer);
function TileLayer() {
_classCallCheck(this, TileLayer);
- return _possibleConstructorReturn(this, _BaseTileLayer.apply(this, arguments));
+ return _possibleConstructorReturn(this, _GridLayer.apply(this, arguments));
}
TileLayer.prototype.componentWillMount = function componentWillMount() {
- _BaseTileLayer.prototype.componentWillMount.call(this);
+ _GridLayer.prototype.componentWillMount.call(this);
var _props = this.props,
url = _props.url,
props = _objectWithoutProperties(_props, ['url']);
- this.leafletElement = (0, _leaflet.tileLayer)(url, props);
+ this.leafletElement = (0, _leaflet.tileLayer)(url, this.getOptions(props));
};
TileLayer.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
- _BaseTileLayer.prototype.componentDidUpdate.call(this, prevProps);
+ _GridLayer.prototype.componentDidUpdate.call(this, prevProps);
var url = this.props.url;
if (url !== prevProps.url) {
@@ -5739,28 +6102,162 @@ return /******/ (function(modules) { // webpackBootstrap
};
return TileLayer;
- }(_BaseTileLayer3.default);
+ }(_GridLayer3.default);
TileLayer.propTypes = {
- url: _react.PropTypes.string.isRequired
+ children: _children2.default,
+ opacity: _react.PropTypes.number,
+ url: _react.PropTypes.string.isRequired,
+ zIndex: _react.PropTypes.number
};
exports.default = TileLayer;
/***/ },
-/* 141 */
+/* 147 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ exports.__esModule = true;
+
+ var _leaflet = __webpack_require__(4);
+
+ var _react = __webpack_require__(3);
+
+ var _reactDom = __webpack_require__(143);
+
+ var _map = __webpack_require__(10);
+
+ var _map2 = _interopRequireDefault(_map);
+
+ var _MapComponent2 = __webpack_require__(83);
+
+ var _MapComponent3 = _interopRequireDefault(_MapComponent2);
+
+ 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 _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) : _defaults(subClass, superClass); }
+
+ var Tooltip = function (_MapComponent) {
+ _inherits(Tooltip, _MapComponent);
+
+ function Tooltip() {
+ var _temp, _this, _ret;
+
+ _classCallCheck(this, Tooltip);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = _possibleConstructorReturn(this, _MapComponent.call.apply(_MapComponent, [this].concat(args))), _this), _this.onTooltipOpen = function (_ref) {
+ var tooltip = _ref.tooltip;
+
+ if (tooltip === _this.leafletElement) {
+ _this.renderTooltipContent();
+ }
+ }, _this.onTooltipClose = function (_ref2) {
+ var tooltip = _ref2.tooltip;
+
+ if (tooltip === _this.leafletElement) {
+ _this.removeTooltipContent();
+ }
+ }, _this.renderTooltipContent = function () {
+ if (_this.props.children) {
+ (0, _reactDom.render)(_react.Children.only(_this.props.children), _this.leafletElement._contentNode);
+ _this.leafletElement.update();
+ } else {
+ _this.removeTooltipContent();
+ }
+ }, _this.removeTooltipContent = function () {
+ if (_this.leafletElement._contentNode) {
+ (0, _reactDom.unmountComponentAtNode)(_this.leafletElement._contentNode);
+ }
+ }, _temp), _possibleConstructorReturn(_this, _ret);
+ }
+
+ Tooltip.prototype.componentWillMount = function componentWillMount() {
+ _MapComponent.prototype.componentWillMount.call(this);
+
+ var _props = this.props,
+ _children = _props.children,
+ props = _objectWithoutProperties(_props, ['children']);
+
+ this.leafletElement = (0, _leaflet.tooltip)(this.getOptions(props), this.context.popupContainer);
+
+ this.context.popupContainer.on({
+ tooltipopen: this.onTooltipOpen,
+ tooltipclose: this.onTooltipClose
+ });
+ };
+
+ Tooltip.prototype.componentDidMount = function componentDidMount() {
+ this.context.popupContainer.bindTooltip(this.leafletElement);
+ };
+
+ Tooltip.prototype.componentDidUpdate = function componentDidUpdate() {
+ if (this.leafletElement.isOpen()) {
+ this.renderTooltipContent();
+ }
+ };
+
+ Tooltip.prototype.componentWillUnmount = function componentWillUnmount() {
+ this.context.popupContainer.off({
+ tooltipopen: this.onTooltipOpen,
+ tooltipclose: this.onTooltipClose
+ });
+ this.context.map.removeLayer(this.leafletElement);
+ _MapComponent.prototype.componentWillUnmount.call(this);
+ };
+
+ Tooltip.prototype.render = function render() {
+ return null;
+ };
+
+ return Tooltip;
+ }(_MapComponent3.default);
+
+ Tooltip.propTypes = {
+ children: _react.PropTypes.node
+ };
+ Tooltip.contextTypes = {
+ map: _map2.default,
+ popupContainer: _react.PropTypes.object,
+ pane: _react.PropTypes.string
+ };
+ exports.default = Tooltip;
+
+/***/ },
+/* 148 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _isEqual2 = __webpack_require__(33);
- var _react = __webpack_require__(4);
+ var _isEqual3 = _interopRequireDefault(_isEqual2);
+
+ var _leaflet = __webpack_require__(4);
+
+ var _react = __webpack_require__(3);
+
+ var _children = __webpack_require__(7);
+
+ var _children2 = _interopRequireDefault(_children);
- var _BaseTileLayer2 = __webpack_require__(14);
+ var _GridLayer2 = __webpack_require__(124);
- var _BaseTileLayer3 = _interopRequireDefault(_BaseTileLayer2);
+ var _GridLayer3 = _interopRequireDefault(_GridLayer2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -5774,49 +6271,72 @@ return /******/ (function(modules) { // webpackBootstrap
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 WMSTileLayer = function (_BaseTileLayer) {
- _inherits(WMSTileLayer, _BaseTileLayer);
+ var WMSTileLayer = function (_GridLayer) {
+ _inherits(WMSTileLayer, _GridLayer);
function WMSTileLayer() {
_classCallCheck(this, WMSTileLayer);
- return _possibleConstructorReturn(this, _BaseTileLayer.apply(this, arguments));
+ return _possibleConstructorReturn(this, _GridLayer.apply(this, arguments));
}
WMSTileLayer.prototype.componentWillMount = function componentWillMount() {
- _BaseTileLayer.prototype.componentWillMount.call(this);
+ _GridLayer.prototype.componentWillMount.call(this);
var _props = this.props,
url = _props.url,
props = _objectWithoutProperties(_props, ['url']);
- this.leafletElement = _leaflet.tileLayer.wms(url, props);
+ this.leafletElement = _leaflet.tileLayer.wms(url, this.getOptions(props));
+ };
+
+ WMSTileLayer.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
+ var prevUrl = prevProps.url,
+ prevParams = _objectWithoutProperties(prevProps, ['url']);
+
+ var _props2 = this.props,
+ url = _props2.url,
+ params = _objectWithoutProperties(_props2, ['url']);
+
+ if (url !== prevUrl) {
+ this.leafletElement.setUrl(url);
+ }
+ if (!(0, _isEqual3.default)(params, prevParams)) {
+ this.leafletElement.setParams(params);
+ }
};
return WMSTileLayer;
- }(_BaseTileLayer3.default);
+ }(_GridLayer3.default);
WMSTileLayer.propTypes = {
- url: _react.PropTypes.string.isRequired
+ children: _children2.default,
+ opacity: _react.PropTypes.number,
+ url: _react.PropTypes.string.isRequired,
+ zIndex: _react.PropTypes.number
};
exports.default = WMSTileLayer;
/***/ },
-/* 142 */
+/* 149 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _leaflet = __webpack_require__(1);
+ var _leaflet = __webpack_require__(4);
- var _react = __webpack_require__(4);
+ var _react = __webpack_require__(3);
var _MapControl2 = __webpack_require__(12);
var _MapControl3 = _interopRequireDefault(_MapControl2);
+ var _controlPosition = __webpack_require__(8);
+
+ var _controlPosition2 = _interopRequireDefault(_controlPosition);
+
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; }
@@ -5844,6 +6364,7 @@ return /******/ (function(modules) { // webpackBootstrap
}(_MapControl3.default);
ZoomControl.propTypes = {
+ position: _controlPosition2.default,
zoomInText: _react.PropTypes.string,
zoomInTitle: _react.PropTypes.string,
zoomOutText: _react.PropTypes.string,
diff --git a/dist/react-leaflet.min.js b/dist/react-leaflet.min.js
index 44f978c4..5f3d0e5e 100644
--- a/dist/react-leaflet.min.js
+++ b/dist/react-leaflet.min.js
@@ -1,3 +1,3 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("leaflet"),require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["leaflet","react","react-dom"],e):"object"==typeof exports?exports.ReactLeaflet=e(require("leaflet"),require("react"),require("react-dom")):t.ReactLeaflet=e(t.L,t.React,t.ReactDOM)}(this,function(t,e,n){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return t[o].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.setIconDefaultImagePath=e.ZoomControl=e.WMSTileLayer=e.TileLayer=e.ScaleControl=e.Rectangle=e.Popup=e.Polyline=e.Polygon=e.Path=e.MultiPolyline=e.MultiPolygon=e.Marker=e.MapLayer=e.MapControl=e.MapComponent=e.Map=e.LayersControl=e.LayerGroup=e.ImageOverlay=e.GeoJson=e.FeatureGroup=e.CircleMarker=e.Circle=e.CanvasTileLayer=e.BaseTileLayer=e.AttributionControl=e.PropTypes=void 0;var i=n(1),u=r(i),p=n(2),a=o(p),s=n(11),c=r(s),l=n(14),f=r(l),y=n(89),h=r(y),d=n(90),b=r(d),v=n(111),m=r(v),O=n(112),g=r(O),w=n(113),j=r(w),P=n(114),_=r(P),x=n(115),T=r(x),E=n(116),M=r(E),C=n(117),L=r(C),D=n(16),R=r(D),W=n(12),S=r(W),U=n(15),N=r(U),z=n(131),I=r(z),k=n(132),q=r(k),A=n(133),B=r(A),F=n(91),G=r(F),Z=n(134),J=r(Z),V=n(135),$=r(V),H=n(136),K=r(H),Q=n(138),X=r(Q),Y=n(139),tt=r(Y),et=n(140),nt=r(et),ot=n(141),rt=r(ot),it=n(142),ut=r(it);e.PropTypes=a,e.AttributionControl=c.default,e.BaseTileLayer=f.default,e.CanvasTileLayer=h.default,e.Circle=b.default,e.CircleMarker=m.default,e.FeatureGroup=g.default,e.GeoJson=j.default,e.ImageOverlay=_.default,e.LayerGroup=T.default,e.LayersControl=M.default,e.Map=L.default,e.MapComponent=R.default,e.MapControl=S.default,e.MapLayer=N.default,e.Marker=I.default,e.MultiPolygon=q.default,e.MultiPolyline=B.default,e.Path=G.default,e.Polygon=J.default,e.Polyline=$.default,e.Popup=K.default,e.Rectangle=X.default,e.ScaleControl=tt.default,e.TileLayer=nt.default,e.WMSTileLayer=rt.default,e.ZoomControl=ut.default;var pt=e.setIconDefaultImagePath=function(t){u.default.Icon.Default.imagePath=t};pt("//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images")},function(e,n){e.exports=t},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.map=e.layerContainer=e.latlngList=e.latlng=e.controlPosition=e.children=e.bounds=void 0;var r=n(3),i=o(r),u=n(7),p=o(u),a=n(8),s=o(a),c=n(6),l=o(c),f=n(5),y=o(f),h=n(9),d=o(h),b=n(10),v=o(b);e.bounds=i.default,e.children=p.default,e.controlPosition=s.default,e.latlng=l.default,e.latlngList=y.default,e.layerContainer=d.default,e.map=v.default},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(4),i=n(1),u=n(5),p=o(u);e.default=r.PropTypes.oneOfType([r.PropTypes.instanceOf(i.LatLngBounds),p.default])},function(t,n){t.exports=e},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(4),i=n(6),u=o(i);e.default=r.PropTypes.arrayOf(u.default)},function(t,e,n){"use strict";e.__esModule=!0;var o=n(4);e.default=o.PropTypes.oneOfType([o.PropTypes.arrayOf(o.PropTypes.number),o.PropTypes.shape({lat:o.PropTypes.number,lng:o.PropTypes.number}),o.PropTypes.shape({lat:o.PropTypes.number,lon:o.PropTypes.number})])},function(t,e,n){"use strict";e.__esModule=!0;var o=n(4);e.default=o.PropTypes.oneOfType([o.PropTypes.arrayOf(o.PropTypes.node),o.PropTypes.node])},function(t,e,n){"use strict";e.__esModule=!0;var o=n(4);e.default=o.PropTypes.oneOf(["topleft","topright","bottomleft","bottomright"])},function(t,e,n){"use strict";e.__esModule=!0;var o=n(4);e.default=o.PropTypes.shape({addLayer:o.PropTypes.func.isRequired,removeLayer:o.PropTypes.func.isRequired})},function(t,e,n){"use strict";e.__esModule=!0;var o=n(1),r=n(4);e.default=r.PropTypes.instanceOf(o.Map)},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.leafletElement;if(!n||!n.on)return{};var o=(0,d.default)(e);return(0,y.default)(e,function(e,r){t[r]&&e===t[r]||(delete o[r],n.off(r,e))}),(0,y.default)(t,function(t,r){e[r]&&t===e[r]||(o[r]=t,n.on(r,t))}),o},e.prototype.fireLeafletEvent=function(t,e){var n=this.leafletElement;n&&n.fire(t,e)},e}(b.Component);e.default=O},function(t,e,n){function o(t,e,n){var o=a(t)?r:p,s=arguments.length<3;return o(t,u(e,4),n,s,i)}var r=n(18),i=n(19),u=n(30),p=n(31),a=n(32);t.exports=o},function(t,e){function n(t,e,n,o){var r=-1,i=t?t.length:0;for(o&&i&&(n=t[++r]);++r-1&&t%1==0&&t<=o}var o=9007199254740991;t.exports=n},function(t,e){function n(t){return t}t.exports=n},function(t,e){function n(t,e,n,o,r){return r(t,function(t,r,i){n=o?(o=!1,t):e(n,t,r,i)}),n}t.exports=n},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){function o(t,e){var n=p(t)?r:i;return n(t,u(e,3))}var r=n(34),i=n(19),u=n(30),p=n(32);t.exports=o},function(t,e){function n(t,e){for(var n=-1,o=t?t.length:0;++n-1}var r=n(41);t.exports=o},function(t,e,n){function o(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}var r=n(41);t.exports=o},function(t,e,n){function o(){this.__data__=new r,this.size=0}var r=n(38);t.exports=o},function(t,e){function n(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}t.exports=n},function(t,e){function n(t){return this.__data__.get(t)}t.exports=n},function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},function(t,e,n){function o(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(1),c=n(4),l=n(6),f=o(l),y=n(91),h=o(y),d=function(t){function e(){return u(this,e),p(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.center,o=e.radius,r=i(e,["center","radius"]);this.leafletElement=(0,s.circle)(n,o,r)},e.prototype.componentDidUpdate=function(t){this.props.center!==t.center&&this.leafletElement.setLatLng(this.props.center),this.props.radius!==t.radius&&this.leafletElement.setRadius(this.props.radius),this.setStyleIfChanged(t,this.props)},e}(h.default);d.propTypes={center:f.default.isRequired,radius:c.PropTypes.number.isRequired},e.default=d},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:{};this.leafletElement.setStyle(t)},e.prototype.setStyleIfChanged=function(t,e){var n=this.getPathOptions(e);(0,l.default)(n,this.getPathOptions(t))||this.setStyle(n)},e}(h.default);b.childContextTypes={popupContainer:f.PropTypes.object},e.default=b},function(t,e,n){var o=n(93),r=n(94),i=n(96),u=n(97),p=i(function(t,e){return null==t?{}:r(t,o(e,u))});t.exports=p},function(t,e){function n(t,e){for(var n=-1,o=t?t.length:0,r=Array(o);++nf))return!1;var h=c.get(t);if(h&&c.get(e))return h==e;var d=-1,b=!0,v=s&p?new r:void 0;for(c.set(t,e),c.set(e,t);++d=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(1),c=n(4),l=n(6),f=o(l),y=n(91),h=o(y),d=function(t){function e(){return u(this,e),p(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.center,o=i(e,["center"]);this.leafletElement=(0,s.circleMarker)(n,o)},e.prototype.componentDidUpdate=function(t){this.props.center!==t.center&&this.leafletElement.setLatLng(this.props.center),this.props.radius!==t.radius&&this.leafletElement.setRadius(this.props.radius),this.setStyleIfChanged(t,this.props)},e}(h.default);d.propTypes={center:f.default.isRequired,radius:c.PropTypes.number},e.default=d},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(27),c=o(s),l=n(1),f=n(4),y=n(91),h=o(y),d=function(t){function e(){return u(this,e),p(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.data,o=i(e,["data"]);this.leafletElement=(0,l.geoJson)(n,o)},e.prototype.componentDidUpdate=function(t){(0,c.default)(this.props.style)?this.setStyle(this.props.style):this.setStyleIfChanged(t,this.props)},e}(h.default);d.propTypes={data:f.PropTypes.oneOfType([f.PropTypes.array,f.PropTypes.object]).isRequired},e.default=d},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(1),c=n(4),l=n(3),f=o(l),y=n(15),h=o(y),d=function(t){function e(){return u(this,e),p(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.bounds,o=e.url,r=i(e,["bounds","url"]);this.leafletElement=(0,s.imageOverlay)(o,n,r)},e.prototype.componentDidUpdate=function(t){this.props.url!==t.url&&this.leafletElement.setUrl(this.props.url),this.props.opacity!==t.opacity&&this.leafletElement.setOpacity(this.props.opacity)},e.prototype.render=function(){return null},e}(h.default);d.propTypes={attribution:c.PropTypes.string,bounds:f.default.isRequired,opacity:c.PropTypes.number,url:c.PropTypes.string.isRequired},e.default=d},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function i(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o2&&void 0!==arguments[2]&&arguments[2];n&&this.context.map.addLayer(t),this.leafletElement.addBaseLayer(t,e)},e.prototype.addOverlay=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n&&this.context.map.addLayer(t),this.leafletElement.addOverlay(t,e)},e.prototype.removeLayer=function(t){this.context.map.removeLayer(t)},e.prototype.removeLayerControl=function(t){this.leafletElement.removeLayer(t)},e.prototype.render=function(){var t=this,e=c.Children.map(this.props.children,function(e){return e?(0,c.cloneElement)(e,t.controlProps):null});return l.default.createElement("div",{style:{display:"none"}},e)},e}(O.default);_.propTypes={baseLayers:c.PropTypes.object,children:y.default,overlays:c.PropTypes.object},_.contextTypes={layerContainer:d.default,map:v.default},e.default=_,_.BaseLayer=j,_.Overlay=P},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=c&&(f=s,y=!1,e=new r(e));t:for(;++l-1}var r=n(123);t.exports=o},function(t,e,n){function o(t,e,n){return e===e?u(t,e,n):r(t,i,n)}var r=n(124),i=n(125),u=n(126);t.exports=o},function(t,e){function n(t,e,n,o){for(var r=t.length,i=n+(o?1:-1);o?i--:++i=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(1),c=n(4),l=n(6),f=o(l),y=n(15),h=o(y),d=function(t){function e(){return u(this,e),p(this,t.apply(this,arguments))}return a(e,t),e.prototype.getChildContext=function(){return{popupContainer:this.leafletElement}},e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.position,o=i(e,["position"]);this.leafletElement=(0,s.marker)(n,o)},e.prototype.componentDidUpdate=function(t){this.props.position!==t.position&&this.leafletElement.setLatLng(this.props.position),this.props.icon!==t.icon&&this.leafletElement.setIcon(this.props.icon),this.props.zIndexOffset!==t.zIndexOffset&&this.leafletElement.setZIndexOffset(this.props.zIndexOffset),this.props.opacity!==t.opacity&&this.leafletElement.setOpacity(this.props.opacity),this.props.draggable!==t.draggable&&(this.props.draggable?this.leafletElement.dragging.enable():this.leafletElement.dragging.disable())},e.prototype.render=function(){return this.props.children||null},e}(h.default);d.propTypes={icon:c.PropTypes.instanceOf(s.Icon),opacity:c.PropTypes.number,position:f.default.isRequired,zIndexOffset:c.PropTypes.number},d.childContextTypes={popupContainer:c.PropTypes.object},e.default=d},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(1),c=n(4),l=n(5),f=o(l),y=n(91),h=o(y),d=function(t){function e(){return u(this,e),p(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.polygons,o=i(e,["polygons"]);this.leafletElement=(0,s.multiPolygon)(n,o)},e.prototype.componentDidUpdate=function(t){this.props.polygons!==t.polygons&&this.leafletElement.setLatLngs(this.props.polygons),this.setStyleIfChanged(t,this.props)},e}(h.default);d.propTypes={polygons:c.PropTypes.arrayOf(c.PropTypes.oneOfType([f.default,c.PropTypes.arrayOf(f.default)])).isRequired},e.default=d},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(1),c=n(4),l=n(5),f=o(l),y=n(91),h=o(y),d=function(t){function e(){return u(this,e),p(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.polylines,o=i(e,["polylines"]);this.leafletElement=(0,s.multiPolyline)(n,o)},e.prototype.componentDidUpdate=function(t){this.props.polylines!==t.polylines&&this.leafletElement.setLatLngs(this.props.polylines),this.setStyleIfChanged(t,this.props)},e}(h.default);d.propTypes={polylines:c.PropTypes.arrayOf(f.default).isRequired},e.default=d},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(1),c=n(4),l=n(5),f=o(l),y=n(91),h=o(y),d=function(t){function e(){return u(this,e),p(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.positions,o=i(e,["positions"]);this.leafletElement=(0,s.polygon)(n,o)},e.prototype.componentDidUpdate=function(t){this.props.positions!==t.positions&&this.leafletElement.setLatLngs(this.props.positions),this.setStyleIfChanged(t,this.props)},e}(h.default);d.propTypes={positions:c.PropTypes.oneOfType([f.default,c.PropTypes.arrayOf(f.default)]).isRequired},e.default=d},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(1),c=n(5),l=o(c),f=n(91),y=o(f),h=function(t){function e(){return u(this,e),p(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.positions,o=i(e,["positions"]);this.leafletElement=(0,s.polyline)(n,o)},e.prototype.componentDidUpdate=function(t){this.props.positions!==t.positions&&this.leafletElement.setLatLngs(this.props.positions),this.setStyleIfChanged(t,this.props)},e}(y.default);h.propTypes={positions:l.default.isRequired},e.default=h},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(1),c=n(4),l=n(137),f=n(6),y=o(f),h=n(10),d=o(h),b=n(16),v=o(b),m=function(t){function e(){return u(this,e),p(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=(e.children,i(e,["children"]));this.leafletElement=(0,s.popup)(n,this.context.popupContainer),this.leafletElement.on("open",this.renderPopupContent.bind(this)),this.leafletElement.on("close",this.removePopupContent.bind(this))},e.prototype.componentDidMount=function(){var t=this.props.position,e=this.context,n=e.map,o=e.popupContainer,r=this.leafletElement;o?o.bindPopup(r):(t&&r.setLatLng(t),r.openOn(n))},e.prototype.componentDidUpdate=function(t){var e=this.props.position;e!==t.position&&this.leafletElement.setLatLng(e),this.leafletElement._isOpen&&this.renderPopupContent()},e.prototype.componentWillUnmount=function(){t.prototype.componentWillUnmount.call(this),this.removePopupContent(),this.context.map.removeLayer(this.leafletElement)},e.prototype.renderPopupContent=function(){this.props.children?((0,l.render)(c.Children.only(this.props.children),this.leafletElement._contentNode),this.leafletElement._updateLayout(),this.leafletElement._updatePosition(),this.leafletElement._adjustPan()):this.removePopupContent()},e.prototype.removePopupContent=function(){this.leafletElement._contentNode&&(0,l.unmountComponentAtNode)(this.leafletElement._contentNode)},e.prototype.render=function(){return null},e}(v.default);m.propTypes={children:c.PropTypes.node,position:y.default},m.contextTypes={map:d.default,popupContainer:c.PropTypes.object},e.default=m},function(t,e){t.exports=n},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(1),c=n(3),l=o(c),f=n(91),y=o(f),h=function(t){function e(){return u(this,e),p(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.bounds,o=i(e,["bounds"]);this.leafletElement=(0,s.rectangle)(n,o)},e.prototype.componentDidUpdate=function(t){this.props.bounds!==t.bounds&&this.leafletElement.setBounds(this.props.bounds),this.setStyleIfChanged(t,this.props)},e}(y.default);h.propTypes={bounds:l.default.isRequired},e.default=h},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(1),c=n(4),l=n(14),f=o(l),y=function(t){function e(){return u(this,e),p(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.url,o=i(e,["url"]);this.leafletElement=(0,s.tileLayer)(n,o)},e.prototype.componentDidUpdate=function(e){t.prototype.componentDidUpdate.call(this,e);var n=this.props.url;n!==e.url&&this.leafletElement.setUrl(n)},e}(f.default);y.propTypes={url:c.PropTypes.string.isRequired},e.default=y},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(1),c=n(4),l=n(14),f=o(l),y=function(t){function e(){return u(this,e),p(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.url,o=i(e,["url"]);this.leafletElement=s.tileLayer.wms(n,o)},e}(f.default);y.propTypes={url:c.PropTypes.string.isRequired},e.default=y},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(4),c=n(3),l=n(7),f=o(l),y=n(6),h=o(y),d=n(14),b=o(d),v=function(t){function e(){return p(this,e),u(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.center,o=e.radius,r=i(e,["center","radius"]);this.leafletElement=(0,s.circle)(n,o,this.getOptions(r))},e.prototype.componentDidUpdate=function(t){this.props.center!==t.center&&this.leafletElement.setLatLng(this.props.center),this.props.radius!==t.radius&&this.leafletElement.setRadius(this.props.radius),this.setStyleIfChanged(t,this.props)},e}(b.default);v.propTypes={center:h.default.isRequired,children:f.default,radius:c.PropTypes.number.isRequired},e.default=v},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:{};this.leafletElement.setStyle(t)},e.prototype.setStyleIfChanged=function(t,e){var n=this.getPathOptions(e);(0,l.default)(n,this.getPathOptions(t))||this.setStyle(n)},e}(b.default);m.childContextTypes={children:h.default,popupContainer:f.PropTypes.object},e.default=m},function(t,e,n){var o=n(16),r=n(17),i=n(32),p=n(30),u=i(function(t,e){return null==t?{}:r(t,o(e,p))});t.exports=u},function(t,e){function n(t,e){for(var n=-1,o=null==t?0:t.length,r=Array(o);++n-1&&t%1==0&&t-1}var r=n(40);t.exports=o},function(t,e,n){function o(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}var r=n(40);t.exports=o},function(t,e,n){function o(){this.__data__=new r,this.size=0}var r=n(37);t.exports=o},function(t,e){function n(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}t.exports=n},function(t,e){function n(t){return this.__data__.get(t)}t.exports=n},function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},function(t,e,n){function o(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.lengthf))return!1;var h=c.get(t);if(h&&c.get(e))return h==e;var d=-1,b=!0,v=n&a?new r:void 0;for(c.set(t,e),c.set(e,t);++d0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.leafletElement;if(!n||!n.on)return{};var o=(0,d.default)(e);return(0,y.default)(e,function(e,r){t[r]&&e===t[r]||(delete o[r],n.off(r,e))}),(0,y.default)(t,function(t,r){e[r]&&t===e[r]||(o[r]=t,n.on(r,t))}),o},e.prototype.fireLeafletEvent=function(t,e){var n=this.leafletElement;n&&n.fire(t,e)},e.prototype.getOptions=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.pane||this.context.pane;return e?b({},t,{pane:e}):t},e}(v.Component);e.default=O},function(t,e,n){function o(t,e,n){var o=a(t)?r:u,s=arguments.length<3;return o(t,p(e,4),n,s,i)}var r=n(85),i=n(86),p=n(95),u=n(96),a=n(78);t.exports=o},function(t,e){function n(t,e,n,o){var r=-1,i=null==t?0:t.length;for(o&&i&&(n=t[++r]);++r-1&&t%1==0&&t<=o}var o=9007199254740991;t.exports=n},function(t,e){function n(t){return t}t.exports=n},function(t,e){function n(t,e,n,o,r){return r(t,function(t,r,i){n=o?(o=!1,t):e(n,t,r,i)}),n}t.exports=n},function(t,e,n){function o(t,e){var n=u(t)?r:i;return n(t,p(e))}var r=n(98),i=n(86),p=n(99),u=n(78);t.exports=o},function(t,e){function n(t,e){for(var n=-1,o=null==t?0:t.length;++n=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(4),c=n(3),l=n(7),f=o(l),y=n(6),h=o(y),d=n(14),b=o(d),v=function(t){function e(){return p(this,e),u(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.center,o=i(e,["center"]);this.leafletElement=(0,s.circleMarker)(n,this.getOptions(o))},e.prototype.componentDidUpdate=function(t){this.props.center!==t.center&&this.leafletElement.setLatLng(this.props.center),this.props.radius!==t.radius&&this.leafletElement.setRadius(this.props.radius),this.setStyleIfChanged(t,this.props)},e}(b.default);v.propTypes={center:h.default.isRequired,children:f.default,radius:c.PropTypes.number},e.default=v},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(92),c=o(s),l=n(4),f=n(3),y=n(7),h=o(y),d=n(14),b=o(d),v=function(t){function e(){return p(this,e),u(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.data,o=i(e,["data"]);this.leafletElement=(0,l.geoJSON)(n,this.getOptions(o))},e.prototype.componentDidUpdate=function(t){(0,c.default)(this.props.style)?this.setStyle(this.props.style):this.setStyleIfChanged(t,this.props)},e}(b.default);v.propTypes={children:h.default,data:f.PropTypes.oneOfType([f.PropTypes.array,f.PropTypes.object]).isRequired},e.default=v},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(4),c=n(3),l=n(2),f=o(l),y=n(7),h=o(y),d=n(82),b=o(d),v=function(t){function e(){return p(this,e),u(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.bounds,o=e.url,r=i(e,["bounds","url"]);this.leafletElement=(0,s.imageOverlay)(o,n,this.getOptions(r))},e.prototype.componentDidUpdate=function(t){this.props.url!==t.url&&this.leafletElement.setUrl(this.props.url),this.props.opacity!==t.opacity&&this.leafletElement.setOpacity(this.props.opacity)},e.prototype.render=function(){return null},e}(b.default);v.propTypes={attribution:c.PropTypes.string,bounds:f.default.isRequired,children:h.default,opacity:c.PropTypes.number,url:c.PropTypes.string.isRequired},e.default=v},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function i(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o2&&void 0!==arguments[2]&&arguments[2];n&&this.context.map.addLayer(t),this.leafletElement.addBaseLayer(t,e)},e.prototype.addOverlay=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n&&this.context.map.addLayer(t),this.leafletElement.addOverlay(t,e)},e.prototype.removeLayer=function(t){this.context.map.removeLayer(t)},e.prototype.removeLayerControl=function(t){this.leafletElement.removeLayer(t)},e.prototype.render=function(){var t=this,e=c.Children.map(this.props.children,function(e){return e?(0,c.cloneElement)(e,t.controlProps):null});return l.default.createElement("div",{style:{display:"none"}},e)},e}(P.default);T.propTypes={baseLayers:c.PropTypes.object,children:y.default,overlays:c.PropTypes.object,position:d.default},T.contextTypes={layerContainer:v.default,map:O.default},e.default=T,T.BaseLayer=_,T.Overlay=x},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;or?0:r+e),n=n>r?r:n,n<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(r);++o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(4),c=n(3),l=(o(c),n(7)),f=o(l),y=n(6),h=o(y),d=n(82),b=o(d),v=function(t){function e(){return p(this,e),u(this,t.apply(this,arguments))}return a(e,t),e.prototype.getChildContext=function(){return{popupContainer:this.leafletElement}},e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.position,o=i(e,["position"]);this.leafletElement=(0,s.marker)(n,this.getOptions(o))},e.prototype.componentDidUpdate=function(t){this.props.position!==t.position&&this.leafletElement.setLatLng(this.props.position),this.props.icon!==t.icon&&this.leafletElement.setIcon(this.props.icon),this.props.zIndexOffset!==t.zIndexOffset&&this.leafletElement.setZIndexOffset(this.props.zIndexOffset),this.props.opacity!==t.opacity&&this.leafletElement.setOpacity(this.props.opacity),this.props.draggable!==t.draggable&&(this.props.draggable?this.leafletElement.dragging.enable():this.leafletElement.dragging.disable())},e.prototype.render=function(){return this.props.children||null},e}(b.default);v.propTypes={children:f.default,icon:c.PropTypes.instanceOf(s.Icon),opacity:c.PropTypes.number,position:h.default.isRequired,zIndexOffset:c.PropTypes.number},v.childContextTypes={popupContainer:c.PropTypes.object},e.default=v},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:o.props,e=t.style,n=t.className,r=o.getPane(o.state.name);r&&(n&&r.classList.add(n),e&&(0,y.default)(e,function(t,e){r.style[e]=t}))},r=n,p(o,r)}return u(e,t),e.prototype.getChildContext=function(){return{pane:this.state.name}},e.prototype.componentDidMount=function(){this.createPane(this.props)},e.prototype.componentWillReceiveProps=function(t){if(this.state.name)if(t.name!==this.props.name)this.removePane(),this.createPane(t);else{if(this.props.className&&t.className!==this.props.className){var e=this.getPane();e&&e.classList.remove(this.props.className)}this.setStyle(t)}},e.prototype.componentWillUnmount=function(){this.removePane()},e.prototype.createPane=function(t){var e=this.context.map,n=t.name||"pane-"+(0,s.default)();if(e&&e.createPane){var o=j(n),r=o||this.getPane(n);if(r);else e.createPane(n,this.getParentPane());this.setState({name:n},this.setStyle)}},e.prototype.removePane=function(){var t=this.state.name;if(t){var e=this.getPane(t);e&&e.remove&&e.remove();var n=this.context.map;n&&n._panes&&(n._panes=(0,l.default)(n._panes,t),n._paneRenderers=(0,l.default)(n._paneRenderers,t)),this.setState({name:void 0})}},e.prototype.getParentPane=function(){return this.getPane(this.props.pane||this.context.pane)},e.prototype.getPane=function(t){return t?this.context.map.getPane(t):void 0},e.prototype.render=function(){return this.state.name?d.default.createElement("div",{style:w},this.props.children):null},e}(h.Component);_.propTypes={name:h.PropTypes.string,children:m.default,map:g.default,className:h.PropTypes.string,style:h.PropTypes.object,pane:h.PropTypes.string},_.contextTypes={map:g.default,pane:h.PropTypes.string},_.childContextTypes={pane:h.PropTypes.string},e.default=_},function(t,e,n){function o(t){var e=++i;return r(t)+e}var r=n(138),i=0;t.exports=o},function(t,e){function n(t){return t}t.exports=n},function(t,e,n){"use strict";var o=function(){};t.exports=o},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(4),c=n(3),l=n(7),f=o(l),y=n(5),h=o(y),d=n(14),b=o(d),v=c.PropTypes.arrayOf(h.default),m=function(t){function e(){return p(this,e),u(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.positions,o=i(e,["positions"]);this.leafletElement=(0,s.polygon)(n,this.getOptions(o))},e.prototype.componentDidUpdate=function(t){this.props.positions!==t.positions&&this.leafletElement.setLatLngs(this.props.positions),this.setStyleIfChanged(t,this.props)},e}(b.default);m.propTypes={children:f.default,popupContainer:c.PropTypes.object,positions:c.PropTypes.oneOfType([h.default,v,c.PropTypes.arrayOf(v)]).isRequired},e.default=m},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(4),c=n(3),l=n(7),f=o(l),y=n(5),h=o(y),d=n(14),b=o(d),v=function(t){function e(){return p(this,e),u(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.positions,o=i(e,["positions"]);this.leafletElement=(0,s.polyline)(n,this.getOptions(o))},e.prototype.componentDidUpdate=function(t){this.props.positions!==t.positions&&this.leafletElement.setLatLngs(this.props.positions),this.setStyleIfChanged(t,this.props)},e}(b.default);v.propTypes={children:f.default,positions:c.PropTypes.oneOfType([h.default,c.PropTypes.arrayOf(h.default)]).isRequired},e.default=v},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(4),c=n(3),l=n(143),f=n(6),y=o(f),h=n(10),d=o(h),b=n(83),v=o(b),m=function(t){function e(){var n,o,r;p(this,e);for(var i=arguments.length,a=Array(i),s=0;s=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(4),c=n(3),l=n(2),f=o(l),y=n(7),h=o(y),d=n(14),b=o(d),v=function(t){function e(){return p(this,e),u(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.bounds,o=i(e,["bounds"]);this.leafletElement=(0,s.rectangle)(n,this.getOptions(o))},e.prototype.componentDidUpdate=function(t){this.props.bounds!==t.bounds&&this.leafletElement.setBounds(this.props.bounds),this.setStyleIfChanged(t,this.props)},e}(b.default);v.propTypes={children:h.default,bounds:f.default.isRequired,popupContainer:c.PropTypes.object},e.default=v},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(4),c=n(3),l=n(7),f=o(l),y=n(124),h=o(y),d=function(t){function e(){return p(this,e),u(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.url,o=i(e,["url"]);this.leafletElement=(0,s.tileLayer)(n,this.getOptions(o))},e.prototype.componentDidUpdate=function(e){t.prototype.componentDidUpdate.call(this,e);var n=this.props.url;n!==e.url&&this.leafletElement.setUrl(n)},e}(h.default);d.propTypes={children:f.default,opacity:c.PropTypes.number,url:c.PropTypes.string.isRequired,zIndex:c.PropTypes.number},e.default=d},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(4),c=n(3),l=n(143),f=n(10),y=o(f),h=n(83),d=o(h),b=function(t){
+function e(){var n,o,r;p(this,e);for(var i=arguments.length,a=Array(i),s=0;s=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):r(t,e))}e.__esModule=!0;var s=n(33),c=o(s),l=n(4),f=n(3),y=n(7),h=o(y),d=n(124),b=o(d),v=function(t){function e(){return p(this,e),u(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){t.prototype.componentWillMount.call(this);var e=this.props,n=e.url,o=i(e,["url"]);this.leafletElement=l.tileLayer.wms(n,this.getOptions(o))},e.prototype.componentDidUpdate=function(t){var e=t.url,n=i(t,["url"]),o=this.props,r=o.url,p=i(o,["url"]);r!==e&&this.leafletElement.setUrl(r),(0,c.default)(p,n)||this.leafletElement.setParams(p)},e}(b.default);v.propTypes={children:h.default,opacity:f.PropTypes.number,url:f.PropTypes.string.isRequired,zIndex:f.PropTypes.number},e.default=v},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){for(var n=Object.getOwnPropertyNames(e),o=0;o` container for the map.
- `maxBounds: bounds` (optional)
- `style: object` (optional): style property of the `
` container for the map.
+- `useFlyTo: boolean` (optional): boolean to control whether to use flyTo functions for bounds and center. If false `map.fitBounds` and `map.setView` will be used. If true `map.flyToBounds` and `map.flyTo` will be used. Defaults to false.
- `zoom: number` (optional)
**Other properties**
- `id: string` (optional): The ID of the `
` container for the map. If you don't provide it, a unique one will be created.
+## Pane
+
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#map-pane)
+
+**Dynamic properties**
+- `name: string` (optional): Unique name for the pane. Existing Leaflet panes are blacklisted.
+- `style: object` (optional): style property of the pane's `
`
+- `className: string` (optional): className property of the pane's `
`
+
## UI Layers
### Marker
-[Leaflet reference](http://leafletjs.com/reference.html#marker)
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#marker)
**Dynamic properties**
- `position: latLng` (required)
@@ -101,18 +106,24 @@ This is the top-level component that must be mounted for children ones to be ren
### Popup
-[Leaflet reference](http://leafletjs.com/reference.html#popup)
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#popup)
The Popup children will be rendered using `ReactDOM.render()`, they must be valid React elements.
**Dynamic properties**
- `position: latLng` (optional)
+### Tooltip
+
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#tooltip)
+
+The Tooltip children will be rendered using `ReactDOM.render()`, they must be valid React elements.
+
## Raster Layers
### TileLayer
-[Leaflet reference](http://leafletjs.com/reference.html#tilelayer)
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#tilelayer)
**Dynamic properties**
- `url: string` (required)
@@ -121,27 +132,28 @@ The Popup children will be rendered using `ReactDOM.render()`, they must be vali
### ImageOverlay
-[Leaflet reference](http://leafletjs.com/reference.html#imageoverlay)
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#imageoverlay)
**Dynamic properties**
- `url: string` (required)
- `opacity: number` (optional)
-### CanvasTileLayer
+### WMSTileLayer
-[Leaflet reference](http://leafletjs.com/reference.html#tilelayer-canvas)
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#tilelayer-wms)
-### WMSTileLayer
+**Dynamic properties**
+- `url: string` (required)
-[Leaflet reference](http://leafletjs.com/reference.html#tilelayer-wms)
+All other properties are passed as parameters and dynamic, they will cause the layer to redraw if they change.
## Vector Layers
-All vector layers extend the **Path** component and therefore accept dynamic [Path options](http://leafletjs.com/reference.html#path-options) properties.
+All vector layers extend the **Path** component and therefore accept dynamic [Path options](http://leafletjs.com/reference-1.0.0.html#path-options) properties.
### Circle
-[Leaflet reference](http://leafletjs.com/reference.html#circle)
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#circle)
**Dynamic properties**
- `center: latLng` (required)
@@ -149,7 +161,7 @@ All vector layers extend the **Path** component and therefore accept dynamic [Pa
### CircleMarker
-[Leaflet reference](http://leafletjs.com/reference.html#circlemarker)
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#circlemarker)
**Dynamic properties**
- `center: latLng` (required)
@@ -157,68 +169,62 @@ All vector layers extend the **Path** component and therefore accept dynamic [Pa
### Polyline
-[Leaflet reference](http://leafletjs.com/reference.html#polyline)
-
-**Dynamic properties**
-- `positions: latLngList` (required)
-
-### MultiPolyline
-
-[Leaflet reference](http://leafletjs.com/reference.html#multipolyline)
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#polyline)
**Dynamic properties**
-- `polylines: array` (required)
+- `positions: latLngList | latLngList[]` (required)
### Polygon
-[Leaflet reference](http://leafletjs.com/reference.html#polygon)
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#polygon)
**Dynamic properties**
-- `positions: latLngList | Array` (required)
-
-### MultiPolygon
-
-[Leaflet reference](http://leafletjs.com/reference.html#multipolygon)
-
-**Dynamic properties**
-- `polygons: array` (required)
+- `positions: latLngList | latLngList[] | latLngList[][]` (required)
### Rectangle
-[Leaflet reference](http://leafletjs.com/reference.html#rectangle)
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#rectangle)
**Dynamic properties**
-- `bounds: bounds` (required, dynamic)
+- `bounds: bounds` (required)
## Other Layers
-### LayerGroup
-
-Use the `LayerGroup` wrapper component to group children layers together.
-
### FeatureGroup
Extended `LayerGroup` supporting a `Popup` child.
### GeoJson
-[Leaflet reference](http://leafletjs.com/reference.html#geojson)
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#geojson)
**Properties**
- `data: GeoJSON` (required). This property will *not* be updated if it is changed after the component is mounted.
+### GridLayer
+
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#gridlayer)
+
+**Dynamic properties**
+- `opacity: number` (optional)
+- `zIndex: number` (optional)
+
+### LayerGroup
+
+Use the `LayerGroup` wrapper component to group children layers together.
+
## Controls
### AttributionControl
-[Leaflet reference](http://leafletjs.com/reference.html#control-attribution)
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#control-attribution)
**Dynamic properties**
- `position: controlPosition` (optional)
### LayersControl
-[Leaflet reference](http://leafletjs.com/reference.html#control-layers)
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#control-layers)
**Dynamic properties**
- `position: controlPosition` (optional)
@@ -277,14 +283,14 @@ Example usage:
### ScaleControl
-[Leaflet reference](http://leafletjs.com/reference.html#control-scale)
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#control-scale)
**Dynamic properties**
- `position: controlPosition` (optional)
### ZoomControl
-[Leaflet reference](http://leafletjs.com/reference.html#control-zoom)
+[Leaflet reference](http://leafletjs.com/reference-1.0.0.html#control-zoom)
**Dynamic properties**
- `position: controlPosition` (optional)
diff --git a/docs/Extending.md b/docs/Extending.md
index 3c1b7a9a..e4ac0ee7 100644
--- a/docs/Extending.md
+++ b/docs/Extending.md
@@ -10,30 +10,29 @@ Make sure to read the [how it works page](How%20it%20works.md) of this documenta
- `React.Component`
- `ControlledLayer`: base class used by `LayersControl` to handle adding and removing its layers.
- - `BaseLayer`
- - `Overlay`
- - `MapComponent`: base class handling extracting and updating Leaflet events.
- - `Map`: top-level component instantiating a Leaflet map and providing it to its children.
- - `MapLayer`: base class for all map layers, handling adding and removing the layer from the map.
- - `BaseTileLayer`: base class for tile layers, handles opacity and z-index.
+ - [`LayersControl.BaseLayer`](Components.md#layerscontrolbaselayer)
+ - [`LayersControl.Overlay`](Components.md#layerscontroloverlay)
+ - [`MapComponent`](Components.md#mapcomponent): base class handling extracting and updating Leaflet events.
+ - [`Map`](Components.md#map): top-level component instantiating a Leaflet map and providing it to its children.
+ - [`MapLayer`](Components.md#maplayer): base class for all map layers, handling adding and removing the layer from the map.
+ - [`GridLayer`](Components.md#gridlayer): base class for tile layers, handles opacity and z-index.
- [`CanvasTileLayer`](Components.md#canvastilelayer)
- [`TileLayer`](Components.md#tilelayer)
- [`WMSTileLayer`](Components.md#wmstilelayer)
- [`ImageOverlay`](Components.md#imageoverlay)
- [`LayerGroup`](Components.md#layergroup)
- [`Marker`](Components.md#marker)
- - `Path`: handles styling of vector layers.
+ - [`Path`](Components.md#path): handles styling of vector layers.
- [`Circle`](Components.md#circle)
- [`CircleMarker`](Components.md#circlemarker)
- [`FeatureGroup`](Components.md#featuregroup)
- [`GeoJson`](Components.md#geojson)
- - [`MultiPolygon`](Components.md#multipolygon)
- - [`MultiPolyline`](Components.md#multipolyline)
- [`Polygon`](Components.md#polygon)
- [`Polyline`](Components.md#polyline)
- [`Rectangle`](Components.md#rectangle)
- [`Popup`](Components.md#popup)
- - `MapControl`: base class for all controls, handles positioning.
+ - [`Tooltip`](Components.md#tooltip)
+ - [`MapControl`](Components.md#mapcontrol): base class for all controls, handles positioning.
- [`AttributionControl`](Components.md#attributioncontrol)
- [`LayersControl`](Components.md#layerscontrol)
- [`ScaleControl`](Components.md#scalecontrol)
diff --git a/docs/Getting started.md b/docs/Getting started.md
index 072ffe96..686fef7f 100644
--- a/docs/Getting started.md
+++ b/docs/Getting started.md
@@ -62,13 +62,13 @@ All components are React wrappers for Leaflet elements and layers, they need a m
### Using npm
```bash
-npm install react-leaflet
+npm install react-leaflet@next
```
React, ReactDOM and Leaflet are peer dependencies, if you haven't already installed them you can use:
```bash
-npm install leaflet react react-dom react-leaflet
+npm install leaflet@1.0.0-rc.2 react react-dom react-leaflet@next
```
### UMD
diff --git a/docs/README.md b/docs/README.md
index d55bf50d..6a67ecdb 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -14,7 +14,6 @@
## [API](API.md)
-- [Helpers](API.md#helpers)
- [PropTypes](API.md#proptypes)
- [Events](API.md#events)
- [Components](API.md#components)
diff --git a/example/components/animate.js b/example/components/animate.js
index 0a99e0b7..b8ecd0cf 100644
--- a/example/components/animate.js
+++ b/example/components/animate.js
@@ -2,24 +2,21 @@ import React, { Component } from 'react'
import { Map, TileLayer, Marker, Popup } from '../../src'
export default class AnimateExample extends Component {
- constructor () {
- super()
- this.state = {
- animate: false,
- latlng: {
- lat: 51.505,
- lng: -0.09,
- },
- }
+ state = {
+ animate: false,
+ latlng: {
+ lat: 51.505,
+ lng: -0.09,
+ },
}
- handleClick (e) {
+ handleClick = (e) => {
this.setState({
latlng: e.latlng,
})
}
- toggleAnimate () {
+ toggleAnimate = () => {
this.setState({
animate: !this.state.animate,
})
@@ -37,14 +34,14 @@ export default class AnimateExample extends Component {
return (