Socket
Socket
Sign inDemoInstall

@nextgis/utils

Package Overview
Dependencies
Maintainers
0
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextgis/utils - npm Package Compare versions

Comparing version 2.3.0 to 2.5.0

6

lib/utils.cjs.js

@@ -1,2 +0,2 @@

/** Bundle of @nextgis/utils; version: 2.3.0; author: NextGIS */
/** Bundle of @nextgis/utils; version: 2.5.0; author: NextGIS */
'use strict';

@@ -197,3 +197,3 @@

var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, key + "" , value);
class Events {

@@ -599,3 +599,3 @@ constructor(emitter) {

var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
class Clipboard {

@@ -602,0 +602,0 @@ constructor(text) {

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const t="undefined"!=typeof window&&void 0!==window.document,e=t?"browser":"node";function o(t){return function(t,e=[]){for(;null!==t;t=Object.getPrototypeOf(t)){const o=Object.getOwnPropertyNames(t);for(let t=0;t<o.length;t++)-1==e.indexOf(o[t])&&e.push(o[t])}return e}(t)}function r(t,e){return t.length===e.length&&t.every((function(t,o){return t===e[o]}))}function n(t){return null!=t}function i(t,e=10){let o;function r(...n){r.clear(),o=setTimeout((()=>{o=null,t.apply(this,n)}),e)}return r.clear=function(){o&&(clearTimeout(o),o=null)},r}var s=Object.defineProperty,c=(t,e,o)=>((t,e,o)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o)(t,"symbol"!=typeof e?e+"":e,o);const a=6371;function u(t){return{type:"Polygon",coordinates:[p(t)]}}function p(t){const e=[t[0],t[1]];return[e,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],e]}const f=Math.PI/180,l=180/Math.PI;function y(t,e,o=10,r=6){const n=o/a*l,i=n/Math.cos(e*f),s=[];for(let c=0;c<r+1;c++){const o=Math.PI*(c/(r/2)),a=t+i*Math.cos(o),u=e+n*Math.sin(o);s.push([a,u])}return s}const d=Math.PI/180,g=180/Math.PI;function h(t,e){b(t,(t=>{if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(const o of t.coordinates)o.forEach((t=>e(t)));else if("MultiPolygon"===t.type)for(const o of t.coordinates)o.forEach((t=>t.forEach((t=>e(t)))));else if("Point"===t.type)e(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(const o of t.coordinates)e(o);return t}))}function b(t,e){if("FeatureCollection"===t.type)for(const o of t.features)e(o.geometry);else"Feature"===t.type?e(t.geometry):"coordinates"in t&&e(t)}function x(t,e,o,r){if(t instanceof Array)return e instanceof Array&&e.sort().join("")===t.sort().join("");if(t instanceof Date)return e instanceof Date&&""+t==""+e;if(t instanceof Function){if(!(e instanceof Function))return!1}else if(t instanceof Object)return e instanceof Object&&(t===o?e===r:m(t,e));return t===e}function m(t,e){const o=Object.keys(t).sort(),r=Object.keys(e).sort();if(o.length!==r.length)return!1;if(o.join("")!==r.join(""))return!1;for(let n=0;n<o.length;n++){if(!x(t[o[n]],e[r[n]],t,e))return!1}return!0}function j(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(A(t)?O(t):!!v(t)&&P(t))}function P(t){return!!v(t)&&t.every(j)}function O(t){if(A(t))for(const e in t)if(!j(e))return!1;return!1}function M(t,e){return("string"==typeof e||"number"==typeof e)&&e in t}function A(t){return"[object Object]"===Object.prototype.toString.call(t)}function v(t){return"[object Array]"===Object.prototype.toString.call(t)}var C=Object.defineProperty,E=(t,e,o)=>((t,e,o)=>e in t?C(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o)(t,"symbol"!=typeof e?e+"":e,o);class w{constructor(t){E(this,"silent",!0),t&&this.copy(t)}static copy(t){return(new w).copy(t)}copy(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(e){!this.silent&&console.log("Please copy manually")}return!1}copyToClipboard(t){const e=document.createElement("input");e.value=t;try{document.body.appendChild(e),this.copyNodeContentsToClipboard(e)}finally{document.body.removeChild(e)}}copyNodeContentsToClipboard(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")}}exports.Clipboard=w,exports.DebounceDecorator=function(t=10){return function(e,o,r){return{configurable:!0,enumerable:r.enumerable,get:function(){return Object.defineProperty(this,o,{configurable:!0,enumerable:r.enumerable,value:i(r.value,t)}),this[o]}}}},exports.EARTHS_RADIUS=a,exports.Events=class{constructor(t){this.emitter=t,c(this,"_eventsStatus",{})}setEventStatus(t,e){this._eventsStatus[t]=e}onLoad(t){const e=(Array.isArray(t)?t:[t]).map((t=>new Promise((e=>{if(this.getEventStatus(t))e(this);else{this.emitter.once(t,(()=>{this.setEventStatus(t,!0),e(this)}))}}))));return Promise.all(e).then((()=>this))}getEventStatus(t){const e=this._eventsStatus[t];return void 0!==e&&!!e}},exports.allProperties=o,exports.applyMixins=function(t,e,r={}){const n=o(t.prototype),i=void 0===r.replace||r.replace;e.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((o=>{const r=-1!==n.indexOf(o);if(!i&&!r||i){const r=Object.getOwnPropertyDescriptor(e.prototype,o);r&&Object.defineProperty(t.prototype,o,r)}}))}))},exports.arrayChunk=function(t,e){return Array.from({length:Math.ceil(t.length/e)},((o,r)=>t.slice(r*e,r*e+e)))},exports.arrayCompare=function(t,e){return r(t=Array.from(t).sort(),e=Array.from(e).sort())},exports.arrayCompareStrict=function(t,e){return r(t=Array.from(t),e=Array.from(e))},exports.arrayUnique=function(t){return t.filter(((t,e,o)=>o.indexOf(t)==e))},exports.camelize=function(t,e=/[_.\- ]/){const o=t.split(e);let r="";for(let n=0;n<o.length;n++){const t=o[n];r+=t.charAt(0).toUpperCase()+t.slice(1)}return r},exports.capitalize=function(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)},exports.checkExtent=function(t){const[e,o,r,n]=t,i=e<r&&o<n;if(!i){console.log("Error: The extent coordinates are not in the correct order."),console.log(`Received extent: [${e}, ${o}, ${r}, ${n}]`);const t=[Math.min(e,r),Math.min(o,n),Math.max(e,r),Math.max(n,o)];console.log(`Expected order: [${t.join(", ")}]`)}const s=e>=-180&&r<=180,c=o>=-90&&n<=90;return s&&c||console.log("Warning: The coordinates may not be within valid geographic ranges."),i&&s&&c},exports.coordinatesCount=function(t){let e=0;return h(t,(()=>e++)),e},exports.debounce=i,exports.debugLog=function(t){return!1},exports.deepmerge=function t(e,o,r=!1){let n=e;const i=o,s=Array.isArray(i);let c=s&&[]||{};return s&&Array.isArray(i)?r?(n=n||[],c=c.concat(n),i.forEach(((e,o)=>{void 0===c[o]?c[o]=e:"object"==typeof e?c[o]=t(n[o],e,r):-1===n.indexOf(e)&&c.push(e)}))):c=i:(n&&"object"==typeof n&&Object.keys(n).forEach((function(t){c[t]=n[t]})),Object.keys(i).forEach((function(e){c[e]="object"==typeof i[e]&&i[e]&&"object"==typeof n[e]&&"object"==typeof i[e]?t(n[e],i[e],r):i[e]}))),c},exports.defined=n,exports.degrees2Radian=function(t){return t*Math.PI/180},exports.degrees2meters=function(t,e){e=e>85.06?85.06:e<-85.06?-85.06:e;const o=20037508.34*t/180;let r=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);return r=20037508.34*r/180,[o,r]},exports.deprecatedMapClick=function(t){if(!t.lngLat&&t.latLng){t.lngLat=[t.latLng.lng,t.latLng.lat]}return t},exports.deprecatedWarn=function(t){console.warn(`DEPRECATED WARN: ${t}`)},exports.eachCoordinates=h,exports.eachGeometry=b,exports.fixUrlStr=function(t){return t.replace(/([^:]\/)\/+/g,"$1")},exports.flatten=function(t,e={}){var o;const r=null==(o=e.flatArray)||o,n={};return function t(e,o){if(Object(e)!==e)n[o]=e;else if(Array.isArray(e)&&r){const r=e.length;for(let n=0;n<r;n++)t(e[n],o+"["+n+"]");0===r&&(n[o]=[])}else{let r=!0;for(const n in e)r=!1,t(e[n],o?o+"."+n:n);r&&o&&(n[o]={})}}(t,""),n},exports.full=function(t){return"string"==typeof t?!!t:n(t)},exports.getBoundsCoordinates=p,exports.getBoundsFeature=function(t){return{type:"Feature",properties:{},geometry:u(t)}},exports.getBoundsPolygon=u,exports.getCircleFeature=function(t,e,o=10,r=6){return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[y(t,e,o,r)]}}},exports.getCirclePolygonCoordinates=y,exports.getCoordinates=function(t){const e=[];return h(t,(t=>e.push(t))),e},exports.getGlobalVariable=function(){return t?window:global},exports.getIdentifyRadius=function(t,e,o){return(o=null!=o?o:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,e+8))*5e-4},exports.getPolygons=function(t){const e=[];return b(t,(t=>{if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((t=>e.push(t)));else if("MultiPolygon"===t.type)for(const o of t.coordinates)for(const t of o)e.push(t);return t})),e},exports.getSquarePolygonCoordinates=function(t,e,o=10){const r=o/a*g,n=r/Math.cos(e*d),i=[t-n,e+r];return[i,[t+n,e+r],[t+n,e-r],[t-n,e-r],i]},exports.isAnyJson=j,exports.isArray=v,exports.isBrowser=t,exports.isJsonArray=P,exports.isJsonMap=O,exports.isLngLatBoundsArray=function(t){return Array.isArray(t)&&4===t.length&&t.every((t=>"number"==typeof t))},exports.isObjKey=M,exports.isObject=A,exports.keyInObj=function(t,e){return M(t,e)},exports.latLngToLngLatArray=function(t){return[t.lng,t.lat]},exports.lngLatArrayToLatLng=function(t){return{lat:t[1],lng:t[0]}},exports.meters2degrees=function(t,e){return[180*t/20037508.34,360*Math.atan(Math.exp(e*Math.PI/20037508.34))/Math.PI-90]},exports.mixinProperties=function(t,e,o){o.forEach((o=>{const r=Object.getOwnPropertyDescriptor(e.prototype,o);r&&Object.defineProperty(t.prototype,o,r)}))},exports.numberWithSpaces=function(t){const e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),e.join(".")},exports.objectAssign=function(t,...e){for(const o of e)for(const e of Object.getOwnPropertyNames(o))t[e]=o[e]},exports.objectDeepEqual=m,exports.objectRemoveEmpty=function t(e){const o={};return Object.keys(e).forEach((r=>{e[r]instanceof Array||e[r]!==Object(e[r])?void 0!==e[r]&&(o[r]=e[r]):o[r]=t(e[r])})),o},exports.reEscape=function(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},exports.round=function(t,e){const o=e?Number("1e+"+e):1;return Math.round((t+Number.EPSILON)*o)/o},exports.sleep=function(t=0){return new Promise((e=>setTimeout(e,t)))},exports.type=e,exports.unflatten=function(t){if(Object(t)!==t||Array.isArray(t))return t;const e=/\.?([^.[\]]+)|\[(\d+)\]/g,o={};for(const r in t){let n,i=o,s="";for(;n=e.exec(r);)i=i[s]||(i[s]=n[2]?[]:{}),s=n[2]||n[1];i[s]=t[r]}return o[""]||o};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const t="undefined"!=typeof window&&void 0!==window.document,e=t?"browser":"node";function o(t){return function(t,e=[]){for(;null!==t;t=Object.getPrototypeOf(t)){const o=Object.getOwnPropertyNames(t);for(let t=0;t<o.length;t++)-1==e.indexOf(o[t])&&e.push(o[t])}return e}(t)}function r(t,e){return t.length===e.length&&t.every((function(t,o){return t===e[o]}))}function n(t){return null!=t}function i(t,e=10){let o;function r(...n){r.clear(),o=setTimeout((()=>{o=null,t.apply(this,n)}),e)}return r.clear=function(){o&&(clearTimeout(o),o=null)},r}var s=Object.defineProperty,c=(t,e,o)=>((t,e,o)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o)(t,e+"",o);const a=6371;function u(t){return{type:"Polygon",coordinates:[p(t)]}}function p(t){const e=[t[0],t[1]];return[e,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],e]}const f=Math.PI/180,l=180/Math.PI;function y(t,e,o=10,r=6){const n=o/a*l,i=n/Math.cos(e*f),s=[];for(let c=0;c<r+1;c++){const o=Math.PI*(c/(r/2)),a=t+i*Math.cos(o),u=e+n*Math.sin(o);s.push([a,u])}return s}const d=Math.PI/180,g=180/Math.PI;function h(t,e){b(t,(t=>{if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(const o of t.coordinates)o.forEach((t=>e(t)));else if("MultiPolygon"===t.type)for(const o of t.coordinates)o.forEach((t=>t.forEach((t=>e(t)))));else if("Point"===t.type)e(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(const o of t.coordinates)e(o);return t}))}function b(t,e){if("FeatureCollection"===t.type)for(const o of t.features)e(o.geometry);else"Feature"===t.type?e(t.geometry):"coordinates"in t&&e(t)}function x(t,e,o,r){if(t instanceof Array)return e instanceof Array&&e.sort().join("")===t.sort().join("");if(t instanceof Date)return e instanceof Date&&""+t==""+e;if(t instanceof Function){if(!(e instanceof Function))return!1}else if(t instanceof Object)return e instanceof Object&&(t===o?e===r:m(t,e));return t===e}function m(t,e){const o=Object.keys(t).sort(),r=Object.keys(e).sort();if(o.length!==r.length)return!1;if(o.join("")!==r.join(""))return!1;for(let n=0;n<o.length;n++){if(!x(t[o[n]],e[r[n]],t,e))return!1}return!0}function j(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(A(t)?O(t):!!v(t)&&P(t))}function P(t){return!!v(t)&&t.every(j)}function O(t){if(A(t))for(const e in t)if(!j(e))return!1;return!1}function M(t,e){return("string"==typeof e||"number"==typeof e)&&e in t}function A(t){return"[object Object]"===Object.prototype.toString.call(t)}function v(t){return"[object Array]"===Object.prototype.toString.call(t)}var C=Object.defineProperty,E=(t,e,o)=>((t,e,o)=>e in t?C(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o)(t,e+"",o);class w{constructor(t){E(this,"silent",!0),t&&this.copy(t)}static copy(t){return(new w).copy(t)}copy(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(e){!this.silent&&console.log("Please copy manually")}return!1}copyToClipboard(t){const e=document.createElement("input");e.value=t;try{document.body.appendChild(e),this.copyNodeContentsToClipboard(e)}finally{document.body.removeChild(e)}}copyNodeContentsToClipboard(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")}}exports.Clipboard=w,exports.DebounceDecorator=function(t=10){return function(e,o,r){return{configurable:!0,enumerable:r.enumerable,get:function(){return Object.defineProperty(this,o,{configurable:!0,enumerable:r.enumerable,value:i(r.value,t)}),this[o]}}}},exports.EARTHS_RADIUS=a,exports.Events=class{constructor(t){this.emitter=t,c(this,"_eventsStatus",{})}setEventStatus(t,e){this._eventsStatus[t]=e}onLoad(t){const e=(Array.isArray(t)?t:[t]).map((t=>new Promise((e=>{if(this.getEventStatus(t))e(this);else{this.emitter.once(t,(()=>{this.setEventStatus(t,!0),e(this)}))}}))));return Promise.all(e).then((()=>this))}getEventStatus(t){const e=this._eventsStatus[t];return void 0!==e&&!!e}},exports.allProperties=o,exports.applyMixins=function(t,e,r={}){const n=o(t.prototype),i=void 0===r.replace||r.replace;e.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((o=>{const r=-1!==n.indexOf(o);if(!i&&!r||i){const r=Object.getOwnPropertyDescriptor(e.prototype,o);r&&Object.defineProperty(t.prototype,o,r)}}))}))},exports.arrayChunk=function(t,e){return Array.from({length:Math.ceil(t.length/e)},((o,r)=>t.slice(r*e,r*e+e)))},exports.arrayCompare=function(t,e){return r(t=Array.from(t).sort(),e=Array.from(e).sort())},exports.arrayCompareStrict=function(t,e){return r(t=Array.from(t),e=Array.from(e))},exports.arrayUnique=function(t){return t.filter(((t,e,o)=>o.indexOf(t)==e))},exports.camelize=function(t,e=/[_.\- ]/){const o=t.split(e);let r="";for(let n=0;n<o.length;n++){const t=o[n];r+=t.charAt(0).toUpperCase()+t.slice(1)}return r},exports.capitalize=function(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)},exports.checkExtent=function(t){const[e,o,r,n]=t,i=e<r&&o<n;if(!i){console.log("Error: The extent coordinates are not in the correct order."),console.log(`Received extent: [${e}, ${o}, ${r}, ${n}]`);const t=[Math.min(e,r),Math.min(o,n),Math.max(e,r),Math.max(n,o)];console.log(`Expected order: [${t.join(", ")}]`)}const s=e>=-180&&r<=180,c=o>=-90&&n<=90;return s&&c||console.log("Warning: The coordinates may not be within valid geographic ranges."),i&&s&&c},exports.coordinatesCount=function(t){let e=0;return h(t,(()=>e++)),e},exports.debounce=i,exports.debugLog=function(t){return!1},exports.deepmerge=function t(e,o,r=!1){let n=e;const i=o,s=Array.isArray(i);let c=s&&[]||{};return s&&Array.isArray(i)?r?(n=n||[],c=c.concat(n),i.forEach(((e,o)=>{void 0===c[o]?c[o]=e:"object"==typeof e?c[o]=t(n[o],e,r):-1===n.indexOf(e)&&c.push(e)}))):c=i:(n&&"object"==typeof n&&Object.keys(n).forEach((function(t){c[t]=n[t]})),Object.keys(i).forEach((function(e){c[e]="object"==typeof i[e]&&i[e]&&"object"==typeof n[e]&&"object"==typeof i[e]?t(n[e],i[e],r):i[e]}))),c},exports.defined=n,exports.degrees2Radian=function(t){return t*Math.PI/180},exports.degrees2meters=function(t,e){e=e>85.06?85.06:e<-85.06?-85.06:e;const o=20037508.34*t/180;let r=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);return r=20037508.34*r/180,[o,r]},exports.deprecatedMapClick=function(t){if(!t.lngLat&&t.latLng){t.lngLat=[t.latLng.lng,t.latLng.lat]}return t},exports.deprecatedWarn=function(t){console.warn(`DEPRECATED WARN: ${t}`)},exports.eachCoordinates=h,exports.eachGeometry=b,exports.fixUrlStr=function(t){return t.replace(/([^:]\/)\/+/g,"$1")},exports.flatten=function(t,e={}){var o;const r=null==(o=e.flatArray)||o,n={};return function t(e,o){if(Object(e)!==e)n[o]=e;else if(Array.isArray(e)&&r){const r=e.length;for(let n=0;n<r;n++)t(e[n],o+"["+n+"]");0===r&&(n[o]=[])}else{let r=!0;for(const n in e)r=!1,t(e[n],o?o+"."+n:n);r&&o&&(n[o]={})}}(t,""),n},exports.full=function(t){return"string"==typeof t?!!t:n(t)},exports.getBoundsCoordinates=p,exports.getBoundsFeature=function(t){return{type:"Feature",properties:{},geometry:u(t)}},exports.getBoundsPolygon=u,exports.getCircleFeature=function(t,e,o=10,r=6){return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[y(t,e,o,r)]}}},exports.getCirclePolygonCoordinates=y,exports.getCoordinates=function(t){const e=[];return h(t,(t=>e.push(t))),e},exports.getGlobalVariable=function(){return t?window:global},exports.getIdentifyRadius=function(t,e,o){return(o=null!=o?o:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,e+8))*5e-4},exports.getPolygons=function(t){const e=[];return b(t,(t=>{if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((t=>e.push(t)));else if("MultiPolygon"===t.type)for(const o of t.coordinates)for(const t of o)e.push(t);return t})),e},exports.getSquarePolygonCoordinates=function(t,e,o=10){const r=o/a*g,n=r/Math.cos(e*d),i=[t-n,e+r];return[i,[t+n,e+r],[t+n,e-r],[t-n,e-r],i]},exports.isAnyJson=j,exports.isArray=v,exports.isBrowser=t,exports.isJsonArray=P,exports.isJsonMap=O,exports.isLngLatBoundsArray=function(t){return Array.isArray(t)&&4===t.length&&t.every((t=>"number"==typeof t))},exports.isObjKey=M,exports.isObject=A,exports.keyInObj=function(t,e){return M(t,e)},exports.latLngToLngLatArray=function(t){return[t.lng,t.lat]},exports.lngLatArrayToLatLng=function(t){return{lat:t[1],lng:t[0]}},exports.meters2degrees=function(t,e){return[180*t/20037508.34,360*Math.atan(Math.exp(e*Math.PI/20037508.34))/Math.PI-90]},exports.mixinProperties=function(t,e,o){o.forEach((o=>{const r=Object.getOwnPropertyDescriptor(e.prototype,o);r&&Object.defineProperty(t.prototype,o,r)}))},exports.numberWithSpaces=function(t){const e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),e.join(".")},exports.objectAssign=function(t,...e){for(const o of e)for(const e of Object.getOwnPropertyNames(o))t[e]=o[e]},exports.objectDeepEqual=m,exports.objectRemoveEmpty=function t(e){const o={};return Object.keys(e).forEach((r=>{e[r]instanceof Array||e[r]!==Object(e[r])?void 0!==e[r]&&(o[r]=e[r]):o[r]=t(e[r])})),o},exports.reEscape=function(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},exports.round=function(t,e){const o=e?Number("1e+"+e):1;return Math.round((t+Number.EPSILON)*o)/o},exports.sleep=function(t=0){return new Promise((e=>setTimeout(e,t)))},exports.type=e,exports.unflatten=function(t){if(Object(t)!==t||Array.isArray(t))return t;const e=/\.?([^.[\]]+)|\[(\d+)\]/g,o={};for(const r in t){let n,i=o,s="";for(;n=e.exec(r);)i=i[s]||(i[s]=n[2]?[]:{}),s=n[2]||n[1];i[s]=t[r]}return o[""]||o};
//# sourceMappingURL=utils.cjs.prod.js.map

