UNPKG

358 kBSource Map (JSON)View Raw
1{"version":3,"file":"l7-draw.min.js","sources":["../node_modules/@turf/helpers/index.js","../src/util/constant.ts","../node_modules/@turf/invariant/index.js","../node_modules/@turf/destination/index.js","../node_modules/@turf/circle/index.js","../node_modules/@turf/distance/index.js","../src/util/create_geometry.ts","../src/util/move_featrues.ts","../src/render/renderFeature.ts","../src/render/base_render.ts","../src/render/draw.ts","../src/render/draw_result.ts","../src/render/draw_vertex.ts","../node_modules/eventemitter3/index.js","../node_modules/lodash/eq.js","../node_modules/lodash/_assocIndexOf.js","../node_modules/lodash/_listCacheDelete.js","../node_modules/lodash/_listCacheGet.js","../node_modules/lodash/_listCacheHas.js","../node_modules/lodash/_listCacheSet.js","../node_modules/lodash/_ListCache.js","../node_modules/lodash/_listCacheClear.js","../node_modules/lodash/_stackClear.js","../node_modules/lodash/_stackDelete.js","../node_modules/lodash/_stackGet.js","../node_modules/lodash/_stackHas.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_root.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObject.js","../node_modules/lodash/isFunction.js","../node_modules/lodash/_isMasked.js","../node_modules/lodash/_coreJsData.js","../node_modules/lodash/_toSource.js","../node_modules/lodash/_baseIsNative.js","../node_modules/lodash/_getValue.js","../node_modules/lodash/_getNative.js","../node_modules/lodash/_Map.js","../node_modules/lodash/_nativeCreate.js","../node_modules/lodash/_hashDelete.js","../node_modules/lodash/_hashGet.js","../node_modules/lodash/_hashHas.js","../node_modules/lodash/_hashSet.js","../node_modules/lodash/_Hash.js","../node_modules/lodash/_hashClear.js","../node_modules/lodash/_isKeyable.js","../node_modules/lodash/_getMapData.js","../node_modules/lodash/_mapCacheDelete.js","../node_modules/lodash/_mapCacheGet.js","../node_modules/lodash/_mapCacheHas.js","../node_modules/lodash/_mapCacheSet.js","../node_modules/lodash/_MapCache.js","../node_modules/lodash/_mapCacheClear.js","../node_modules/lodash/_stackSet.js","../node_modules/lodash/_Stack.js","../node_modules/lodash/_defineProperty.js","../node_modules/lodash/_baseAssignValue.js","../node_modules/lodash/_assignMergeValue.js","../node_modules/lodash/_createBaseFor.js","../node_modules/lodash/_baseFor.js","../node_modules/lodash/_cloneBuffer.js","../node_modules/lodash/_Uint8Array.js","../node_modules/lodash/_cloneArrayBuffer.js","../node_modules/lodash/_cloneTypedArray.js","../node_modules/lodash/_copyArray.js","../node_modules/lodash/_baseCreate.js","../node_modules/lodash/_overArg.js","../node_modules/lodash/_getPrototype.js","../node_modules/lodash/_isPrototype.js","../node_modules/lodash/_initCloneObject.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/_baseIsArguments.js","../node_modules/lodash/isArguments.js","../node_modules/lodash/isArray.js","../node_modules/lodash/isLength.js","../node_modules/lodash/isArrayLike.js","../node_modules/lodash/isArrayLikeObject.js","../node_modules/lodash/stubFalse.js","../node_modules/lodash/isBuffer.js","../node_modules/lodash/isPlainObject.js","../node_modules/lodash/_baseIsTypedArray.js","../node_modules/lodash/_baseUnary.js","../node_modules/lodash/_nodeUtil.js","../node_modules/lodash/isTypedArray.js","../node_modules/lodash/_safeGet.js","../node_modules/lodash/_assignValue.js","../node_modules/lodash/_copyObject.js","../node_modules/lodash/_baseTimes.js","../node_modules/lodash/_isIndex.js","../node_modules/lodash/_arrayLikeKeys.js","../node_modules/lodash/_nativeKeysIn.js","../node_modules/lodash/_baseKeysIn.js","../node_modules/lodash/keysIn.js","../node_modules/lodash/toPlainObject.js","../node_modules/lodash/_baseMergeDeep.js","../node_modules/lodash/_baseMerge.js","../node_modules/lodash/identity.js","../node_modules/lodash/_apply.js","../node_modules/lodash/_overRest.js","../node_modules/lodash/constant.js","../node_modules/lodash/_shortOut.js","../node_modules/lodash/_setToString.js","../node_modules/lodash/_baseSetToString.js","../node_modules/lodash/_baseRest.js","../node_modules/lodash/_isIterateeCall.js","../node_modules/lodash/_createAssigner.js","../node_modules/lodash/merge.js","../node_modules/lodash/_arrayEach.js","../node_modules/lodash/_nativeKeys.js","../node_modules/lodash/_baseKeys.js","../node_modules/lodash/keys.js","../node_modules/lodash/_baseAssign.js","../node_modules/lodash/_baseAssignIn.js","../node_modules/lodash/_arrayFilter.js","../node_modules/lodash/stubArray.js","../node_modules/lodash/_getSymbols.js","../node_modules/lodash/_copySymbols.js","../node_modules/lodash/_arrayPush.js","../node_modules/lodash/_getSymbolsIn.js","../node_modules/lodash/_copySymbolsIn.js","../node_modules/lodash/_baseGetAllKeys.js","../node_modules/lodash/_getAllKeys.js","../node_modules/lodash/_getAllKeysIn.js","../node_modules/lodash/_DataView.js","../node_modules/lodash/_Promise.js","../node_modules/lodash/_Set.js","../node_modules/lodash/_WeakMap.js","../node_modules/lodash/_getTag.js","../node_modules/lodash/_initCloneArray.js","../node_modules/lodash/_cloneDataView.js","../node_modules/lodash/_cloneRegExp.js","../node_modules/lodash/_cloneSymbol.js","../node_modules/lodash/_initCloneByTag.js","../node_modules/lodash/_baseIsMap.js","../node_modules/lodash/isMap.js","../node_modules/lodash/_baseIsSet.js","../node_modules/lodash/isSet.js","../node_modules/lodash/_baseClone.js","../node_modules/lodash/cloneDeep.js","../src/source.ts","../src/util/layerstyle.ts","../src/modes/draw_mode.ts","../src/modes/draw_delete.ts","../src/modes/draw_edit.ts","../src/modes/draw_selected.ts","../src/modes/draw_feature.ts","../src/modes/draw_circle.ts","../node_modules/@turf/bearing/node_modules/@turf/helpers/main.es.js","../node_modules/@turf/bearing/node_modules/@turf/invariant/main.es.js","../node_modules/@turf/bearing/main.es.js","../node_modules/@turf/midpoint/node_modules/@turf/helpers/main.es.js","../node_modules/@turf/midpoint/node_modules/@turf/invariant/main.es.js","../node_modules/@turf/midpoint/node_modules/@turf/destination/main.es.js","../node_modules/@turf/midpoint/node_modules/@turf/distance/main.es.js","../src/render/draw_mid_vertex.ts","../node_modules/@turf/midpoint/main.es.js","../src/modes/draw_polygon.ts","../src/modes/draw_line.ts","../src/modes/draw_point.ts","../src/modes/draw_rect.ts","../node_modules/style-inject/dist/style-inject.es.js","../src/draw_control.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexports.earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexports.factors = {\n centimeters: exports.earthRadius * 100,\n centimetres: exports.earthRadius * 100,\n degrees: exports.earthRadius / 111325,\n feet: exports.earthRadius * 3.28084,\n inches: exports.earthRadius * 39.370,\n kilometers: exports.earthRadius / 1000,\n kilometres: exports.earthRadius / 1000,\n meters: exports.earthRadius,\n metres: exports.earthRadius,\n miles: exports.earthRadius / 1609.344,\n millimeters: exports.earthRadius * 1000,\n millimetres: exports.earthRadius * 1000,\n nauticalmiles: exports.earthRadius / 1852,\n radians: 1,\n yards: exports.earthRadius / 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexports.unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.370,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / exports.earthRadius,\n yards: 1 / 1.0936,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexports.areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nfunction feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\nexports.feature = feature;\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nfunction geometry(type, coordinates, options) {\n if (options === void 0) { options = {}; }\n switch (type) {\n case \"Point\": return point(coordinates).geometry;\n case \"LineString\": return lineString(coordinates).geometry;\n case \"Polygon\": return polygon(coordinates).geometry;\n case \"MultiPoint\": return multiPoint(coordinates).geometry;\n case \"MultiLineString\": return multiLineString(coordinates).geometry;\n case \"MultiPolygon\": return multiPolygon(coordinates).geometry;\n default: throw new Error(type + \" is invalid\");\n }\n}\nexports.geometry = geometry;\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nfunction point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.point = point;\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nfunction points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\nexports.points = points;\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nfunction polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.polygon = polygon;\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nfunction polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\nexports.polygons = polygons;\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nfunction lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.lineString = lineString;\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nfunction lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\nexports.lineStrings = lineStrings;\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nfunction featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\nexports.featureCollection = featureCollection;\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nfunction multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.multiLineString = multiLineString;\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nfunction multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.multiPoint = multiPoint;\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nfunction multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.multiPolygon = multiPolygon;\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nfunction geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\nexports.geometryCollection = geometryCollection;\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nfunction round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\nexports.round = round;\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, or kilometers inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nfunction radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = exports.factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\nexports.radiansToLength = radiansToLength;\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, or kilometers inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nfunction lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = exports.factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\nexports.lengthToRadians = lengthToRadians;\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, or kilometers inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nfunction lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\nexports.lengthToDegrees = lengthToDegrees;\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nfunction bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\nexports.bearingToAzimuth = bearingToAzimuth;\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nfunction radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return degrees * 180 / Math.PI;\n}\nexports.radiansToDegrees = radiansToDegrees;\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nfunction degreesToRadians(degrees) {\n var radians = degrees % 360;\n return radians * Math.PI / 180;\n}\nexports.degreesToRadians = degreesToRadians;\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nfunction convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\nexports.convertLength = convertLength;\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted distance\n */\nfunction convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = exports.areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = exports.areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\nexports.convertArea = convertArea;\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nfunction isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num) && !/^\\s*$/.test(num);\n}\nexports.isNumber = isNumber;\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nfunction isObject(input) {\n return (!!input) && (input.constructor === Object);\n}\nexports.isObject = isObject;\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nfunction validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\nexports.validateBBox = validateBBox;\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nfunction validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\nexports.validateId = validateId;\n// Deprecated methods\nfunction radians2degrees() {\n throw new Error(\"method has been renamed to `radiansToDegrees`\");\n}\nexports.radians2degrees = radians2degrees;\nfunction degrees2radians() {\n throw new Error(\"method has been renamed to `degreesToRadians`\");\n}\nexports.degrees2radians = degrees2radians;\nfunction distanceToDegrees() {\n throw new Error(\"method has been renamed to `lengthToDegrees`\");\n}\nexports.distanceToDegrees = distanceToDegrees;\nfunction distanceToRadians() {\n throw new Error(\"method has been renamed to `lengthToRadians`\");\n}\nexports.distanceToRadians = distanceToRadians;\nfunction radiansToDistance() {\n throw new Error(\"method has been renamed to `radiansToLength`\");\n}\nexports.radiansToDistance = radiansToDistance;\nfunction bearingToAngle() {\n throw new Error(\"method has been renamed to `bearingToAzimuth`\");\n}\nexports.bearingToAngle = bearingToAngle;\nfunction convertDistance() {\n throw new Error(\"method has been renamed to `convertLength`\");\n}\nexports.convertDistance = convertDistance;\n","export enum DrawEvent {\n CREATE = 'draw.create',\n DELETE = 'draw.delete',\n Move = 'draw.move',\n Edit = 'draw.edit',\n UPDATE = 'draw.update',\n CHANGE = 'draw.change',\n SELECTION_CHANGE = 'draw.selectionchange',\n MODE_CHANGE = 'draw.modechange',\n ACTIONABLE = 'draw.actionable',\n RENDER = 'draw.render',\n COMBINE_FEATURES = 'draw.combine',\n UNCOMBINE_FEATURES = 'draw.uncombine',\n}\n\nexport enum DrawModes {\n DRAW_Circle = 'draw_circle',\n DRAW_Rect = 'draw_react',\n DRAW_LINE_STRING = 'draw_line_string',\n DRAW_POLYGON = 'draw_polygon',\n DRAW_POINT = 'draw_point',\n SIMPLE_SELECT = 'simple_select',\n DIRECT_SELECT = 'direct_select',\n STATIC = 'static',\n}\n\nexport type unitsType = 'degrees' | 'radians' | 'miles' | 'kilometers';\n\nexport enum FeatureType {\n FEATURE = 'Feature',\n POLYGON = 'Polygon',\n LINE_STRING = 'LineString',\n POINT = 'Point',\n FEATURE_COLLECTION = 'FeatureCollection',\n MULTI_PREFIX = 'Multi',\n MULTI_POINT = 'MultiPoint',\n MULTI_LINE_STRING = 'MultiLineString',\n MULTI_POLYGON = 'MultiPolygon',\n}\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar helpers_1 = require(\"@turf/helpers\");\r\n/**\r\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\r\n *\r\n * @name getCoord\r\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\r\n * @returns {Array<number>} coordinates\r\n * @example\r\n * var pt = turf.point([10, 10]);\r\n *\r\n * var coord = turf.getCoord(pt);\r\n * //= [10, 10]\r\n */\r\nfunction getCoord(coord) {\r\n if (!coord) {\r\n throw new Error(\"coord is required\");\r\n }\r\n if (!Array.isArray(coord)) {\r\n if (coord.type === \"Feature\" && coord.geometry !== null && coord.geometry.type === \"Point\") {\r\n return coord.geometry.coordinates;\r\n }\r\n if (coord.type === \"Point\") {\r\n return coord.coordinates;\r\n }\r\n }\r\n if (Array.isArray(coord) && coord.length >= 2 && !Array.isArray(coord[0]) && !Array.isArray(coord[1])) {\r\n return coord;\r\n }\r\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\r\n}\r\nexports.getCoord = getCoord;\r\n/**\r\n * Unwrap coordinates from a Feature, Geometry Object or an Array\r\n *\r\n * @name getCoords\r\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\r\n * @returns {Array<any>} coordinates\r\n * @example\r\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\r\n *\r\n * var coords = turf.getCoords(poly);\r\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\r\n */\r\nfunction getCoords(coords) {\r\n if (Array.isArray(coords)) {\r\n return coords;\r\n }\r\n // Feature\r\n if (coords.type === \"Feature\") {\r\n if (coords.geometry !== null) {\r\n return coords.geometry.coordinates;\r\n }\r\n }\r\n else {\r\n // Geometry\r\n if (coords.coordinates) {\r\n return coords.coordinates;\r\n }\r\n }\r\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\r\n}\r\nexports.getCoords = getCoords;\r\n/**\r\n * Checks if coordinates contains a number\r\n *\r\n * @name containsNumber\r\n * @param {Array<any>} coordinates GeoJSON Coordinates\r\n * @returns {boolean} true if Array contains a number\r\n */\r\nfunction containsNumber(coordinates) {\r\n if (coordinates.length > 1 && helpers_1.isNumber(coordinates[0]) && helpers_1.isNumber(coordinates[1])) {\r\n return true;\r\n }\r\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\r\n return containsNumber(coordinates[0]);\r\n }\r\n throw new Error(\"coordinates must only contain numbers\");\r\n}\r\nexports.containsNumber = containsNumber;\r\n/**\r\n * Enforce expectations about types of GeoJSON objects for Turf.\r\n *\r\n * @name geojsonType\r\n * @param {GeoJSON} value any GeoJSON object\r\n * @param {string} type expected GeoJSON type\r\n * @param {string} name name of calling function\r\n * @throws {Error} if value is not the expected type.\r\n */\r\nfunction geojsonType(value, type, name) {\r\n if (!type || !name) {\r\n throw new Error(\"type and name required\");\r\n }\r\n if (!value || value.type !== type) {\r\n throw new Error(\"Invalid input to \" + name + \": must be a \" + type + \", given \" + value.type);\r\n }\r\n}\r\nexports.geojsonType = geojsonType;\r\n/**\r\n * Enforce expectations about types of {@link Feature} inputs for Turf.\r\n * Internally this uses {@link geojsonType} to judge geometry types.\r\n *\r\n * @name featureOf\r\n * @param {Feature} feature a feature with an expected geometry type\r\n * @param {string} type expected GeoJSON type\r\n * @param {string} name name of calling function\r\n * @throws {Error} error if value is not the expected type.\r\n */\r\nfunction featureOf(feature, type, name) {\r\n if (!feature) {\r\n throw new Error(\"No feature passed\");\r\n }\r\n if (!name) {\r\n throw new Error(\".featureOf() requires a name\");\r\n }\r\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\r\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\r\n }\r\n if (!feature.geometry || feature.geometry.type !== type) {\r\n throw new Error(\"Invalid input to \" + name + \": must be a \" + type + \", given \" + feature.geometry.type);\r\n }\r\n}\r\nexports.featureOf = featureOf;\r\n/**\r\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\r\n * Internally this uses {@link geojsonType} to judge geometry types.\r\n *\r\n * @name collectionOf\r\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\r\n * @param {string} type expected GeoJSON type\r\n * @param {string} name name of calling function\r\n * @throws {Error} if value is not the expected type.\r\n */\r\nfunction collectionOf(featureCollection, type, name) {\r\n if (!featureCollection) {\r\n throw new Error(\"No featureCollection passed\");\r\n }\r\n if (!name) {\r\n throw new Error(\".collectionOf() requires a name\");\r\n }\r\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\r\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\r\n }\r\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\r\n var feature = _a[_i];\r\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\r\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\r\n }\r\n if (!feature.geometry || feature.geometry.type !== type) {\r\n throw new Error(\"Invalid input to \" + name + \": must be a \" + type + \", given \" + feature.geometry.type);\r\n }\r\n }\r\n}\r\nexports.collectionOf = collectionOf;\r\n/**\r\n * Get Geometry from Feature or Geometry Object\r\n *\r\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\r\n * @returns {Geometry|null} GeoJSON Geometry Object\r\n * @throws {Error} if geojson is not a Feature or Geometry Object\r\n * @example\r\n * var point = {\r\n * \"type\": \"Feature\",\r\n * \"properties\": {},\r\n * \"geometry\": {\r\n * \"type\": \"Point\",\r\n * \"coordinates\": [110, 40]\r\n * }\r\n * }\r\n * var geom = turf.getGeom(point)\r\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\r\n */\r\nfunction getGeom(geojson) {\r\n if (geojson.type === \"Feature\") {\r\n return geojson.geometry;\r\n }\r\n return geojson;\r\n}\r\nexports.getGeom = getGeom;\r\n/**\r\n * Get GeoJSON object's type, Geometry type is prioritize.\r\n *\r\n * @param {GeoJSON} geojson GeoJSON object\r\n * @param {string} [name=\"geojson\"] name of the variable to display in error message\r\n * @returns {string} GeoJSON type\r\n * @example\r\n * var point = {\r\n * \"type\": \"Feature\",\r\n * \"properties\": {},\r\n * \"geometry\": {\r\n * \"type\": \"Point\",\r\n * \"coordinates\": [110, 40]\r\n * }\r\n * }\r\n * var geom = turf.getType(point)\r\n * //=\"Point\"\r\n */\r\nfunction getType(geojson, name) {\r\n if (geojson.type === \"FeatureCollection\") {\r\n return \"FeatureCollection\";\r\n }\r\n if (geojson.type === \"GeometryCollection\") {\r\n return \"GeometryCollection\";\r\n }\r\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\r\n return geojson.geometry.type;\r\n }\r\n return geojson.type;\r\n}\r\nexports.getType = getType;\r\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// http://en.wikipedia.org/wiki/Haversine_formula\n// http://www.movable-type.co.uk/scripts/latlong.html\nvar helpers_1 = require(\"@turf/helpers\");\nvar invariant_1 = require(\"@turf/invariant\");\n/**\n * Takes a {@link Point} and calculates the location of a destination point given a distance in\n * degrees, radians, miles, or kilometers; and bearing in degrees.\n * This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature.\n *\n * @name destination\n * @param {Coord} origin starting point\n * @param {number} distance distance from the origin point\n * @param {number} bearing ranging from -180 to 180\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] miles, kilometers, degrees, or radians\n * @param {Object} [options.properties={}] Translate properties to Point\n * @returns {Feature<Point>} destination point\n * @example\n * var point = turf.point([-75.343, 39.984]);\n * var distance = 50;\n * var bearing = 90;\n * var options = {units: 'miles'};\n *\n * var destination = turf.destination(point, distance, bearing, options);\n *\n * //addToMap\n * var addToMap = [point, destination]\n * destination.properties['marker-color'] = '#f00';\n * point.properties['marker-color'] = '#0f0';\n */\nfunction destination(origin, distance, bearing, options) {\n if (options === void 0) { options = {}; }\n // Handle input\n var coordinates1 = invariant_1.getCoord(origin);\n var longitude1 = helpers_1.degreesToRadians(coordinates1[0]);\n var latitude1 = helpers_1.degreesToRadians(coordinates1[1]);\n var bearingRad = helpers_1.degreesToRadians(bearing);\n var radians = helpers_1.lengthToRadians(distance, options.units);\n // Main\n var latitude2 = Math.asin(Math.sin(latitude1) * Math.cos(radians) +\n Math.cos(latitude1) * Math.sin(radians) * Math.cos(bearingRad));\n var longitude2 = longitude1 + Math.atan2(Math.sin(bearingRad) * Math.sin(radians) * Math.cos(latitude1), Math.cos(radians) - Math.sin(latitude1) * Math.sin(latitude2));\n var lng = helpers_1.radiansToDegrees(longitude2);\n var lat = helpers_1.radiansToDegrees(latitude2);\n return helpers_1.point([lng, lat], options.properties);\n}\nexports.default = destination;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar destination_1 = require(\"@turf/destination\");\nvar helpers_1 = require(\"@turf/helpers\");\n/**\n * Takes a {@link Point} and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision.\n *\n * @name circle\n * @param {Feature<Point>|number[]} center center point\n * @param {number} radius radius of the circle\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.steps=64] number of steps\n * @param {string} [options.units='kilometers'] miles, kilometers, degrees, or radians\n * @param {Object} [options.properties={}] properties\n * @returns {Feature<Polygon>} circle polygon\n * @example\n * var center = [-75.343, 39.984];\n * var radius = 5;\n * var options = {steps: 10, units: 'kilometers', properties: {foo: 'bar'}};\n * var circle = turf.circle(center, radius, options);\n *\n * //addToMap\n * var addToMap = [turf.point(center), circle]\n */\nfunction circle(center, radius, options) {\n if (options === void 0) { options = {}; }\n // default params\n var steps = options.steps || 64;\n var properties = options.properties ? options.properties : (!Array.isArray(center) && center.type === 'Feature' && center.properties) ? center.properties : {};\n // main\n var coordinates = [];\n for (var i = 0; i < steps; i++) {\n coordinates.push(destination_1.default(center, radius, i * -360 / steps, options).geometry.coordinates);\n }\n coordinates.push(coordinates[0]);\n return helpers_1.polygon([coordinates], properties);\n}\nexports.default = circle;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar invariant_1 = require(\"@turf/invariant\");\nvar helpers_1 = require(\"@turf/helpers\");\n//http://en.wikipedia.org/wiki/Haversine_formula\n//http://www.movable-type.co.uk/scripts/latlong.html\n/**\n * Calculates the distance between two {@link Point|points} in degrees, radians, miles, or kilometers.\n * This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature.\n *\n * @name distance\n * @param {Coord} from origin point\n * @param {Coord} to destination point\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers\n * @returns {number} distance between the two points\n * @example\n * var from = turf.point([-75.343, 39.984]);\n * var to = turf.point([-75.534, 39.123]);\n * var options = {units: 'miles'};\n *\n * var distance = turf.distance(from, to, options);\n *\n * //addToMap\n * var addToMap = [from, to];\n * from.properties.distance = distance;\n * to.properties.distance = distance;\n */\nfunction distance(from, to, options) {\n if (options === void 0) { options = {}; }\n var coordinates1 = invariant_1.getCoord(from);\n var coordinates2 = invariant_1.getCoord(to);\n var dLat = helpers_1.degreesToRadians((coordinates2[1] - coordinates1[1]));\n var dLon = helpers_1.degreesToRadians((coordinates2[0] - coordinates1[0]));\n var lat1 = helpers_1.degreesToRadians(coordinates1[1]);\n var lat2 = helpers_1.degreesToRadians(coordinates2[1]);\n var a = Math.pow(Math.sin(dLat / 2), 2) +\n Math.pow(Math.sin(dLon / 2), 2) * Math.cos(lat1) * Math.cos(lat2);\n return helpers_1.radiansToLength(2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), options.units);\n}\nexports.default = distance;\n","// @ts-ignore\nimport turfCircle from '@turf/circle';\n// @ts-ignore\nimport turfDistance from '@turf/distance';\nimport {\n Feature,\n featureCollection,\n FeatureCollection,\n lineString,\n point,\n polygon,\n} from '@turf/helpers';\nimport { unitsType } from './constant';\n\nexport function createCircle(\n center: [number, number],\n endPoint: [number, number],\n options: {\n units: unitsType;\n steps: number;\n id: string;\n pointFeatures: Feature[];\n },\n): Feature {\n const radius = turfDistance(point(center), point(endPoint), options);\n const feature = turfCircle(center, radius, {\n units: options.units,\n steps: options.steps,\n properties: {\n ...options,\n active: true,\n type: 'circle',\n radius,\n startPoint: {\n lng: center[0],\n lat: center[1],\n },\n endPoint: {\n lng: endPoint[0],\n lat: endPoint[1],\n },\n },\n });\n return feature as Feature;\n}\n\nexport function createRect(\n startPoint: [number, number],\n endPoint: [number, number],\n options: {\n id: string;\n pointFeatures: Feature[];\n [key: string]: any;\n },\n): Feature {\n const minX = Math.min(startPoint[0], endPoint[0]);\n const minY = Math.min(startPoint[1], endPoint[1]);\n const maxX = Math.max(startPoint[0], endPoint[0]);\n const maxY = Math.max(startPoint[1], endPoint[1]);\n const feature = {\n type: 'Feature',\n properties: {\n type: 'rect',\n active: true,\n startPoint: {\n lng: startPoint[0],\n lat: startPoint[1],\n },\n endPoint: {\n lng: endPoint[0],\n lat: endPoint[1],\n },\n ...options,\n },\n geometry: {\n type: 'Polygon',\n coordinates: [\n [\n [minX, minY],\n [minX, maxY],\n [maxX, maxY],\n [maxX, minY],\n [minX, minY],\n ],\n ],\n },\n };\n return feature as Feature;\n}\n\nexport function createPolygon(\n points: Array<{ lng: number; lat: number }>,\n options: {\n id?: string | number;\n pointFeatures: Feature[];\n [key: string]: any;\n },\n): any {\n const coords = points.map(p => [p.lng, p.lat]);\n if (points.length < 2) {\n return point(coords[0], options);\n } else if (points.length < 3) {\n return lineString(coords, options);\n } else {\n coords.push(coords[0]);\n return polygon([coords], options);\n }\n}\n\nexport function createLine(\n points: Array<{ lng: number; lat: number }>,\n options: any,\n): any {\n const coords = points.map(p => [p.lng, p.lat]);\n if (points.length < 2) {\n return point(coords[0], options);\n } else {\n return lineString(coords, options);\n }\n}\n\nexport function createPoint(\n points: Array<{ lng: number; lat: number }>,\n): FeatureCollection {\n const features = points.map((p, index) =>\n point([p.lng, p.lat], {\n active: true,\n id: index.toString(),\n }),\n );\n return featureCollection(features);\n}\n","import { Feature, Geometry, Properties } from '@turf/helpers';\nimport { FeatureType } from './constant';\ninterface IDelta {\n lng: number;\n lat: number;\n}\ntype RingType = Array<[number, number]>;\nexport default function(features: Feature[], delta: IDelta) {\n features.forEach(feature => {\n const geometry = feature.geometry as Geometry;\n let nextCoord;\n const { type, coordinates } = geometry;\n switch (type) {\n case FeatureType.POINT:\n nextCoord = movePoint(coordinates as [number, number], delta);\n break;\n case FeatureType.LINE_STRING:\n case FeatureType.MULTI_POINT:\n nextCoord = moveRing(coordinates as RingType, delta);\n break;\n case FeatureType.POLYGON:\n case FeatureType.MULTI_LINE_STRING:\n nextCoord = moveMultiPolygon(coordinates as RingType[], delta);\n break;\n case FeatureType.MULTI_POLYGON:\n nextCoord = (coordinates as RingType[][]).map(mult =>\n moveMultiPolygon(mult as RingType[], delta),\n );\n break;\n }\n if (nextCoord) {\n geometry.coordinates = nextCoord;\n }\n });\n\n return features;\n}\n\nexport function movePoint(\n coord: [number, number],\n delta: IDelta,\n): [number, number] {\n return [coord[0] + delta.lng, coord[1] + delta.lat];\n}\n\nexport function moveRing(coords: RingType, delta: IDelta) {\n return coords.map(coord => movePoint(coord, delta));\n}\n\nexport function moveMultiPolygon(mult: RingType[], delta: IDelta) {\n return mult.map(ring => moveRing(ring, delta));\n}\n","import { ILayer, LineLayer, PointLayer, PolygonLayer } from '@antv/l7';\nimport { FeatureCollection } from '@turf/helpers';\nexport function renderFeature(fe: FeatureCollection, style: any): ILayer[] {\n const type = fe.features[0]?.geometry?.type;\n let layers;\n switch (type) {\n case 'Point':\n layers = drawPoint(fe, style.point);\n break;\n case 'LineString':\n layers = drawLine(fe, style.line);\n break;\n case 'Polygon':\n layers = drawPolyon(fe, style.polygon);\n break;\n }\n return layers as ILayer[];\n}\n\nfunction drawPoint(fe: FeatureCollection, style: any) {\n const layer = new PointLayer({\n zIndex: 2,\n pickingBuffer: 3,\n })\n .source(fe)\n .shape('circle')\n .color(style.color)\n .size(style.size)\n .style(style.style);\n return [layer];\n}\n\nfunction drawLine(fe: FeatureCollection, style: any) {\n const layer = new LineLayer({\n pickingBuffer: 3,\n })\n .source(fe)\n .shape('line')\n .color(style.color)\n .size(style.size)\n .style(style.style);\n return [layer];\n}\n\nfunction drawPolyon(fe: FeatureCollection, style: any) {\n const fill = new PolygonLayer()\n .source(fe)\n .shape('fill')\n .color(style.color)\n .size(style.size)\n .style({\n opacity: style.style.opacity,\n });\n const line = new PolygonLayer()\n .source(fe)\n .shape('line')\n .color(style.style.stroke)\n .size(style.style.strokeWidth)\n .style({\n opacity: style.style.strokeOpacity,\n lineType: style.style.lineType,\n dashArray: style.style.dashArray,\n });\n return [fill, line];\n}\n","import { IInteractionTarget, ILayer, Scene } from '@antv/l7';\nconst InitFeature = {\n type: 'FeatureCollection',\n features: [],\n};\ntype CallBack = (...args: any[]) => any;\nimport { FeatureCollection } from '@turf/helpers';\nimport Draw from '../modes/draw_feature';\nimport { DrawEvent, DrawModes } from '../util/constant';\nimport { renderFeature } from './renderFeature';\nexport default class BaseRenderLayer {\n public drawLayers: ILayer[] = [];\n protected draw: Draw;\n protected isEnableDrag: boolean;\n protected isEnableEdit: boolean;\n constructor(draw: Draw) {\n this.draw = draw;\n }\n public update(feature: FeatureCollection) {\n if (this.drawLayers.length > 0) {\n this.updateData(feature);\n }\n this.removeLayers();\n const style = this.draw.getStyle('normal');\n this.drawLayers = renderFeature(feature, style);\n this.addLayers();\n }\n public on(type: any, handler: CallBack) {\n const layer = this.drawLayers[0];\n layer.on(type, handler);\n }\n public off(type: any, handler: CallBack) {\n const layer = this.drawLayers[0];\n layer.off(type, handler);\n }\n\n public emit(type: string, e: any) {\n const layer = this.drawLayers[0];\n layer.emit(type, e);\n }\n\n public updateData(data: any) {\n if (this.drawLayers.length === 0) {\n this.update(data);\n }\n this.drawLayers.forEach(layer => layer.setData(data));\n }\n\n public destroy() {\n this.removeLayers();\n }\n\n public removeLayers() {\n if (this.drawLayers.length !== 0) {\n this.drawLayers.forEach(layer => this.draw.scene.removeLayer(layer));\n }\n }\n public addLayers() {\n this.drawLayers.forEach(layer => this.draw.scene.addLayer(layer));\n }\n\n public show() {\n this.drawLayers.forEach(layer => layer.show());\n }\n\n public hide() {\n this.drawLayers.forEach(layer => layer.hide());\n }\n}\n","import { IInteractionTarget, ILayer, Scene } from '@antv/l7';\nconst InitFeature = {\n type: 'FeatureCollection',\n features: [],\n};\nimport { Feature, FeatureCollection } from '@turf/helpers';\nimport Draw from '../modes/draw_feature';\nimport { DrawEvent, DrawModes } from '../util/constant';\nimport BaseRender from './base_render';\nimport { renderFeature } from './renderFeature';\nexport default class DrawLayer extends BaseRender {\n public update(feature: FeatureCollection) {\n this.removeLayers();\n const style = this.draw.getStyle('active');\n this.drawLayers = renderFeature(feature, style);\n this.addLayers();\n }\n public enableSelect() {\n this.show();\n if (this.isEnableDrag) {\n return;\n }\n const layer = this.drawLayers[0];\n layer.on('mouseenter', this.onMouseMove);\n layer.on('mouseout', this.onUnMouseMove);\n if (this.draw.editEnable) {\n layer.on('click', this.onClick);\n }\n layer.on('unclick', this.onUnClick);\n this.isEnableDrag = true;\n }\n public disableSelect() {\n if (!this.isEnableDrag) {\n return;\n }\n const layer = this.drawLayers[0];\n layer.off('mouseenter', this.onMouseMove);\n layer.off('mouseout', this.onUnMouseMove);\n layer.off('click', this.onClick);\n layer.off('unclick', this.onUnClick);\n this.isEnableDrag = false;\n }\n\n public enableEdit() {\n if (this.isEnableEdit) {\n return;\n }\n const layer = this.drawLayers[0];\n layer.on('unclick', this.onUnClick);\n this.isEnableDrag = true;\n }\n\n public disableEdit() {\n if (!this.isEnableEdit) {\n return;\n }\n const layer = this.drawLayers[0];\n layer.off('unclick', this.onUnClick);\n this.isEnableDrag = false;\n }\n\n private onMouseMove = (e: any) => {\n this.draw.setCursor('move');\n this.draw.selectMode.enable();\n };\n private onUnMouseMove = (e: any) => {\n this.draw.resetCursor();\n this.draw.selectMode.disable();\n };\n private onClick = (e: any) => {\n this.draw.selectMode.disable();\n this.draw.editMode.enable();\n this.disableSelect();\n this.draw.resetCursor();\n this.enableEdit();\n this.draw.setCurrentFeature(e.feature);\n this.draw.emit(DrawEvent.MODE_CHANGE, DrawModes.DIRECT_SELECT);\n };\n\n private onUnClick = (e: any) => {\n this.draw.selectMode.disable();\n this.draw.editMode.disable();\n this.draw.source.setFeatureUnActive(\n this.draw.getCurrentFeature() as Feature,\n );\n this.disableSelect();\n this.disableEdit();\n this.hide();\n this.draw.emit(DrawEvent.MODE_CHANGE, DrawModes.STATIC);\n };\n}\n","import { Feature, FeatureCollection } from '@turf/helpers';\nimport { DrawEvent, DrawModes } from '../util/constant';\nimport BaseRender from './base_render';\nimport { renderFeature } from './renderFeature';\nexport default class DrawResultLayer extends BaseRender {\n public update(feature: FeatureCollection) {\n if (this.drawLayers.length > 0) {\n this.updateData(feature);\n return;\n }\n this.removeLayers();\n const style = this.draw.getStyle('normal');\n this.drawLayers = renderFeature(feature, style);\n this.addFilter();\n this.addLayers();\n }\n public enableSelect() {\n if (this.isEnableDrag) {\n return;\n }\n if (!this.draw.selectEnable) {\n return;\n }\n const layer = this.drawLayers[0];\n layer.on('click', this.onClick);\n this.isEnableDrag = true;\n }\n public disableSelect() {\n if (!this.isEnableDrag) {\n return;\n }\n const layer = this.drawLayers[0];\n layer.off('click', this.onClick);\n this.isEnableDrag = false;\n }\n public enableDelete() {\n this.disableSelect();\n const layer = this.drawLayers[0];\n layer.on('click', this.onDeleteClick);\n }\n\n public disableDelete() {\n const layer = this.drawLayers[0];\n layer.off('click', this.onDeleteClick);\n }\n public addFilter() {\n this.drawLayers.forEach(layer =>\n layer.filter('active', active => {\n return !active;\n }),\n );\n }\n private onClick = (e: any) => {\n this.draw.source.setFeatureUnActive(\n this.draw.getCurrentFeature() as Feature,\n );\n this.draw.setCurrentFeature(e.feature);\n this.draw.source.setFeatureActive(e.feature as Feature);\n this.updateData(this.draw.source.data);\n this.draw.emit(DrawEvent.MODE_CHANGE, DrawModes.SIMPLE_SELECT);\n };\n\n private onDeleteClick = (e: any) => {\n this.draw.source.removeFeature(e.feature);\n this.updateData(this.draw.source.data);\n };\n}\n","import { FeatureCollection } from '@turf/helpers';\nimport BaseRender from './base_render';\nimport { renderFeature } from './renderFeature';\nexport default class DrawVertexLayer extends BaseRender {\n public update(feature: FeatureCollection) {\n this.removeLayers();\n const style = this.draw.getStyle('active');\n this.drawLayers = renderFeature(feature, style);\n this.addLayers();\n }\n public enableSelect() {\n return;\n }\n public disableSelect() {\n return;\n }\n\n public enableEdit() {\n if (this.isEnableEdit) {\n return;\n }\n const layer = this.drawLayers[0];\n layer.on('mouseenter', this.onMouseEnter);\n layer.on('mouseout', this.onMouseOut);\n layer.on('click', this.onClick);\n this.isEnableEdit = true;\n }\n\n public disableEdit() {\n if (!this.isEnableEdit) {\n return;\n }\n const layer = this.drawLayers[0];\n layer.off('mouseenter', this.onMouseEnter);\n layer.off('mouseout', this.onMouseOut);\n layer.off('click', this.onClick);\n this.isEnableEdit = false;\n }\n\n private onMouseEnter = (e: any) => {\n this.draw.setCursor('move');\n this.draw.setCurrentVertex(e.feature);\n this.draw.editMode.enable();\n };\n private onMouseOut = (e: any) => {\n this.draw.resetCursor();\n this.draw.editMode.disable();\n };\n private onClick = (e: any) => {\n this.draw.setCurrentVertex(e.feature);\n this.draw.editMode.enable();\n };\n}\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignMergeValue;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nmodule.exports = safeGet;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n","var assignMergeValue = require('./_assignMergeValue'),\n cloneBuffer = require('./_cloneBuffer'),\n cloneTypedArray = require('./_cloneTypedArray'),\n copyArray = require('./_copyArray'),\n initCloneObject = require('./_initCloneObject'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLikeObject = require('./isArrayLikeObject'),\n isBuffer = require('./isBuffer'),\n isFunction = require('./isFunction'),\n isObject = require('./isObject'),\n isPlainObject = require('./isPlainObject'),\n isTypedArray = require('./isTypedArray'),\n safeGet = require('./_safeGet'),\n toPlainObject = require('./toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nmodule.exports = baseMergeDeep;\n","var Stack = require('./_Stack'),\n assignMergeValue = require('./_assignMergeValue'),\n baseFor = require('./_baseFor'),\n baseMergeDeep = require('./_baseMergeDeep'),\n isObject = require('./isObject'),\n keysIn = require('./keysIn'),\n safeGet = require('./_safeGet');\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nmodule.exports = baseMerge;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","var baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n","var baseMerge = require('./_baseMerge'),\n createAssigner = require('./_createAssigner');\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nmodule.exports = merge;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","import { Feature, FeatureCollection } from '@turf/helpers';\n// tslint:disable-next-line:no-submodule-imports\nimport cloneDeep from 'lodash/cloneDeep';\nexport default class DrawSource {\n public data: FeatureCollection;\n constructor(data?: FeatureCollection) {\n this.data = data || this.getDefaultData();\n }\n\n public addFeature(feature: any) {\n this.data.features.push(feature);\n }\n\n public getData(): FeatureCollection {\n const features = cloneDeep(this.data.features).map((feature: Feature) => {\n feature.properties = {\n id: feature?.properties?.id,\n type: feature?.properties?.type,\n };\n return feature;\n });\n return {\n type: 'FeatureCollection',\n features,\n };\n }\n\n public getFeature(id: string): Feature | undefined {\n const result = this.data.features.find((fe: Feature) => {\n return fe?.properties?.id === id;\n });\n\n return result;\n }\n public removeAllFeatures() {\n this.data = this.getDefaultData();\n }\n public removeFeature(feature: Feature) {\n const index = this.getFeatureIndex(feature);\n if (index !== undefined) {\n this.data.features.splice(index, 1);\n }\n }\n public setFeatureActive(feature: Feature) {\n const fe = this.getFeature(feature?.properties?.id);\n if (fe && fe.properties) {\n fe.properties.active = true;\n }\n }\n\n public setFeatureUnActive(feature: Feature) {\n const fe = this.getFeature(feature?.properties?.id);\n if (fe && fe.properties) {\n fe.properties.active = false;\n }\n }\n public clearFeatureActive() {\n this.data.features.forEach((fe: Feature) => {\n if (fe && fe.properties) {\n fe.properties.active = false;\n }\n });\n }\n public updateFeature(feature: Feature) {\n this.removeFeature(feature);\n this.addFeature(feature);\n }\n public destroy() {\n this.data = this.getDefaultData();\n }\n private getDefaultData(): FeatureCollection {\n return {\n type: 'FeatureCollection',\n features: [],\n };\n }\n\n private getFeatureIndex(feature: Feature): number | undefined {\n return this.data.features.findIndex(fe => {\n return fe?.properties?.id === feature?.properties?.id;\n });\n }\n}\n","const LayerStyles = {\n active: {\n point: {\n type: 'PointLayer',\n shape: 'circle',\n color: '#fbb03b',\n size: 5,\n style: {\n stroke: '#fff',\n strokeWidth: 2,\n },\n },\n line: {\n type: 'LineLayer',\n shape: 'line',\n color: '#fbb03b',\n size: 1,\n style: {\n opacity: 1,\n lineType: 'dash',\n dashArray: [2, 2],\n },\n },\n polygon: {\n shape: 'fill',\n color: '#fbb03b',\n style: {\n opacity: 0.1,\n stroke: '#fbb03b',\n strokeWidth: 1,\n strokeOpacity: 1,\n lineType: 'dash',\n dashArray: [2, 2],\n },\n },\n },\n normal: {\n polygon: {\n type: 'PolygonLayer',\n shape: 'fill',\n color: '#3bb2d0',\n style: {\n opacity: 0.1,\n stroke: '#3bb2d0',\n strokeWidth: 1,\n strokeOpacity: 1,\n lineType: 'solid',\n dashArray: [2, 2],\n },\n },\n line: {\n type: 'LineLayer',\n shape: 'line',\n size: 1,\n color: '#3bb2d0',\n style: {\n opacity: 1,\n },\n },\n point: {\n type: 'PointLayer',\n shape: 'circle',\n color: '#3bb2d0',\n size: 3,\n style: {\n stroke: '#fff',\n strokeWidth: 2,\n },\n },\n },\n normal_point: {\n type: 'PointLayer',\n shape: 'circle',\n color: '#3bb2d0',\n size: 3,\n style: {\n stroke: '#fff',\n strokeWidth: 2,\n },\n },\n mid_point: {\n point: {\n type: 'PointLayer',\n shape: 'circle',\n color: '#fbb03b',\n size: 3,\n style: {},\n },\n },\n};\n\nexport default LayerStyles;\n","import { IInteractionTarget, IPopup, Scene } from '@antv/l7';\nimport { Feature, FeatureCollection } from '@turf/helpers';\nimport { EventEmitter } from 'eventemitter3';\n// tslint:disable-next-line:no-submodule-imports\nimport merge from 'lodash/merge';\nimport DrawSource from '../source';\nimport LayerStyles from '../util/layerstyle';\n\nexport interface IDrawOption {\n data: FeatureCollection;\n title: string;\n style: any;\n}\n\nexport type DrawStatus =\n | 'Drawing'\n | 'DrawSelected'\n | 'DrawEdit'\n | 'DrawFinish'\n | 'EditFinish'\n | 'DrawDelete';\n\nlet DrawFeatureId = 0;\n\nexport default abstract class DrawMode extends EventEmitter {\n public source: DrawSource;\n public scene: Scene;\n public type: string;\n public title: string;\n public isEnable: boolean = false;\n\n protected options: {\n [key: string]: any;\n } = {\n style: LayerStyles,\n };\n protected drawStatus: DrawStatus = 'Drawing';\n protected currentFeature: Feature | null;\n protected currentVertex: Feature | null;\n protected popup: IPopup;\n constructor(scene: Scene, options: Partial<IDrawOption> = {}) {\n super();\n const { data } = options;\n this.scene = scene;\n this.source = new DrawSource(data);\n this.options = merge(this.options, this.getDefaultOptions(), options);\n this.title = this.getOption('title');\n }\n public enable() {\n if (this.isEnable) {\n return;\n }\n // @ts-ignore\n this.scene.setMapStatus({\n dragEnable: false,\n });\n this.scene.on('dragstart', this.onDragStart);\n this.scene.on('dragging', this.onDragging);\n this.scene.on('dragend', this.onDragEnd);\n this.scene.on('click', this.onClick);\n this.setCursor(this.getOption('cursor'));\n this.isEnable = true;\n }\n\n public disable() {\n if (!this.isEnable) {\n return;\n }\n this.scene.off('dragstart', this.onDragStart);\n this.scene.off('dragging', this.onDragging);\n this.scene.off('dragend', this.onDragEnd);\n this.scene.off('click', this.onClick);\n this.resetCursor();\n // @ts-ignore\n this.scene.setMapStatus({\n dragEnable: true,\n });\n this.isEnable = false;\n }\n public setCurrentFeature(feature: Feature) {\n this.currentFeature = feature;\n this.source.setFeatureActive(feature);\n }\n\n public setCurrentVertex(feature: Feature) {\n this.currentVertex = feature;\n }\n public deleteCurrentFeature() {\n throw new Error('子类未实现该方法');\n }\n\n public getCurrentVertex(): Feature {\n return this.currentVertex as Feature;\n }\n public getCurrentFeature(): Feature {\n return this.currentFeature as Feature;\n }\n\n public getOption(key: string) {\n return this.options[key];\n }\n\n public getStyle(id: string) {\n return this.getOption('style')[id];\n }\n\n public getUniqId() {\n return DrawFeatureId++;\n }\n\n public setCursor(cursor: string) {\n const container = this.scene.getMapCanvasContainer();\n if (container) {\n container.style.cursor = cursor;\n }\n }\n public resetCursor() {\n const container = this.scene.getMapCanvasContainer();\n if (container) {\n container.removeAttribute('style');\n }\n }\n public destroy() {\n DrawFeatureId = 0;\n this.removeAllListeners();\n this.disable();\n }\n\n protected getDefaultOptions(): any {\n return {};\n }\n\n protected abstract onDragStart(e: IInteractionTarget): void;\n\n protected abstract onDragging(e: IInteractionTarget): void;\n\n protected abstract onDragEnd(e: IInteractionTarget): void;\n\n protected onClick(e: IInteractionTarget): any {\n return null;\n }\n}\n","import { IInteractionTarget, ILngLat, Scene } from '@antv/l7';\nimport { Feature } from '@turf/helpers';\nimport { DrawEvent } from '../util/constant';\nimport { IDrawFeatureOption } from './draw_feature';\nimport DrawFeature, { IDrawOption } from './draw_mode';\nexport default class DrawDelete extends DrawFeature {\n // 绘制完成之后显示\n constructor(scene: Scene, options: Partial<IDrawFeatureOption> = {}) {\n super(scene, options);\n }\n\n public enable() {\n this.emit(DrawEvent.DELETE, '');\n }\n public disable() {\n return null;\n }\n protected getDefaultOptions(): Partial<IDrawFeatureOption> {\n return {\n ...super.getDefaultOptions(),\n title: '删除图形',\n };\n }\n\n protected onDragStart(e: any): void {\n throw new Error('Method not implemented.');\n }\n protected onDragging = (e: IInteractionTarget) => {\n return;\n };\n\n protected onDragEnd = () => {\n throw new Error('Method not implemented.');\n };\n protected onClick = () => {\n return null;\n };\n}\n","import { IInteractionTarget, ILngLat, Scene } from '@antv/l7';\nimport { Feature } from '@turf/helpers';\nimport { DrawEvent } from '../util/constant';\nimport { IDrawFeatureOption } from './draw_feature';\nimport DrawFeature, { IDrawOption } from './draw_mode';\nexport default class DrawEdit extends DrawFeature {\n private endPoint: ILngLat;\n // 绘制完成之后显示\n constructor(scene: Scene, options: Partial<IDrawFeatureOption> = {}) {\n super(scene, options);\n }\n\n public setEditFeature(feature: Feature) {\n this.currentFeature = feature;\n }\n\n protected onDragStart = (e: IInteractionTarget) => {\n // @ts-ignore\n };\n\n protected getDefaultOptions() {\n return {\n steps: 64,\n units: 'kilometres',\n cursor: 'move',\n };\n }\n\n protected onDragging = (e: IInteractionTarget) => {\n this.endPoint = e.lngLat;\n this.emit(DrawEvent.Edit, this.endPoint);\n return;\n };\n\n protected onDragEnd = () => {\n this.emit(DrawEvent.UPDATE, this.currentFeature);\n this.resetCursor();\n this.disable();\n };\n protected onClick = () => {\n return null;\n };\n}\n","import {\n IInteractionTarget,\n ILayer,\n ILngLat,\n IPopup,\n LineLayer,\n PointLayer,\n PolygonLayer,\n Popup,\n Scene,\n} from '@antv/l7';\nimport { Feature, featureCollection, point } from '@turf/helpers';\nimport { DrawEvent, DrawModes } from '../util/constant';\nimport moveFeatures from '../util/move_featrues';\nimport { IDrawFeatureOption } from './draw_feature';\nimport DrawFeature, { IDrawOption } from './draw_mode';\nconst InitFeature = {\n type: 'FeatureCollection',\n features: [],\n};\nexport default class DrawSelect extends DrawFeature {\n private center: ILngLat;\n private dragStartPoint: ILngLat;\n // 绘制完成之后显示\n constructor(scene: Scene, options: Partial<IDrawFeatureOption> = {}) {\n super(scene, options);\n }\n\n public setSelectedFeature(feature: Feature) {\n this.currentFeature = feature;\n }\n\n protected onDragStart = (e: IInteractionTarget) => {\n this.scene.setMapStatus({ dragEnable: false });\n this.dragStartPoint = e.lngLat;\n };\n\n protected getDefaultOptions(): Partial<IDrawFeatureOption> {\n return {\n steps: 64,\n units: 'kilometers',\n cursor: 'move',\n };\n }\n\n protected onDragging = (e: IInteractionTarget) => {\n const delta = {\n lng: e.lngLat.lng - this.dragStartPoint.lng,\n lat: e.lngLat.lat - this.dragStartPoint.lat,\n };\n this.emit(DrawEvent.Move, delta);\n this.dragStartPoint = e.lngLat;\n\n return;\n };\n\n protected onDragEnd = () => {\n this.emit(DrawEvent.UPDATE, this.currentFeature);\n };\n protected onClick = () => {\n return null;\n };\n}\n","import { IInteractionTarget, ILayer, ILngLat, Popup, Scene } from '@antv/l7';\nimport {\n Feature,\n FeatureCollection,\n featureCollection,\n point,\n Units,\n unitsFactors,\n} from '@turf/helpers';\nimport DrawRender from '../render/draw';\nimport RenderLayer from '../render/draw_result';\nimport DrawVertexLayer from '../render/draw_vertex';\nimport { DrawEvent, DrawModes } from '../util/constant';\nimport DrawDelete from './draw_delete';\nimport DrawEdit from './draw_edit';\nimport DrawMode, { IDrawOption } from './draw_mode';\nimport DrawSelected from './draw_selected';\nexport interface IDrawFeatureOption extends IDrawOption {\n units: Units;\n steps: number;\n editEnable: boolean;\n selectEnable: boolean;\n cursor: string;\n}\nexport default abstract class DrawFeature extends DrawMode {\n // 绘制完成之后显示\n public selectMode: DrawSelected;\n public editMode: DrawEdit;\n public deleteMode: DrawDelete;\n public editEnable: boolean;\n public selectEnable: boolean;\n\n protected normalLayer: RenderLayer;\n protected drawLayer: DrawRender;\n protected drawVertexLayer: DrawVertexLayer;\n\n constructor(scene: Scene, options: Partial<IDrawFeatureOption> = {}) {\n super(scene, options);\n this.drawLayer = new DrawRender(this);\n this.drawVertexLayer = new DrawVertexLayer(this);\n this.normalLayer = new RenderLayer(this);\n this.selectEnable = this.getOption('selectEnable');\n this.editEnable = this.getOption('editEnable');\n\n // this.editLayer = new EditLayer(this);\n this.selectMode = new DrawSelected(this.scene, {});\n this.editMode = new DrawEdit(this.scene, {});\n this.deleteMode = new DrawDelete(this.scene, {});\n\n this.selectMode.on(DrawEvent.UPDATE, this.onDrawUpdate);\n this.selectMode.on(DrawEvent.Move, this.onDrawMove);\n this.editMode.on(DrawEvent.MODE_CHANGE, this.onModeChange);\n this.editMode.on(DrawEvent.UPDATE, this.onDrawUpdate);\n this.editMode.on(DrawEvent.Edit, this.onDrawEdit);\n this.selectMode.on(DrawEvent.MODE_CHANGE, this.onModeChange);\n\n this.deleteMode.on(DrawEvent.DELETE, this.onDrawDelete);\n this.on(DrawEvent.CREATE, this.onDrawCreate);\n this.on(DrawEvent.MODE_CHANGE, this.onModeChange);\n document.addEventListener('keydown', this.addKeyDownEvent);\n if (this.options.data && this.initData()) {\n this.normalLayer.update(this.source.data);\n this.normalLayer.enableSelect();\n }\n }\n public abstract drawFinish(): void;\n public setCurrentFeature(feature: Feature) {\n this.currentFeature = feature as Feature;\n // @ts-ignore\n this.pointFeatures = feature.properties.pointFeatures;\n\n this.source.setFeatureActive(feature);\n }\n public deleteCurrentFeature() {\n this.deleteMode.enable();\n }\n public disableLayer() {\n // this.emit(DrawEvent.MODE_CHANGE, DrawModes.STATIC);\n this.drawLayer.disableSelect();\n }\n public enableLayer() {\n this.drawLayer.enableSelect();\n }\n\n public getData(): FeatureCollection {\n return this.source.getData();\n }\n\n public removeAllData(): void {\n this.source.removeAllFeatures();\n this.currentFeature = null;\n this.drawLayer.hide();\n this.drawVertexLayer.hide();\n this.normalLayer.hide();\n this.hideOtherLayer();\n }\n\n public clear() {\n this.drawLayer.disableSelect();\n this.drawLayer.disableEdit();\n this.drawLayer.hide();\n this.drawVertexLayer.hide();\n this.hideOtherLayer();\n this.emit(DrawEvent.MODE_CHANGE, DrawModes.STATIC);\n }\n public reset() {\n this.drawLayer.show();\n this.drawVertexLayer.show();\n this.showOtherLayer();\n }\n\n public addVertex(feature: Feature): void {\n throw new Error('子类未实现该方法');\n }\n\n public onRemove() {\n this.destroy();\n this.selectMode.destroy();\n this.editMode.destroy();\n this.source.destroy();\n this.drawLayer.destroy();\n this.drawVertexLayer.destroy();\n this.normalLayer.destroy();\n document.removeEventListener('keydown', this.addKeyDownEvent);\n }\n protected getDefaultOptions(): Partial<IDrawFeatureOption> {\n return {\n steps: 64,\n units: 'kilometers',\n cursor: 'crosshair',\n editEnable: true,\n selectEnable: true,\n };\n }\n protected abstract onDragStart(e: IInteractionTarget): void;\n\n protected abstract onDragging(e: IInteractionTarget): void;\n\n protected abstract onDragEnd(e: IInteractionTarget): void;\n\n protected abstract createFeature(e?: any): Feature;\n\n protected abstract moveFeature(e: ILngLat): void;\n\n protected abstract editFeature(e: any): void;\n\n protected abstract hideOtherLayer(): void;\n\n protected abstract showOtherLayer(): void;\n protected initData(): boolean {\n return false;\n }\n\n private addDrawPopup(lnglat: ILngLat, dis: number) {\n const popup = new Popup({\n anchor: 'left',\n closeButton: false,\n })\n .setLnglat(lnglat)\n .setText(`半径:${dis.toFixed(2)}千米`);\n this.scene.addPopup(popup);\n this.popup = popup;\n }\n\n private onModeChange = (mode: DrawModes[any]) => {\n switch (mode) {\n case DrawModes.DIRECT_SELECT:\n if (!this.editEnable) {\n return;\n }\n this.editMode.enable();\n this.editMode.setEditFeature(this.currentFeature as Feature);\n this.drawLayer.updateData(\n featureCollection([this.currentFeature as Feature]),\n );\n this.drawVertexLayer.updateData(\n featureCollection(this.currentFeature?.properties?.pointFeatures),\n );\n this.drawVertexLayer.show();\n this.drawVertexLayer.enableEdit();\n this.showOtherLayer();\n this.drawStatus = 'DrawEdit';\n break;\n case DrawModes.SIMPLE_SELECT:\n if (!this.selectEnable) {\n this.drawLayer.hide();\n this.drawVertexLayer.hide();\n this.hideOtherLayer();\n this.emit(DrawEvent.MODE_CHANGE, DrawModes.STATIC);\n return;\n }\n this.selectMode.setSelectedFeature(this.currentFeature as Feature);\n this.selectMode.enable();\n this.drawLayer.updateData(\n // TODO:导入数据不能正常使用\n featureCollection([this.currentFeature as Feature]),\n );\n this.drawLayer.enableSelect();\n this.drawVertexLayer.updateData(\n featureCollection(this.currentFeature?.properties?.pointFeatures),\n );\n this.drawVertexLayer.disableEdit();\n this.drawVertexLayer.show();\n this.drawLayer.show();\n this.showOtherLayer();\n this.drawStatus = 'DrawSelected';\n break;\n case DrawModes.STATIC:\n this.source.updateFeature(this.currentFeature as Feature);\n this.selectMode.disable();\n this.editMode.disable();\n this.source.clearFeatureActive();\n this.drawVertexLayer.hide();\n this.drawVertexLayer.disableEdit();\n this.hideOtherLayer();\n this.normalLayer.update(this.source.data);\n this.normalLayer.enableSelect();\n this.drawStatus = 'DrawFinish';\n break;\n }\n };\n\n private onDrawCreate = (feature: Feature) => {\n this.source.addFeature(feature);\n };\n\n private onDrawUpdate = (feature: Feature) => {\n this.source.updateFeature(this.currentFeature as Feature);\n this.emit(DrawEvent.UPDATE, this.currentFeature);\n };\n\n private onDrawMove = (delta: ILngLat) => {\n if (this.drawStatus === 'DrawSelected') {\n this.moveFeature(delta);\n }\n };\n\n private onDrawEdit = (endpoint: ILngLat) => {\n this.editFeature(endpoint);\n };\n\n private onDrawDelete = () => {\n if (this.drawStatus === 'DrawSelected') {\n this.clear();\n this.source.removeFeature(this.currentFeature as Feature);\n\n this.normalLayer.update(this.source.data);\n this.drawLayer.disableSelect();\n this.selectMode.disable();\n this.currentFeature = null;\n // this.drawStatus = 'DrawDelete';\n }\n };\n\n private addKeyDownEvent = (event: KeyboardEvent) => {\n // tslint:disable-next-line:no-arg\n const e = event || window.event;\n if (e && e.keyCode === 8) {\n this.deleteMode.enable();\n }\n };\n}\n","import {\n IInteractionTarget,\n ILayer,\n ILngLat,\n PointLayer,\n Scene,\n} from '@antv/l7';\nimport {\n Feature,\n featureCollection,\n Geometries,\n Properties,\n} from '@turf/helpers';\nimport { DrawEvent, DrawModes, unitsType } from '../util/constant';\nimport { createCircle, createPoint } from '../util/create_geometry';\nimport moveFeatures, { movePoint } from '../util/move_featrues';\nimport DrawFeature, { IDrawFeatureOption } from './draw_feature';\nexport default class DrawCircle extends DrawFeature {\n protected startPoint: ILngLat;\n protected endPoint: ILngLat;\n protected pointFeatures: Feature[];\n protected centerLayer: ILayer;\n constructor(scene: Scene, options: Partial<IDrawFeatureOption> = {}) {\n super(scene, options);\n this.type = 'circle';\n }\n\n public drawFinish() {\n return null;\n }\n\n public setCurrentFeature(feature: Feature) {\n this.currentFeature = feature as Feature;\n // @ts-ignore\n this.pointFeatures = feature.properties.pointFeatures;\n // @ts-ignore\n this.startPoint = feature.properties.startPoint;\n // @ts-ignore\n this.endPoint = feature.properties.endPoint;\n this.source.setFeatureActive(feature);\n }\n\n protected getDefaultOptions(): Partial<IDrawFeatureOption> {\n return {\n ...super.getDefaultOptions(),\n title: '绘制圆',\n };\n }\n\n protected onDragStart = (e: IInteractionTarget) => {\n if (this.drawStatus !== 'Drawing') {\n this.drawLayer.emit('unclick', null);\n }\n this.startPoint = e.lngLat;\n this.setCursor('grabbing');\n this.initCenterLayer();\n this.centerLayer.setData([this.startPoint]);\n };\n\n protected onDragging = (e: IInteractionTarget) => {\n this.endPoint = e.lngLat;\n const feature = this.createFeature() as Feature<Geometries, Properties>;\n const properties = feature.properties as { pointFeatures: Feature[] };\n this.drawLayer.update(featureCollection([feature]));\n this.drawVertexLayer.update(featureCollection(properties.pointFeatures));\n };\n\n protected onDragEnd = () => {\n const feature = this.createFeature(`${this.getUniqId()}`);\n const properties = feature.properties as { pointFeatures: Feature[] };\n this.drawLayer.update(featureCollection([feature]));\n this.drawVertexLayer.update(featureCollection(properties.pointFeatures));\n this.emit(DrawEvent.CREATE, this.currentFeature);\n this.emit(DrawEvent.MODE_CHANGE, DrawModes.SIMPLE_SELECT);\n this.disable();\n };\n\n protected moveFeature(delta: ILngLat): void {\n const newFeature = moveFeatures([this.currentFeature as Feature], delta);\n this.drawLayer.updateData(featureCollection(newFeature));\n const newPointFeture = moveFeatures(this.pointFeatures, delta);\n this.drawVertexLayer.updateData(featureCollection(newPointFeture));\n const newStartPoint = movePoint(\n [this.startPoint.lng, this.startPoint.lat],\n delta,\n );\n this.startPoint = {\n lat: newStartPoint[1],\n lng: newStartPoint[0],\n };\n const newEndPoint = movePoint(\n [this.endPoint.lng, this.endPoint.lat],\n delta,\n );\n const endPointObj = {\n lat: newEndPoint[1],\n lng: newEndPoint[0],\n };\n newFeature[0].properties = {\n ...newFeature[0].properties,\n startPoint: this.startPoint,\n endPoint: endPointObj,\n pointFeatures: newPointFeture,\n };\n this.centerLayer.setData([this.startPoint]);\n this.setCurrentFeature(newFeature[0]);\n const changeFeature = {\n ...newFeature[0],\n };\n this.emit(DrawEvent.CHANGE, changeFeature);\n }\n\n protected createFeature(id: string = '0'): Feature {\n const points = createPoint([this.endPoint]);\n const feature = createCircle(\n [this.startPoint.lng, this.startPoint.lat],\n [this.endPoint.lng, this.endPoint.lat],\n {\n pointFeatures: points.features,\n units: this.getOption('units'),\n steps: this.getOption('steps'),\n id,\n },\n );\n this.setCurrentFeature(feature as Feature);\n return feature;\n }\n\n protected editFeature(endPoint: ILngLat): void {\n this.endPoint = endPoint;\n const newFeature = this.createFeature();\n const properties = newFeature.properties as { pointFeatures: Feature[] };\n this.drawLayer.updateData(featureCollection([newFeature]));\n this.drawVertexLayer.updateData(\n featureCollection(properties.pointFeatures),\n );\n this.emit(DrawEvent.CHANGE, featureCollection([newFeature]).features[0]);\n }\n\n protected showOtherLayer() {\n this.centerLayer.setData([this.currentFeature?.properties?.startPoint]);\n this.centerLayer.show();\n }\n\n protected hideOtherLayer() {\n if (this.currentFeature) {\n this.centerLayer.hide();\n }\n }\n\n private initCenterLayer() {\n const centerStyle = this.getStyle('active').point;\n const layer = new PointLayer()\n .source([this.startPoint], {\n parser: {\n type: 'json',\n x: 'lng',\n y: 'lat',\n },\n })\n .shape('circle')\n .color(centerStyle.color)\n .size(centerStyle.size)\n .style(centerStyle.style);\n this.scene.addLayer(layer);\n this.centerLayer = layer;\n }\n}\n","/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n */\nvar earthRadius = 6371008.8;\n\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n */\nvar factors = {\n meters: earthRadius,\n metres: earthRadius,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n miles: earthRadius / 1609.344,\n nauticalmiles: earthRadius / 1852,\n inches: earthRadius * 39.370,\n yards: earthRadius / 1.0936,\n feet: earthRadius * 3.28084,\n radians: 1,\n degrees: earthRadius / 111325,\n};\n\n/**\n * Units of measurement factors based on 1 meter.\n */\nvar unitsFactors = {\n meters: 1,\n metres: 1,\n millimeters: 1000,\n millimetres: 1000,\n centimeters: 100,\n centimetres: 100,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n miles: 1 / 1609.344,\n nauticalmiles: 1 / 1852,\n inches: 39.370,\n yards: 1 / 1.0936,\n feet: 3.28084,\n radians: 1 / earthRadius,\n degrees: 1 / 111325,\n};\n\n/**\n * Area of measurement factors based on 1 square meter.\n */\nvar areaFactors = {\n meters: 1,\n metres: 1,\n millimeters: 1000000,\n millimetres: 1000000,\n centimeters: 10000,\n centimetres: 10000,\n kilometers: 0.000001,\n kilometres: 0.000001,\n acres: 0.000247105,\n miles: 3.86e-7,\n yards: 1.195990046,\n feet: 10.763910417,\n inches: 1550.003100006\n};\n\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nfunction feature(geometry, properties, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error('options is invalid');\n var bbox = options.bbox;\n var id = options.id;\n\n // Validation\n if (geometry === undefined) throw new Error('geometry is required');\n if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');\n if (bbox) validateBBox(bbox);\n if (id) validateId(id);\n\n // Main\n var feat = {type: 'Feature'};\n if (id) feat.id = id;\n if (bbox) feat.bbox = bbox;\n feat.properties = properties || {};\n feat.geometry = geometry;\n return feat;\n}\n\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<number>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = 'Point';\n * var coordinates = [110, 50];\n *\n * var geometry = turf.geometry(type, coordinates);\n *\n * //=geometry\n */\nfunction geometry(type, coordinates, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error('options is invalid');\n var bbox = options.bbox;\n\n // Validation\n if (!type) throw new Error('type is required');\n if (!coordinates) throw new Error('coordinates is required');\n if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');\n if (bbox) validateBBox(bbox);\n\n // Main\n var geom;\n switch (type) {\n case 'Point': geom = point(coordinates).geometry; break;\n case 'LineString': geom = lineString(coordinates).geometry; break;\n case 'Polygon': geom = polygon(coordinates).geometry; break;\n case 'MultiPoint': geom = multiPoint(coordinates).geometry; break;\n case 'MultiLineString': geom = multiLineString(coordinates).geometry; break;\n case 'MultiPolygon': geom = multiPolygon(coordinates).geometry; break;\n default: throw new Error(type + ' is invalid');\n }\n if (bbox) geom.bbox = bbox;\n return geom;\n}\n\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nfunction point(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');\n if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');\n\n return feature({\n type: 'Point',\n coordinates: coordinates\n }, properties, options);\n}\n\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nfunction points(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');\n\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nfunction polygon(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n\n for (var i = 0; i < coordinates.length; i++) {\n var ring = coordinates[i];\n if (ring.length < 4) {\n throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (i === 0 && j === 0 && !isNumber(ring[0][0]) || !isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error('First and last Position are not equivalent.');\n }\n }\n }\n\n return feature({\n type: 'Polygon',\n coordinates: coordinates\n }, properties, options);\n}\n\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nfunction polygons(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');\n\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nfunction lineString(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions');\n // Check if first point of LineString contains two numbers\n if (!isNumber(coordinates[0][1]) || !isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');\n\n return feature({\n type: 'LineString',\n coordinates: coordinates\n }, properties, options);\n}\n\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<number>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nfunction lineStrings(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');\n\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nfunction featureCollection(features, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error('options is invalid');\n var bbox = options.bbox;\n var id = options.id;\n\n // Validation\n if (!features) throw new Error('No features passed');\n if (!Array.isArray(features)) throw new Error('features must be an Array');\n if (bbox) validateBBox(bbox);\n if (id) validateId(id);\n\n // Main\n var fc = {type: 'FeatureCollection'};\n if (id) fc.id = id;\n if (bbox) fc.bbox = bbox;\n fc.features = features;\n return fc;\n}\n\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nfunction multiLineString(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n\n return feature({\n type: 'MultiLineString',\n coordinates: coordinates\n }, properties, options);\n}\n\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nfunction multiPoint(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n\n return feature({\n type: 'MultiPoint',\n coordinates: coordinates\n }, properties, options);\n}\n\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nfunction multiPolygon(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n\n return feature({\n type: 'MultiPolygon',\n coordinates: coordinates\n }, properties, options);\n}\n\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = {\n * \"type\": \"Point\",\n * \"coordinates\": [100, 0]\n * };\n * var line = {\n * \"type\": \"LineString\",\n * \"coordinates\": [ [101, 0], [102, 1] ]\n * };\n * var collection = turf.geometryCollection([pt, line]);\n *\n * //=collection\n */\nfunction geometryCollection(geometries, properties, options) {\n if (!geometries) throw new Error('geometries is required');\n if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');\n\n return feature({\n type: 'GeometryCollection',\n geometries: geometries\n }, properties, options);\n}\n\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nfunction round(num, precision) {\n if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');\n if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.\n * @returns {number} distance\n */\nfunction radiansToLength(radians, units) {\n if (radians === undefined || radians === null) throw new Error('radians is required');\n\n if (units && typeof units !== 'string') throw new Error('units must be a string');\n var factor = factors[units || 'kilometers'];\n if (!factor) throw new Error(units + ' units is invalid');\n return radians * factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.\n * @returns {number} radians\n */\nfunction lengthToRadians(distance, units) {\n if (distance === undefined || distance === null) throw new Error('distance is required');\n\n if (units && typeof units !== 'string') throw new Error('units must be a string');\n var factor = factors[units || 'kilometers'];\n if (!factor) throw new Error(units + ' units is invalid');\n return distance / factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nfunction lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nfunction bearingToAzimuth(bearing) {\n if (bearing === null || bearing === undefined) throw new Error('bearing is required');\n\n var angle = bearing % 360;\n if (angle < 0) angle += 360;\n return angle;\n}\n\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nfunction radiansToDegrees(radians) {\n if (radians === null || radians === undefined) throw new Error('radians is required');\n\n var degrees = radians % (2 * Math.PI);\n return degrees * 180 / Math.PI;\n}\n\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nfunction degreesToRadians(degrees) {\n if (degrees === null || degrees === undefined) throw new Error('degrees is required');\n\n var radians = degrees % 360;\n return radians * Math.PI / 180;\n}\n\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {string} originalUnit of the length\n * @param {string} [finalUnit='kilometers'] returned unit\n * @returns {number} the converted length\n */\nfunction convertLength(length, originalUnit, finalUnit) {\n if (length === null || length === undefined) throw new Error('length is required');\n if (!(length >= 0)) throw new Error('length must be a positive number');\n\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit || 'kilometers');\n}\n\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches\n * @param {number} area to be converted\n * @param {string} [originalUnit='meters'] of the distance\n * @param {string} [finalUnit='kilometers'] returned unit\n * @returns {number} the converted distance\n */\nfunction convertArea(area, originalUnit, finalUnit) {\n if (area === null || area === undefined) throw new Error('area is required');\n if (!(area >= 0)) throw new Error('area must be a positive number');\n\n var startFactor = areaFactors[originalUnit || 'meters'];\n if (!startFactor) throw new Error('invalid original units');\n\n var finalFactor = areaFactors[finalUnit || 'kilometers'];\n if (!finalFactor) throw new Error('invalid final units');\n\n return (area / startFactor) * finalFactor;\n}\n\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nfunction isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nfunction isObject(input) {\n return (!!input) && (input.constructor === Object);\n}\n\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nfunction validateBBox(bbox) {\n if (!bbox) throw new Error('bbox is required');\n if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');\n if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');\n bbox.forEach(function (num) {\n if (!isNumber(num)) throw new Error('bbox must only contain numbers');\n });\n}\n\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nfunction validateId(id) {\n if (!id) throw new Error('id is required');\n if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');\n}\n\n// Deprecated methods\nfunction radians2degrees() {\n throw new Error('method has been renamed to `radiansToDegrees`');\n}\n\nfunction degrees2radians() {\n throw new Error('method has been renamed to `degreesToRadians`');\n}\n\nfunction distanceToDegrees() {\n throw new Error('method has been renamed to `lengthToDegrees`');\n}\n\nfunction distanceToRadians() {\n throw new Error('method has been renamed to `lengthToRadians`');\n}\n\nfunction radiansToDistance() {\n throw new Error('method has been renamed to `radiansToLength`');\n}\n\nfunction bearingToAngle() {\n throw new Error('method has been renamed to `bearingToAzimuth`');\n}\n\nfunction convertDistance() {\n throw new Error('method has been renamed to `convertLength`');\n}\n\nexport { earthRadius, factors, unitsFactors, areaFactors, feature, geometry, point, points, polygon, polygons, lineString, lineStrings, featureCollection, multiLineString, multiPoint, multiPolygon, geometryCollection, round, radiansToLength, lengthToRadians, lengthToDegrees, bearingToAzimuth, radiansToDegrees, degreesToRadians, convertLength, convertArea, isNumber, isObject, validateBBox, validateId, radians2degrees, degrees2radians, distanceToDegrees, distanceToRadians, radiansToDistance, bearingToAngle, convertDistance };\n","import { isNumber } from '@turf/helpers';\n\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nfunction getCoord(coord) {\n if (!coord) throw new Error('coord is required');\n if (coord.type === 'Feature' && coord.geometry !== null && coord.geometry.type === 'Point') return coord.geometry.coordinates;\n if (coord.type === 'Point') return coord.coordinates;\n if (Array.isArray(coord) && coord.length >= 2 && coord[0].length === undefined && coord[1].length === undefined) return coord;\n\n throw new Error('coord must be GeoJSON Point or an Array of numbers');\n}\n\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nfunction getCoords(coords) {\n if (!coords) throw new Error('coords is required');\n\n // Feature\n if (coords.type === 'Feature' && coords.geometry !== null) return coords.geometry.coordinates;\n\n // Geometry\n if (coords.coordinates) return coords.coordinates;\n\n // Array of numbers\n if (Array.isArray(coords)) return coords;\n\n throw new Error('coords must be GeoJSON Feature, Geometry Object or an Array');\n}\n\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nfunction containsNumber(coordinates) {\n if (coordinates.length > 1 && isNumber(coordinates[0]) && isNumber(coordinates[1])) {\n return true;\n }\n\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error('coordinates must only contain numbers');\n}\n\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction geojsonType(value, type, name) {\n if (!type || !name) throw new Error('type and name required');\n\n if (!value || value.type !== type) {\n throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + value.type);\n }\n}\n\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nfunction featureOf(feature, type, name) {\n if (!feature) throw new Error('No feature passed');\n if (!name) throw new Error('.featureOf() requires a name');\n if (!feature || feature.type !== 'Feature' || !feature.geometry) {\n throw new Error('Invalid input to ' + name + ', Feature with geometry required');\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + feature.geometry.type);\n }\n}\n\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction collectionOf(featureCollection, type, name) {\n if (!featureCollection) throw new Error('No featureCollection passed');\n if (!name) throw new Error('.collectionOf() requires a name');\n if (!featureCollection || featureCollection.type !== 'FeatureCollection') {\n throw new Error('Invalid input to ' + name + ', FeatureCollection required');\n }\n for (var i = 0; i < featureCollection.features.length; i++) {\n var feature = featureCollection.features[i];\n if (!feature || feature.type !== 'Feature' || !feature.geometry) {\n throw new Error('Invalid input to ' + name + ', Feature with geometry required');\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + feature.geometry.type);\n }\n }\n}\n\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nfunction getGeom(geojson) {\n if (!geojson) throw new Error('geojson is required');\n if (geojson.geometry !== undefined) return geojson.geometry;\n if (geojson.coordinates || geojson.geometries) return geojson;\n throw new Error('geojson must be a valid Feature or Geometry Object');\n}\n\n/**\n * Get Geometry Type from Feature or Geometry Object\n *\n * @throws {Error} **DEPRECATED** in v5.0.0 in favor of getType\n */\nfunction getGeomType() {\n throw new Error('invariant.getGeomType has been deprecated in v5.0 in favor of invariant.getType');\n}\n\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nfunction getType(geojson, name) {\n if (!geojson) throw new Error((name || 'geojson') + ' is required');\n // GeoJSON Feature & GeometryCollection\n if (geojson.geometry && geojson.geometry.type) return geojson.geometry.type;\n // GeoJSON Geometry & FeatureCollection\n if (geojson.type) return geojson.type;\n throw new Error((name || 'geojson') + ' is invalid');\n}\n\nexport { getCoord, getCoords, containsNumber, geojsonType, featureOf, collectionOf, getGeom, getGeomType, getType };\n","import { getCoord } from '@turf/invariant';\nimport { degreesToRadians, isObject, radiansToDegrees } from '@turf/helpers';\n\n//http://en.wikipedia.org/wiki/Haversine_formula\n//http://www.movable-type.co.uk/scripts/latlong.html\n\n/**\n * Takes two {@link Point|points} and finds the geographic bearing between them,\n * i.e. the angle measured in degrees from the north line (0 degrees)\n *\n * @name bearing\n * @param {Coord} start starting Point\n * @param {Coord} end ending Point\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.final=false] calculates the final bearing if true\n * @returns {number} bearing in decimal degrees, between -180 and 180 degrees (positive clockwise)\n * @example\n * var point1 = turf.point([-75.343, 39.984]);\n * var point2 = turf.point([-75.534, 39.123]);\n *\n * var bearing = turf.bearing(point1, point2);\n *\n * //addToMap\n * var addToMap = [point1, point2]\n * point1.properties['marker-color'] = '#f00'\n * point2.properties['marker-color'] = '#0f0'\n * point1.properties.bearing = bearing\n */\nfunction bearing(start, end, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error('options is invalid');\n var final = options.final;\n\n // Reverse calculation\n if (final === true) return calculateFinalBearing(start, end);\n\n var coordinates1 = getCoord(start);\n var coordinates2 = getCoord(end);\n\n var lon1 = degreesToRadians(coordinates1[0]);\n var lon2 = degreesToRadians(coordinates2[0]);\n var lat1 = degreesToRadians(coordinates1[1]);\n var lat2 = degreesToRadians(coordinates2[1]);\n var a = Math.sin(lon2 - lon1) * Math.cos(lat2);\n var b = Math.cos(lat1) * Math.sin(lat2) -\n Math.sin(lat1) * Math.cos(lat2) * Math.cos(lon2 - lon1);\n\n return radiansToDegrees(Math.atan2(a, b));\n}\n\n/**\n * Calculates Final Bearing\n *\n * @private\n * @param {Coord} start starting Point\n * @param {Coord} end ending Point\n * @returns {number} bearing\n */\nfunction calculateFinalBearing(start, end) {\n // Swap start & end\n var bear = bearing(end, start);\n bear = (bear + 180) % 360;\n return bear;\n}\n\nexport default bearing;\n","/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n */\nvar earthRadius = 6371008.8;\n\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n */\nvar factors = {\n meters: earthRadius,\n metres: earthRadius,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n miles: earthRadius / 1609.344,\n nauticalmiles: earthRadius / 1852,\n inches: earthRadius * 39.370,\n yards: earthRadius / 1.0936,\n feet: earthRadius * 3.28084,\n radians: 1,\n degrees: earthRadius / 111325,\n};\n\n/**\n * Units of measurement factors based on 1 meter.\n */\nvar unitsFactors = {\n meters: 1,\n metres: 1,\n millimeters: 1000,\n millimetres: 1000,\n centimeters: 100,\n centimetres: 100,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n miles: 1 / 1609.344,\n nauticalmiles: 1 / 1852,\n inches: 39.370,\n yards: 1 / 1.0936,\n feet: 3.28084,\n radians: 1 / earthRadius,\n degrees: 1 / 111325,\n};\n\n/**\n * Area of measurement factors based on 1 square meter.\n */\nvar areaFactors = {\n meters: 1,\n metres: 1,\n millimeters: 1000000,\n millimetres: 1000000,\n centimeters: 10000,\n centimetres: 10000,\n kilometers: 0.000001,\n kilometres: 0.000001,\n acres: 0.000247105,\n miles: 3.86e-7,\n yards: 1.195990046,\n feet: 10.763910417,\n inches: 1550.003100006\n};\n\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nfunction feature(geometry, properties, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error('options is invalid');\n var bbox = options.bbox;\n var id = options.id;\n\n // Validation\n if (geometry === undefined) throw new Error('geometry is required');\n if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');\n if (bbox) validateBBox(bbox);\n if (id) validateId(id);\n\n // Main\n var feat = {type: 'Feature'};\n if (id) feat.id = id;\n if (bbox) feat.bbox = bbox;\n feat.properties = properties || {};\n feat.geometry = geometry;\n return feat;\n}\n\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<number>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = 'Point';\n * var coordinates = [110, 50];\n *\n * var geometry = turf.geometry(type, coordinates);\n *\n * //=geometry\n */\nfunction geometry(type, coordinates, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error('options is invalid');\n var bbox = options.bbox;\n\n // Validation\n if (!type) throw new Error('type is required');\n if (!coordinates) throw new Error('coordinates is required');\n if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');\n if (bbox) validateBBox(bbox);\n\n // Main\n var geom;\n switch (type) {\n case 'Point': geom = point(coordinates).geometry; break;\n case 'LineString': geom = lineString(coordinates).geometry; break;\n case 'Polygon': geom = polygon(coordinates).geometry; break;\n case 'MultiPoint': geom = multiPoint(coordinates).geometry; break;\n case 'MultiLineString': geom = multiLineString(coordinates).geometry; break;\n case 'MultiPolygon': geom = multiPolygon(coordinates).geometry; break;\n default: throw new Error(type + ' is invalid');\n }\n if (bbox) geom.bbox = bbox;\n return geom;\n}\n\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nfunction point(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');\n if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');\n\n return feature({\n type: 'Point',\n coordinates: coordinates\n }, properties, options);\n}\n\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nfunction points(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');\n\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nfunction polygon(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n\n for (var i = 0; i < coordinates.length; i++) {\n var ring = coordinates[i];\n if (ring.length < 4) {\n throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (i === 0 && j === 0 && !isNumber(ring[0][0]) || !isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error('First and last Position are not equivalent.');\n }\n }\n }\n\n return feature({\n type: 'Polygon',\n coordinates: coordinates\n }, properties, options);\n}\n\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nfunction polygons(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');\n\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nfunction lineString(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions');\n // Check if first point of LineString contains two numbers\n if (!isNumber(coordinates[0][1]) || !isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');\n\n return feature({\n type: 'LineString',\n coordinates: coordinates\n }, properties, options);\n}\n\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<number>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nfunction lineStrings(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');\n\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nfunction featureCollection(features, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error('options is invalid');\n var bbox = options.bbox;\n var id = options.id;\n\n // Validation\n if (!features) throw new Error('No features passed');\n if (!Array.isArray(features)) throw new Error('features must be an Array');\n if (bbox) validateBBox(bbox);\n if (id) validateId(id);\n\n // Main\n var fc = {type: 'FeatureCollection'};\n if (id) fc.id = id;\n if (bbox) fc.bbox = bbox;\n fc.features = features;\n return fc;\n}\n\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nfunction multiLineString(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n\n return feature({\n type: 'MultiLineString',\n coordinates: coordinates\n }, properties, options);\n}\n\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nfunction multiPoint(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n\n return feature({\n type: 'MultiPoint',\n coordinates: coordinates\n }, properties, options);\n}\n\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nfunction multiPolygon(coordinates, properties, options) {\n if (!coordinates) throw new Error('coordinates is required');\n\n return feature({\n type: 'MultiPolygon',\n coordinates: coordinates\n }, properties, options);\n}\n\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = {\n * \"type\": \"Point\",\n * \"coordinates\": [100, 0]\n * };\n * var line = {\n * \"type\": \"LineString\",\n * \"coordinates\": [ [101, 0], [102, 1] ]\n * };\n * var collection = turf.geometryCollection([pt, line]);\n *\n * //=collection\n */\nfunction geometryCollection(geometries, properties, options) {\n if (!geometries) throw new Error('geometries is required');\n if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');\n\n return feature({\n type: 'GeometryCollection',\n geometries: geometries\n }, properties, options);\n}\n\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nfunction round(num, precision) {\n if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');\n if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.\n * @returns {number} distance\n */\nfunction radiansToLength(radians, units) {\n if (radians === undefined || radians === null) throw new Error('radians is required');\n\n if (units && typeof units !== 'string') throw new Error('units must be a string');\n var factor = factors[units || 'kilometers'];\n if (!factor) throw new Error(units + ' units is invalid');\n return radians * factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.\n * @returns {number} radians\n */\nfunction lengthToRadians(distance, units) {\n if (distance === undefined || distance === null) throw new Error('distance is required');\n\n if (units && typeof units !== 'string') throw new Error('units must be a string');\n var factor = factors[units || 'kilometers'];\n if (!factor) throw new Error(units + ' units is invalid');\n return distance / factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nfunction lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nfunction bearingToAzimuth(bearing) {\n if (bearing === null || bearing === undefined) throw new Error('bearing is required');\n\n var angle = bearing % 360;\n if (angle < 0) angle += 360;\n return angle;\n}\n\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nfunction radiansToDegrees(radians) {\n if (radians === null || radians === undefined) throw new Error('radians is required');\n\n var degrees = radians % (2 * Math.PI);\n return degrees * 180 / Math.PI;\n}\n\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nfunction degreesToRadians(degrees) {\n if (degrees === null || degrees === undefined) throw new Error('degrees is required');\n\n var radians = degrees % 360;\n return radians * Math.PI / 180;\n}\n\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {string} originalUnit of the length\n * @param {string} [finalUnit='kilometers'] returned unit\n * @returns {number} the converted length\n */\nfunction convertLength(length, originalUnit, finalUnit) {\n if (length === null || length === undefined) throw new Error('length is required');\n if (!(length >= 0)) throw new Error('length must be a positive number');\n\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit || 'kilometers');\n}\n\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches\n * @param {number} area to be converted\n * @param {string} [originalUnit='meters'] of the distance\n * @param {string} [finalUnit='kilometers'] returned unit\n * @returns {number} the converted distance\n */\nfunction convertArea(area, originalUnit, finalUnit) {\n if (area === null || area === undefined) throw new Error('area is required');\n if (!(area >= 0)) throw new Error('area must be a positive number');\n\n var startFactor = areaFactors[originalUnit || 'meters'];\n if (!startFactor) throw new Error('invalid original units');\n\n var finalFactor = areaFactors[finalUnit || 'kilometers'];\n if (!finalFactor) throw new Error('invalid final units');\n\n return (area / startFactor) * finalFactor;\n}\n\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nfunction isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nfunction isObject(input) {\n return (!!input) && (input.constructor === Object);\n}\n\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nfunction validateBBox(bbox) {\n if (!bbox) throw new Error('bbox is required');\n if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');\n if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');\n bbox.forEach(function (num) {\n if (!isNumber(num)) throw new Error('bbox must only contain numbers');\n });\n}\n\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nfunction validateId(id) {\n if (!id) throw new Error('id is required');\n if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');\n}\n\n// Deprecated methods\nfunction radians2degrees() {\n throw new Error('method has been renamed to `radiansToDegrees`');\n}\n\nfunction degrees2radians() {\n throw new Error('method has been renamed to `degreesToRadians`');\n}\n\nfunction distanceToDegrees() {\n throw new Error('method has been renamed to `lengthToDegrees`');\n}\n\nfunction distanceToRadians() {\n throw new Error('method has been renamed to `lengthToRadians`');\n}\n\nfunction radiansToDistance() {\n throw new Error('method has been renamed to `radiansToLength`');\n}\n\nfunction bearingToAngle() {\n throw new Error('method has been renamed to `bearingToAzimuth`');\n}\n\nfunction convertDistance() {\n throw new Error('method has been renamed to `convertLength`');\n}\n\nexport { earthRadius, factors, unitsFactors, areaFactors, feature, geometry, point, points, polygon, polygons, lineString, lineStrings, featureCollection, multiLineString, multiPoint, multiPolygon, geometryCollection, round, radiansToLength, lengthToRadians, lengthToDegrees, bearingToAzimuth, radiansToDegrees, degreesToRadians, convertLength, convertArea, isNumber, isObject, validateBBox, validateId, radians2degrees, degrees2radians, distanceToDegrees, distanceToRadians, radiansToDistance, bearingToAngle, convertDistance };\n","import { isNumber } from '@turf/helpers';\n\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nfunction getCoord(coord) {\n if (!coord) throw new Error('coord is required');\n if (coord.type === 'Feature' && coord.geometry !== null && coord.geometry.type === 'Point') return coord.geometry.coordinates;\n if (coord.type === 'Point') return coord.coordinates;\n if (Array.isArray(coord) && coord.length >= 2 && coord[0].length === undefined && coord[1].length === undefined) return coord;\n\n throw new Error('coord must be GeoJSON Point or an Array of numbers');\n}\n\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nfunction getCoords(coords) {\n if (!coords) throw new Error('coords is required');\n\n // Feature\n if (coords.type === 'Feature' && coords.geometry !== null) return coords.geometry.coordinates;\n\n // Geometry\n if (coords.coordinates) return coords.coordinates;\n\n // Array of numbers\n if (Array.isArray(coords)) return coords;\n\n throw new Error('coords must be GeoJSON Feature, Geometry Object or an Array');\n}\n\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nfunction containsNumber(coordinates) {\n if (coordinates.length > 1 && isNumber(coordinates[0]) && isNumber(coordinates[1])) {\n return true;\n }\n\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error('coordinates must only contain numbers');\n}\n\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction geojsonType(value, type, name) {\n if (!type || !name) throw new Error('type and name required');\n\n if (!value || value.type !== type) {\n throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + value.type);\n }\n}\n\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nfunction featureOf(feature, type, name) {\n if (!feature) throw new Error('No feature passed');\n if (!name) throw new Error('.featureOf() requires a name');\n if (!feature || feature.type !== 'Feature' || !feature.geometry) {\n throw new Error('Invalid input to ' + name + ', Feature with geometry required');\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + feature.geometry.type);\n }\n}\n\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction collectionOf(featureCollection, type, name) {\n if (!featureCollection) throw new Error('No featureCollection passed');\n if (!name) throw new Error('.collectionOf() requires a name');\n if (!featureCollection || featureCollection.type !== 'FeatureCollection') {\n throw new Error('Invalid input to ' + name + ', FeatureCollection required');\n }\n for (var i = 0; i < featureCollection.features.length; i++) {\n var feature = featureCollection.features[i];\n if (!feature || feature.type !== 'Feature' || !feature.geometry) {\n throw new Error('Invalid input to ' + name + ', Feature with geometry required');\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + feature.geometry.type);\n }\n }\n}\n\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nfunction getGeom(geojson) {\n if (!geojson) throw new Error('geojson is required');\n if (geojson.geometry !== undefined) return geojson.geometry;\n if (geojson.coordinates || geojson.geometries) return geojson;\n throw new Error('geojson must be a valid Feature or Geometry Object');\n}\n\n/**\n * Get Geometry Type from Feature or Geometry Object\n *\n * @throws {Error} **DEPRECATED** in v5.0.0 in favor of getType\n */\nfunction getGeomType() {\n throw new Error('invariant.getGeomType has been deprecated in v5.0 in favor of invariant.getType');\n}\n\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nfunction getType(geojson, name) {\n if (!geojson) throw new Error((name || 'geojson') + ' is required');\n // GeoJSON Feature & GeometryCollection\n if (geojson.geometry && geojson.geometry.type) return geojson.geometry.type;\n // GeoJSON Geometry & FeatureCollection\n if (geojson.type) return geojson.type;\n throw new Error((name || 'geojson') + ' is invalid');\n}\n\nexport { getCoord, getCoords, containsNumber, geojsonType, featureOf, collectionOf, getGeom, getGeomType, getType };\n","import { getCoord } from '@turf/invariant';\nimport { degreesToRadians, isObject, lengthToRadians, point, radiansToDegrees } from '@turf/helpers';\n\n//http://en.wikipedia.org/wiki/Haversine_formula\n//http://www.movable-type.co.uk/scripts/latlong.html\n/**\n * Takes a {@link Point} and calculates the location of a destination point given a distance in degrees, radians, miles, or kilometers; and bearing in degrees. This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature.\n *\n * @name destination\n * @param {Coord} origin starting point\n * @param {number} distance distance from the origin point\n * @param {number} bearing ranging from -180 to 180\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] miles, kilometers, degrees, or radians\n * @param {Object} [options.properties={}] Translate properties to Point\n * @returns {Feature<Point>} destination point\n * @example\n * var point = turf.point([-75.343, 39.984]);\n * var distance = 50;\n * var bearing = 90;\n * var options = {units: 'miles'};\n *\n * var destination = turf.destination(point, distance, bearing, options);\n *\n * //addToMap\n * var addToMap = [point, destination]\n * destination.properties['marker-color'] = '#f00';\n * point.properties['marker-color'] = '#0f0';\n */\nfunction destination(origin, distance, bearing, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error('options is invalid');\n var units = options.units;\n var properties = options.properties;\n\n // Handle input\n var coordinates1 = getCoord(origin);\n var longitude1 = degreesToRadians(coordinates1[0]);\n var latitude1 = degreesToRadians(coordinates1[1]);\n var bearing_rad = degreesToRadians(bearing);\n var radians = lengthToRadians(distance, units);\n\n // Main\n var latitude2 = Math.asin(Math.sin(latitude1) * Math.cos(radians) +\n Math.cos(latitude1) * Math.sin(radians) * Math.cos(bearing_rad));\n var longitude2 = longitude1 + Math.atan2(Math.sin(bearing_rad) * Math.sin(radians) * Math.cos(latitude1),\n Math.cos(radians) - Math.sin(latitude1) * Math.sin(latitude2));\n var lng = radiansToDegrees(longitude2);\n var lat = radiansToDegrees(latitude2);\n\n return point([lng, lat], properties);\n}\n\nexport default destination;\n","import { getCoord } from '@turf/invariant';\nimport { degreesToRadians, isObject, radiansToLength } from '@turf/helpers';\n\n//http://en.wikipedia.org/wiki/Haversine_formula\n//http://www.movable-type.co.uk/scripts/latlong.html\n\n/**\n * Calculates the distance between two {@link Point|points} in degrees, radians,\n * miles, or kilometers. This uses the\n * [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula)\n * to account for global curvature.\n *\n * @name distance\n * @param {Coord} from origin point\n * @param {Coord} to destination point\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers\n * @returns {number} distance between the two points\n * @example\n * var from = turf.point([-75.343, 39.984]);\n * var to = turf.point([-75.534, 39.123]);\n * var options = {units: 'miles'};\n *\n * var distance = turf.distance(from, to, options);\n *\n * //addToMap\n * var addToMap = [from, to];\n * from.properties.distance = distance;\n * to.properties.distance = distance;\n */\nfunction distance(from, to, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error('options is invalid');\n var units = options.units;\n\n var coordinates1 = getCoord(from);\n var coordinates2 = getCoord(to);\n var dLat = degreesToRadians((coordinates2[1] - coordinates1[1]));\n var dLon = degreesToRadians((coordinates2[0] - coordinates1[0]));\n var lat1 = degreesToRadians(coordinates1[1]);\n var lat2 = degreesToRadians(coordinates2[1]);\n\n var a = Math.pow(Math.sin(dLat / 2), 2) +\n Math.pow(Math.sin(dLon / 2), 2) * Math.cos(lat1) * Math.cos(lat2);\n\n return radiansToLength(2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), units);\n}\n\nexport default distance;\n","import {\n feature,\n Feature,\n featureCollection,\n FeatureCollection,\n Point,\n Properties,\n} from '@turf/helpers';\nimport midPoint from '@turf/midpoint';\nimport BaseRender from './base_render';\nimport { renderFeature } from './renderFeature';\nexport default class DrawVertexLayer extends BaseRender {\n public update(pointFeatures: FeatureCollection) {\n this.removeLayers();\n const midFeatures = this.calcMidPointData(pointFeatures);\n const style = this.draw.getStyle('mid_point');\n this.drawLayers = renderFeature(midFeatures, style);\n this.addLayers();\n this.enableEdit();\n }\n public updateData(data: any) {\n const midFeatures = this.calcMidPointData(data);\n this.drawLayers.forEach(layer => layer.setData(midFeatures));\n }\n public enableEdit() {\n const layer = this.drawLayers[0];\n layer.on('mouseenter', this.onMouseEnter);\n layer.on('mouseout', this.onMouseOut);\n layer.on('click', this.onClick);\n }\n\n public disableEdit() {\n const layer = this.drawLayers[0];\n layer.off('mouseenter', this.onMouseEnter);\n layer.off('mouseout', this.onMouseOut);\n layer.off('click', this.onClick);\n }\n\n private onMouseEnter = (e: any) => {\n this.draw.setCursor('pointer');\n };\n private onMouseOut = (e: any) => {\n this.draw.resetCursor();\n };\n private onClick = (e: any) => {\n this.draw.addVertex(e.feature);\n // 添加一个顶点 1.更新顶点 2.更新重点\n };\n\n private calcMidPointData(fe: FeatureCollection) {\n const midFeatures: Feature[] = [];\n fe.features.forEach((item, index) => {\n const preFeature = (item as unknown) as Feature<Point, Properties>;\n if (this.draw.type === 'line' && index === fe.features.length - 1) {\n return;\n }\n const nextFeature =\n index !== fe.features.length - 1\n ? ((fe.features[index + 1] as unknown) as Feature<Point, Properties>)\n : ((fe.features[0] as unknown) as Feature<Point, Properties>);\n // @ts-ignore\n const point = midPoint(preFeature, nextFeature) as Feature<\n Point,\n Properties\n >;\n // @ts-ignore\n point.properties.id = index;\n midFeatures.push(point);\n });\n return featureCollection(midFeatures);\n }\n}\n","import bearing from '@turf/bearing';\nimport destination from '@turf/destination';\nimport distance from '@turf/distance';\n\n/**\n * Takes two {@link Point|points} and returns a point midway between them.\n * The midpoint is calculated geodesically, meaning the curvature of the earth is taken into account.\n *\n * @name midpoint\n * @param {Coord} point1 first point\n * @param {Coord} point2 second point\n * @returns {Feature<Point>} a point midway between `pt1` and `pt2`\n * @example\n * var point1 = turf.point([144.834823, -37.771257]);\n * var point2 = turf.point([145.14244, -37.830937]);\n *\n * var midpoint = turf.midpoint(point1, point2);\n *\n * //addToMap\n * var addToMap = [point1, point2, midpoint];\n * midpoint.properties['marker-color'] = '#f00';\n */\nfunction midpoint(point1, point2) {\n var dist = distance(point1, point2);\n var heading = bearing(point1, point2);\n var midpoint = destination(point1, dist / 2, heading);\n\n return midpoint;\n}\n\nexport default midpoint;\n","import { IInteractionTarget, ILayer, ILngLat, Scene } from '@antv/l7';\nimport {\n Feature,\n FeatureCollection,\n featureCollection,\n Geometries,\n point,\n Position,\n Properties,\n} from '@turf/helpers';\nimport DrawMidVertex from '../render/draw_mid_vertex';\nimport { DrawEvent, DrawModes, unitsType } from '../util/constant';\nimport { createPoint, createPolygon } from '../util/create_geometry';\nimport moveFeatures from '../util/move_featrues';\nimport DrawFeature, { IDrawFeatureOption } from './draw_feature';\nexport interface IDrawRectOption extends IDrawFeatureOption {\n units: unitsType;\n steps: number;\n}\nexport default class DrawPolygon extends DrawFeature {\n protected startPoint: ILngLat;\n protected endPoint: ILngLat;\n protected points: ILngLat[] = [];\n protected pointFeatures: Feature[];\n protected drawMidVertexLayer: DrawMidVertex;\n\n constructor(scene: Scene, options: Partial<IDrawRectOption> = {}) {\n super(scene, options);\n this.type = 'polygon';\n this.drawMidVertexLayer = new DrawMidVertex(this);\n this.on(DrawEvent.MODE_CHANGE, this.addMidLayerEvent);\n }\n public enable() {\n super.enable();\n this.scene.on('mousemove', this.onMouseMove);\n this.scene.on('dblclick', this.onDblClick);\n // 关闭双击放大\n }\n\n public disable() {\n super.disable();\n this.scene.off('mousemove', this.onMouseMove);\n this.scene.off('dblclick', this.onDblClick);\n }\n\n public drawFinish() {\n this.points = this.points.reverse();\n const feature = this.createFeature(this.points);\n const properties = feature.properties as { pointFeatures: Feature[] };\n this.drawLayer.update(featureCollection([feature]));\n this.drawVertexLayer.update(featureCollection(properties.pointFeatures));\n // @ts-ignore\n this.emit(DrawEvent.CREATE, this.currentFeature);\n this.emit(DrawEvent.MODE_CHANGE, DrawModes.SIMPLE_SELECT);\n this.points = [];\n this.disable();\n }\n\n public addVertex(vertex: Feature<Geometries, Properties>) {\n // @ts-ignore\n const id = vertex.properties.id;\n const coord = vertex?.geometry?.coordinates as Position;\n const feature = this.currentFeature as Feature<Geometries, Properties>;\n const type = feature?.geometry?.type;\n const points = [];\n if (type === 'Polygon') {\n const coords = feature?.geometry?.coordinates as Position[][];\n coords[0].splice(id + 1, 0, coord);\n for (let i = 0; i < coords[0].length - 1; i++) {\n points.push({\n lng: coords[0][i][0],\n lat: coords[0][i][1],\n });\n }\n } else {\n const coords = feature?.geometry?.coordinates as Position[];\n coords.splice(id + 1, 0, coord);\n for (const coor of coords) {\n points.push({\n lng: coor[0],\n lat: coor[1],\n });\n }\n }\n const pointfeatures = createPoint(points);\n this.pointFeatures = pointfeatures.features;\n this.drawLayer.updateData(featureCollection([feature]));\n this.drawVertexLayer.updateData(pointfeatures);\n this.drawMidVertexLayer.updateData(featureCollection(this.pointFeatures));\n // @ts-ignore\n feature.properties.pointFeatures = pointfeatures.features;\n this.setCurrentFeature(feature);\n }\n\n protected getDefaultOptions(): Partial<IDrawFeatureOption> {\n return {\n ...super.getDefaultOptions(),\n title: '绘制多边形',\n };\n }\n protected onDragStart = (e: IInteractionTarget) => {\n return null;\n };\n protected onDragging = (e: IInteractionTarget) => {\n return null;\n };\n\n protected onDragEnd = () => {\n return null;\n };\n\n protected onClick = (e: any) => {\n if (this.drawStatus !== 'Drawing') {\n this.drawLayer.emit('unclick', null);\n }\n const lngLat = e.lngLat || e.lnglat;\n this.endPoint = lngLat;\n this.points.push(lngLat);\n const feature = this.createFeature(this.points);\n const pointfeatures = createPoint([this.points[0], this.endPoint]);\n this.drawLayer.update(featureCollection([feature]));\n this.drawVertexLayer.update(featureCollection(pointfeatures.features));\n this.onDraw();\n };\n\n protected onMouseMove = (e: any) => {\n const lngLat = e.lngLat || e.lnglat;\n if (this.points.length === 0) {\n return;\n }\n const tmpPoints = this.points.slice();\n tmpPoints.push(lngLat);\n const feature = this.createFeature(tmpPoints);\n this.drawLayer.update(featureCollection([feature]));\n };\n\n protected onDblClick = (e: any) => {\n const lngLat = e.lngLat || e.lnglat;\n if (this.points.length < 2) {\n return;\n }\n this.points.push(lngLat);\n this.drawFinish();\n };\n\n protected moveFeature(delta: ILngLat): void {\n const newFeature = moveFeatures([this.currentFeature as Feature], delta);\n const newPointFeture = moveFeatures(this.pointFeatures, delta);\n this.drawLayer.updateData(featureCollection(newFeature));\n this.drawVertexLayer.updateData(featureCollection(newPointFeture));\n newFeature[0].properties = {\n ...newFeature[0].properties,\n pointFeatures: newPointFeture,\n };\n this.setCurrentFeature(newFeature[0]);\n }\n protected createFeature(\n points: ILngLat[],\n id?: string,\n active: boolean = true,\n ): Feature {\n const pointfeatures = createPoint(points);\n this.pointFeatures = pointfeatures.features;\n const feature = createPolygon(points, {\n id: id || this.getUniqId(),\n type: 'polygon',\n active,\n pointFeatures: this.pointFeatures,\n });\n this.setCurrentFeature(feature as Feature);\n return feature;\n }\n\n protected editFeature(vertex: ILngLat): void {\n const selectVertexed = this.currentVertex as Feature<\n Geometries,\n Properties\n >;\n if (selectVertexed === null) {\n return;\n } else {\n // @ts-ignore\n const id = selectVertexed.properties.id * 1;\n // @ts-ignore\n selectVertexed.geometry.coordinates = [vertex.lng, vertex.lat];\n // @ts-ignore\n this.pointFeatures[id].geometry.coordinates = [vertex.lng, vertex.lat];\n this.drawVertexLayer.updateData(featureCollection(this.pointFeatures));\n this.drawMidVertexLayer.updateData(featureCollection(this.pointFeatures));\n this.editPolygonVertex(id, vertex);\n this.drawLayer.updateData(\n featureCollection([this.currentFeature as Feature]),\n );\n const feature = this.currentFeature as Feature;\n feature.properties = {\n ...this.currentFeature?.properties,\n pointFeatures: this.pointFeatures,\n };\n this.setCurrentFeature(feature);\n }\n }\n\n protected onDraw = () => {\n this.drawVertexLayer.on('mousemove', (e: any) => {\n this.setCursor('pointer');\n });\n this.drawVertexLayer.on('mouseout', () => {\n this.setCursor('crosshair');\n });\n this.drawVertexLayer.on('click', () => {\n this.resetCursor();\n this.drawFinish();\n });\n };\n\n protected showOtherLayer() {\n // if (this.editMode.isEnable) {\n // this.drawMidVertexLayer.update(featureCollection(this.pointFeatures));\n // this.drawMidVertexLayer.show();\n // }\n return null;\n }\n\n protected hideOtherLayer() {\n return null;\n }\n\n protected addMidLayerEvent(mode: DrawModes[any]) {\n switch (mode) {\n case DrawModes.DIRECT_SELECT:\n this.drawMidVertexLayer.update(featureCollection(this.pointFeatures));\n this.drawMidVertexLayer.show();\n break;\n case DrawModes.STATIC:\n this.drawMidVertexLayer.hide();\n break;\n }\n }\n protected initData(): boolean {\n const features: Feature[] = [];\n this.source.data.features.forEach(feature => {\n if (feature.geometry.type === 'Polygon') {\n const points = (feature.geometry.coordinates[0] as Position[]).map(\n coord => {\n return {\n lng: coord[0],\n lat: coord[1],\n };\n },\n );\n features.push(\n this.createFeature(points.slice(1), feature?.properties?.id, false),\n );\n }\n });\n this.source.data.features = features;\n return true;\n }\n\n private editPolygonVertex(id: number, vertex: ILngLat) {\n const feature = this.currentFeature as Feature<Geometries, Properties>;\n const type = feature?.geometry?.type;\n if (type === 'Polygon') {\n const coords = feature?.geometry?.coordinates as Position[][];\n coords[0][id] = [vertex.lng, vertex.lat];\n if (-id === 0) {\n coords[0][coords[0].length - 1] = [vertex.lng, vertex.lat];\n }\n } else {\n const coords = feature?.geometry?.coordinates as Position[];\n coords[id] = [vertex.lng, vertex.lat];\n }\n this.setCurrentFeature(feature);\n this.drawLayer.updateData(\n featureCollection([this.currentFeature as Feature]),\n );\n }\n}\n/**\n * draw 端点响应事件\n * select Polyon 响应事件\n * edit 端点 中心点响应事件\n */\n","import { ILngLat, Scene } from '@antv/l7';\nimport { Feature, featureCollection } from '@turf/helpers';\nimport { unitsType } from '../util/constant';\nimport { createLine, createPoint } from '../util/create_geometry';\nimport moveFeatures from '../util/move_featrues';\nimport { IDrawFeatureOption } from './draw_feature';\nimport DrawPolygon from './draw_polygon';\nexport interface IDrawRectOption extends IDrawFeatureOption {\n units: unitsType;\n steps: number;\n}\nexport default class DrawLine extends DrawPolygon {\n constructor(scene: Scene, options: Partial<IDrawRectOption> = {}) {\n super(scene, options);\n this.type = 'line';\n }\n\n protected getDefaultOptions(): Partial<IDrawFeatureOption> {\n return {\n ...super.getDefaultOptions(),\n title: '绘制线',\n };\n }\n protected moveFeature(delta: ILngLat): Feature {\n const newFeature = moveFeatures([this.currentFeature as Feature], delta);\n const newPointFeture = moveFeatures(this.pointFeatures, delta);\n this.drawLayer.updateData(featureCollection(newFeature));\n this.drawVertexLayer.updateData(featureCollection(newPointFeture));\n this.currentFeature = newFeature[0];\n this.pointFeatures = newPointFeture;\n return this.currentFeature;\n }\n protected createFeature(\n points: ILngLat[],\n id?: string,\n active: boolean = true,\n ): Feature {\n const pointfeatures = createPoint(points);\n this.pointFeatures = pointfeatures.features;\n const feature = createLine(points, {\n id: id || this.getUniqId(),\n type: 'line',\n active,\n pointFeatures: this.pointFeatures,\n });\n this.setCurrentFeature(feature as Feature);\n return feature;\n }\n protected initData(): boolean {\n const features: Feature[] = [];\n this.source.data.features.forEach(feature => {\n if (feature.geometry.type === 'LineString') {\n // @ts-ignore\n const points = feature.geometry.coordinates.map(coord => {\n return {\n lng: coord[0],\n lat: coord[1],\n };\n });\n features.push(\n this.createFeature(points, feature?.properties?.id, false),\n );\n }\n });\n this.source.data.features = features;\n return true;\n }\n}\n","import { IInteractionTarget, ILayer, ILngLat, Scene } from '@antv/l7';\nimport { Feature, featureCollection, point } from '@turf/helpers';\nimport { DrawEvent, DrawModes, unitsType } from '../util/constant';\nimport moveFeatures from '../util/move_featrues';\nimport DrawFeature, { IDrawFeatureOption } from './draw_feature';\nexport default class DrawPoint extends DrawFeature {\n protected pointFeatures: Feature[];\n\n constructor(scene: Scene, options: Partial<IDrawFeatureOption> = {}) {\n super(scene, options);\n this.type = 'point';\n }\n public drawFinish() {\n this.emit(DrawEvent.CREATE, this.currentFeature);\n this.emit(DrawEvent.MODE_CHANGE, DrawModes.SIMPLE_SELECT);\n this.disable();\n }\n\n protected getDefaultOptions(): Partial<IDrawFeatureOption> {\n return {\n ...super.getDefaultOptions(),\n title: '绘制点',\n };\n }\n\n protected onDragStart = (e: IInteractionTarget) => {\n return null;\n };\n protected onDragging = (e: IInteractionTarget) => {\n return null;\n };\n\n protected onDragEnd = () => {\n return null;\n };\n\n protected onClick = (e: any) => {\n if (this.drawStatus !== 'Drawing') {\n this.drawLayer.emit('unclick', null);\n }\n const lngLat = e.lngLat || e.lnglat;\n const feature = this.createFeature(lngLat);\n this.drawLayer.update(featureCollection([feature]));\n this.drawVertexLayer.update(featureCollection([feature]));\n this.drawFinish();\n };\n\n protected moveFeature(delta: ILngLat): Feature {\n const newFeature = moveFeatures([this.currentFeature as Feature], delta);\n this.drawLayer.updateData(featureCollection(newFeature));\n this.drawVertexLayer.updateData(featureCollection(newFeature));\n this.currentFeature = newFeature[0];\n this.pointFeatures = newFeature;\n this.currentFeature.properties = {\n ...this.currentFeature.properties,\n pointFeatures: newFeature,\n };\n return this.currentFeature;\n }\n protected createFeature(\n p: ILngLat,\n id?: string,\n active: boolean = true,\n ): Feature {\n const feature = point([p.lng, p.lat], {\n id: id || this.getUniqId(),\n type: 'point',\n active,\n pointFeatures: [point([p.lng, p.lat])],\n });\n this.setCurrentFeature(feature as Feature);\n return feature;\n }\n protected initData(): boolean {\n const features: Feature[] = [];\n this.source.data.features.forEach(feature => {\n if (feature.geometry.type === 'Point') {\n const p = {\n lng: feature.geometry.coordinates[0] as number,\n lat: feature.geometry.coordinates[1] as number,\n };\n features.push(this.createFeature(p, feature?.properties?.id, false));\n }\n });\n this.source.data.features = features;\n return true;\n }\n\n protected editFeature(endPoint: ILngLat): void {\n this.createFeature(endPoint);\n }\n\n protected showOtherLayer() {\n return null;\n }\n\n protected hideOtherLayer() {\n return null;\n }\n}\n","import { Scene } from '@antv/l7';\nimport {\n Feature,\n FeatureCollection,\n featureCollection,\n point,\n} from '@turf/helpers';\nimport { unitsType } from '../util/constant';\nimport { createPoint, createRect } from '../util/create_geometry';\nimport DrawCircle from './draw_circle';\nimport { IDrawFeatureOption } from './draw_feature';\nexport default class DrawRect extends DrawCircle {\n constructor(scene: Scene, options: Partial<IDrawFeatureOption> = {}) {\n super(scene, options);\n this.type = 'rect';\n }\n public drawFinish() {\n return null;\n }\n protected getDefaultOptions(): Partial<IDrawFeatureOption> {\n return {\n ...super.getDefaultOptions(),\n title: '绘制矩形',\n };\n }\n\n protected createFeature(id: string = '0'): Feature {\n const points = createPoint([this.endPoint]);\n const feature = createRect(\n [this.startPoint.lng, this.startPoint.lat],\n [this.endPoint.lng, this.endPoint.lat],\n {\n id,\n pointFeatures: points.features,\n },\n );\n this.setCurrentFeature(feature as Feature);\n return feature;\n }\n}\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/*\n * @Author: lzxue\n * @Date: 2020-04-03 19:24:16\n * @Last Modified by: lzxue\n * @Last Modified time: 2020-06-22 17:33:14\n */\nimport { Control, DOM, IControlOption, PositionType, Scene } from '@antv/l7';\nimport './css/draw.less';\nimport {\n DrawCircle,\n DrawDelete,\n DrawFeature,\n DrawLine,\n DrawPoint,\n DrawPolygon,\n DrawRect,\n} from './modes';\nimport { IDrawFeatureOption } from './modes/draw_feature';\nconst DrawType: {\n [key: string]: any;\n} = {\n point: DrawPoint,\n line: DrawLine,\n polygon: DrawPolygon,\n circle: DrawCircle,\n rect: DrawRect,\n};\nimport { isObject, polygon } from '@turf/helpers';\nimport { DrawEvent, DrawModes } from './util/constant';\nexport interface IControls {\n [key: string]: boolean | IDrawFeatureOption;\n}\n\nexport interface IDrawControlOption extends IControlOption {\n pickBuffer: number;\n controls: IControls;\n layout: 'horizontal' | 'vertical';\n style: any;\n}\nexport class DrawControl extends Control {\n private draw: {\n [key: string]: DrawFeature;\n } = {};\n private currentDraw: DrawFeature;\n private scene: Scene;\n constructor(scene: Scene, options: Partial<IDrawControlOption>) {\n super(options);\n this.scene = scene;\n }\n\n public getDefault() {\n return {\n position: PositionType.TOPLEFT,\n controls: {\n point: true,\n line: true,\n polygon: true,\n rect: true,\n circle: true,\n delete: true,\n },\n name: 'draw',\n };\n }\n\n public onAdd(): HTMLElement {\n const { layout } = this.controlOption;\n const controlClass = 'l7-control-draw' + ' ' + layout;\n const { controls } = this.controlOption as IDrawControlOption;\n const container = DOM.create('div', controlClass) as HTMLElement;\n this.addControls(controls, container);\n\n // 代理每个绘制组件的事件\n\n this.addControlEvent();\n // 监听组件 选中, 编辑\n return container;\n }\n\n public onRemove() {\n for (const draw in this.draw) {\n if (this.draw[draw]) {\n this.draw[draw].destroy();\n }\n }\n }\n\n public getDraw(type: string): DrawFeature | null {\n const { controls } = this.controlOption as IDrawControlOption;\n if (controls[type]) {\n return this.draw[type];\n }\n return null;\n }\n\n public getAllData() {\n const res: { [key: string]: any } = {};\n for (const draw in this.draw) {\n if (this.draw[draw]) {\n res[draw] = this.draw[draw].getData();\n }\n }\n return res;\n }\n public removeAllData() {\n for (const draw in this.draw) {\n if (this.draw[draw]) {\n this.draw[draw].removeAllData();\n }\n }\n }\n\n private addControls(controls: IControls, container: HTMLElement) {\n const { style } = this.controlOption as IDrawControlOption;\n for (const type in controls) {\n if (DrawType[type] && controls[type] !== false) {\n const drawOption: Partial<IDrawFeatureOption> = isObject(controls[type])\n ? (controls[type] as Partial<IDrawFeatureOption>)\n : {};\n if (style) {\n drawOption.style = style;\n }\n const draw = new DrawType[type](this.scene, drawOption);\n draw.on(DrawEvent.MODE_CHANGE, this.onModeChange.bind(null, type));\n this.draw[type] = draw;\n this.createButton(\n draw.title,\n 'draw-' + type,\n container,\n 'click',\n this.onButtonClick.bind(null, type),\n );\n } else if (type === 'delete' && controls[type] !== false) {\n const draw = new DrawDelete(this.scene);\n draw.on(DrawEvent.MODE_CHANGE, this.onModeChange.bind(null, type));\n this.createButton(\n draw.title,\n 'draw-' + type,\n container,\n 'mousedown',\n this.onDeleteMode.bind(null, type),\n );\n }\n }\n }\n\n private addControlEvent() {\n for (const draw in this.draw) {\n if (this.draw[draw]) {\n ['draw.create', 'draw.update', 'draw.delete'].forEach(\n (type: string) => {\n this.draw[draw].on(type, feature => {\n this.emit(type, {\n drawType: draw,\n feature,\n });\n });\n },\n );\n }\n }\n }\n private createButton(\n tile: string,\n className: string,\n container: HTMLElement,\n eventType: string,\n fn: (...arg: any[]) => any,\n ) {\n const link = DOM.create('button', className, container);\n link.title = tile;\n link.addEventListener(eventType, fn, false);\n return link;\n }\n\n private onButtonClick = (type: string, e: MouseEvent) => {\n for (const draw in this.draw) {\n if (draw === type) {\n this.draw[draw].enable();\n } else {\n this.draw[draw].disable();\n }\n }\n };\n\n private onDeleteMode = (type: string, e: MouseEvent) => {\n e.stopPropagation();\n if (!this.currentDraw) {\n return;\n }\n this.currentDraw.deleteMode.enable();\n return false;\n };\n\n private onModeChange = (type: string, mode: string) => {\n if (mode === DrawModes.SIMPLE_SELECT) {\n this.currentDraw = this.draw[type];\n }\n };\n}\n"],"names":["feature","geom","properties","options","feat","type","id","bbox","geometry","point","coordinates","polygon","_i","coordinates_1","length","ring","Error","j","lineString","featureCollection","features","fc","multiLineString","multiPoint","multiPolygon","radiansToLength","radians","units","factor","exports","factors","lengthToRadians","distance","radiansToDegrees","Math","PI","isNumber","num","isNaN","Array","isArray","test","Object","defineProperty","value","centimeters","earthRadius","centimetres","degrees","feet","inches","kilometers","kilometres","meters","metres","miles","millimeters","millimetres","nauticalmiles","yards","acres","map","coords","geometries","precision","multiplier","pow","round","bearing","angle","originalUnit","finalUnit","area","startFactor","areaFactors","finalFactor","input","constructor","forEach","indexOf","DrawEvent","DrawModes","FeatureType","coord","containsNumber","helpers_1","name","_a","geojson","origin","coordinates1","invariant_1","getCoord","longitude1","degreesToRadians","latitude1","bearingRad","latitude2","asin","sin","cos","lng","atan2","lat","center","radius","steps","i","push","destination_1","default","from","to","coordinates2","dLat","dLon","lat1","lat2","a","sqrt","createCircle","endPoint","turfDistance","turfCircle","active","startPoint","createRect","minX","min","minY","maxX","max","maxY","createPolygon","points","p","createLine","createPoint","index","delta","nextCoord","POINT","movePoint","LINE_STRING","MULTI_POINT","moveRing","POLYGON","MULTI_LINE_STRING","moveMultiPolygon","MULTI_POLYGON","mult","renderFeature","fe","style","layers","_fe$features$","_fe$features$$geometr","PointLayer","zIndex","pickingBuffer","source","shape","color","size","drawPoint","LineLayer","drawLine","line","fill","PolygonLayer","opacity","stroke","strokeWidth","strokeOpacity","lineType","dashArray","drawPolyon","BaseRenderLayer","draw","this","drawLayers","updateData","removeLayers","getStyle","addLayers","handler","on","off","e","emit","data","update","layer","setData","_this","scene","removeLayer","_this2","addLayer","show","hide","DrawLayer","setCursor","selectMode","enable","resetCursor","disable","editMode","disableSelect","enableEdit","setCurrentFeature","MODE_CHANGE","DIRECT_SELECT","setFeatureUnActive","getCurrentFeature","disableEdit","STATIC","isEnableDrag","onMouseMove","onUnMouseMove","editEnable","onClick","onUnClick","isEnableEdit","BaseRender","DrawResultLayer","setFeatureActive","SIMPLE_SELECT","removeFeature","addFilter","selectEnable","onDeleteClick","filter","DrawVertexLayer","setCurrentVertex","onMouseEnter","onMouseOut","has","prototype","hasOwnProperty","prefix","Events","EE","fn","context","once","addListener","emitter","event","TypeError","listener","evt","_events","_eventsCount","clearEvent","EventEmitter","create","__proto__","eventNames","events","names","call","slice","getOwnPropertySymbols","concat","listeners","handlers","l","ee","listenerCount","a1","a2","a3","a4","a5","args","len","arguments","removeListener","undefined","apply","removeAllListeners","prefixed","module","other","array","key","eq","splice","__data__","assocIndexOf","pop","ListCache","entries","clear","entry","set","listCacheDelete","get","listCacheGet","listCacheHas","listCacheSet","result","global","freeSelf","self","freeGlobal","Function","root","Symbol","objectProto","nativeObjectToString","toString","symToStringTag","toStringTag","isOwn","tag","unmasked","getRawTag","objectToString","uid","isObject","baseGetTag","coreJsData","maskSrcKey","exec","keys","IE_PROTO","func","funcToString","reIsHostCtor","reIsNative","RegExp","replace","isMasked","isFunction","toSource","object","getValue","baseIsNative","getNative","nativeCreate","Hash","hashDelete","hashGet","hashHas","hashSet","isKeyable","getMapData","MapCache","hash","Map","string","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","pairs","LARGE_ARRAY_SIZE","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","configurable","enumerable","writable","baseAssignValue","fromRight","iteratee","keysFunc","iterable","props","createBaseFor","freeExports","nodeType","freeModule","Buffer","allocUnsafe","buffer","isDeep","copy","Uint8Array","arrayBuffer","byteLength","typedArray","cloneArrayBuffer","byteOffset","objectCreate","proto","transform","arg","overArg","getPrototypeOf","Ctor","isPrototype","baseCreate","getPrototype","isObjectLike","propertyIsEnumerable","baseIsArguments","isLength","isArrayLike","isBuffer","stubFalse","objectCtorString","typedArrayTags","freeProcess","process","nodeUtil","types","require","binding","nodeIsTypedArray","isTypedArray","baseUnary","baseIsTypedArray","objValue","customizer","isNew","newValue","assignValue","n","reIsUint","inherited","isArr","isArg","isArguments","isBuff","isType","skipIndexes","baseTimes","String","isIndex","nativeKeysIn","isProto","arrayLikeKeys","baseKeysIn","copyObject","keysIn","srcIndex","mergeFunc","stack","safeGet","srcValue","stacked","assignMergeValue","isCommon","isTyped","isArrayLikeObject","copyArray","cloneBuffer","cloneTypedArray","isPlainObject","toPlainObject","initCloneObject","baseMerge","baseFor","baseMergeDeep","thisArg","nativeMax","start","otherArgs","nativeNow","Date","now","count","lastCalled","stamp","remaining","shortOut","constant","identity","setToString","overRest","assigner","baseRest","sources","guard","isIterateeCall","createAssigner","nativeKeys","baseKeys","predicate","resIndex","nativeGetSymbols","arrayFilter","symbol","stubArray","getSymbols","values","offset","arrayPush","getSymbolsIn","symbolsFunc","baseGetAllKeys","dataViewCtorString","DataView","mapCtorString","promiseCtorString","Promise","setCtorString","Set","weakMapCtorString","WeakMap","getTag","ArrayBuffer","resolve","ctorString","dataView","reFlags","regexp","lastIndex","symbolProto","symbolValueOf","valueOf","cloneDataView","cloneRegExp","cloneSymbol","nodeIsMap","isMap","baseIsMap","nodeIsSet","isSet","baseIsSet","cloneableTags","baseClone","bitmask","isFlat","isFull","initCloneArray","isFunc","copySymbolsIn","baseAssignIn","copySymbols","baseAssign","initCloneByTag","subValue","add","getAllKeysIn","getAllKeys","arrayEach","CLONE_DEEP_FLAG","DrawSource","getDefaultData","cloneDeep","_feature$properties","_feature$properties2","find","getFeatureIndex","getFeature","_feature$properties3","_feature$properties4","addFeature","findIndex","_feature$properties5","LayerStyles","normal","normal_point","mid_point","DrawFeatureId","DrawMode","merge","getDefaultOptions","title","getOption","isEnable","setMapStatus","dragEnable","onDragStart","onDragging","onDragEnd","currentFeature","currentVertex","cursor","container","getMapCanvasContainer","removeAttribute","DrawDelete","DELETE","DrawFeature","DrawEdit","lngLat","Edit","UPDATE","DrawSelect","dragStartPoint","Move","mode","setEditFeature","drawLayer","drawVertexLayer","_this$currentFeature","_this$currentFeature$","pointFeatures","showOtherLayer","drawStatus","hideOtherLayer","setSelectedFeature","enableSelect","_this$currentFeature2","_this$currentFeature3","updateFeature","clearFeatureActive","normalLayer","moveFeature","endpoint","editFeature","window","keyCode","deleteMode","DrawRender","RenderLayer","DrawSelected","onDrawUpdate","onDrawMove","onModeChange","onDrawEdit","onDrawDelete","CREATE","onDrawCreate","document","addEventListener","addKeyDownEvent","initData","getData","removeAllFeatures","destroy","removeEventListener","lnglat","dis","popup","Popup","anchor","closeButton","setLnglat","setText","toFixed","addPopup","DrawCircle","initCenterLayer","centerLayer","createFeature","getUniqId","newFeature","moveFeatures","newPointFeture","newStartPoint","newEndPoint","endPointObj","changeFeature","CHANGE","centerStyle","parser","x","y","end","final","bear","calculateFinalBearing","lon1","lon2","validateBBox","validateId","destination","bearing_rad","addVertex","midFeatures","calcMidPointData","item","point1","point2","DrawPolygon","pointfeatures","onDraw","tmpPoints","drawFinish","drawMidVertexLayer","DrawMidVertex","addMidLayerEvent","onDblClick","reverse","vertex","_vertex$geometry","_feature$geometry","_feature$geometry2","_feature$geometry3","coor","selectVertexed","editPolygonVertex","_feature$geometry4","_feature$geometry5","_feature$geometry6","DrawLine","DrawPoint","DrawRect","css","ref","insertAt","head","getElementsByTagName","createElement","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","DrawType","circle","rect","DrawControl","stopPropagation","currentDraw","position","PositionType","TOPLEFT","controls","delete","controlOption","DOM","layout","addControls","addControlEvent","res","removeAllData","drawOption","bind","createButton","onButtonClick","onDeleteMode","drawType","tile","className","eventType","link","Control"],"mappings":"04HAmGA,SAASA,EAAQC,EAAMC,EAAYC,QACf,IAAZA,IAAsBA,EAAU,IACpC,IAAIC,EAAO,CAAEC,KAAM,WASnB,OARmB,IAAfF,EAAQG,IAAYH,EAAQG,MAC5BF,EAAKE,GAAKH,EAAQG,IAElBH,EAAQI,OACRH,EAAKG,KAAOJ,EAAQI,MAExBH,EAAKF,WAAaA,GAAc,GAChCE,EAAKI,SAAWP,EACTG,EA8CX,SAASK,EAAMC,EAAaR,EAAYC,GAMpC,YALgB,IAAZA,IAAsBA,EAAU,IAK7BH,EAJI,CACPK,KAAM,QACNK,YAAaA,GAEIR,EAAYC,GA6CrC,SAASQ,EAAQD,EAAaR,EAAYC,QACtB,IAAZA,IAAsBA,EAAU,IACpC,IAAK,IAAIS,EAAK,EAAGC,EAAgBH,EAAkBG,EAAcC,OAAnBF,EAA2BA,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