@@ -1,2 +0,2 @@

/** Bundle of @nextgis/utils; version: 2.3.0; author: NextGIS */
/** Bundle of @nextgis/utils; version: 2.5.0; author: NextGIS */
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";

@@ -193,3 +193,3 @@ const type = isBrowser ? "browser" : "node";

var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, key + "" , value);
class Events {

@@ -595,3 +595,3 @@ constructor(emitter) {

var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
class Clipboard {

@@ -598,0 +598,0 @@ constructor(text) {

@@ -1,2 +0,2 @@

const t="undefined"!=typeof window&&void 0!==window.document,e=t?"browser":"node";function n(){return t?window:global}function o(t,e,n={}){const o=r(t.prototype),i=void 0===n.replace||n.replace;e.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((n=>{const r=-1!==o.indexOf(n);if(!i&&!r||i){const o=Object.getOwnPropertyDescriptor(e.prototype,n);o&&Object.defineProperty(t.prototype,n,o)}}))}))}function r(t){return function(t,e=[]){for(;null!==t;t=Object.getPrototypeOf(t)){const n=Object.getOwnPropertyNames(t);for(let t=0;t<n.length;t++)-1==e.indexOf(n[t])&&e.push(n[t])}return e}(t)}function i(t,e,n){n.forEach((n=>{const o=Object.getOwnPropertyDescriptor(e.prototype,n);o&&Object.defineProperty(t.prototype,n,o)}))}function c(t,e){return a(t=Array.from(t).sort(),e=Array.from(e).sort())}function u(t,e){return a(t=Array.from(t),e=Array.from(e))}function a(t,e){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))}function s(t){return t.filter(((t,e,n)=>n.indexOf(t)==e))}function f(t,e){return Array.from({length:Math.ceil(t.length/e)},((n,o)=>t.slice(o*e,o*e+e)))}function l(t){return null!=t}function p(t){return"string"==typeof t?!!t:l(t)}function y(t,e,n=!1){let o=t;const r=e,i=Array.isArray(r);let c=i&&[]||{};return i&&Array.isArray(r)?n?(o=o||[],c=c.concat(o),r.forEach(((t,e)=>{void 0===c[e]?c[e]=t:"object"==typeof t?c[e]=y(o[e],t,n):-1===o.indexOf(t)&&c.push(t)}))):c=r:(o&&"object"==typeof o&&Object.keys(o).forEach((function(t){c[t]=o[t]})),Object.keys(r).forEach((function(t){c[t]="object"==typeof r[t]&&r[t]&&"object"==typeof o[t]&&"object"==typeof r[t]?y(o[t],r[t],n):r[t]}))),c}function h(t){return!1}function g(t){if(!t.lngLat&&t.latLng){t.lngLat=[t.latLng.lng,t.latLng.lat]}return t}function d(t){console.warn(`DEPRECATED WARN: ${t}`)}function b(t,e=10){let n;function o(...r){o.clear(),n=setTimeout((()=>{n=null,t.apply(this,r)}),e)}return o.clear=function(){n&&(clearTimeout(n),n=null)},o}function m(t=10){return function(e,n,o){return{configurable:!0,enumerable:o.enumerable,get:function(){return Object.defineProperty(this,n,{configurable:!0,enumerable:o.enumerable,value:b(o.value,t)}),this[n]}}}}var j=Object.defineProperty,P=(t,e,n)=>((t,e,n)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n);class O{constructor(t){this.emitter=t,P(this,"_eventsStatus",{})}setEventStatus(t,e){this._eventsStatus[t]=e}onLoad(t){const e=(Array.isArray(t)?t:[t]).map((t=>new Promise((e=>{if(this.getEventStatus(t))e(this);else{this.emitter.once(t,(()=>{this.setEventStatus(t,!0),e(this)}))}}))));return Promise.all(e).then((()=>this))}getEventStatus(t){const e=this._eventsStatus[t];return void 0!==e&&!!e}}function M(t){return[t.lng,t.lat]}function v(t){return{lat:t[1],lng:t[0]}}const w=6371;function A(t){return{type:"Polygon",coordinates:[E(t)]}}function E(t){const e=[t[0],t[1]];return[e,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],e]}function C(t){return{type:"Feature",properties:{},geometry:A(t)}}const x=Math.PI/180,S=180/Math.PI;function I(t,e,n=10,o=6){const r=n/w*S,i=r/Math.cos(e*x),c=[];for(let u=0;u<o+1;u++){const n=Math.PI*(u/(o/2)),a=t+i*Math.cos(n),s=e+r*Math.sin(n);c.push([a,s])}return c}function T(t,e,n=10,o=6){return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[I(t,e,n,o)]}}}const L=Math.PI/180,D=180/Math.PI;function N(t,e,n=10){const o=n/w*D,r=o/Math.cos(e*L),i=[t-r,e+o];return[i,[t+r,e+o],[t+r,e-o],[t-r,e-o],i]}function $(t,e){e=e>85.06?85.06:e<-85.06?-85.06:e;const n=20037508.34*t/180;let o=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);return o=20037508.34*o/180,[n,o]}function F(t,e){return[180*t/20037508.34,360*Math.atan(Math.exp(e*Math.PI/20037508.34))/Math.PI-90]}function k(t){return t*Math.PI/180}function R(t){let e=0;return U(t,(()=>e++)),e}function _(t){const e=[];return U(t,(t=>e.push(t))),e}function U(t,e){B(t,(t=>{if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(const n of t.coordinates)n.forEach((t=>e(t)));else if("MultiPolygon"===t.type)for(const n of t.coordinates)n.forEach((t=>t.forEach((t=>e(t)))));else if("Point"===t.type)e(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(const n of t.coordinates)e(n);return t}))}function W(t){const e=[];return B(t,(t=>{if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((t=>e.push(t)));else if("MultiPolygon"===t.type)for(const n of t.coordinates)for(const t of n)e.push(t);return t})),e}function B(t,e){if("FeatureCollection"===t.type)for(const n of t.features)e(n.geometry);else"Feature"===t.type?e(t.geometry):"coordinates"in t&&e(t)}function q(t){return Array.isArray(t)&&4===t.length&&t.every((t=>"number"==typeof t))}function z(t,e,n){return(n=null!=n?n:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,e+8))*5e-4}function G(t){const[e,n,o,r]=t,i=e<o&&n<r;if(!i){console.log("Error: The extent coordinates are not in the correct order."),console.log(`Received extent: [${e}, ${n}, ${o}, ${r}]`);const t=[Math.min(e,o),Math.min(n,r),Math.max(e,o),Math.max(r,n)];console.log(`Expected order: [${t.join(", ")}]`)}const c=e>=-180&&o<=180,u=n>=-90&&r<=90;return c&&u||console.log("Warning: The coordinates may not be within valid geographic ranges."),i&&c&&u}function H(t,...e){for(const n of e)for(const e of Object.getOwnPropertyNames(n))t[e]=n[e]}function J(t,e,n,o){if(t instanceof Array)return e instanceof Array&&e.sort().join("")===t.sort().join("");if(t instanceof Date)return e instanceof Date&&""+t==""+e;if(t instanceof Function){if(!(e instanceof Function))return!1}else if(t instanceof Object)return e instanceof Object&&(t===n?e===o:K(t,e));return t===e}function K(t,e){const n=Object.keys(t).sort(),o=Object.keys(e).sort();if(n.length!==o.length)return!1;if(n.join("")!==o.join(""))return!1;for(let r=0;r<n.length;r++){if(!J(t[n[r]],e[o[r]],t,e))return!1}return!0}function Q(t){const e={};return Object.keys(t).forEach((n=>{t[n]instanceof Array||t[n]!==Object(t[n])?void 0!==t[n]&&(e[n]=t[n]):e[n]=Q(t[n])})),e}function V(t,e={}){var n;const o=null==(n=e.flatArray)||n,r={};return function t(e,n){if(Object(e)!==e)r[n]=e;else if(Array.isArray(e)&&o){const o=e.length;for(let r=0;r<o;r++)t(e[r],n+"["+r+"]");0===o&&(r[n]=[])}else{let o=!0;for(const r in e)o=!1,t(e[r],n?n+"."+r:r);o&&n&&(r[n]={})}}(t,""),r}function X(t){if(Object(t)!==t||Array.isArray(t))return t;const e=/\.?([^.[\]]+)|\[(\d+)\]/g,n={};for(const o in t){let r,i=n,c="";for(;r=e.exec(o);)i=i[c]||(i[c]=r[2]?[]:{}),c=r[2]||r[1];i[c]=t[o]}return n[""]||n}function Y(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(t=0){return new Promise((e=>setTimeout(e,t)))}function tt(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)}function et(t,e=/[_.\- ]/){const n=t.split(e);let o="";for(let r=0;r<n.length;r++){const t=n[r];o+=t.charAt(0).toUpperCase()+t.slice(1)}return o}function nt(t){const e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),e.join(".")}function ot(t,e){const n=e?Number("1e+"+e):1;return Math.round((t+Number.EPSILON)*n)/n}function rt(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(st(t)?ct(t):!!ft(t)&&it(t))}function it(t){return!!ft(t)&&t.every(rt)}function ct(t){if(st(t))for(const e in t)if(!rt(e))return!1;return!1}function ut(t,e){return("string"==typeof e||"number"==typeof e)&&e in t}function at(t,e){return ut(t,e)}function st(t){return"[object Object]"===Object.prototype.toString.call(t)}function ft(t){return"[object Array]"===Object.prototype.toString.call(t)}function lt(t){return t.replace(/([^:]\/)\/+/g,"$1")}var pt=Object.defineProperty,yt=(t,e,n)=>((t,e,n)=>e in t?pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n);class ht{constructor(t){yt(this,"silent",!0),t&&this.copy(t)}static copy(t){return(new ht).copy(t)}copy(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(e){!this.silent&&console.log("Please copy manually")}return!1}copyToClipboard(t){const e=document.createElement("input");e.value=t;try{document.body.appendChild(e),this.copyNodeContentsToClipboard(e)}finally{document.body.removeChild(e)}}copyNodeContentsToClipboard(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")}}export{ht as Clipboard,m as DebounceDecorator,w as EARTHS_RADIUS,O as Events,r as allProperties,o as applyMixins,f as arrayChunk,c as arrayCompare,u as arrayCompareStrict,s as arrayUnique,et as camelize,tt as capitalize,G as checkExtent,R as coordinatesCount,b as debounce,h as debugLog,y as deepmerge,l as defined,k as degrees2Radian,$ as degrees2meters,g as deprecatedMapClick,d as deprecatedWarn,U as eachCoordinates,B as eachGeometry,lt as fixUrlStr,V as flatten,p as full,E as getBoundsCoordinates,C as getBoundsFeature,A as getBoundsPolygon,T as getCircleFeature,I as getCirclePolygonCoordinates,_ as getCoordinates,n as getGlobalVariable,z as getIdentifyRadius,W as getPolygons,N as getSquarePolygonCoordinates,rt as isAnyJson,ft as isArray,t as isBrowser,it as isJsonArray,ct as isJsonMap,q as isLngLatBoundsArray,ut as isObjKey,st as isObject,at as keyInObj,M as latLngToLngLatArray,v as lngLatArrayToLatLng,F as meters2degrees,i as mixinProperties,nt as numberWithSpaces,H as objectAssign,K as objectDeepEqual,Q as objectRemoveEmpty,Y as reEscape,ot as round,Z as sleep,e as type,X as unflatten};
const t="undefined"!=typeof window&&void 0!==window.document,n=t?"browser":"node";function e(){return t?window:global}function o(t,n,e={}){const o=r(t.prototype),i=void 0===e.replace||e.replace;n.forEach((n=>{Object.getOwnPropertyNames(n.prototype).forEach((e=>{const r=-1!==o.indexOf(e);if(!i&&!r||i){const o=Object.getOwnPropertyDescriptor(n.prototype,e);o&&Object.defineProperty(t.prototype,e,o)}}))}))}function r(t){return function(t,n=[]){for(;null!==t;t=Object.getPrototypeOf(t)){const e=Object.getOwnPropertyNames(t);for(let t=0;t<e.length;t++)-1==n.indexOf(e[t])&&n.push(e[t])}return n}(t)}function i(t,n,e){e.forEach((e=>{const o=Object.getOwnPropertyDescriptor(n.prototype,e);o&&Object.defineProperty(t.prototype,e,o)}))}function c(t,n){return a(t=Array.from(t).sort(),n=Array.from(n).sort())}function u(t,n){return a(t=Array.from(t),n=Array.from(n))}function a(t,n){return t.length===n.length&&t.every((function(t,e){return t===n[e]}))}function s(t){return t.filter(((t,n,e)=>e.indexOf(t)==n))}function f(t,n){return Array.from({length:Math.ceil(t.length/n)},((e,o)=>t.slice(o*n,o*n+n)))}function l(t){return null!=t}function p(t){return"string"==typeof t?!!t:l(t)}function y(t,n,e=!1){let o=t;const r=n,i=Array.isArray(r);let c=i&&[]||{};return i&&Array.isArray(r)?e?(o=o||[],c=c.concat(o),r.forEach(((t,n)=>{void 0===c[n]?c[n]=t:"object"==typeof t?c[n]=y(o[n],t,e):-1===o.indexOf(t)&&c.push(t)}))):c=r:(o&&"object"==typeof o&&Object.keys(o).forEach((function(t){c[t]=o[t]})),Object.keys(r).forEach((function(t){c[t]="object"==typeof r[t]&&r[t]&&"object"==typeof o[t]&&"object"==typeof r[t]?y(o[t],r[t],e):r[t]}))),c}function h(t){return!1}function g(t){if(!t.lngLat&&t.latLng){t.lngLat=[t.latLng.lng,t.latLng.lat]}return t}function d(t){console.warn(`DEPRECATED WARN: ${t}`)}function b(t,n=10){let e;function o(...r){o.clear(),e=setTimeout((()=>{e=null,t.apply(this,r)}),n)}return o.clear=function(){e&&(clearTimeout(e),e=null)},o}function m(t=10){return function(n,e,o){return{configurable:!0,enumerable:o.enumerable,get:function(){return Object.defineProperty(this,e,{configurable:!0,enumerable:o.enumerable,value:b(o.value,t)}),this[e]}}}}var j=Object.defineProperty,P=(t,n,e)=>((t,n,e)=>n in t?j(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e)(t,n+"",e);class O{constructor(t){this.emitter=t,P(this,"_eventsStatus",{})}setEventStatus(t,n){this._eventsStatus[t]=n}onLoad(t){const n=(Array.isArray(t)?t:[t]).map((t=>new Promise((n=>{if(this.getEventStatus(t))n(this);else{this.emitter.once(t,(()=>{this.setEventStatus(t,!0),n(this)}))}}))));return Promise.all(n).then((()=>this))}getEventStatus(t){const n=this._eventsStatus[t];return void 0!==n&&!!n}}function M(t){return[t.lng,t.lat]}function v(t){return{lat:t[1],lng:t[0]}}const w=6371;function A(t){return{type:"Polygon",coordinates:[E(t)]}}function E(t){const n=[t[0],t[1]];return[n,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],n]}function C(t){return{type:"Feature",properties:{},geometry:A(t)}}const x=Math.PI/180,S=180/Math.PI;function I(t,n,e=10,o=6){const r=e/w*S,i=r/Math.cos(n*x),c=[];for(let u=0;u<o+1;u++){const e=Math.PI*(u/(o/2)),a=t+i*Math.cos(e),s=n+r*Math.sin(e);c.push([a,s])}return c}function T(t,n,e=10,o=6){return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[I(t,n,e,o)]}}}const L=Math.PI/180,D=180/Math.PI;function N(t,n,e=10){const o=e/w*D,r=o/Math.cos(n*L),i=[t-r,n+o];return[i,[t+r,n+o],[t+r,n-o],[t-r,n-o],i]}function $(t,n){n=n>85.06?85.06:n<-85.06?-85.06:n;const e=20037508.34*t/180;let o=Math.log(Math.tan((90+n)*Math.PI/360))/(Math.PI/180);return o=20037508.34*o/180,[e,o]}function F(t,n){return[180*t/20037508.34,360*Math.atan(Math.exp(n*Math.PI/20037508.34))/Math.PI-90]}function k(t){return t*Math.PI/180}function R(t){let n=0;return U(t,(()=>n++)),n}function _(t){const n=[];return U(t,(t=>n.push(t))),n}function U(t,n){B(t,(t=>{if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(const e of t.coordinates)e.forEach((t=>n(t)));else if("MultiPolygon"===t.type)for(const e of t.coordinates)e.forEach((t=>t.forEach((t=>n(t)))));else if("Point"===t.type)n(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(const e of t.coordinates)n(e);return t}))}function W(t){const n=[];return B(t,(t=>{if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((t=>n.push(t)));else if("MultiPolygon"===t.type)for(const e of t.coordinates)for(const t of e)n.push(t);return t})),n}function B(t,n){if("FeatureCollection"===t.type)for(const e of t.features)n(e.geometry);else"Feature"===t.type?n(t.geometry):"coordinates"in t&&n(t)}function q(t){return Array.isArray(t)&&4===t.length&&t.every((t=>"number"==typeof t))}function z(t,n,e){return(e=null!=e?e:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,n+8))*5e-4}function G(t){const[n,e,o,r]=t,i=n<o&&e<r;if(!i){console.log("Error: The extent coordinates are not in the correct order."),console.log(`Received extent: [${n}, ${e}, ${o}, ${r}]`);const t=[Math.min(n,o),Math.min(e,r),Math.max(n,o),Math.max(r,e)];console.log(`Expected order: [${t.join(", ")}]`)}const c=n>=-180&&o<=180,u=e>=-90&&r<=90;return c&&u||console.log("Warning: The coordinates may not be within valid geographic ranges."),i&&c&&u}function H(t,...n){for(const e of n)for(const n of Object.getOwnPropertyNames(e))t[n]=e[n]}function J(t,n,e,o){if(t instanceof Array)return n instanceof Array&&n.sort().join("")===t.sort().join("");if(t instanceof Date)return n instanceof Date&&""+t==""+n;if(t instanceof Function){if(!(n instanceof Function))return!1}else if(t instanceof Object)return n instanceof Object&&(t===e?n===o:K(t,n));return t===n}function K(t,n){const e=Object.keys(t).sort(),o=Object.keys(n).sort();if(e.length!==o.length)return!1;if(e.join("")!==o.join(""))return!1;for(let r=0;r<e.length;r++){if(!J(t[e[r]],n[o[r]],t,n))return!1}return!0}function Q(t){const n={};return Object.keys(t).forEach((e=>{t[e]instanceof Array||t[e]!==Object(t[e])?void 0!==t[e]&&(n[e]=t[e]):n[e]=Q(t[e])})),n}function V(t,n={}){var e;const o=null==(e=n.flatArray)||e,r={};return function t(n,e){if(Object(n)!==n)r[e]=n;else if(Array.isArray(n)&&o){const o=n.length;for(let r=0;r<o;r++)t(n[r],e+"["+r+"]");0===o&&(r[e]=[])}else{let o=!0;for(const r in n)o=!1,t(n[r],e?e+"."+r:r);o&&e&&(r[e]={})}}(t,""),r}function X(t){if(Object(t)!==t||Array.isArray(t))return t;const n=/\.?([^.[\]]+)|\[(\d+)\]/g,e={};for(const o in t){let r,i=e,c="";for(;r=n.exec(o);)i=i[c]||(i[c]=r[2]?[]:{}),c=r[2]||r[1];i[c]=t[o]}return e[""]||e}function Y(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(t=0){return new Promise((n=>setTimeout(n,t)))}function tt(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)}function nt(t,n=/[_.\- ]/){const e=t.split(n);let o="";for(let r=0;r<e.length;r++){const t=e[r];o+=t.charAt(0).toUpperCase()+t.slice(1)}return o}function et(t){const n=t.toString().split(".");return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),n.join(".")}function ot(t,n){const e=n?Number("1e+"+n):1;return Math.round((t+Number.EPSILON)*e)/e}function rt(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(st(t)?ct(t):!!ft(t)&&it(t))}function it(t){return!!ft(t)&&t.every(rt)}function ct(t){if(st(t))for(const n in t)if(!rt(n))return!1;return!1}function ut(t,n){return("string"==typeof n||"number"==typeof n)&&n in t}function at(t,n){return ut(t,n)}function st(t){return"[object Object]"===Object.prototype.toString.call(t)}function ft(t){return"[object Array]"===Object.prototype.toString.call(t)}function lt(t){return t.replace(/([^:]\/)\/+/g,"$1")}var pt=Object.defineProperty,yt=(t,n,e)=>((t,n,e)=>n in t?pt(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e)(t,n+"",e);class ht{constructor(t){yt(this,"silent",!0),t&&this.copy(t)}static copy(t){return(new ht).copy(t)}copy(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(n){!this.silent&&console.log("Please copy manually")}return!1}copyToClipboard(t){const n=document.createElement("input");n.value=t;try{document.body.appendChild(n),this.copyNodeContentsToClipboard(n)}finally{document.body.removeChild(n)}}copyNodeContentsToClipboard(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")}}export{ht as Clipboard,m as DebounceDecorator,w as EARTHS_RADIUS,O as Events,r as allProperties,o as applyMixins,f as arrayChunk,c as arrayCompare,u as arrayCompareStrict,s as arrayUnique,nt as camelize,tt as capitalize,G as checkExtent,R as coordinatesCount,b as debounce,h as debugLog,y as deepmerge,l as defined,k as degrees2Radian,$ as degrees2meters,g as deprecatedMapClick,d as deprecatedWarn,U as eachCoordinates,B as eachGeometry,lt as fixUrlStr,V as flatten,p as full,E as getBoundsCoordinates,C as getBoundsFeature,A as getBoundsPolygon,T as getCircleFeature,I as getCirclePolygonCoordinates,_ as getCoordinates,e as getGlobalVariable,z as getIdentifyRadius,W as getPolygons,N as getSquarePolygonCoordinates,rt as isAnyJson,ft as isArray,t as isBrowser,it as isJsonArray,ct as isJsonMap,q as isLngLatBoundsArray,ut as isObjKey,st as isObject,at as keyInObj,M as latLngToLngLatArray,v as lngLatArrayToLatLng,F as meters2degrees,i as mixinProperties,et as numberWithSpaces,H as objectAssign,K as objectDeepEqual,Q as objectRemoveEmpty,Y as reEscape,ot as round,Z as sleep,n as type,X as unflatten};
//# sourceMappingURL=utils.esm-browser.prod.js.map

@@ -1,2 +0,2 @@

/** Bundle of @nextgis/utils; version: 2.3.0; author: NextGIS */
/** Bundle of @nextgis/utils; version: 2.5.0; author: NextGIS */
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";

@@ -194,3 +194,3 @@ const type = isBrowser ? "browser" : "node";

var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, key + "" , value);
class Events {

@@ -596,3 +596,3 @@ constructor(emitter) {

var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
class Clipboard {

@@ -599,0 +599,0 @@ constructor(text) {

@@ -1,2 +0,2 @@

const t="undefined"!=typeof window&&void 0!==window.document,e=t?"browser":"node";function n(){return t?window:global}function o(t,e,n={}){const o=r(t.prototype),c=void 0===n.replace||n.replace;e.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((n=>{const r=-1!==o.indexOf(n);if(!c&&!r||c){const o=Object.getOwnPropertyDescriptor(e.prototype,n);o&&Object.defineProperty(t.prototype,n,o)}}))}))}function r(t){return function(t,e=[]){for(;null!==t;t=Object.getPrototypeOf(t)){const n=Object.getOwnPropertyNames(t);for(let t=0;t<n.length;t++)-1==e.indexOf(n[t])&&e.push(n[t])}return e}(t)}function c(t,e,n){n.forEach((n=>{const o=Object.getOwnPropertyDescriptor(e.prototype,n);o&&Object.defineProperty(t.prototype,n,o)}))}function i(t,e){return a(t=Array.from(t).sort(),e=Array.from(e).sort())}function u(t,e){return a(t=Array.from(t),e=Array.from(e))}function a(t,e){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))}function s(t){return t.filter(((t,e,n)=>n.indexOf(t)==e))}function f(t,e){return Array.from({length:Math.ceil(t.length/e)},((n,o)=>t.slice(o*e,o*e+e)))}function l(t){return null!=t}function p(t){return"string"==typeof t?!!t:l(t)}function y(t,e,n=!1){let o=t;const r=e,c=Array.isArray(r);let i=c&&[]||{};return c&&Array.isArray(r)?n?(o=o||[],i=i.concat(o),r.forEach(((t,e)=>{void 0===i[e]?i[e]=t:"object"==typeof t?i[e]=y(o[e],t,n):-1===o.indexOf(t)&&i.push(t)}))):i=r:(o&&"object"==typeof o&&Object.keys(o).forEach((function(t){i[t]=o[t]})),Object.keys(r).forEach((function(t){i[t]="object"==typeof r[t]&&r[t]&&"object"==typeof o[t]&&"object"==typeof r[t]?y(o[t],r[t],n):r[t]}))),i}function h(t){return"production"!==process.env.NODE_ENV&&(console.trace("DEBUG: "+t),!0)}function d(t){if(!t.lngLat&&t.latLng){h("deprecated use of latLng in MapClickEvent, use lngLat instead");t.lngLat=[t.latLng.lng,t.latLng.lat]}return t}function g(t){console.warn(`DEPRECATED WARN: ${t}`)}function b(t,e=10){let n;function o(...r){o.clear(),n=setTimeout((()=>{n=null,t.apply(this,r)}),e)}return o.clear=function(){n&&(clearTimeout(n),n=null)},o}function m(t=10){return function(e,n,o){return{configurable:!0,enumerable:o.enumerable,get:function(){return Object.defineProperty(this,n,{configurable:!0,enumerable:o.enumerable,value:b(o.value,t)}),this[n]}}}}var j=Object.defineProperty,O=(t,e,n)=>((t,e,n)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n);class P{constructor(t){this.emitter=t,O(this,"_eventsStatus",{})}setEventStatus(t,e){this._eventsStatus[t]=e}onLoad(t){const e=(Array.isArray(t)?t:[t]).map((t=>new Promise((e=>{if(this.getEventStatus(t))e(this);else{this.emitter.once(t,(()=>{this.setEventStatus(t,!0),e(this)}))}}))));return Promise.all(e).then((()=>this))}getEventStatus(t){const e=this._eventsStatus[t];return void 0!==e&&!!e}}function M(t){return[t.lng,t.lat]}function v(t){return{lat:t[1],lng:t[0]}}const w=6371;function E(t){return{type:"Polygon",coordinates:[A(t)]}}function A(t){const e=[t[0],t[1]];return[e,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],e]}function C(t){return{type:"Feature",properties:{},geometry:E(t)}}const x=Math.PI/180,S=180/Math.PI;function I(t,e,n=10,o=6){const r=n/w*S,c=r/Math.cos(e*x),i=[];for(let u=0;u<o+1;u++){const n=Math.PI*(u/(o/2)),a=t+c*Math.cos(n),s=e+r*Math.sin(n);i.push([a,s])}return i}function L(t,e,n=10,o=6){return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[I(t,e,n,o)]}}}const D=Math.PI/180,N=180/Math.PI;function T(t,e,n=10){const o=n/w*N,r=o/Math.cos(e*D),c=[t-r,e+o];return[c,[t+r,e+o],[t+r,e-o],[t-r,e-o],c]}function $(t,e){e=e>85.06?85.06:e<-85.06?-85.06:e;const n=20037508.34*t/180;let o=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);return o=20037508.34*o/180,[n,o]}function k(t,e){return[180*t/20037508.34,360*Math.atan(Math.exp(e*Math.PI/20037508.34))/Math.PI-90]}function F(t){return t*Math.PI/180}function _(t){let e=0;return U(t,(()=>e++)),e}function R(t){const e=[];return U(t,(t=>e.push(t))),e}function U(t,e){W(t,(t=>{if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(const n of t.coordinates)n.forEach((t=>e(t)));else if("MultiPolygon"===t.type)for(const n of t.coordinates)n.forEach((t=>t.forEach((t=>e(t)))));else if("Point"===t.type)e(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(const n of t.coordinates)e(n);return t}))}function B(t){const e=[];return W(t,(t=>{if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((t=>e.push(t)));else if("MultiPolygon"===t.type)for(const n of t.coordinates)for(const t of n)e.push(t);return t})),e}function W(t,e){if("FeatureCollection"===t.type)for(const n of t.features)e(n.geometry);else"Feature"===t.type?e(t.geometry):"coordinates"in t&&e(t)}function G(t){return Array.isArray(t)&&4===t.length&&t.every((t=>"number"==typeof t))}function V(t,e,n){return(n=null!=n?n:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,e+8))*5e-4}function q(t){const[e,n,o,r]=t,c=e<o&&n<r;if(!c){console.log("Error: The extent coordinates are not in the correct order."),console.log(`Received extent: [${e}, ${n}, ${o}, ${r}]`);const t=[Math.min(e,o),Math.min(n,r),Math.max(e,o),Math.max(r,n)];console.log(`Expected order: [${t.join(", ")}]`)}const i=e>=-180&&o<=180,u=n>=-90&&r<=90;return i&&u||console.log("Warning: The coordinates may not be within valid geographic ranges."),c&&i&&u}function z(t,...e){for(const n of e)for(const e of Object.getOwnPropertyNames(n))t[e]=n[e]}function H(t,e,n,o){if(t instanceof Array)return e instanceof Array&&e.sort().join("")===t.sort().join("");if(t instanceof Date)return e instanceof Date&&""+t==""+e;if(t instanceof Function){if(!(e instanceof Function))return!1}else if(t instanceof Object)return e instanceof Object&&(t===n?e===o:J(t,e));return t===e}function J(t,e){const n=Object.keys(t).sort(),o=Object.keys(e).sort();if(n.length!==o.length)return!1;if(n.join("")!==o.join(""))return!1;for(let r=0;r<n.length;r++){if(!H(t[n[r]],e[o[r]],t,e))return!1}return!0}function K(t){const e={};return Object.keys(t).forEach((n=>{t[n]instanceof Array||t[n]!==Object(t[n])?void 0!==t[n]&&(e[n]=t[n]):e[n]=K(t[n])})),e}function Q(t,e={}){var n;const o=null==(n=e.flatArray)||n,r={};return function t(e,n){if(Object(e)!==e)r[n]=e;else if(Array.isArray(e)&&o){const o=e.length;for(let r=0;r<o;r++)t(e[r],n+"["+r+"]");0===o&&(r[n]=[])}else{let o=!0;for(const r in e)o=!1,t(e[r],n?n+"."+r:r);o&&n&&(r[n]={})}}(t,""),r}function X(t){if(Object(t)!==t||Array.isArray(t))return t;const e=/\.?([^.[\]]+)|\[(\d+)\]/g,n={};for(const o in t){let r,c=n,i="";for(;r=e.exec(o);)c=c[i]||(c[i]=r[2]?[]:{}),i=r[2]||r[1];c[i]=t[o]}return n[""]||n}function Y(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(t=0){return new Promise((e=>setTimeout(e,t)))}function tt(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)}function et(t,e=/[_.\- ]/){const n=t.split(e);let o="";for(let r=0;r<n.length;r++){const t=n[r];o+=t.charAt(0).toUpperCase()+t.slice(1)}return o}function nt(t){const e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),e.join(".")}function ot(t,e){const n=e?Number("1e+"+e):1;return Math.round((t+Number.EPSILON)*n)/n}function rt(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(st(t)?it(t):!!ft(t)&&ct(t))}function ct(t){return!!ft(t)&&t.every(rt)}function it(t){if(st(t))for(const e in t)if(!rt(e))return!1;return!1}function ut(t,e){return("string"==typeof e||"number"==typeof e)&&e in t}function at(t,e){return ut(t,e)}function st(t){return"[object Object]"===Object.prototype.toString.call(t)}function ft(t){return"[object Array]"===Object.prototype.toString.call(t)}function lt(t){return t.replace(/([^:]\/)\/+/g,"$1")}var pt=Object.defineProperty,yt=(t,e,n)=>((t,e,n)=>e in t?pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n);class ht{constructor(t){yt(this,"silent",!0),t&&this.copy(t)}static copy(t){return(new ht).copy(t)}copy(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(e){!this.silent&&console.log("Please copy manually")}return!1}copyToClipboard(t){const e=document.createElement("input");e.value=t;try{document.body.appendChild(e),this.copyNodeContentsToClipboard(e)}finally{document.body.removeChild(e)}}copyNodeContentsToClipboard(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")}}export{ht as Clipboard,m as DebounceDecorator,w as EARTHS_RADIUS,P as Events,r as allProperties,o as applyMixins,f as arrayChunk,i as arrayCompare,u as arrayCompareStrict,s as arrayUnique,et as camelize,tt as capitalize,q as checkExtent,_ as coordinatesCount,b as debounce,h as debugLog,y as deepmerge,l as defined,F as degrees2Radian,$ as degrees2meters,d as deprecatedMapClick,g as deprecatedWarn,U as eachCoordinates,W as eachGeometry,lt as fixUrlStr,Q as flatten,p as full,A as getBoundsCoordinates,C as getBoundsFeature,E as getBoundsPolygon,L as getCircleFeature,I as getCirclePolygonCoordinates,R as getCoordinates,n as getGlobalVariable,V as getIdentifyRadius,B as getPolygons,T as getSquarePolygonCoordinates,rt as isAnyJson,ft as isArray,t as isBrowser,ct as isJsonArray,it as isJsonMap,G as isLngLatBoundsArray,ut as isObjKey,st as isObject,at as keyInObj,M as latLngToLngLatArray,v as lngLatArrayToLatLng,k as meters2degrees,c as mixinProperties,nt as numberWithSpaces,z as objectAssign,J as objectDeepEqual,K as objectRemoveEmpty,Y as reEscape,ot as round,Z as sleep,e as type,X as unflatten};
const t="undefined"!=typeof window&&void 0!==window.document,e=t?"browser":"node";function n(){return t?window:global}function o(t,e,n={}){const o=r(t.prototype),c=void 0===n.replace||n.replace;e.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((n=>{const r=-1!==o.indexOf(n);if(!c&&!r||c){const o=Object.getOwnPropertyDescriptor(e.prototype,n);o&&Object.defineProperty(t.prototype,n,o)}}))}))}function r(t){return function(t,e=[]){for(;null!==t;t=Object.getPrototypeOf(t)){const n=Object.getOwnPropertyNames(t);for(let t=0;t<n.length;t++)-1==e.indexOf(n[t])&&e.push(n[t])}return e}(t)}function c(t,e,n){n.forEach((n=>{const o=Object.getOwnPropertyDescriptor(e.prototype,n);o&&Object.defineProperty(t.prototype,n,o)}))}function i(t,e){return a(t=Array.from(t).sort(),e=Array.from(e).sort())}function u(t,e){return a(t=Array.from(t),e=Array.from(e))}function a(t,e){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))}function s(t){return t.filter(((t,e,n)=>n.indexOf(t)==e))}function f(t,e){return Array.from({length:Math.ceil(t.length/e)},((n,o)=>t.slice(o*e,o*e+e)))}function l(t){return null!=t}function p(t){return"string"==typeof t?!!t:l(t)}function y(t,e,n=!1){let o=t;const r=e,c=Array.isArray(r);let i=c&&[]||{};return c&&Array.isArray(r)?n?(o=o||[],i=i.concat(o),r.forEach(((t,e)=>{void 0===i[e]?i[e]=t:"object"==typeof t?i[e]=y(o[e],t,n):-1===o.indexOf(t)&&i.push(t)}))):i=r:(o&&"object"==typeof o&&Object.keys(o).forEach((function(t){i[t]=o[t]})),Object.keys(r).forEach((function(t){i[t]="object"==typeof r[t]&&r[t]&&"object"==typeof o[t]&&"object"==typeof r[t]?y(o[t],r[t],n):r[t]}))),i}function h(t){return"production"!==process.env.NODE_ENV&&(console.trace("DEBUG: "+t),!0)}function d(t){if(!t.lngLat&&t.latLng){h("deprecated use of latLng in MapClickEvent, use lngLat instead");t.lngLat=[t.latLng.lng,t.latLng.lat]}return t}function g(t){console.warn(`DEPRECATED WARN: ${t}`)}function b(t,e=10){let n;function o(...r){o.clear(),n=setTimeout((()=>{n=null,t.apply(this,r)}),e)}return o.clear=function(){n&&(clearTimeout(n),n=null)},o}function m(t=10){return function(e,n,o){return{configurable:!0,enumerable:o.enumerable,get:function(){return Object.defineProperty(this,n,{configurable:!0,enumerable:o.enumerable,value:b(o.value,t)}),this[n]}}}}var j=Object.defineProperty,O=(t,e,n)=>((t,e,n)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,e+"",n);class P{constructor(t){this.emitter=t,O(this,"_eventsStatus",{})}setEventStatus(t,e){this._eventsStatus[t]=e}onLoad(t){const e=(Array.isArray(t)?t:[t]).map((t=>new Promise((e=>{if(this.getEventStatus(t))e(this);else{this.emitter.once(t,(()=>{this.setEventStatus(t,!0),e(this)}))}}))));return Promise.all(e).then((()=>this))}getEventStatus(t){const e=this._eventsStatus[t];return void 0!==e&&!!e}}function M(t){return[t.lng,t.lat]}function v(t){return{lat:t[1],lng:t[0]}}const w=6371;function E(t){return{type:"Polygon",coordinates:[A(t)]}}function A(t){const e=[t[0],t[1]];return[e,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],e]}function C(t){return{type:"Feature",properties:{},geometry:E(t)}}const x=Math.PI/180,S=180/Math.PI;function I(t,e,n=10,o=6){const r=n/w*S,c=r/Math.cos(e*x),i=[];for(let u=0;u<o+1;u++){const n=Math.PI*(u/(o/2)),a=t+c*Math.cos(n),s=e+r*Math.sin(n);i.push([a,s])}return i}function L(t,e,n=10,o=6){return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[I(t,e,n,o)]}}}const D=Math.PI/180,N=180/Math.PI;function T(t,e,n=10){const o=n/w*N,r=o/Math.cos(e*D),c=[t-r,e+o];return[c,[t+r,e+o],[t+r,e-o],[t-r,e-o],c]}function $(t,e){e=e>85.06?85.06:e<-85.06?-85.06:e;const n=20037508.34*t/180;let o=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);return o=20037508.34*o/180,[n,o]}function k(t,e){return[180*t/20037508.34,360*Math.atan(Math.exp(e*Math.PI/20037508.34))/Math.PI-90]}function F(t){return t*Math.PI/180}function _(t){let e=0;return U(t,(()=>e++)),e}function R(t){const e=[];return U(t,(t=>e.push(t))),e}function U(t,e){W(t,(t=>{if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(const n of t.coordinates)n.forEach((t=>e(t)));else if("MultiPolygon"===t.type)for(const n of t.coordinates)n.forEach((t=>t.forEach((t=>e(t)))));else if("Point"===t.type)e(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(const n of t.coordinates)e(n);return t}))}function B(t){const e=[];return W(t,(t=>{if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((t=>e.push(t)));else if("MultiPolygon"===t.type)for(const n of t.coordinates)for(const t of n)e.push(t);return t})),e}function W(t,e){if("FeatureCollection"===t.type)for(const n of t.features)e(n.geometry);else"Feature"===t.type?e(t.geometry):"coordinates"in t&&e(t)}function G(t){return Array.isArray(t)&&4===t.length&&t.every((t=>"number"==typeof t))}function V(t,e,n){return(n=null!=n?n:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,e+8))*5e-4}function q(t){const[e,n,o,r]=t,c=e<o&&n<r;if(!c){console.log("Error: The extent coordinates are not in the correct order."),console.log(`Received extent: [${e}, ${n}, ${o}, ${r}]`);const t=[Math.min(e,o),Math.min(n,r),Math.max(e,o),Math.max(r,n)];console.log(`Expected order: [${t.join(", ")}]`)}const i=e>=-180&&o<=180,u=n>=-90&&r<=90;return i&&u||console.log("Warning: The coordinates may not be within valid geographic ranges."),c&&i&&u}function z(t,...e){for(const n of e)for(const e of Object.getOwnPropertyNames(n))t[e]=n[e]}function H(t,e,n,o){if(t instanceof Array)return e instanceof Array&&e.sort().join("")===t.sort().join("");if(t instanceof Date)return e instanceof Date&&""+t==""+e;if(t instanceof Function){if(!(e instanceof Function))return!1}else if(t instanceof Object)return e instanceof Object&&(t===n?e===o:J(t,e));return t===e}function J(t,e){const n=Object.keys(t).sort(),o=Object.keys(e).sort();if(n.length!==o.length)return!1;if(n.join("")!==o.join(""))return!1;for(let r=0;r<n.length;r++){if(!H(t[n[r]],e[o[r]],t,e))return!1}return!0}function K(t){const e={};return Object.keys(t).forEach((n=>{t[n]instanceof Array||t[n]!==Object(t[n])?void 0!==t[n]&&(e[n]=t[n]):e[n]=K(t[n])})),e}function Q(t,e={}){var n;const o=null==(n=e.flatArray)||n,r={};return function t(e,n){if(Object(e)!==e)r[n]=e;else if(Array.isArray(e)&&o){const o=e.length;for(let r=0;r<o;r++)t(e[r],n+"["+r+"]");0===o&&(r[n]=[])}else{let o=!0;for(const r in e)o=!1,t(e[r],n?n+"."+r:r);o&&n&&(r[n]={})}}(t,""),r}function X(t){if(Object(t)!==t||Array.isArray(t))return t;const e=/\.?([^.[\]]+)|\[(\d+)\]/g,n={};for(const o in t){let r,c=n,i="";for(;r=e.exec(o);)c=c[i]||(c[i]=r[2]?[]:{}),i=r[2]||r[1];c[i]=t[o]}return n[""]||n}function Y(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(t=0){return new Promise((e=>setTimeout(e,t)))}function tt(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)}function et(t,e=/[_.\- ]/){const n=t.split(e);let o="";for(let r=0;r<n.length;r++){const t=n[r];o+=t.charAt(0).toUpperCase()+t.slice(1)}return o}function nt(t){const e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),e.join(".")}function ot(t,e){const n=e?Number("1e+"+e):1;return Math.round((t+Number.EPSILON)*n)/n}function rt(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(st(t)?it(t):!!ft(t)&&ct(t))}function ct(t){return!!ft(t)&&t.every(rt)}function it(t){if(st(t))for(const e in t)if(!rt(e))return!1;return!1}function ut(t,e){return("string"==typeof e||"number"==typeof e)&&e in t}function at(t,e){return ut(t,e)}function st(t){return"[object Object]"===Object.prototype.toString.call(t)}function ft(t){return"[object Array]"===Object.prototype.toString.call(t)}function lt(t){return t.replace(/([^:]\/)\/+/g,"$1")}var pt=Object.defineProperty,yt=(t,e,n)=>((t,e,n)=>e in t?pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,e+"",n);class ht{constructor(t){yt(this,"silent",!0),t&&this.copy(t)}static copy(t){return(new ht).copy(t)}copy(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(e){!this.silent&&console.log("Please copy manually")}return!1}copyToClipboard(t){const e=document.createElement("input");e.value=t;try{document.body.appendChild(e),this.copyNodeContentsToClipboard(e)}finally{document.body.removeChild(e)}}copyNodeContentsToClipboard(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")}}export{ht as Clipboard,m as DebounceDecorator,w as EARTHS_RADIUS,P as Events,r as allProperties,o as applyMixins,f as arrayChunk,i as arrayCompare,u as arrayCompareStrict,s as arrayUnique,et as camelize,tt as capitalize,q as checkExtent,_ as coordinatesCount,b as debounce,h as debugLog,y as deepmerge,l as defined,F as degrees2Radian,$ as degrees2meters,d as deprecatedMapClick,g as deprecatedWarn,U as eachCoordinates,W as eachGeometry,lt as fixUrlStr,Q as flatten,p as full,A as getBoundsCoordinates,C as getBoundsFeature,E as getBoundsPolygon,L as getCircleFeature,I as getCirclePolygonCoordinates,R as getCoordinates,n as getGlobalVariable,V as getIdentifyRadius,B as getPolygons,T as getSquarePolygonCoordinates,rt as isAnyJson,ft as isArray,t as isBrowser,ct as isJsonArray,it as isJsonMap,G as isLngLatBoundsArray,ut as isObjKey,st as isObject,at as keyInObj,M as latLngToLngLatArray,v as lngLatArrayToLatLng,k as meters2degrees,c as mixinProperties,nt as numberWithSpaces,z as objectAssign,J as objectDeepEqual,K as objectRemoveEmpty,Y as reEscape,ot as round,Z as sleep,e as type,X as unflatten};
//# sourceMappingURL=utils.esm-bundler.prod.js.map

@@ -1,2 +0,2 @@

/** Bundle of @nextgis/utils; version: 2.3.0; author: NextGIS */
/** Bundle of @nextgis/utils; version: 2.5.0; author: NextGIS */
var Utils = (function (exports) {

@@ -196,3 +196,3 @@ 'use strict';

var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, key + "" , value);
class Events {

@@ -598,3 +598,3 @@ constructor(emitter) {

var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
class Clipboard {

@@ -601,0 +601,0 @@ constructor(text) {

@@ -1,2 +0,2 @@

var Utils=function(t){"use strict";const e="undefined"!=typeof window&&void 0!==window.document,n=e?"browser":"node";function o(t){return function(t,e=[]){for(;null!==t;t=Object.getPrototypeOf(t)){const n=Object.getOwnPropertyNames(t);for(let t=0;t<n.length;t++)-1==e.indexOf(n[t])&&e.push(n[t])}return e}(t)}function r(t,e){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))}function i(t){return null!=t}function c(t,e=10){let n;function o(...r){o.clear(),n=setTimeout((()=>{n=null,t.apply(this,r)}),e)}return o.clear=function(){n&&(clearTimeout(n),n=null)},o}var a=Object.defineProperty,s=(t,e,n)=>((t,e,n)=>e in t?a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n);const u=6371;function f(t){return{type:"Polygon",coordinates:[l(t)]}}function l(t){const e=[t[0],t[1]];return[e,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],e]}const y=Math.PI/180,p=180/Math.PI;function g(t,e,n=10,o=6){const r=n/u*p,i=r/Math.cos(e*y),c=[];for(let a=0;a<o+1;a++){const n=Math.PI*(a/(o/2)),s=t+i*Math.cos(n),u=e+r*Math.sin(n);c.push([s,u])}return c}const d=Math.PI/180,h=180/Math.PI;function b(t,e){m(t,(t=>{if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(const n of t.coordinates)n.forEach((t=>e(t)));else if("MultiPolygon"===t.type)for(const n of t.coordinates)n.forEach((t=>t.forEach((t=>e(t)))));else if("Point"===t.type)e(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(const n of t.coordinates)e(n);return t}))}function m(t,e){if("FeatureCollection"===t.type)for(const n of t.features)e(n.geometry);else"Feature"===t.type?e(t.geometry):"coordinates"in t&&e(t)}function j(t,e,n,o){if(t instanceof Array)return e instanceof Array&&e.sort().join("")===t.sort().join("");if(t instanceof Date)return e instanceof Date&&""+t==""+e;if(t instanceof Function){if(!(e instanceof Function))return!1}else if(t instanceof Object)return e instanceof Object&&(t===n?e===o:P(t,e));return t===e}function P(t,e){const n=Object.keys(t).sort(),o=Object.keys(e).sort();if(n.length!==o.length)return!1;if(n.join("")!==o.join(""))return!1;for(let r=0;r<n.length;r++){if(!j(t[n[r]],e[o[r]],t,e))return!1}return!0}function O(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(C(t)?A(t):!!E(t)&&M(t))}function M(t){return!!E(t)&&t.every(O)}function A(t){if(C(t))for(const e in t)if(!O(e))return!1;return!1}function v(t,e){return("string"==typeof e||"number"==typeof e)&&e in t}function C(t){return"[object Object]"===Object.prototype.toString.call(t)}function E(t){return"[object Array]"===Object.prototype.toString.call(t)}var w=Object.defineProperty,S=(t,e,n)=>((t,e,n)=>e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n);class L{constructor(t){S(this,"silent",!0),t&&this.copy(t)}static copy(t){return(new L).copy(t)}copy(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(e){!this.silent&&console.log("Please copy manually")}return!1}copyToClipboard(t){const e=document.createElement("input");e.value=t;try{document.body.appendChild(e),this.copyNodeContentsToClipboard(e)}finally{document.body.removeChild(e)}}copyNodeContentsToClipboard(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")}}return t.Clipboard=L,t.DebounceDecorator=function(t=10){return function(e,n,o){return{configurable:!0,enumerable:o.enumerable,get:function(){return Object.defineProperty(this,n,{configurable:!0,enumerable:o.enumerable,value:c(o.value,t)}),this[n]}}}},t.EARTHS_RADIUS=u,t.Events=class{constructor(t){this.emitter=t,s(this,"_eventsStatus",{})}setEventStatus(t,e){this._eventsStatus[t]=e}onLoad(t){const e=(Array.isArray(t)?t:[t]).map((t=>new Promise((e=>{if(this.getEventStatus(t))e(this);else{this.emitter.once(t,(()=>{this.setEventStatus(t,!0),e(this)}))}}))));return Promise.all(e).then((()=>this))}getEventStatus(t){const e=this._eventsStatus[t];return void 0!==e&&!!e}},t.allProperties=o,t.applyMixins=function(t,e,n={}){const r=o(t.prototype),i=void 0===n.replace||n.replace;e.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((n=>{const o=-1!==r.indexOf(n);if(!i&&!o||i){const o=Object.getOwnPropertyDescriptor(e.prototype,n);o&&Object.defineProperty(t.prototype,n,o)}}))}))},t.arrayChunk=function(t,e){return Array.from({length:Math.ceil(t.length/e)},((n,o)=>t.slice(o*e,o*e+e)))},t.arrayCompare=function(t,e){return r(t=Array.from(t).sort(),e=Array.from(e).sort())},t.arrayCompareStrict=function(t,e){return r(t=Array.from(t),e=Array.from(e))},t.arrayUnique=function(t){return t.filter(((t,e,n)=>n.indexOf(t)==e))},t.camelize=function(t,e=/[_.\- ]/){const n=t.split(e);let o="";for(let r=0;r<n.length;r++){const t=n[r];o+=t.charAt(0).toUpperCase()+t.slice(1)}return o},t.capitalize=function(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)},t.checkExtent=function(t){const[e,n,o,r]=t,i=e<o&&n<r;if(!i){console.log("Error: The extent coordinates are not in the correct order."),console.log(`Received extent: [${e}, ${n}, ${o}, ${r}]`);const t=[Math.min(e,o),Math.min(n,r),Math.max(e,o),Math.max(r,n)];console.log(`Expected order: [${t.join(", ")}]`)}const c=e>=-180&&o<=180,a=n>=-90&&r<=90;return c&&a||console.log("Warning: The coordinates may not be within valid geographic ranges."),i&&c&&a},t.coordinatesCount=function(t){let e=0;return b(t,(()=>e++)),e},t.debounce=c,t.debugLog=function(t){return!1},t.deepmerge=function t(e,n,o=!1){let r=e;const i=n,c=Array.isArray(i);let a=c&&[]||{};return c&&Array.isArray(i)?o?(r=r||[],a=a.concat(r),i.forEach(((e,n)=>{void 0===a[n]?a[n]=e:"object"==typeof e?a[n]=t(r[n],e,o):-1===r.indexOf(e)&&a.push(e)}))):a=i:(r&&"object"==typeof r&&Object.keys(r).forEach((function(t){a[t]=r[t]})),Object.keys(i).forEach((function(e){a[e]="object"==typeof i[e]&&i[e]&&"object"==typeof r[e]&&"object"==typeof i[e]?t(r[e],i[e],o):i[e]}))),a},t.defined=i,t.degrees2Radian=function(t){return t*Math.PI/180},t.degrees2meters=function(t,e){e=e>85.06?85.06:e<-85.06?-85.06:e;const n=20037508.34*t/180;let o=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);return o=20037508.34*o/180,[n,o]},t.deprecatedMapClick=function(t){if(!t.lngLat&&t.latLng){t.lngLat=[t.latLng.lng,t.latLng.lat]}return t},t.deprecatedWarn=function(t){console.warn(`DEPRECATED WARN: ${t}`)},t.eachCoordinates=b,t.eachGeometry=m,t.fixUrlStr=function(t){return t.replace(/([^:]\/)\/+/g,"$1")},t.flatten=function(t,e={}){var n;const o=null==(n=e.flatArray)||n,r={};return function t(e,n){if(Object(e)!==e)r[n]=e;else if(Array.isArray(e)&&o){const o=e.length;for(let r=0;r<o;r++)t(e[r],n+"["+r+"]");0===o&&(r[n]=[])}else{let o=!0;for(const r in e)o=!1,t(e[r],n?n+"."+r:r);o&&n&&(r[n]={})}}(t,""),r},t.full=function(t){return"string"==typeof t?!!t:i(t)},t.getBoundsCoordinates=l,t.getBoundsFeature=function(t){return{type:"Feature",properties:{},geometry:f(t)}},t.getBoundsPolygon=f,t.getCircleFeature=function(t,e,n=10,o=6){return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[g(t,e,n,o)]}}},t.getCirclePolygonCoordinates=g,t.getCoordinates=function(t){const e=[];return b(t,(t=>e.push(t))),e},t.getGlobalVariable=function(){return e?window:global},t.getIdentifyRadius=function(t,e,n){return(n=null!=n?n:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,e+8))*5e-4},t.getPolygons=function(t){const e=[];return m(t,(t=>{if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((t=>e.push(t)));else if("MultiPolygon"===t.type)for(const n of t.coordinates)for(const t of n)e.push(t);return t})),e},t.getSquarePolygonCoordinates=function(t,e,n=10){const o=n/u*h,r=o/Math.cos(e*d),i=[t-r,e+o];return[i,[t+r,e+o],[t+r,e-o],[t-r,e-o],i]},t.isAnyJson=O,t.isArray=E,t.isBrowser=e,t.isJsonArray=M,t.isJsonMap=A,t.isLngLatBoundsArray=function(t){return Array.isArray(t)&&4===t.length&&t.every((t=>"number"==typeof t))},t.isObjKey=v,t.isObject=C,t.keyInObj=function(t,e){return v(t,e)},t.latLngToLngLatArray=function(t){return[t.lng,t.lat]},t.lngLatArrayToLatLng=function(t){return{lat:t[1],lng:t[0]}},t.meters2degrees=function(t,e){return[180*t/20037508.34,360*Math.atan(Math.exp(e*Math.PI/20037508.34))/Math.PI-90]},t.mixinProperties=function(t,e,n){n.forEach((n=>{const o=Object.getOwnPropertyDescriptor(e.prototype,n);o&&Object.defineProperty(t.prototype,n,o)}))},t.numberWithSpaces=function(t){const e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),e.join(".")},t.objectAssign=function(t,...e){for(const n of e)for(const e of Object.getOwnPropertyNames(n))t[e]=n[e]},t.objectDeepEqual=P,t.objectRemoveEmpty=function t(e){const n={};return Object.keys(e).forEach((o=>{e[o]instanceof Array||e[o]!==Object(e[o])?void 0!==e[o]&&(n[o]=e[o]):n[o]=t(e[o])})),n},t.reEscape=function(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},t.round=function(t,e){const n=e?Number("1e+"+e):1;return Math.round((t+Number.EPSILON)*n)/n},t.sleep=function(t=0){return new Promise((e=>setTimeout(e,t)))},t.type=n,t.unflatten=function(t){if(Object(t)!==t||Array.isArray(t))return t;const e=/\.?([^.[\]]+)|\[(\d+)\]/g,n={};for(const o in t){let r,i=n,c="";for(;r=e.exec(o);)i=i[c]||(i[c]=r[2]?[]:{}),c=r[2]||r[1];i[c]=t[o]}return n[""]||n},t}({});
var Utils=function(t){"use strict";const e="undefined"!=typeof window&&void 0!==window.document,n=e?"browser":"node";function o(t){return function(t,e=[]){for(;null!==t;t=Object.getPrototypeOf(t)){const n=Object.getOwnPropertyNames(t);for(let t=0;t<n.length;t++)-1==e.indexOf(n[t])&&e.push(n[t])}return e}(t)}function r(t,e){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))}function i(t){return null!=t}function c(t,e=10){let n;function o(...r){o.clear(),n=setTimeout((()=>{n=null,t.apply(this,r)}),e)}return o.clear=function(){n&&(clearTimeout(n),n=null)},o}var a=Object.defineProperty,s=(t,e,n)=>((t,e,n)=>e in t?a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,e+"",n);const u=6371;function f(t){return{type:"Polygon",coordinates:[l(t)]}}function l(t){const e=[t[0],t[1]];return[e,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],e]}const p=Math.PI/180,y=180/Math.PI;function g(t,e,n=10,o=6){const r=n/u*y,i=r/Math.cos(e*p),c=[];for(let a=0;a<o+1;a++){const n=Math.PI*(a/(o/2)),s=t+i*Math.cos(n),u=e+r*Math.sin(n);c.push([s,u])}return c}const d=Math.PI/180,h=180/Math.PI;function b(t,e){m(t,(t=>{if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(const n of t.coordinates)n.forEach((t=>e(t)));else if("MultiPolygon"===t.type)for(const n of t.coordinates)n.forEach((t=>t.forEach((t=>e(t)))));else if("Point"===t.type)e(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(const n of t.coordinates)e(n);return t}))}function m(t,e){if("FeatureCollection"===t.type)for(const n of t.features)e(n.geometry);else"Feature"===t.type?e(t.geometry):"coordinates"in t&&e(t)}function j(t,e,n,o){if(t instanceof Array)return e instanceof Array&&e.sort().join("")===t.sort().join("");if(t instanceof Date)return e instanceof Date&&""+t==""+e;if(t instanceof Function){if(!(e instanceof Function))return!1}else if(t instanceof Object)return e instanceof Object&&(t===n?e===o:P(t,e));return t===e}function P(t,e){const n=Object.keys(t).sort(),o=Object.keys(e).sort();if(n.length!==o.length)return!1;if(n.join("")!==o.join(""))return!1;for(let r=0;r<n.length;r++){if(!j(t[n[r]],e[o[r]],t,e))return!1}return!0}function O(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(C(t)?A(t):!!E(t)&&M(t))}function M(t){return!!E(t)&&t.every(O)}function A(t){if(C(t))for(const e in t)if(!O(e))return!1;return!1}function v(t,e){return("string"==typeof e||"number"==typeof e)&&e in t}function C(t){return"[object Object]"===Object.prototype.toString.call(t)}function E(t){return"[object Array]"===Object.prototype.toString.call(t)}var w=Object.defineProperty,S=(t,e,n)=>((t,e,n)=>e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,e+"",n);class L{constructor(t){S(this,"silent",!0),t&&this.copy(t)}static copy(t){return(new L).copy(t)}copy(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(e){!this.silent&&console.log("Please copy manually")}return!1}copyToClipboard(t){const e=document.createElement("input");e.value=t;try{document.body.appendChild(e),this.copyNodeContentsToClipboard(e)}finally{document.body.removeChild(e)}}copyNodeContentsToClipboard(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")}}return t.Clipboard=L,t.DebounceDecorator=function(t=10){return function(e,n,o){return{configurable:!0,enumerable:o.enumerable,get:function(){return Object.defineProperty(this,n,{configurable:!0,enumerable:o.enumerable,value:c(o.value,t)}),this[n]}}}},t.EARTHS_RADIUS=u,t.Events=class{constructor(t){this.emitter=t,s(this,"_eventsStatus",{})}setEventStatus(t,e){this._eventsStatus[t]=e}onLoad(t){const e=(Array.isArray(t)?t:[t]).map((t=>new Promise((e=>{if(this.getEventStatus(t))e(this);else{this.emitter.once(t,(()=>{this.setEventStatus(t,!0),e(this)}))}}))));return Promise.all(e).then((()=>this))}getEventStatus(t){const e=this._eventsStatus[t];return void 0!==e&&!!e}},t.allProperties=o,t.applyMixins=function(t,e,n={}){const r=o(t.prototype),i=void 0===n.replace||n.replace;e.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((n=>{const o=-1!==r.indexOf(n);if(!i&&!o||i){const o=Object.getOwnPropertyDescriptor(e.prototype,n);o&&Object.defineProperty(t.prototype,n,o)}}))}))},t.arrayChunk=function(t,e){return Array.from({length:Math.ceil(t.length/e)},((n,o)=>t.slice(o*e,o*e+e)))},t.arrayCompare=function(t,e){return r(t=Array.from(t).sort(),e=Array.from(e).sort())},t.arrayCompareStrict=function(t,e){return r(t=Array.from(t),e=Array.from(e))},t.arrayUnique=function(t){return t.filter(((t,e,n)=>n.indexOf(t)==e))},t.camelize=function(t,e=/[_.\- ]/){const n=t.split(e);let o="";for(let r=0;r<n.length;r++){const t=n[r];o+=t.charAt(0).toUpperCase()+t.slice(1)}return o},t.capitalize=function(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)},t.checkExtent=function(t){const[e,n,o,r]=t,i=e<o&&n<r;if(!i){console.log("Error: The extent coordinates are not in the correct order."),console.log(`Received extent: [${e}, ${n}, ${o}, ${r}]`);const t=[Math.min(e,o),Math.min(n,r),Math.max(e,o),Math.max(r,n)];console.log(`Expected order: [${t.join(", ")}]`)}const c=e>=-180&&o<=180,a=n>=-90&&r<=90;return c&&a||console.log("Warning: The coordinates may not be within valid geographic ranges."),i&&c&&a},t.coordinatesCount=function(t){let e=0;return b(t,(()=>e++)),e},t.debounce=c,t.debugLog=function(t){return!1},t.deepmerge=function t(e,n,o=!1){let r=e;const i=n,c=Array.isArray(i);let a=c&&[]||{};return c&&Array.isArray(i)?o?(r=r||[],a=a.concat(r),i.forEach(((e,n)=>{void 0===a[n]?a[n]=e:"object"==typeof e?a[n]=t(r[n],e,o):-1===r.indexOf(e)&&a.push(e)}))):a=i:(r&&"object"==typeof r&&Object.keys(r).forEach((function(t){a[t]=r[t]})),Object.keys(i).forEach((function(e){a[e]="object"==typeof i[e]&&i[e]&&"object"==typeof r[e]&&"object"==typeof i[e]?t(r[e],i[e],o):i[e]}))),a},t.defined=i,t.degrees2Radian=function(t){return t*Math.PI/180},t.degrees2meters=function(t,e){e=e>85.06?85.06:e<-85.06?-85.06:e;const n=20037508.34*t/180;let o=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);return o=20037508.34*o/180,[n,o]},t.deprecatedMapClick=function(t){if(!t.lngLat&&t.latLng){t.lngLat=[t.latLng.lng,t.latLng.lat]}return t},t.deprecatedWarn=function(t){console.warn(`DEPRECATED WARN: ${t}`)},t.eachCoordinates=b,t.eachGeometry=m,t.fixUrlStr=function(t){return t.replace(/([^:]\/)\/+/g,"$1")},t.flatten=function(t,e={}){var n;const o=null==(n=e.flatArray)||n,r={};return function t(e,n){if(Object(e)!==e)r[n]=e;else if(Array.isArray(e)&&o){const o=e.length;for(let r=0;r<o;r++)t(e[r],n+"["+r+"]");0===o&&(r[n]=[])}else{let o=!0;for(const r in e)o=!1,t(e[r],n?n+"."+r:r);o&&n&&(r[n]={})}}(t,""),r},t.full=function(t){return"string"==typeof t?!!t:i(t)},t.getBoundsCoordinates=l,t.getBoundsFeature=function(t){return{type:"Feature",properties:{},geometry:f(t)}},t.getBoundsPolygon=f,t.getCircleFeature=function(t,e,n=10,o=6){return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[g(t,e,n,o)]}}},t.getCirclePolygonCoordinates=g,t.getCoordinates=function(t){const e=[];return b(t,(t=>e.push(t))),e},t.getGlobalVariable=function(){return e?window:global},t.getIdentifyRadius=function(t,e,n){return(n=null!=n?n:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,e+8))*5e-4},t.getPolygons=function(t){const e=[];return m(t,(t=>{if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((t=>e.push(t)));else if("MultiPolygon"===t.type)for(const n of t.coordinates)for(const t of n)e.push(t);return t})),e},t.getSquarePolygonCoordinates=function(t,e,n=10){const o=n/u*h,r=o/Math.cos(e*d),i=[t-r,e+o];return[i,[t+r,e+o],[t+r,e-o],[t-r,e-o],i]},t.isAnyJson=O,t.isArray=E,t.isBrowser=e,t.isJsonArray=M,t.isJsonMap=A,t.isLngLatBoundsArray=function(t){return Array.isArray(t)&&4===t.length&&t.every((t=>"number"==typeof t))},t.isObjKey=v,t.isObject=C,t.keyInObj=function(t,e){return v(t,e)},t.latLngToLngLatArray=function(t){return[t.lng,t.lat]},t.lngLatArrayToLatLng=function(t){return{lat:t[1],lng:t[0]}},t.meters2degrees=function(t,e){return[180*t/20037508.34,360*Math.atan(Math.exp(e*Math.PI/20037508.34))/Math.PI-90]},t.mixinProperties=function(t,e,n){n.forEach((n=>{const o=Object.getOwnPropertyDescriptor(e.prototype,n);o&&Object.defineProperty(t.prototype,n,o)}))},t.numberWithSpaces=function(t){const e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),e.join(".")},t.objectAssign=function(t,...e){for(const n of e)for(const e of Object.getOwnPropertyNames(n))t[e]=n[e]},t.objectDeepEqual=P,t.objectRemoveEmpty=function t(e){const n={};return Object.keys(e).forEach((o=>{e[o]instanceof Array||e[o]!==Object(e[o])?void 0!==e[o]&&(n[o]=e[o]):n[o]=t(e[o])})),n},t.reEscape=function(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},t.round=function(t,e){const n=e?Number("1e+"+e):1;return Math.round((t+Number.EPSILON)*n)/n},t.sleep=function(t=0){return new Promise((e=>setTimeout(e,t)))},t.type=n,t.unflatten=function(t){if(Object(t)!==t||Array.isArray(t))return t;const e=/\.?([^.[\]]+)|\[(\d+)\]/g,n={};for(const o in t){let r,i=n,c="";for(;r=e.exec(o);)i=i[c]||(i[c]=r[2]?[]:{}),c=r[2]||r[1];i[c]=t[o]}return n[""]||n},t}({});
//# sourceMappingURL=utils.global.prod.js.map
{
"name": "@nextgis/utils",
"version": "2.3.0",
"version": "2.5.0",
"description": "Common development tools",

@@ -12,3 +12,3 @@ "main": "index.js",

"devDependencies": {
"@nextgis/build-tools": "^2.3.0",
"@nextgis/build-tools": "^2.5.0",
"@types/geojson": "^7946.0.14"

@@ -50,3 +50,3 @@ },

},
"gitHead": "e25d812d39f6c704adb2884ffbf20e84ef7cb1dc"
"gitHead": "7ed42736d080f0e22acc996a95f6406e96ab527c"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc