@nextgis/ngw-leaflet 3.0.0-alpha.3 → 3.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.3; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.4; author: NextGIS */
2
2
  var NgwLeaflet = (function () {
3
3
  'use strict';
4
4
 
@@ -14947,6 +14947,20 @@ var NgwLeaflet = (function () {
14947
14947
  function fixUrlStr(url) {
14948
14948
  return url.replace(/([^:]\/)\/+/g, "$1");
14949
14949
  }
14950
+ function updateUrlParams(urlStr, params) {
14951
+ const url = new URL(urlStr);
14952
+ const searchParams = new URLSearchParams(url.search);
14953
+ Object.entries(params).forEach(([key, value]) => {
14954
+ if (value === void 0) {
14955
+ searchParams.delete(key);
14956
+ } else {
14957
+ searchParams.set(key, value);
14958
+ }
14959
+ });
14960
+ searchParams.set("timestamp", String((/* @__PURE__ */ new Date()).getTime()));
14961
+ const newSearch = [...searchParams.entries()].map(([key, value]) => `${key}=${value}`).join("&");
14962
+ return `${url.origin}${url.pathname}?${newSearch}`;
14963
+ }
14950
14964
 
14951
14965
  function boundsToArray(bounds) {
14952
14966
  const ne = bounds.getNorthEast();
@@ -15051,15 +15065,15 @@ var NgwLeaflet = (function () {
15051
15065
  };
15052
15066
  }
15053
15067
 
15054
- var __defProp$Y = Object.defineProperty;
15055
- var __defNormalProp$Y = (obj, key, value) => key in obj ? __defProp$Y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15056
- var __publicField$E = (obj, key, value) => __defNormalProp$Y(obj, typeof key !== "symbol" ? key + "" : key, value);
15068
+ var __defProp$Z = Object.defineProperty;
15069
+ var __defNormalProp$Z = (obj, key, value) => key in obj ? __defProp$Z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15070
+ var __publicField$F = (obj, key, value) => __defNormalProp$Z(obj, typeof key !== "symbol" ? key + "" : key, value);
15057
15071
  class BaseAdapter {
15058
15072
  constructor(map, options) {
15059
15073
  this.map = map;
15060
15074
  this.options = options;
15061
- __publicField$E(this, "layer");
15062
- __publicField$E(this, "pane", "order-0");
15075
+ __publicField$F(this, "layer");
15076
+ __publicField$F(this, "pane", "order-0");
15063
15077
  if (options.order !== void 0) {
15064
15078
  const pane = "order-" + options.order;
15065
15079
  let exist = map.getPane(pane);
@@ -15088,19 +15102,19 @@ var NgwLeaflet = (function () {
15088
15102
  };
15089
15103
  }
15090
15104
 
15091
- var __defProp$X = Object.defineProperty;
15105
+ var __defProp$Y = Object.defineProperty;
15092
15106
  var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
15093
15107
  var __hasOwnProp$G = Object.prototype.hasOwnProperty;
15094
15108
  var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
15095
- var __defNormalProp$X = (obj, key, value) => key in obj ? __defProp$X(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15109
+ var __defNormalProp$Y = (obj, key, value) => key in obj ? __defProp$Y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15096
15110
  var __spreadValues$F = (a, b) => {
15097
15111
  for (var prop in b || (b = {}))
15098
15112
  if (__hasOwnProp$G.call(b, prop))
15099
- __defNormalProp$X(a, prop, b[prop]);
15113
+ __defNormalProp$Y(a, prop, b[prop]);
15100
15114
  if (__getOwnPropSymbols$G)
15101
15115
  for (var prop of __getOwnPropSymbols$G(b)) {
15102
15116
  if (__propIsEnum$G.call(b, prop))
15103
- __defNormalProp$X(a, prop, b[prop]);
15117
+ __defNormalProp$Y(a, prop, b[prop]);
15104
15118
  }
15105
15119
  return a;
15106
15120
  };
@@ -15119,30 +15133,30 @@ var NgwLeaflet = (function () {
15119
15133
  return opt;
15120
15134
  }
15121
15135
 
15122
- var __defProp$W = Object.defineProperty;
15136
+ var __defProp$X = Object.defineProperty;
15123
15137
  var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
15124
15138
  var __hasOwnProp$F = Object.prototype.hasOwnProperty;
15125
15139
  var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
15126
- var __defNormalProp$W = (obj, key, value) => key in obj ? __defProp$W(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15140
+ var __defNormalProp$X = (obj, key, value) => key in obj ? __defProp$X(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15127
15141
  var __spreadValues$E = (a, b) => {
15128
15142
  for (var prop in b || (b = {}))
15129
15143
  if (__hasOwnProp$F.call(b, prop))
15130
- __defNormalProp$W(a, prop, b[prop]);
15144
+ __defNormalProp$X(a, prop, b[prop]);
15131
15145
  if (__getOwnPropSymbols$F)
15132
15146
  for (var prop of __getOwnPropSymbols$F(b)) {
15133
15147
  if (__propIsEnum$F.call(b, prop))
15134
- __defNormalProp$W(a, prop, b[prop]);
15148
+ __defNormalProp$X(a, prop, b[prop]);
15135
15149
  }
15136
15150
  return a;
15137
15151
  };
15138
- var __publicField$D = (obj, key, value) => __defNormalProp$W(obj, typeof key !== "symbol" ? key + "" : key, value);
15152
+ var __publicField$E = (obj, key, value) => __defNormalProp$X(obj, typeof key !== "symbol" ? key + "" : key, value);
15139
15153
  class GeoJsonEvents {
15140
15154
  constructor(layer) {
15141
- __publicField$D(this, "layer");
15142
- __publicField$D(this, "_onclick");
15143
- __publicField$D(this, "_ondblclick");
15144
- __publicField$D(this, "_mouseout");
15145
- __publicField$D(this, "_mouseover");
15155
+ __publicField$E(this, "layer");
15156
+ __publicField$E(this, "_onclick");
15157
+ __publicField$E(this, "_ondblclick");
15158
+ __publicField$E(this, "_mouseout");
15159
+ __publicField$E(this, "_mouseover");
15146
15160
  this.layer = layer;
15147
15161
  }
15148
15162
  handleMouseEvents(layer) {
@@ -15839,19 +15853,19 @@ var NgwLeaflet = (function () {
15839
15853
  typeof: evaluateArgs(([arg]) => typeOfValue(arg))
15840
15854
  };
15841
15855
 
15842
- var __defProp$V = Object.defineProperty;
15856
+ var __defProp$W = Object.defineProperty;
15843
15857
  var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
15844
15858
  var __hasOwnProp$E = Object.prototype.hasOwnProperty;
15845
15859
  var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
15846
- var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15860
+ var __defNormalProp$W = (obj, key, value) => key in obj ? __defProp$W(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15847
15861
  var __spreadValues$D = (a, b) => {
15848
15862
  for (var prop in b || (b = {}))
15849
15863
  if (__hasOwnProp$E.call(b, prop))
15850
- __defNormalProp$V(a, prop, b[prop]);
15864
+ __defNormalProp$W(a, prop, b[prop]);
15851
15865
  if (__getOwnPropSymbols$E)
15852
15866
  for (var prop of __getOwnPropSymbols$E(b)) {
15853
15867
  if (__propIsEnum$E.call(b, prop))
15854
- __defNormalProp$V(a, prop, b[prop]);
15868
+ __defNormalProp$W(a, prop, b[prop]);
15855
15869
  }
15856
15870
  return a;
15857
15871
  };
@@ -15876,19 +15890,19 @@ var NgwLeaflet = (function () {
15876
15890
  throw new Error(`Expression "${name}" is not supported.`);
15877
15891
  }
15878
15892
 
15879
- var __defProp$U = Object.defineProperty;
15893
+ var __defProp$V = Object.defineProperty;
15880
15894
  var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
15881
15895
  var __hasOwnProp$D = Object.prototype.hasOwnProperty;
15882
15896
  var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
15883
- var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15897
+ var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15884
15898
  var __spreadValues$C = (a, b) => {
15885
15899
  for (var prop in b || (b = {}))
15886
15900
  if (__hasOwnProp$D.call(b, prop))
15887
- __defNormalProp$U(a, prop, b[prop]);
15901
+ __defNormalProp$V(a, prop, b[prop]);
15888
15902
  if (__getOwnPropSymbols$D)
15889
15903
  for (var prop of __getOwnPropSymbols$D(b)) {
15890
15904
  if (__propIsEnum$D.call(b, prop))
15891
- __defNormalProp$U(a, prop, b[prop]);
15905
+ __defNormalProp$V(a, prop, b[prop]);
15892
15906
  }
15893
15907
  return a;
15894
15908
  };
@@ -15927,19 +15941,19 @@ var NgwLeaflet = (function () {
15927
15941
  return;
15928
15942
  }
15929
15943
 
15930
- var __defProp$T = Object.defineProperty;
15944
+ var __defProp$U = Object.defineProperty;
15931
15945
  var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
15932
15946
  var __hasOwnProp$C = Object.prototype.hasOwnProperty;
15933
15947
  var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
15934
- var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15948
+ var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15935
15949
  var __spreadValues$B = (a, b) => {
15936
15950
  for (var prop in b || (b = {}))
15937
15951
  if (__hasOwnProp$C.call(b, prop))
15938
- __defNormalProp$T(a, prop, b[prop]);
15952
+ __defNormalProp$U(a, prop, b[prop]);
15939
15953
  if (__getOwnPropSymbols$C)
15940
15954
  for (var prop of __getOwnPropSymbols$C(b)) {
15941
15955
  if (__propIsEnum$C.call(b, prop))
15942
- __defNormalProp$T(a, prop, b[prop]);
15956
+ __defNormalProp$U(a, prop, b[prop]);
15943
15957
  }
15944
15958
  return a;
15945
15959
  };
@@ -16021,19 +16035,19 @@ var NgwLeaflet = (function () {
16021
16035
  return logic === "any" ? filters_.some(filterFunction) : filters_.every(filterFunction);
16022
16036
  }
16023
16037
 
16024
- var __defProp$S = Object.defineProperty;
16038
+ var __defProp$T = Object.defineProperty;
16025
16039
  var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
16026
16040
  var __hasOwnProp$B = Object.prototype.hasOwnProperty;
16027
16041
  var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
16028
- var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16042
+ var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16029
16043
  var __spreadValues$A = (a, b) => {
16030
16044
  for (var prop in b || (b = {}))
16031
16045
  if (__hasOwnProp$B.call(b, prop))
16032
- __defNormalProp$S(a, prop, b[prop]);
16046
+ __defNormalProp$T(a, prop, b[prop]);
16033
16047
  if (__getOwnPropSymbols$B)
16034
16048
  for (var prop of __getOwnPropSymbols$B(b)) {
16035
16049
  if (__propIsEnum$B.call(b, prop))
16036
- __defNormalProp$S(a, prop, b[prop]);
16050
+ __defNormalProp$T(a, prop, b[prop]);
16037
16051
  }
16038
16052
  return a;
16039
16053
  };
@@ -16157,26 +16171,26 @@ var NgwLeaflet = (function () {
16157
16171
  return newPaint;
16158
16172
  }
16159
16173
 
16160
- var __defProp$R = Object.defineProperty;
16161
- var __defProps$l = Object.defineProperties;
16162
- var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
16174
+ var __defProp$S = Object.defineProperty;
16175
+ var __defProps$m = Object.defineProperties;
16176
+ var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
16163
16177
  var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
16164
16178
  var __hasOwnProp$A = Object.prototype.hasOwnProperty;
16165
16179
  var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
16166
- var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16180
+ var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16167
16181
  var __spreadValues$z = (a, b) => {
16168
16182
  for (var prop in b || (b = {}))
16169
16183
  if (__hasOwnProp$A.call(b, prop))
16170
- __defNormalProp$R(a, prop, b[prop]);
16184
+ __defNormalProp$S(a, prop, b[prop]);
16171
16185
  if (__getOwnPropSymbols$A)
16172
16186
  for (var prop of __getOwnPropSymbols$A(b)) {
16173
16187
  if (__propIsEnum$A.call(b, prop))
16174
- __defNormalProp$R(a, prop, b[prop]);
16188
+ __defNormalProp$S(a, prop, b[prop]);
16175
16189
  }
16176
16190
  return a;
16177
16191
  };
16178
- var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
16179
- var __objRest$5 = (source, exclude) => {
16192
+ var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
16193
+ var __objRest$6 = (source, exclude) => {
16180
16194
  var target = {};
16181
16195
  for (var prop in source)
16182
16196
  if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -16188,10 +16202,10 @@ var NgwLeaflet = (function () {
16188
16202
  }
16189
16203
  return target;
16190
16204
  };
16191
- var __publicField$C = (obj, key, value) => __defNormalProp$R(obj, key + "" , value);
16205
+ var __publicField$D = (obj, key, value) => __defNormalProp$S(obj, key + "" , value);
16192
16206
  class GeoJsonPaint {
16193
16207
  constructor(layer) {
16194
- __publicField$C(this, "layer");
16208
+ __publicField$D(this, "layer");
16195
16209
  this.layer = layer;
16196
16210
  }
16197
16211
  setPaintEachLayer(paint) {
@@ -16259,7 +16273,7 @@ var NgwLeaflet = (function () {
16259
16273
  return PAINT;
16260
16274
  }
16261
16275
  _createDivIcon(icon) {
16262
- const _a = icon, { html, rotate, className } = _a, toLIconOpt = __objRest$5(_a, ["html", "rotate", "className"]);
16276
+ const _a = icon, { html, rotate, className } = _a, toLIconOpt = __objRest$6(_a, ["html", "rotate", "className"]);
16263
16277
  const element = document.createElement("div");
16264
16278
  if (className) {
16265
16279
  element.className = className;
@@ -16270,7 +16284,7 @@ var NgwLeaflet = (function () {
16270
16284
  if (html) {
16271
16285
  element.innerHTML = html;
16272
16286
  }
16273
- const divIcon = new leafletSrcExports.DivIcon(__spreadProps$l(__spreadValues$z({
16287
+ const divIcon = new leafletSrcExports.DivIcon(__spreadProps$m(__spreadValues$z({
16274
16288
  className: ""
16275
16289
  }, toLIconOpt), {
16276
16290
  html: element
@@ -16318,26 +16332,26 @@ var NgwLeaflet = (function () {
16318
16332
  }
16319
16333
  }
16320
16334
 
16321
- var __defProp$Q = Object.defineProperty;
16322
- var __defProps$k = Object.defineProperties;
16323
- var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
16335
+ var __defProp$R = Object.defineProperty;
16336
+ var __defProps$l = Object.defineProperties;
16337
+ var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
16324
16338
  var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
16325
16339
  var __hasOwnProp$z = Object.prototype.hasOwnProperty;
16326
16340
  var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
16327
- var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16341
+ var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16328
16342
  var __spreadValues$y = (a, b) => {
16329
16343
  for (var prop in b || (b = {}))
16330
16344
  if (__hasOwnProp$z.call(b, prop))
16331
- __defNormalProp$Q(a, prop, b[prop]);
16345
+ __defNormalProp$R(a, prop, b[prop]);
16332
16346
  if (__getOwnPropSymbols$z)
16333
16347
  for (var prop of __getOwnPropSymbols$z(b)) {
16334
16348
  if (__propIsEnum$z.call(b, prop))
16335
- __defNormalProp$Q(a, prop, b[prop]);
16349
+ __defNormalProp$R(a, prop, b[prop]);
16336
16350
  }
16337
16351
  return a;
16338
16352
  };
16339
- var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
16340
- var __publicField$B = (obj, key, value) => __defNormalProp$Q(obj, typeof key !== "symbol" ? key + "" : key, value);
16353
+ var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
16354
+ var __publicField$C = (obj, key, value) => __defNormalProp$R(obj, typeof key !== "symbol" ? key + "" : key, value);
16341
16355
  var __async$s = (__this, __arguments, generator) => {
16342
16356
  return new Promise((resolve, reject) => {
16343
16357
  var fulfilled = (value) => {
@@ -16361,22 +16375,22 @@ var NgwLeaflet = (function () {
16361
16375
  class GeoJsonAdapter extends BaseAdapter {
16362
16376
  constructor(map, options) {
16363
16377
  super(map, options);
16364
- __publicField$B(this, "layer");
16365
- __publicField$B(this, "selected", false);
16366
- __publicField$B(this, "type");
16367
- __publicField$B(this, "_layers", []);
16368
- __publicField$B(this, "_events");
16369
- __publicField$B(this, "paint");
16370
- __publicField$B(this, "selectedPaint");
16371
- __publicField$B(this, "_selectedLayers", []);
16372
- __publicField$B(this, "_filteredLayers", []);
16373
- __publicField$B(this, "_filterFun");
16374
- __publicField$B(this, "_openedPopup", []);
16375
- __publicField$B(this, "_paint");
16376
- __publicField$B(this, "$updateTooltip", debounce(() => {
16378
+ __publicField$C(this, "layer");
16379
+ __publicField$C(this, "selected", false);
16380
+ __publicField$C(this, "type");
16381
+ __publicField$C(this, "_layers", []);
16382
+ __publicField$C(this, "_events");
16383
+ __publicField$C(this, "paint");
16384
+ __publicField$C(this, "selectedPaint");
16385
+ __publicField$C(this, "_selectedLayers", []);
16386
+ __publicField$C(this, "_filteredLayers", []);
16387
+ __publicField$C(this, "_filterFun");
16388
+ __publicField$C(this, "_openedPopup", []);
16389
+ __publicField$C(this, "_paint");
16390
+ __publicField$C(this, "$updateTooltip", debounce(() => {
16377
16391
  this.updateTooltip();
16378
16392
  }, 300));
16379
- __publicField$B(this, "$unselect", () => {
16393
+ __publicField$C(this, "$unselect", () => {
16380
16394
  this.unselect();
16381
16395
  });
16382
16396
  this._events = new GeoJsonEvents(this);
@@ -16385,7 +16399,7 @@ var NgwLeaflet = (function () {
16385
16399
  addLayer(options) {
16386
16400
  Object.assign(this.options, options);
16387
16401
  this.paint = options.paint;
16388
- this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$k(__spreadValues$y({}, options.nativeOptions), {
16402
+ this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$l(__spreadValues$y({}, options.nativeOptions), {
16389
16403
  pane: this.pane
16390
16404
  }));
16391
16405
  this.selectedPaint = options.selectedPaint;
@@ -16735,7 +16749,7 @@ var NgwLeaflet = (function () {
16735
16749
  if (feature) {
16736
16750
  return this._paint.preparePaint(__spreadValues$y(__spreadValues$y({}, PAINT), paint(feature)));
16737
16751
  } else {
16738
- return this._paint.preparePaint(__spreadProps$k(__spreadValues$y({}, PAINT), { type: "path" }));
16752
+ return this._paint.preparePaint(__spreadProps$l(__spreadValues$y({}, PAINT), { type: "path" }));
16739
16753
  }
16740
16754
  }
16741
16755
  };
@@ -16929,20 +16943,20 @@ var NgwLeaflet = (function () {
16929
16943
  return [promise, abortFunc];
16930
16944
  }
16931
16945
 
16932
- var __defProp$P = Object.defineProperty;
16933
- var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16934
- var __publicField$A = (obj, key, value) => __defNormalProp$P(obj, typeof key !== "symbol" ? key + "" : key, value);
16946
+ var __defProp$Q = Object.defineProperty;
16947
+ var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16948
+ var __publicField$B = (obj, key, value) => __defNormalProp$Q(obj, typeof key !== "symbol" ? key + "" : key, value);
16935
16949
  class Queue {
16936
16950
  /**
16937
16951
  * @param {PromiseQueueOptions} options - Configuration options for the queue.
16938
16952
  */
16939
16953
  constructor({ concurrency = 1, delay = 0 } = {}) {
16940
- __publicField$A(this, "queue", []);
16941
- __publicField$A(this, "concurrency");
16942
- __publicField$A(this, "activeCount", 0);
16943
- __publicField$A(this, "timeoutId");
16944
- __publicField$A(this, "delay");
16945
- __publicField$A(this, "toAbort", []);
16954
+ __publicField$B(this, "queue", []);
16955
+ __publicField$B(this, "concurrency");
16956
+ __publicField$B(this, "activeCount", 0);
16957
+ __publicField$B(this, "timeoutId");
16958
+ __publicField$B(this, "delay");
16959
+ __publicField$B(this, "toAbort", []);
16946
16960
  this.concurrency = concurrency;
16947
16961
  this.delay = delay;
16948
16962
  }
@@ -17018,13 +17032,13 @@ var NgwLeaflet = (function () {
17018
17032
 
17019
17033
  const imageQueue = new Queue({ concurrency: 6, delay: 200 });
17020
17034
 
17021
- var __defProp$O = Object.defineProperty;
17022
- var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17023
- var __publicField$z = (obj, key, value) => __defNormalProp$O(obj, key + "" , value);
17035
+ var __defProp$P = Object.defineProperty;
17036
+ var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17037
+ var __publicField$A = (obj, key, value) => __defNormalProp$P(obj, key + "" , value);
17024
17038
  class ImageOverlay extends leafletSrcExports.ImageOverlay {
17025
17039
  constructor(imageUrl, bounds, options) {
17026
17040
  super(imageUrl, bounds, options);
17027
- __publicField$z(this, "_aborter");
17041
+ __publicField$A(this, "_aborter");
17028
17042
  }
17029
17043
  cancelLoad() {
17030
17044
  if (this._aborter) {
@@ -17053,13 +17067,14 @@ var NgwLeaflet = (function () {
17053
17067
  }
17054
17068
  }
17055
17069
 
17056
- var __defProp$N = Object.defineProperty;
17057
- var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17058
- var __publicField$y = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
17070
+ var __defProp$O = Object.defineProperty;
17071
+ var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17072
+ var __publicField$z = (obj, key, value) => __defNormalProp$O(obj, typeof key !== "symbol" ? key + "" : key, value);
17059
17073
  class ImageLayer extends leafletSrcExports.Layer {
17060
17074
  constructor(url, options) {
17075
+ var _a;
17061
17076
  super(options);
17062
- __publicField$y(this, "defaultWmsParams", {
17077
+ __publicField$z(this, "defaultWmsParams", {
17063
17078
  service: "WMS",
17064
17079
  request: "GetMap",
17065
17080
  version: "1.1.1",
@@ -17068,7 +17083,7 @@ var NgwLeaflet = (function () {
17068
17083
  format: "image/jpeg",
17069
17084
  transparent: false
17070
17085
  });
17071
- __publicField$y(this, "options", {
17086
+ __publicField$z(this, "options", {
17072
17087
  crs: null,
17073
17088
  uppercase: false,
17074
17089
  attribution: "",
@@ -17081,11 +17096,11 @@ var NgwLeaflet = (function () {
17081
17096
  viewPortBuffer: 0,
17082
17097
  setViewDelay: 100
17083
17098
  });
17084
- __publicField$y(this, "wmsParams");
17085
- __publicField$y(this, "_url");
17086
- __publicField$y(this, "_currentUrl");
17087
- __publicField$y(this, "_currentOverlay");
17088
- __publicField$y(this, "_loadedOverlay");
17099
+ __publicField$z(this, "wmsParams");
17100
+ __publicField$z(this, "_url");
17101
+ __publicField$z(this, "_currentUrl");
17102
+ __publicField$z(this, "_currentOverlay");
17103
+ __publicField$z(this, "_loadedOverlay");
17089
17104
  this._url = url;
17090
17105
  const params = {};
17091
17106
  const opts = {};
@@ -17098,7 +17113,11 @@ var NgwLeaflet = (function () {
17098
17113
  }
17099
17114
  }
17100
17115
  leafletSrcExports.Util.setOptions(this, opts);
17101
- this.wmsParams = leafletSrcExports.Util.extend({}, this.defaultWmsParams, params);
17116
+ this.wmsParams = leafletSrcExports.Util.extend(
17117
+ {},
17118
+ this.defaultWmsParams,
17119
+ (_a = params == null ? void 0 : params.params) != null ? _a : {}
17120
+ );
17102
17121
  }
17103
17122
  setParams(params) {
17104
17123
  leafletSrcExports.Util.extend(this.wmsParams, params);
@@ -17245,27 +17264,27 @@ var NgwLeaflet = (function () {
17245
17264
  }
17246
17265
  }
17247
17266
 
17248
- var __defProp$M = Object.defineProperty;
17267
+ var __defProp$N = Object.defineProperty;
17249
17268
  var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
17250
17269
  var __hasOwnProp$y = Object.prototype.hasOwnProperty;
17251
17270
  var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
17252
- var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17271
+ var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17253
17272
  var __spreadValues$x = (a, b) => {
17254
17273
  for (var prop in b || (b = {}))
17255
17274
  if (__hasOwnProp$y.call(b, prop))
17256
- __defNormalProp$M(a, prop, b[prop]);
17275
+ __defNormalProp$N(a, prop, b[prop]);
17257
17276
  if (__getOwnPropSymbols$y)
17258
17277
  for (var prop of __getOwnPropSymbols$y(b)) {
17259
17278
  if (__propIsEnum$y.call(b, prop))
17260
- __defNormalProp$M(a, prop, b[prop]);
17279
+ __defNormalProp$N(a, prop, b[prop]);
17261
17280
  }
17262
17281
  return a;
17263
17282
  };
17264
- var __publicField$x = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
17283
+ var __publicField$y = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
17265
17284
  class ImageAdapter extends BaseAdapter {
17266
17285
  constructor() {
17267
17286
  super(...arguments);
17268
- __publicField$x(this, "layer");
17287
+ __publicField$y(this, "layer");
17269
17288
  }
17270
17289
  addLayer(options) {
17271
17290
  const url = options && options.url;
@@ -17287,8 +17306,15 @@ var NgwLeaflet = (function () {
17287
17306
  return this.layer;
17288
17307
  }
17289
17308
  }
17309
+ updateLayer(options) {
17310
+ if (this.layer) {
17311
+ const params = (options == null ? void 0 : options.params) || {};
17312
+ leafletSrcExports.Util.extend(this.layer.wmsParams, params);
17313
+ this.layer.update();
17314
+ }
17315
+ }
17290
17316
  }
17291
- __publicField$x(ImageAdapter, "queue", imageQueue);
17317
+ __publicField$y(ImageAdapter, "queue", imageQueue);
17292
17318
 
17293
17319
  function makeRemote(Base) {
17294
17320
  return class RemoteTileLayer extends Base {
@@ -17350,26 +17376,26 @@ var NgwLeaflet = (function () {
17350
17376
  }
17351
17377
  const TileLayer = makeRemote(TileLayerBase);
17352
17378
 
17353
- var __defProp$L = Object.defineProperty;
17354
- var __defProps$j = Object.defineProperties;
17355
- var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
17379
+ var __defProp$M = Object.defineProperty;
17380
+ var __defProps$k = Object.defineProperties;
17381
+ var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
17356
17382
  var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
17357
17383
  var __hasOwnProp$x = Object.prototype.hasOwnProperty;
17358
17384
  var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
17359
- var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17385
+ var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17360
17386
  var __spreadValues$w = (a, b) => {
17361
17387
  for (var prop in b || (b = {}))
17362
17388
  if (__hasOwnProp$x.call(b, prop))
17363
- __defNormalProp$L(a, prop, b[prop]);
17389
+ __defNormalProp$M(a, prop, b[prop]);
17364
17390
  if (__getOwnPropSymbols$x)
17365
17391
  for (var prop of __getOwnPropSymbols$x(b)) {
17366
17392
  if (__propIsEnum$x.call(b, prop))
17367
- __defNormalProp$L(a, prop, b[prop]);
17393
+ __defNormalProp$M(a, prop, b[prop]);
17368
17394
  }
17369
17395
  return a;
17370
17396
  };
17371
- var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
17372
- var __objRest$4 = (source, exclude) => {
17397
+ var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
17398
+ var __objRest$5 = (source, exclude) => {
17373
17399
  var target = {};
17374
17400
  for (var prop in source)
17375
17401
  if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -17385,7 +17411,7 @@ var NgwLeaflet = (function () {
17385
17411
  addLayer(options) {
17386
17412
  this.options = Object.assign(this.options, options);
17387
17413
  if (options) {
17388
- const _a = options, { url } = _a, opt = __objRest$4(_a, ["url"]);
17414
+ const _a = options, { url } = _a, opt = __objRest$5(_a, ["url"]);
17389
17415
  if (url) {
17390
17416
  const tileLayerOptions = __spreadValues$w({
17391
17417
  pane: this.pane,
@@ -17398,7 +17424,7 @@ var NgwLeaflet = (function () {
17398
17424
  }
17399
17425
  let layer;
17400
17426
  if (opt.headers || opt.withCredentials) {
17401
- layer = new TileLayer(url, __spreadProps$j(__spreadValues$w({}, tileLayerOptions), {
17427
+ layer = new TileLayer(url, __spreadProps$k(__spreadValues$w({}, tileLayerOptions), {
17402
17428
  headers: opt.headers,
17403
17429
  withCredentials: opt.withCredentials,
17404
17430
  setViewDelay: opt.setViewDelay
@@ -17410,41 +17436,40 @@ var NgwLeaflet = (function () {
17410
17436
  }
17411
17437
  }
17412
17438
  }
17413
- updateLayer() {
17439
+ updateLayer(options) {
17414
17440
  if (this.layer) {
17415
17441
  const currentUrl = this.layer._url;
17416
- const timestamp = (/* @__PURE__ */ new Date()).getTime();
17417
- const separator = currentUrl.includes("?") ? "&" : "?";
17418
- const newUrl = currentUrl.replace(/(\?|&)timestamp=\d*/g, "") + separator + `timestamp=${timestamp}`;
17419
- this.layer.setUrl(newUrl);
17442
+ if (options == null ? void 0 : options.params) {
17443
+ this.layer.setUrl(updateUrlParams(currentUrl, options.params));
17444
+ }
17420
17445
  this.layer.redraw();
17421
17446
  }
17422
17447
  }
17423
17448
  }
17424
17449
 
17425
- var __defProp$K = Object.defineProperty;
17426
- var __defProps$i = Object.defineProperties;
17427
- var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
17450
+ var __defProp$L = Object.defineProperty;
17451
+ var __defProps$j = Object.defineProperties;
17452
+ var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
17428
17453
  var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
17429
17454
  var __hasOwnProp$w = Object.prototype.hasOwnProperty;
17430
17455
  var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
17431
- var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17456
+ var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17432
17457
  var __spreadValues$v = (a, b) => {
17433
17458
  for (var prop in b || (b = {}))
17434
17459
  if (__hasOwnProp$w.call(b, prop))
17435
- __defNormalProp$K(a, prop, b[prop]);
17460
+ __defNormalProp$L(a, prop, b[prop]);
17436
17461
  if (__getOwnPropSymbols$w)
17437
17462
  for (var prop of __getOwnPropSymbols$w(b)) {
17438
17463
  if (__propIsEnum$w.call(b, prop))
17439
- __defNormalProp$K(a, prop, b[prop]);
17464
+ __defNormalProp$L(a, prop, b[prop]);
17440
17465
  }
17441
17466
  return a;
17442
17467
  };
17443
- var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
17468
+ var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
17444
17469
  class OsmAdapter extends TileAdapter {
17445
17470
  addLayer(options) {
17446
17471
  const url = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
17447
- return super.addLayer(__spreadProps$i(__spreadValues$v({
17472
+ return super.addLayer(__spreadProps$j(__spreadValues$v({
17448
17473
  name: "OpenStreetMap",
17449
17474
  attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
17450
17475
  }, options), {
@@ -17460,26 +17485,26 @@ var NgwLeaflet = (function () {
17460
17485
  }
17461
17486
  const WmsLayer = makeRemote(WmsLayerBase);
17462
17487
 
17463
- var __defProp$J = Object.defineProperty;
17464
- var __defProps$h = Object.defineProperties;
17465
- var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
17488
+ var __defProp$K = Object.defineProperty;
17489
+ var __defProps$i = Object.defineProperties;
17490
+ var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
17466
17491
  var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
17467
17492
  var __hasOwnProp$v = Object.prototype.hasOwnProperty;
17468
17493
  var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
17469
- var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17494
+ var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17470
17495
  var __spreadValues$u = (a, b) => {
17471
17496
  for (var prop in b || (b = {}))
17472
17497
  if (__hasOwnProp$v.call(b, prop))
17473
- __defNormalProp$J(a, prop, b[prop]);
17498
+ __defNormalProp$K(a, prop, b[prop]);
17474
17499
  if (__getOwnPropSymbols$v)
17475
17500
  for (var prop of __getOwnPropSymbols$v(b)) {
17476
17501
  if (__propIsEnum$v.call(b, prop))
17477
- __defNormalProp$J(a, prop, b[prop]);
17502
+ __defNormalProp$K(a, prop, b[prop]);
17478
17503
  }
17479
17504
  return a;
17480
17505
  };
17481
- var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
17482
- var __objRest$3 = (source, exclude) => {
17506
+ var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
17507
+ var __objRest$4 = (source, exclude) => {
17483
17508
  var target = {};
17484
17509
  for (var prop in source)
17485
17510
  if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -17494,7 +17519,7 @@ var NgwLeaflet = (function () {
17494
17519
  class WmsAdapter extends BaseAdapter {
17495
17520
  addLayer(options) {
17496
17521
  Object.assign(this.options, options);
17497
- const _a = options, { url } = _a, opt = __objRest$3(_a, ["url"]);
17522
+ const _a = options, { url } = _a, opt = __objRest$4(_a, ["url"]);
17498
17523
  if (url) {
17499
17524
  const layerOptions = __spreadValues$u({
17500
17525
  pane: this.pane,
@@ -17507,7 +17532,7 @@ var NgwLeaflet = (function () {
17507
17532
  }, options.nativeOptions);
17508
17533
  let layer;
17509
17534
  if (opt.headers || opt.withCredentials) {
17510
- layer = new WmsLayer(url, __spreadProps$h(__spreadValues$u({}, layerOptions), {
17535
+ layer = new WmsLayer(url, __spreadProps$i(__spreadValues$u({}, layerOptions), {
17511
17536
  headers: opt.headers,
17512
17537
  withCredentials: opt.withCredentials
17513
17538
  }));
@@ -17527,33 +17552,33 @@ var NgwLeaflet = (function () {
17527
17552
  ];
17528
17553
  }
17529
17554
 
17530
- var __defProp$I = Object.defineProperty;
17555
+ var __defProp$J = Object.defineProperty;
17531
17556
  var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
17532
17557
  var __hasOwnProp$u = Object.prototype.hasOwnProperty;
17533
17558
  var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
17534
- var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17559
+ var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17535
17560
  var __spreadValues$t = (a, b) => {
17536
17561
  for (var prop in b || (b = {}))
17537
17562
  if (__hasOwnProp$u.call(b, prop))
17538
- __defNormalProp$I(a, prop, b[prop]);
17563
+ __defNormalProp$J(a, prop, b[prop]);
17539
17564
  if (__getOwnPropSymbols$u)
17540
17565
  for (var prop of __getOwnPropSymbols$u(b)) {
17541
17566
  if (__propIsEnum$u.call(b, prop))
17542
- __defNormalProp$I(a, prop, b[prop]);
17567
+ __defNormalProp$J(a, prop, b[prop]);
17543
17568
  }
17544
17569
  return a;
17545
17570
  };
17546
- var __publicField$w = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
17571
+ var __publicField$x = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
17547
17572
  const _LeafletMapAdapter = class _LeafletMapAdapter {
17548
17573
  constructor() {
17549
- __publicField$w(this, "options", { target: "map" });
17550
- __publicField$w(this, "layerAdapters", _LeafletMapAdapter.layerAdapters);
17551
- __publicField$w(this, "controlAdapters", _LeafletMapAdapter.controlAdapters);
17552
- __publicField$w(this, "emitter", new EventEmitter());
17553
- __publicField$w(this, "map");
17554
- __publicField$w(this, "_resizeObserver");
17555
- __publicField$w(this, "_unselectCb", []);
17556
- __publicField$w(this, "_universalEvents", [
17574
+ __publicField$x(this, "options", { target: "map" });
17575
+ __publicField$x(this, "layerAdapters", _LeafletMapAdapter.layerAdapters);
17576
+ __publicField$x(this, "controlAdapters", _LeafletMapAdapter.controlAdapters);
17577
+ __publicField$x(this, "emitter", new EventEmitter());
17578
+ __publicField$x(this, "map");
17579
+ __publicField$x(this, "_resizeObserver");
17580
+ __publicField$x(this, "_unselectCb", []);
17581
+ __publicField$x(this, "_universalEvents", [
17557
17582
  "move",
17558
17583
  "zoom",
17559
17584
  "zoomend",
@@ -17561,7 +17586,7 @@ var NgwLeaflet = (function () {
17561
17586
  "moveend",
17562
17587
  "movestart"
17563
17588
  ]);
17564
- __publicField$w(this, "_positionEvents", [
17589
+ __publicField$x(this, "_positionEvents", [
17565
17590
  "mousemove",
17566
17591
  "mouseout",
17567
17592
  "mouseover"
@@ -17861,7 +17886,7 @@ var NgwLeaflet = (function () {
17861
17886
  }
17862
17887
  }
17863
17888
  };
17864
- __publicField$w(_LeafletMapAdapter, "layerAdapters", {
17889
+ __publicField$x(_LeafletMapAdapter, "layerAdapters", {
17865
17890
  GEOJSON: GeoJsonAdapter,
17866
17891
  IMAGE: ImageAdapter,
17867
17892
  TILE: TileAdapter,
@@ -17869,11 +17894,11 @@ var NgwLeaflet = (function () {
17869
17894
  // // MVT: MvtAdapter,
17870
17895
  OSM: OsmAdapter
17871
17896
  });
17872
- __publicField$w(_LeafletMapAdapter, "controlAdapters", {
17897
+ __publicField$x(_LeafletMapAdapter, "controlAdapters", {
17873
17898
  ZOOM: leafletSrcExports.Control.Zoom,
17874
17899
  ATTRIBUTION: AttributionControl
17875
17900
  });
17876
- __publicField$w(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
17901
+ __publicField$x(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
17877
17902
  let LeafletMapAdapter = _LeafletMapAdapter;
17878
17903
 
17879
17904
  const svgPath = {
@@ -17948,12 +17973,12 @@ var NgwLeaflet = (function () {
17948
17973
  };
17949
17974
  }
17950
17975
 
17951
- var __defProp$H = Object.defineProperty;
17952
- var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17953
- var __publicField$v = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
17976
+ var __defProp$I = Object.defineProperty;
17977
+ var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17978
+ var __publicField$w = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
17954
17979
  const _Cache = class _Cache {
17955
17980
  constructor(options = {}) {
17956
- __publicField$v(this, "cache", []);
17981
+ __publicField$w(this, "cache", []);
17957
17982
  var _a;
17958
17983
  const namespace = (_a = options.namespace) != null ? _a : "default";
17959
17984
  if (_Cache.instance[namespace]) {
@@ -18059,12 +18084,12 @@ var NgwLeaflet = (function () {
18059
18084
  return objectDeepEqual(itemProps || {}, objectRemoveEmpty(props));
18060
18085
  }
18061
18086
  };
18062
- __publicField$v(_Cache, "instance", {});
18087
+ __publicField$w(_Cache, "instance", {});
18063
18088
  let Cache = _Cache;
18064
18089
 
18065
18090
  var pkg = {
18066
18091
  name: "@nextgis/ngw-connector",
18067
- version: "3.0.0-alpha.3",
18092
+ version: "3.0.0-alpha.4",
18068
18093
  _priority: 12,
18069
18094
  description: "A lightweight HTTP client optimized for use with NextGIS Web API",
18070
18095
  main: "index.js",
@@ -18073,9 +18098,9 @@ var NgwLeaflet = (function () {
18073
18098
  jsdelivr: "lib/ngw-connector.global.prod.js",
18074
18099
  types: "lib/index.d.ts",
18075
18100
  dependencies: {
18076
- "@nextgis/cache": "^3.0.0-alpha.3",
18101
+ "@nextgis/cache": "^3.0.0-alpha.4",
18077
18102
  "@nextgis/cancelable-promise": "^3.0.0-alpha.3",
18078
- "@nextgis/utils": "^3.0.0-alpha.3",
18103
+ "@nextgis/utils": "^3.0.0-alpha.4",
18079
18104
  "@types/events": "^3.0.0",
18080
18105
  events: "*",
18081
18106
  "form-data": "^4.0.0"
@@ -18118,33 +18143,33 @@ var NgwLeaflet = (function () {
18118
18143
  gitHead: "edc68033f914f6c95c4125b9738bba6d36e990b4"
18119
18144
  };
18120
18145
 
18121
- var __defProp$G = Object.defineProperty;
18122
- var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18123
- var __publicField$u = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
18146
+ var __defProp$H = Object.defineProperty;
18147
+ var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18148
+ var __publicField$v = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
18124
18149
  class NgwError extends Error {
18125
18150
  constructor(er) {
18126
18151
  super();
18127
- __publicField$u(this, "name", "NgwError");
18128
- __publicField$u(this, "title");
18129
- __publicField$u(this, "message");
18130
- __publicField$u(this, "detail");
18131
- __publicField$u(this, "exception");
18132
- __publicField$u(this, "status_code");
18133
- __publicField$u(this, "data");
18134
- __publicField$u(this, "guru_meditation");
18152
+ __publicField$v(this, "name", "NgwError");
18153
+ __publicField$v(this, "title");
18154
+ __publicField$v(this, "message");
18155
+ __publicField$v(this, "detail");
18156
+ __publicField$v(this, "exception");
18157
+ __publicField$v(this, "status_code");
18158
+ __publicField$v(this, "data");
18159
+ __publicField$v(this, "guru_meditation");
18135
18160
  Object.assign(this, er);
18136
18161
  Object.setPrototypeOf(this, NgwError.prototype);
18137
18162
  }
18138
18163
  }
18139
18164
 
18140
- var __defProp$F = Object.defineProperty;
18141
- var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18142
- var __publicField$t = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
18165
+ var __defProp$G = Object.defineProperty;
18166
+ var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18167
+ var __publicField$u = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
18143
18168
  class ResourceNotFoundError extends NgwError {
18144
18169
  constructor(obj) {
18145
18170
  super(obj);
18146
- __publicField$t(this, "name", "ResourceNotFoundError");
18147
- __publicField$t(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
18171
+ __publicField$u(this, "name", "ResourceNotFoundError");
18172
+ __publicField$u(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
18148
18173
  Object.setPrototypeOf(this, ResourceNotFoundError.prototype);
18149
18174
  }
18150
18175
  }
@@ -18178,23 +18203,23 @@ var NgwLeaflet = (function () {
18178
18203
  return query;
18179
18204
  }
18180
18205
 
18181
- var __defProp$E = Object.defineProperty;
18206
+ var __defProp$F = Object.defineProperty;
18182
18207
  var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
18183
18208
  var __hasOwnProp$t = Object.prototype.hasOwnProperty;
18184
18209
  var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
18185
- var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18210
+ var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18186
18211
  var __spreadValues$s = (a, b) => {
18187
18212
  for (var prop in b || (b = {}))
18188
18213
  if (__hasOwnProp$t.call(b, prop))
18189
- __defNormalProp$E(a, prop, b[prop]);
18214
+ __defNormalProp$F(a, prop, b[prop]);
18190
18215
  if (__getOwnPropSymbols$t)
18191
18216
  for (var prop of __getOwnPropSymbols$t(b)) {
18192
18217
  if (__propIsEnum$t.call(b, prop))
18193
- __defNormalProp$E(a, prop, b[prop]);
18218
+ __defNormalProp$F(a, prop, b[prop]);
18194
18219
  }
18195
18220
  return a;
18196
18221
  };
18197
- var __publicField$s = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
18222
+ var __publicField$t = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
18198
18223
  var __async$r = (__this, __arguments, generator) => {
18199
18224
  return new Promise((resolve, reject) => {
18200
18225
  var fulfilled = (value) => {
@@ -18220,8 +18245,8 @@ var NgwLeaflet = (function () {
18220
18245
  connector,
18221
18246
  cacheId
18222
18247
  }) {
18223
- __publicField$s(this, "cache");
18224
- __publicField$s(this, "connector");
18248
+ __publicField$t(this, "cache");
18249
+ __publicField$t(this, "connector");
18225
18250
  this.connector = connector;
18226
18251
  this.cache = new Cache({ namespace: cacheId });
18227
18252
  }
@@ -18474,14 +18499,14 @@ var NgwLeaflet = (function () {
18474
18499
  }
18475
18500
  }
18476
18501
 
18477
- var __defProp$D = Object.defineProperty;
18478
- var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18479
- var __publicField$r = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
18502
+ var __defProp$E = Object.defineProperty;
18503
+ var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18504
+ var __publicField$s = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
18480
18505
  class InsufficientPermissionsError extends NgwError {
18481
18506
  constructor(obj) {
18482
18507
  super(obj);
18483
- __publicField$r(this, "name", "InsufficientPermissionsError");
18484
- __publicField$r(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
18508
+ __publicField$s(this, "name", "InsufficientPermissionsError");
18509
+ __publicField$s(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
18485
18510
  Object.setPrototypeOf(this, InsufficientPermissionsError.prototype);
18486
18511
  }
18487
18512
  }
@@ -18499,19 +18524,19 @@ var NgwLeaflet = (function () {
18499
18524
  });
18500
18525
  }
18501
18526
 
18502
- var __defProp$C = Object.defineProperty;
18527
+ var __defProp$D = Object.defineProperty;
18503
18528
  var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
18504
18529
  var __hasOwnProp$s = Object.prototype.hasOwnProperty;
18505
18530
  var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
18506
- var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18531
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18507
18532
  var __spreadValues$r = (a, b) => {
18508
18533
  for (var prop in b || (b = {}))
18509
18534
  if (__hasOwnProp$s.call(b, prop))
18510
- __defNormalProp$C(a, prop, b[prop]);
18535
+ __defNormalProp$D(a, prop, b[prop]);
18511
18536
  if (__getOwnPropSymbols$s)
18512
18537
  for (var prop of __getOwnPropSymbols$s(b)) {
18513
18538
  if (__propIsEnum$s.call(b, prop))
18514
- __defNormalProp$C(a, prop, b[prop]);
18539
+ __defNormalProp$D(a, prop, b[prop]);
18515
18540
  }
18516
18541
  return a;
18517
18542
  };
@@ -18586,13 +18611,13 @@ var NgwLeaflet = (function () {
18586
18611
  });
18587
18612
  }
18588
18613
 
18589
- var __defProp$B = Object.defineProperty;
18590
- var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18591
- var __publicField$q = (obj, key, value) => __defNormalProp$B(obj, key + "" , value);
18614
+ var __defProp$C = Object.defineProperty;
18615
+ var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18616
+ var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, key + "" , value);
18592
18617
  class NetworkError extends Error {
18593
18618
  constructor(url) {
18594
18619
  super();
18595
- __publicField$q(this, "name", "NetworkError");
18620
+ __publicField$r(this, "name", "NetworkError");
18596
18621
  Object.setPrototypeOf(this, NetworkError.prototype);
18597
18622
  this.message = `Unable to request ${url}.
18598
18623
  Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`;
@@ -18681,26 +18706,26 @@ var NgwLeaflet = (function () {
18681
18706
  };
18682
18707
  }
18683
18708
 
18684
- var __defProp$A = Object.defineProperty;
18685
- var __defProps$g = Object.defineProperties;
18686
- var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
18709
+ var __defProp$B = Object.defineProperty;
18710
+ var __defProps$h = Object.defineProperties;
18711
+ var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
18687
18712
  var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
18688
18713
  var __hasOwnProp$r = Object.prototype.hasOwnProperty;
18689
18714
  var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
18690
- var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18715
+ var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18691
18716
  var __spreadValues$q = (a, b) => {
18692
18717
  for (var prop in b || (b = {}))
18693
18718
  if (__hasOwnProp$r.call(b, prop))
18694
- __defNormalProp$A(a, prop, b[prop]);
18719
+ __defNormalProp$B(a, prop, b[prop]);
18695
18720
  if (__getOwnPropSymbols$r)
18696
18721
  for (var prop of __getOwnPropSymbols$r(b)) {
18697
18722
  if (__propIsEnum$r.call(b, prop))
18698
- __defNormalProp$A(a, prop, b[prop]);
18723
+ __defNormalProp$B(a, prop, b[prop]);
18699
18724
  }
18700
18725
  return a;
18701
18726
  };
18702
- var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
18703
- var __objRest$2 = (source, exclude) => {
18727
+ var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
18728
+ var __objRest$3 = (source, exclude) => {
18704
18729
  var target = {};
18705
18730
  for (var prop in source)
18706
18731
  if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -18712,7 +18737,7 @@ var NgwLeaflet = (function () {
18712
18737
  }
18713
18738
  return target;
18714
18739
  };
18715
- var __publicField$p = (obj, key, value) => __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
18740
+ var __publicField$q = (obj, key, value) => __defNormalProp$B(obj, typeof key !== "symbol" ? key + "" : key, value);
18716
18741
  var __async$p = (__this, __arguments, generator) => {
18717
18742
  return new Promise((resolve, reject) => {
18718
18743
  var fulfilled = (value) => {
@@ -18738,16 +18763,16 @@ var NgwLeaflet = (function () {
18738
18763
  class NgwConnector {
18739
18764
  constructor(options) {
18740
18765
  this.options = options;
18741
- __publicField$p(this, "id", ID$2++);
18742
- __publicField$p(this, "emitter", new EventEmitter());
18743
- __publicField$p(this, "user");
18744
- __publicField$p(this, "resources");
18745
- __publicField$p(this, "cache");
18746
- __publicField$p(this, "withCredentials");
18747
- __publicField$p(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
18748
- __publicField$p(this, "routeStr", "/api/component/pyramid/route");
18749
- __publicField$p(this, "activeRequests", {});
18750
- __publicField$p(this, "requestTransform");
18766
+ __publicField$q(this, "id", ID$2++);
18767
+ __publicField$q(this, "emitter", new EventEmitter());
18768
+ __publicField$q(this, "user");
18769
+ __publicField$q(this, "resources");
18770
+ __publicField$q(this, "cache");
18771
+ __publicField$q(this, "withCredentials");
18772
+ __publicField$q(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
18773
+ __publicField$q(this, "routeStr", "/api/component/pyramid/route");
18774
+ __publicField$q(this, "activeRequests", {});
18775
+ __publicField$q(this, "requestTransform");
18751
18776
  const exist = findConnector(options);
18752
18777
  this.cache = new Cache({ namespace: options.cacheId });
18753
18778
  if (exist) {
@@ -19031,7 +19056,7 @@ var NgwLeaflet = (function () {
19031
19056
  throw new Error("Empty `url` not allowed");
19032
19057
  }
19033
19058
  if (params) {
19034
- const _a = params, restParams = __objRest$2(_a, ["paramList"]);
19059
+ const _a = params, restParams = __objRest$3(_a, ["paramList"]);
19035
19060
  url = template(url, restParams);
19036
19061
  }
19037
19062
  url = encodeURI(fixUrlStr(url));
@@ -19067,7 +19092,7 @@ var NgwLeaflet = (function () {
19067
19092
  }
19068
19093
  });
19069
19094
  if (cache && method === "GET") {
19070
- const cacheOptions = cacheProps ? cacheProps : __spreadProps$g(__spreadValues$q({}, objectRemoveEmpty({
19095
+ const cacheOptions = cacheProps ? cacheProps : __spreadProps$h(__spreadValues$q({}, objectRemoveEmpty({
19071
19096
  headers,
19072
19097
  withCredentials,
19073
19098
  responseType,
@@ -19229,30 +19254,30 @@ var NgwLeaflet = (function () {
19229
19254
  return er;
19230
19255
  }
19231
19256
  }
19232
- __publicField$p(NgwConnector, "errors", {
19257
+ __publicField$q(NgwConnector, "errors", {
19233
19258
  NgwError,
19234
19259
  ResourceNotFoundError
19235
19260
  });
19236
19261
 
19237
- var __defProp$z = Object.defineProperty;
19238
- var __defProps$f = Object.defineProperties;
19239
- var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
19262
+ var __defProp$A = Object.defineProperty;
19263
+ var __defProps$g = Object.defineProperties;
19264
+ var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
19240
19265
  var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
19241
19266
  var __hasOwnProp$q = Object.prototype.hasOwnProperty;
19242
19267
  var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
19243
- var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19268
+ var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19244
19269
  var __spreadValues$p = (a, b) => {
19245
19270
  for (var prop in b || (b = {}))
19246
19271
  if (__hasOwnProp$q.call(b, prop))
19247
- __defNormalProp$z(a, prop, b[prop]);
19272
+ __defNormalProp$A(a, prop, b[prop]);
19248
19273
  if (__getOwnPropSymbols$q)
19249
19274
  for (var prop of __getOwnPropSymbols$q(b)) {
19250
19275
  if (__propIsEnum$q.call(b, prop))
19251
- __defNormalProp$z(a, prop, b[prop]);
19276
+ __defNormalProp$A(a, prop, b[prop]);
19252
19277
  }
19253
19278
  return a;
19254
19279
  };
19255
- var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
19280
+ var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
19256
19281
  var __async$o = (__this, __arguments, generator) => {
19257
19282
  return new Promise((resolve, reject) => {
19258
19283
  var fulfilled = (value) => {
@@ -19357,13 +19382,13 @@ var NgwLeaflet = (function () {
19357
19382
  for (const f of filters_) {
19358
19383
  if (isPropertyFilter(f)) {
19359
19384
  _queries.push(
19360
- fetchNgwLayerItemsRequest(__spreadProps$f(__spreadValues$p({}, opt), {
19385
+ fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$p({}, opt), {
19361
19386
  paramList: [..._parentAllParams, ...paramList, createParam(f)]
19362
19387
  }))
19363
19388
  );
19364
19389
  } else {
19365
19390
  getQueries(
19366
- __spreadProps$f(__spreadValues$p({}, opt), {
19391
+ __spreadProps$g(__spreadValues$p({}, opt), {
19367
19392
  filters: f
19368
19393
  }),
19369
19394
  _queries,
@@ -19384,7 +19409,7 @@ var NgwLeaflet = (function () {
19384
19409
  if (propertiesFilterList.length) {
19385
19410
  for (const x of propertiesFilterList) {
19386
19411
  getQueries(
19387
- __spreadProps$f(__spreadValues$p({}, opt), {
19412
+ __spreadProps$g(__spreadValues$p({}, opt), {
19388
19413
  filters: x
19389
19414
  }),
19390
19415
  _queries,
@@ -19393,7 +19418,7 @@ var NgwLeaflet = (function () {
19393
19418
  }
19394
19419
  } else {
19395
19420
  _queries.push(
19396
- fetchNgwLayerItemsRequest(__spreadProps$f(__spreadValues$p({}, opt), {
19421
+ fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$p({}, opt), {
19397
19422
  paramList: [..._parentAllParams, ...paramList, ...filters2]
19398
19423
  }))
19399
19424
  );
@@ -19458,25 +19483,25 @@ var NgwLeaflet = (function () {
19458
19483
  );
19459
19484
  }
19460
19485
 
19461
- var __defProp$y = Object.defineProperty;
19462
- var __defProps$e = Object.defineProperties;
19463
- var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
19486
+ var __defProp$z = Object.defineProperty;
19487
+ var __defProps$f = Object.defineProperties;
19488
+ var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
19464
19489
  var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
19465
19490
  var __hasOwnProp$p = Object.prototype.hasOwnProperty;
19466
19491
  var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
19467
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19492
+ var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19468
19493
  var __spreadValues$o = (a, b) => {
19469
19494
  for (var prop in b || (b = {}))
19470
19495
  if (__hasOwnProp$p.call(b, prop))
19471
- __defNormalProp$y(a, prop, b[prop]);
19496
+ __defNormalProp$z(a, prop, b[prop]);
19472
19497
  if (__getOwnPropSymbols$p)
19473
19498
  for (var prop of __getOwnPropSymbols$p(b)) {
19474
19499
  if (__propIsEnum$p.call(b, prop))
19475
- __defNormalProp$y(a, prop, b[prop]);
19500
+ __defNormalProp$z(a, prop, b[prop]);
19476
19501
  }
19477
19502
  return a;
19478
19503
  };
19479
- var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
19504
+ var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
19480
19505
  var __async$n = (__this, __arguments, generator) => {
19481
19506
  return new Promise((resolve, reject) => {
19482
19507
  var fulfilled = (value) => {
@@ -19514,45 +19539,45 @@ var NgwLeaflet = (function () {
19514
19539
  if (resp.geom) {
19515
19540
  return createGeoJsonFeature(resp);
19516
19541
  } else {
19517
- const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$e(__spreadValues$o({}, options), {
19542
+ const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$f(__spreadValues$o({}, options), {
19518
19543
  geom: true,
19519
19544
  fields: null,
19520
19545
  extensions: null
19521
19546
  }));
19522
19547
  const geom = onlyGeomItem.geom;
19523
- return createGeoJsonFeature(__spreadProps$e(__spreadValues$o({}, resp), { geom }));
19548
+ return createGeoJsonFeature(__spreadProps$f(__spreadValues$o({}, resp), { geom }));
19524
19549
  }
19525
19550
  });
19526
- return __spreadProps$e(__spreadValues$o({}, resp), {
19551
+ return __spreadProps$f(__spreadValues$o({}, resp), {
19527
19552
  toGeojson
19528
19553
  });
19529
19554
  });
19530
19555
  }
19531
19556
 
19532
- var __defProp$x = Object.defineProperty;
19557
+ var __defProp$y = Object.defineProperty;
19533
19558
  var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
19534
19559
  var __hasOwnProp$o = Object.prototype.hasOwnProperty;
19535
19560
  var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
19536
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19561
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19537
19562
  var __spreadValues$n = (a, b) => {
19538
19563
  for (var prop in b || (b = {}))
19539
19564
  if (__hasOwnProp$o.call(b, prop))
19540
- __defNormalProp$x(a, prop, b[prop]);
19565
+ __defNormalProp$y(a, prop, b[prop]);
19541
19566
  if (__getOwnPropSymbols$o)
19542
19567
  for (var prop of __getOwnPropSymbols$o(b)) {
19543
19568
  if (__propIsEnum$o.call(b, prop))
19544
- __defNormalProp$x(a, prop, b[prop]);
19569
+ __defNormalProp$y(a, prop, b[prop]);
19545
19570
  }
19546
19571
  return a;
19547
19572
  };
19548
- var __publicField$o = (obj, key, value) => __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
19573
+ var __publicField$p = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
19549
19574
  class BookmarkItem {
19550
19575
  constructor(options) {
19551
19576
  this.options = options;
19552
- __publicField$o(this, "name");
19553
- __publicField$o(this, "resourceId");
19554
- __publicField$o(this, "item");
19555
- __publicField$o(this, "_extent");
19577
+ __publicField$p(this, "name");
19578
+ __publicField$p(this, "resourceId");
19579
+ __publicField$p(this, "item");
19580
+ __publicField$p(this, "_extent");
19556
19581
  this.resourceId = options.resourceId;
19557
19582
  const item = options.item;
19558
19583
  this.item = item;
@@ -19698,14 +19723,14 @@ var NgwLeaflet = (function () {
19698
19723
  return true;
19699
19724
  }
19700
19725
 
19701
- var __defProp$w = Object.defineProperty;
19702
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19703
- var __publicField$n = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
19704
- class TreeHelper {
19705
- constructor(item) {
19706
- __publicField$n(this, "item");
19707
- __publicField$n(this, "_children", []);
19708
- __publicField$n(this, "_parent");
19726
+ var __defProp$x = Object.defineProperty;
19727
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19728
+ var __publicField$o = (obj, key, value) => __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
19729
+ class TreeHelper {
19730
+ constructor(item) {
19731
+ __publicField$o(this, "item");
19732
+ __publicField$o(this, "_children", []);
19733
+ __publicField$o(this, "_parent");
19709
19734
  this.item = item;
19710
19735
  }
19711
19736
  setParent(parent) {
@@ -19768,19 +19793,19 @@ var NgwLeaflet = (function () {
19768
19793
  }
19769
19794
  }
19770
19795
 
19771
- var __defProp$v = Object.defineProperty;
19772
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19773
- var __publicField$m = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
19796
+ var __defProp$w = Object.defineProperty;
19797
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19798
+ var __publicField$n = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
19774
19799
  class BaseProperty {
19775
19800
  constructor(name, item, options) {
19776
- __publicField$m(this, "options");
19777
- __publicField$m(this, "emitter", new EventEmitter());
19778
- __publicField$m(this, "name");
19779
- __publicField$m(this, "item");
19780
- __publicField$m(this, "_blocked", false);
19781
- __publicField$m(this, "_container");
19782
- __publicField$m(this, "_value");
19783
- __publicField$m(this, "_removeEventsListener");
19801
+ __publicField$n(this, "options");
19802
+ __publicField$n(this, "emitter", new EventEmitter());
19803
+ __publicField$n(this, "name");
19804
+ __publicField$n(this, "item");
19805
+ __publicField$n(this, "_blocked", false);
19806
+ __publicField$n(this, "_container");
19807
+ __publicField$n(this, "_value");
19808
+ __publicField$n(this, "_removeEventsListener");
19784
19809
  this.item = item;
19785
19810
  this.options = Object.assign({}, options);
19786
19811
  this.name = name;
@@ -19877,23 +19902,23 @@ var NgwLeaflet = (function () {
19877
19902
  }
19878
19903
  }
19879
19904
 
19880
- var __defProp$u = Object.defineProperty;
19905
+ var __defProp$v = Object.defineProperty;
19881
19906
  var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
19882
19907
  var __hasOwnProp$n = Object.prototype.hasOwnProperty;
19883
19908
  var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
19884
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19909
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19885
19910
  var __spreadValues$m = (a, b) => {
19886
19911
  for (var prop in b || (b = {}))
19887
19912
  if (__hasOwnProp$n.call(b, prop))
19888
- __defNormalProp$u(a, prop, b[prop]);
19913
+ __defNormalProp$v(a, prop, b[prop]);
19889
19914
  if (__getOwnPropSymbols$n)
19890
19915
  for (var prop of __getOwnPropSymbols$n(b)) {
19891
19916
  if (__propIsEnum$n.call(b, prop))
19892
- __defNormalProp$u(a, prop, b[prop]);
19917
+ __defNormalProp$v(a, prop, b[prop]);
19893
19918
  }
19894
19919
  return a;
19895
19920
  };
19896
- var __publicField$l = (obj, key, value) => __defNormalProp$u(obj, key + "" , value);
19921
+ var __publicField$m = (obj, key, value) => __defNormalProp$v(obj, key + "" , value);
19897
19922
  const _CheckProperty = class _CheckProperty extends BaseProperty {
19898
19923
  constructor(name, item, options) {
19899
19924
  super(name, item, __spreadValues$m(__spreadValues$m({}, _CheckProperty.options), options));
@@ -20001,7 +20026,7 @@ var NgwLeaflet = (function () {
20001
20026
  }
20002
20027
  }
20003
20028
  };
20004
- __publicField$l(_CheckProperty, "options", {
20029
+ __publicField$m(_CheckProperty, "options", {
20005
20030
  hierarchy: true,
20006
20031
  bubble: false,
20007
20032
  propagation: false,
@@ -20010,31 +20035,31 @@ var NgwLeaflet = (function () {
20010
20035
  });
20011
20036
  let CheckProperty = _CheckProperty;
20012
20037
 
20013
- var __defProp$t = Object.defineProperty;
20038
+ var __defProp$u = Object.defineProperty;
20014
20039
  var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
20015
20040
  var __hasOwnProp$m = Object.prototype.hasOwnProperty;
20016
20041
  var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
20017
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20042
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20018
20043
  var __spreadValues$l = (a, b) => {
20019
20044
  for (var prop in b || (b = {}))
20020
20045
  if (__hasOwnProp$m.call(b, prop))
20021
- __defNormalProp$t(a, prop, b[prop]);
20046
+ __defNormalProp$u(a, prop, b[prop]);
20022
20047
  if (__getOwnPropSymbols$m)
20023
20048
  for (var prop of __getOwnPropSymbols$m(b)) {
20024
20049
  if (__propIsEnum$m.call(b, prop))
20025
- __defNormalProp$t(a, prop, b[prop]);
20050
+ __defNormalProp$u(a, prop, b[prop]);
20026
20051
  }
20027
20052
  return a;
20028
20053
  };
20029
- var __publicField$k = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
20054
+ var __publicField$l = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
20030
20055
  const BOOLEAN_TYPE = "boolean";
20031
20056
  const STRING_TYPE = "string";
20032
20057
  const _ItemProperties = class _ItemProperties {
20033
20058
  constructor(item, propertiesList) {
20034
20059
  this.item = item;
20035
- __publicField$k(this, "options", {});
20036
- __publicField$k(this, "_properties", {});
20037
- __publicField$k(this, "_propertiesList", []);
20060
+ __publicField$l(this, "options", {});
20061
+ __publicField$l(this, "_properties", {});
20062
+ __publicField$l(this, "_propertiesList", []);
20038
20063
  if (propertiesList) {
20039
20064
  propertiesList.forEach(this._setPropertyHandler.bind(this));
20040
20065
  }
@@ -20097,35 +20122,35 @@ var NgwLeaflet = (function () {
20097
20122
  return Handler;
20098
20123
  }
20099
20124
  };
20100
- __publicField$k(_ItemProperties, "handlers", {
20125
+ __publicField$l(_ItemProperties, "handlers", {
20101
20126
  CheckProperty
20102
20127
  });
20103
20128
  let ItemProperties = _ItemProperties;
20104
20129
 
20105
- var __defProp$s = Object.defineProperty;
20130
+ var __defProp$t = Object.defineProperty;
20106
20131
  var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
20107
20132
  var __hasOwnProp$l = Object.prototype.hasOwnProperty;
20108
20133
  var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
20109
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20134
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20110
20135
  var __spreadValues$k = (a, b) => {
20111
20136
  for (var prop in b || (b = {}))
20112
20137
  if (__hasOwnProp$l.call(b, prop))
20113
- __defNormalProp$s(a, prop, b[prop]);
20138
+ __defNormalProp$t(a, prop, b[prop]);
20114
20139
  if (__getOwnPropSymbols$l)
20115
20140
  for (var prop of __getOwnPropSymbols$l(b)) {
20116
20141
  if (__propIsEnum$l.call(b, prop))
20117
- __defNormalProp$s(a, prop, b[prop]);
20142
+ __defNormalProp$t(a, prop, b[prop]);
20118
20143
  }
20119
20144
  return a;
20120
20145
  };
20121
- var __publicField$j = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
20146
+ var __publicField$k = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
20122
20147
  let ID$1 = 0;
20123
20148
  class Item {
20124
20149
  constructor(options) {
20125
- __publicField$j(this, "options", {});
20126
- __publicField$j(this, "properties");
20127
- __publicField$j(this, "tree");
20128
- __publicField$j(this, "id", ID$1);
20150
+ __publicField$k(this, "options", {});
20151
+ __publicField$k(this, "properties");
20152
+ __publicField$k(this, "tree");
20153
+ __publicField$k(this, "id", ID$1);
20129
20154
  ID$1 += 1;
20130
20155
  this.options = __spreadValues$k({}, options);
20131
20156
  this.tree = new TreeHelper(this);
@@ -20179,25 +20204,25 @@ var NgwLeaflet = (function () {
20179
20204
  }
20180
20205
  }
20181
20206
 
20182
- var __defProp$r = Object.defineProperty;
20183
- var __defProps$d = Object.defineProperties;
20184
- var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
20207
+ var __defProp$s = Object.defineProperty;
20208
+ var __defProps$e = Object.defineProperties;
20209
+ var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
20185
20210
  var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
20186
20211
  var __hasOwnProp$k = Object.prototype.hasOwnProperty;
20187
20212
  var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
20188
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20213
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20189
20214
  var __spreadValues$j = (a, b) => {
20190
20215
  for (var prop in b || (b = {}))
20191
20216
  if (__hasOwnProp$k.call(b, prop))
20192
- __defNormalProp$r(a, prop, b[prop]);
20217
+ __defNormalProp$s(a, prop, b[prop]);
20193
20218
  if (__getOwnPropSymbols$k)
20194
20219
  for (var prop of __getOwnPropSymbols$k(b)) {
20195
20220
  if (__propIsEnum$k.call(b, prop))
20196
- __defNormalProp$r(a, prop, b[prop]);
20221
+ __defNormalProp$s(a, prop, b[prop]);
20197
20222
  }
20198
20223
  return a;
20199
20224
  };
20200
- var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
20225
+ var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
20201
20226
  function getNgwWebmapExtent(webmap) {
20202
20227
  const bottom = webmap["extent_bottom"];
20203
20228
  const left = webmap["extent_left"];
@@ -20265,14 +20290,14 @@ var NgwLeaflet = (function () {
20265
20290
  if (resource.cls && resource.cls.indexOf("style") !== -1) {
20266
20291
  return connector.getResource(resource.parent.id, options).then((res) => {
20267
20292
  if (res) {
20268
- return fetchNgwLayerExtent(__spreadProps$d(__spreadValues$j({}, options), {
20293
+ return fetchNgwLayerExtent(__spreadProps$e(__spreadValues$j({}, options), {
20269
20294
  resourceId: res.resource.id,
20270
20295
  connector
20271
20296
  }));
20272
20297
  }
20273
20298
  });
20274
20299
  } else {
20275
- return fetchNgwLayerExtent(__spreadProps$d(__spreadValues$j({}, options), {
20300
+ return fetchNgwLayerExtent(__spreadProps$e(__spreadValues$j({}, options), {
20276
20301
  resourceId: resource.id,
20277
20302
  connector
20278
20303
  }));
@@ -20280,9 +20305,9 @@ var NgwLeaflet = (function () {
20280
20305
  }
20281
20306
  }
20282
20307
 
20283
- var __defProp$q = Object.defineProperty;
20284
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20285
- var __publicField$i = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
20308
+ var __defProp$r = Object.defineProperty;
20309
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20310
+ var __publicField$j = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
20286
20311
  var __async$m = (__this, __arguments, generator) => {
20287
20312
  return new Promise((resolve, reject) => {
20288
20313
  var fulfilled = (value) => {
@@ -20305,9 +20330,9 @@ var NgwLeaflet = (function () {
20305
20330
  };
20306
20331
  class NgwResource {
20307
20332
  constructor() {
20308
- __publicField$i(this, "item");
20309
- __publicField$i(this, "connector");
20310
- __publicField$i(this, "_extent");
20333
+ __publicField$j(this, "item");
20334
+ __publicField$j(this, "connector");
20335
+ __publicField$j(this, "_extent");
20311
20336
  }
20312
20337
  /** @deprecated use {@link NgwResource.getBounds} instead */
20313
20338
  getExtent() {
@@ -20426,23 +20451,23 @@ var NgwLeaflet = (function () {
20426
20451
  };
20427
20452
  }
20428
20453
 
20429
- var __defProp$p = Object.defineProperty;
20454
+ var __defProp$q = Object.defineProperty;
20430
20455
  var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
20431
20456
  var __hasOwnProp$j = Object.prototype.hasOwnProperty;
20432
20457
  var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
20433
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20458
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20434
20459
  var __spreadValues$i = (a, b) => {
20435
20460
  for (var prop in b || (b = {}))
20436
20461
  if (__hasOwnProp$j.call(b, prop))
20437
- __defNormalProp$p(a, prop, b[prop]);
20462
+ __defNormalProp$q(a, prop, b[prop]);
20438
20463
  if (__getOwnPropSymbols$j)
20439
20464
  for (var prop of __getOwnPropSymbols$j(b)) {
20440
20465
  if (__propIsEnum$j.call(b, prop))
20441
- __defNormalProp$p(a, prop, b[prop]);
20466
+ __defNormalProp$q(a, prop, b[prop]);
20442
20467
  }
20443
20468
  return a;
20444
20469
  };
20445
- var __objRest$1 = (source, exclude) => {
20470
+ var __objRest$2 = (source, exclude) => {
20446
20471
  var target = {};
20447
20472
  for (var prop in source)
20448
20473
  if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -20454,7 +20479,7 @@ var NgwLeaflet = (function () {
20454
20479
  }
20455
20480
  return target;
20456
20481
  };
20457
- var __publicField$h = (obj, key, value) => __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
20482
+ var __publicField$i = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
20458
20483
  var __async$k = (__this, __arguments, generator) => {
20459
20484
  return new Promise((resolve, reject) => {
20460
20485
  var fulfilled = (value) => {
@@ -20475,11 +20500,11 @@ var NgwLeaflet = (function () {
20475
20500
  step((generator = generator.apply(__this, __arguments)).next());
20476
20501
  });
20477
20502
  };
20478
- const URL = "https://qms.nextgis.com";
20479
- function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
20503
+ const URL$1 = "https://qms.nextgis.com";
20504
+ function createQmsAdapter(webMapOrOptions, url = URL$1, createOpt = {}) {
20480
20505
  let webMap;
20481
20506
  if ("webMap" in webMapOrOptions) {
20482
- const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$1(_a, ["webMap", "url"]);
20507
+ const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$2(_a, ["webMap", "url"]);
20483
20508
  webMap = webMap_;
20484
20509
  if (url_) {
20485
20510
  url = url_;
@@ -20491,13 +20516,13 @@ var NgwLeaflet = (function () {
20491
20516
  webMap = webMapOrOptions;
20492
20517
  }
20493
20518
  if (!url) {
20494
- url = URL;
20519
+ url = URL$1;
20495
20520
  }
20496
20521
  class QmsAdapter {
20497
20522
  constructor(map, options) {
20498
- __publicField$h(this, "qms");
20499
- __publicField$h(this, "options");
20500
- __publicField$h(this, "map");
20523
+ __publicField$i(this, "qms");
20524
+ __publicField$i(this, "options");
20525
+ __publicField$i(this, "map");
20501
20526
  this.map = map;
20502
20527
  const opt = __spreadValues$i(__spreadValues$i({}, createOpt), options);
20503
20528
  this.options = opt;
@@ -20551,29 +20576,29 @@ var NgwLeaflet = (function () {
20551
20576
  return QmsAdapter;
20552
20577
  }
20553
20578
 
20554
- var __defProp$o = Object.defineProperty;
20579
+ var __defProp$p = Object.defineProperty;
20555
20580
  var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
20556
20581
  var __hasOwnProp$i = Object.prototype.hasOwnProperty;
20557
20582
  var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
20558
- var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20583
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20559
20584
  var __spreadValues$h = (a, b) => {
20560
20585
  for (var prop in b || (b = {}))
20561
20586
  if (__hasOwnProp$i.call(b, prop))
20562
- __defNormalProp$o(a, prop, b[prop]);
20587
+ __defNormalProp$p(a, prop, b[prop]);
20563
20588
  if (__getOwnPropSymbols$i)
20564
20589
  for (var prop of __getOwnPropSymbols$i(b)) {
20565
20590
  if (__propIsEnum$i.call(b, prop))
20566
- __defNormalProp$o(a, prop, b[prop]);
20591
+ __defNormalProp$p(a, prop, b[prop]);
20567
20592
  }
20568
20593
  return a;
20569
20594
  };
20570
- var __publicField$g = (obj, key, value) => __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
20595
+ var __publicField$h = (obj, key, value) => __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
20571
20596
  class QmsKit {
20572
20597
  constructor(options) {
20573
- __publicField$g(this, "options", {
20598
+ __publicField$h(this, "options", {
20574
20599
  url: "https://qms.nextgis.com"
20575
20600
  });
20576
- __publicField$g(this, "url");
20601
+ __publicField$h(this, "url");
20577
20602
  this.options = __spreadValues$h(__spreadValues$h({}, this.options), options);
20578
20603
  this.url = this.options.url;
20579
20604
  }
@@ -20589,31 +20614,31 @@ var NgwLeaflet = (function () {
20589
20614
  return createQmsAdapter({ webMap, url: this.url });
20590
20615
  }
20591
20616
  }
20592
- __publicField$g(QmsKit, "utils", {
20617
+ __publicField$h(QmsKit, "utils", {
20593
20618
  createQmsAdapter
20594
20619
  });
20595
20620
 
20596
- var __defProp$n = Object.defineProperty;
20597
- var __defProps$c = Object.defineProperties;
20598
- var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
20621
+ var __defProp$o = Object.defineProperty;
20622
+ var __defProps$d = Object.defineProperties;
20623
+ var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
20599
20624
  var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
20600
20625
  var __getProtoOf$2 = Object.getPrototypeOf;
20601
20626
  var __hasOwnProp$h = Object.prototype.hasOwnProperty;
20602
20627
  var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
20603
20628
  var __reflectGet$2 = Reflect.get;
20604
- var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20629
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20605
20630
  var __spreadValues$g = (a, b) => {
20606
20631
  for (var prop in b || (b = {}))
20607
20632
  if (__hasOwnProp$h.call(b, prop))
20608
- __defNormalProp$n(a, prop, b[prop]);
20633
+ __defNormalProp$o(a, prop, b[prop]);
20609
20634
  if (__getOwnPropSymbols$h)
20610
20635
  for (var prop of __getOwnPropSymbols$h(b)) {
20611
20636
  if (__propIsEnum$h.call(b, prop))
20612
- __defNormalProp$n(a, prop, b[prop]);
20637
+ __defNormalProp$o(a, prop, b[prop]);
20613
20638
  }
20614
20639
  return a;
20615
20640
  };
20616
- var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
20641
+ var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
20617
20642
  var __superGet$2 = (cls, obj, key) => __reflectGet$2(__getProtoOf$2(cls), key, obj);
20618
20643
  var __async$j = (__this, __arguments, generator) => {
20619
20644
  return new Promise((resolve, reject) => {
@@ -20658,7 +20683,7 @@ var NgwLeaflet = (function () {
20658
20683
  class BasemapTileAdapter extends TileAdapter {
20659
20684
  addLayer(opt) {
20660
20685
  return __async$j(this, null, function* () {
20661
- return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$c(__spreadValues$g({}, opt), { url }));
20686
+ return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$d(__spreadValues$g({}, opt), { url }));
20662
20687
  });
20663
20688
  }
20664
20689
  }
@@ -20737,25 +20762,25 @@ var NgwLeaflet = (function () {
20737
20762
  return fields;
20738
20763
  }
20739
20764
 
20740
- var __defProp$m = Object.defineProperty;
20741
- var __defProps$b = Object.defineProperties;
20742
- var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
20765
+ var __defProp$n = Object.defineProperty;
20766
+ var __defProps$c = Object.defineProperties;
20767
+ var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
20743
20768
  var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
20744
20769
  var __hasOwnProp$g = Object.prototype.hasOwnProperty;
20745
20770
  var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
20746
- var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20771
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20747
20772
  var __spreadValues$f = (a, b) => {
20748
20773
  for (var prop in b || (b = {}))
20749
20774
  if (__hasOwnProp$g.call(b, prop))
20750
- __defNormalProp$m(a, prop, b[prop]);
20775
+ __defNormalProp$n(a, prop, b[prop]);
20751
20776
  if (__getOwnPropSymbols$g)
20752
20777
  for (var prop of __getOwnPropSymbols$g(b)) {
20753
20778
  if (__propIsEnum$g.call(b, prop))
20754
- __defNormalProp$m(a, prop, b[prop]);
20779
+ __defNormalProp$n(a, prop, b[prop]);
20755
20780
  }
20756
20781
  return a;
20757
20782
  };
20758
- var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
20783
+ var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
20759
20784
  var __async$i = (__this, __arguments, generator) => {
20760
20785
  return new Promise((resolve, reject) => {
20761
20786
  var fulfilled = (value) => {
@@ -20781,13 +20806,13 @@ var NgwLeaflet = (function () {
20781
20806
  var _a;
20782
20807
  const filters = options.filters;
20783
20808
  if (filters) {
20784
- let data = yield createFeatureFieldFilterQueries(__spreadProps$b(__spreadValues$f({}, options), {
20809
+ let data = yield createFeatureFieldFilterQueries(__spreadProps$c(__spreadValues$f({}, options), {
20785
20810
  filters
20786
20811
  }));
20787
20812
  const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
20788
20813
  if (clientFilterValidate) {
20789
20814
  data = data.filter((y) => {
20790
- const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$b(__spreadValues$f({}, y.fields), {
20815
+ const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$c(__spreadValues$f({}, y.fields), {
20791
20816
  id: y.id
20792
20817
  }));
20793
20818
  const result = propertiesFilter(fields, filters);
@@ -20875,28 +20900,28 @@ var NgwLeaflet = (function () {
20875
20900
  return filterOptions;
20876
20901
  }
20877
20902
 
20878
- var __defProp$l = Object.defineProperty;
20879
- var __defProps$a = Object.defineProperties;
20880
- var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
20903
+ var __defProp$m = Object.defineProperty;
20904
+ var __defProps$b = Object.defineProperties;
20905
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
20881
20906
  var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
20882
20907
  var __getProtoOf$1 = Object.getPrototypeOf;
20883
20908
  var __hasOwnProp$f = Object.prototype.hasOwnProperty;
20884
20909
  var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
20885
20910
  var __reflectGet$1 = Reflect.get;
20886
- var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20911
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20887
20912
  var __spreadValues$e = (a, b) => {
20888
20913
  for (var prop in b || (b = {}))
20889
20914
  if (__hasOwnProp$f.call(b, prop))
20890
- __defNormalProp$l(a, prop, b[prop]);
20915
+ __defNormalProp$m(a, prop, b[prop]);
20891
20916
  if (__getOwnPropSymbols$f)
20892
20917
  for (var prop of __getOwnPropSymbols$f(b)) {
20893
20918
  if (__propIsEnum$f.call(b, prop))
20894
- __defNormalProp$l(a, prop, b[prop]);
20919
+ __defNormalProp$m(a, prop, b[prop]);
20895
20920
  }
20896
20921
  return a;
20897
20922
  };
20898
- var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
20899
- var __publicField$f = (obj, key, value) => __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
20923
+ var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
20924
+ var __publicField$g = (obj, key, value) => __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
20900
20925
  var __superGet$1 = (cls, obj, key) => __reflectGet$1(__getProtoOf$1(cls), key, obj);
20901
20926
  var __async$g = (__this, __arguments, generator) => {
20902
20927
  return new Promise((resolve, reject) => {
@@ -20969,11 +20994,11 @@ var NgwLeaflet = (function () {
20969
20994
  class NgwGeoJsonAdapter extends GeoJsonAdapter {
20970
20995
  constructor() {
20971
20996
  super(...arguments);
20972
- __publicField$f(this, "emitter", new EventEmitter());
20973
- __publicField$f(this, "__onMapMove");
20974
- __publicField$f(this, "__onMapMoveStart");
20975
- __publicField$f(this, "__enableMapMoveListener");
20976
- __publicField$f(this, "__disableMapMoveListener");
20997
+ __publicField$g(this, "emitter", new EventEmitter());
20998
+ __publicField$g(this, "__onMapMove");
20999
+ __publicField$g(this, "__onMapMoveStart");
21000
+ __publicField$g(this, "__enableMapMoveListener");
21001
+ __publicField$g(this, "__disableMapMoveListener");
20977
21002
  }
20978
21003
  addLayer(opt) {
20979
21004
  return __async$g(this, null, function* () {
@@ -21046,10 +21071,10 @@ var NgwLeaflet = (function () {
21046
21071
  getCount() {
21047
21072
  return fetchNgwLayerCount({ connector, resourceId, cache: true });
21048
21073
  }
21049
- updateLayer(filterArgs) {
21074
+ updateLayer(opt) {
21050
21075
  return __async$g(this, null, function* () {
21051
21076
  var _a2;
21052
- filterArgs = filterArgs || _lastFilterArgs || {};
21077
+ const filterArgs = opt || _lastFilterArgs || {};
21053
21078
  if ((_a2 = this.options.strategy) == null ? void 0 : _a2.startsWith("BBOX")) {
21054
21079
  yield webMap.onLoad("create");
21055
21080
  filterArgs.options = filterArgs.options || {};
@@ -21074,7 +21099,7 @@ var NgwLeaflet = (function () {
21074
21099
  try {
21075
21100
  this.emitter.emit("preupdate", filterArgs);
21076
21101
  webMap._emitLayerEvent("layer:preupdate", options.id || "", filterArgs);
21077
- const data = yield getData(filterArgs.filters, __spreadProps$a(__spreadValues$e({}, filterArgs.options), {
21102
+ const data = yield getData(filterArgs.filters, __spreadProps$b(__spreadValues$e({}, filterArgs.options), {
21078
21103
  srs: this.options.srs
21079
21104
  }));
21080
21105
  let newData = data;
@@ -21127,7 +21152,7 @@ var NgwLeaflet = (function () {
21127
21152
  if (this.clearLayer) {
21128
21153
  this.clearLayer();
21129
21154
  }
21130
- const data = yield getData(filters, __spreadProps$a(__spreadValues$e({}, opt), {
21155
+ const data = yield getData(filters, __spreadProps$b(__spreadValues$e({}, opt), {
21131
21156
  srs: this.options.srs
21132
21157
  }));
21133
21158
  this.setData(data);
@@ -21316,26 +21341,26 @@ var NgwLeaflet = (function () {
21316
21341
  }
21317
21342
  }
21318
21343
 
21319
- var __defProp$k = Object.defineProperty;
21320
- var __defProps$9 = Object.defineProperties;
21321
- var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
21344
+ var __defProp$l = Object.defineProperty;
21345
+ var __defProps$a = Object.defineProperties;
21346
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
21322
21347
  var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
21323
21348
  var __hasOwnProp$e = Object.prototype.hasOwnProperty;
21324
21349
  var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
21325
- var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21350
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21326
21351
  var __spreadValues$d = (a, b) => {
21327
21352
  for (var prop in b || (b = {}))
21328
21353
  if (__hasOwnProp$e.call(b, prop))
21329
- __defNormalProp$k(a, prop, b[prop]);
21354
+ __defNormalProp$l(a, prop, b[prop]);
21330
21355
  if (__getOwnPropSymbols$e)
21331
21356
  for (var prop of __getOwnPropSymbols$e(b)) {
21332
21357
  if (__propIsEnum$e.call(b, prop))
21333
- __defNormalProp$k(a, prop, b[prop]);
21358
+ __defNormalProp$l(a, prop, b[prop]);
21334
21359
  }
21335
21360
  return a;
21336
21361
  };
21337
- var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
21338
- var __publicField$e = (obj, key, value) => __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
21362
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
21363
+ var __publicField$f = (obj, key, value) => __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
21339
21364
  var __async$e = (__this, __arguments, generator) => {
21340
21365
  return new Promise((resolve, reject) => {
21341
21366
  var fulfilled = (value) => {
@@ -21356,11 +21381,47 @@ var NgwLeaflet = (function () {
21356
21381
  step((generator = generator.apply(__this, __arguments)).next());
21357
21382
  });
21358
21383
  };
21384
+ class Legend {
21385
+ constructor({
21386
+ layerId,
21387
+ legend,
21388
+ onSymbolRenderChange
21389
+ }) {
21390
+ __publicField$f(this, "layerId");
21391
+ __publicField$f(this, "legend");
21392
+ __publicField$f(this, "onSymbolRenderChange");
21393
+ this.layerId = layerId;
21394
+ this.legend = this.createLegend(legend);
21395
+ this.onSymbolRenderChange = onSymbolRenderChange;
21396
+ }
21397
+ createLegend(items) {
21398
+ return items.map((params) => __spreadProps$a(__spreadValues$d({}, params), {
21399
+ /** @deprecated use display_name instead */
21400
+ name: params.display_name,
21401
+ /** @deprecated use icon instead */
21402
+ symbol: params.icon
21403
+ }));
21404
+ }
21405
+ setSymbolRender(symbolIndex, status) {
21406
+ const legendItem = this.legend.find((l) => l.index === symbolIndex);
21407
+ if (legendItem) {
21408
+ const render = legendItem.render;
21409
+ if (render !== status) {
21410
+ legendItem.render = status;
21411
+ if (this.onSymbolRenderChange) {
21412
+ this.onSymbolRenderChange(
21413
+ this.legend.filter((l) => l.render).map((l) => l.index)
21414
+ );
21415
+ }
21416
+ }
21417
+ }
21418
+ }
21419
+ }
21359
21420
  function createRasterAdapter(_0) {
21360
21421
  return __async$e(this, arguments, function* ({
21361
21422
  layerOptions,
21362
- webMap,
21363
21423
  connector,
21424
+ webMap,
21364
21425
  item
21365
21426
  }) {
21366
21427
  const resourceCls = item.resource.cls;
@@ -21389,16 +21450,17 @@ var NgwLeaflet = (function () {
21389
21450
  constructor(map, _options) {
21390
21451
  super(map, _options);
21391
21452
  this.map = map;
21392
- // options = {};
21393
- __publicField$e(this, "item", item);
21394
- __publicField$e(this, "resourceId", resourceId);
21453
+ __publicField$f(this, "item", item);
21454
+ __publicField$f(this, "resourceId", resourceId);
21455
+ __publicField$f(this, "_blocked", false);
21456
+ __publicField$f(this, "_layerVisibility");
21395
21457
  const opt = ngwApiToAdapterOptions({
21396
21458
  options: layerOptions,
21397
21459
  webMap,
21398
21460
  baseUrl: connector.options.baseUrl || ""
21399
21461
  });
21400
21462
  if (opt) {
21401
- const layerAdapterOptions = __spreadProps$9(__spreadValues$d(__spreadValues$d({}, opt), layerOptions.adapterOptions), {
21463
+ const layerAdapterOptions = __spreadProps$a(__spreadValues$d(__spreadValues$d({}, opt), layerOptions.adapterOptions), {
21402
21464
  params: { resource: resourceId },
21403
21465
  layers: opt.layers || String(resourceId),
21404
21466
  resourceId
@@ -21412,25 +21474,19 @@ var NgwLeaflet = (function () {
21412
21474
  addLayer(addOptions) {
21413
21475
  return super.addLayer(__spreadValues$d(__spreadValues$d({}, this.options), addOptions));
21414
21476
  }
21415
- getLegend(options) {
21416
- return __async$e(this, null, function* () {
21417
- const ngwLegend = yield connector.get("render.legend_symbols", __spreadValues$d({
21418
- params: { id: resourceId },
21419
- cache: true
21420
- }, options));
21421
- const id = this.options.id;
21422
- if (id !== void 0) {
21423
- const legend = {
21424
- layerId: id,
21425
- legend: ngwLegend.map(({ display_name, icon }) => ({
21426
- name: display_name,
21427
- symbol: icon
21428
- }))
21429
- };
21430
- return [legend];
21477
+ showLayer() {
21478
+ this._layerVisibility = true;
21479
+ if (this.layer) {
21480
+ if (!this._blocked) {
21481
+ webMap.mapAdapter.showLayer(this.layer);
21431
21482
  }
21432
- return [];
21433
- });
21483
+ }
21484
+ }
21485
+ hideLayer() {
21486
+ this._layerVisibility = false;
21487
+ if (this.layer) {
21488
+ webMap.mapAdapter.hideLayer(this.layer);
21489
+ }
21434
21490
  }
21435
21491
  getIdentificationIds() {
21436
21492
  return __async$e(this, null, function* () {
@@ -21446,8 +21502,69 @@ var NgwLeaflet = (function () {
21446
21502
  return [];
21447
21503
  });
21448
21504
  }
21449
- // beforeRemove() {
21450
- // }
21505
+ getLegend(options) {
21506
+ return __async$e(this, null, function* () {
21507
+ const id = this.options.id;
21508
+ if (id !== void 0) {
21509
+ const ngwLegend = yield connector.get("render.legend_symbols", __spreadValues$d({
21510
+ params: { id: resourceId },
21511
+ cache: true
21512
+ }, options));
21513
+ const legend = new Legend({
21514
+ layerId: id,
21515
+ legend: ngwLegend,
21516
+ onSymbolRenderChange: this._setLegendSymbol.bind(this)
21517
+ });
21518
+ return [legend];
21519
+ }
21520
+ return [];
21521
+ });
21522
+ }
21523
+ _hideLayer() {
21524
+ if (this.options.id) {
21525
+ webMap.mapAdapter.hideLayer(this.layer);
21526
+ }
21527
+ }
21528
+ _showLayer() {
21529
+ if (this.options.id) {
21530
+ if (this._layerVisibility) {
21531
+ webMap.showLayer(this.options.id, { silent: true });
21532
+ }
21533
+ }
21534
+ }
21535
+ _setLegendSymbol(renderIndexes) {
21536
+ const intervals = this._consolidateIntervals(renderIndexes);
21537
+ if (!intervals.length) {
21538
+ this._hideLayer();
21539
+ this._blocked = true;
21540
+ } else {
21541
+ this._blocked = false;
21542
+ this._showLayer();
21543
+ }
21544
+ if (this.updateLayer) {
21545
+ this.updateLayer({
21546
+ params: {
21547
+ [`symbols[${resourceId}]`]: intervals.join(",") || void 0
21548
+ }
21549
+ });
21550
+ }
21551
+ }
21552
+ _consolidateIntervals(symbols) {
21553
+ const sortedSymbols = symbols.slice().sort((a, b) => a - b);
21554
+ const intervals = [];
21555
+ let start = sortedSymbols[0];
21556
+ let end = start;
21557
+ for (let i = 1; i <= sortedSymbols.length; i++) {
21558
+ if (sortedSymbols[i] === end + 1) {
21559
+ end = sortedSymbols[i];
21560
+ } else {
21561
+ intervals.push(start === end ? `${start}` : `${start}-${end}`);
21562
+ start = sortedSymbols[i];
21563
+ end = start;
21564
+ }
21565
+ }
21566
+ return intervals;
21567
+ }
21451
21568
  };
21452
21569
  } else {
21453
21570
  throw new Error(adapter + " not supported yet. Only TILE");
@@ -21455,25 +21572,25 @@ var NgwLeaflet = (function () {
21455
21572
  });
21456
21573
  }
21457
21574
 
21458
- var __defProp$j = Object.defineProperty;
21459
- var __defProps$8 = Object.defineProperties;
21460
- var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
21575
+ var __defProp$k = Object.defineProperty;
21576
+ var __defProps$9 = Object.defineProperties;
21577
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
21461
21578
  var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
21462
21579
  var __hasOwnProp$d = Object.prototype.hasOwnProperty;
21463
21580
  var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
21464
- var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21581
+ var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21465
21582
  var __spreadValues$c = (a, b) => {
21466
21583
  for (var prop in b || (b = {}))
21467
21584
  if (__hasOwnProp$d.call(b, prop))
21468
- __defNormalProp$j(a, prop, b[prop]);
21585
+ __defNormalProp$k(a, prop, b[prop]);
21469
21586
  if (__getOwnPropSymbols$d)
21470
21587
  for (var prop of __getOwnPropSymbols$d(b)) {
21471
21588
  if (__propIsEnum$d.call(b, prop))
21472
- __defNormalProp$j(a, prop, b[prop]);
21589
+ __defNormalProp$k(a, prop, b[prop]);
21473
21590
  }
21474
21591
  return a;
21475
21592
  };
21476
- var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
21593
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
21477
21594
  var __async$d = (__this, __arguments, generator) => {
21478
21595
  return new Promise((resolve, reject) => {
21479
21596
  var fulfilled = (value) => {
@@ -21521,7 +21638,7 @@ var NgwLeaflet = (function () {
21521
21638
  const firstStyle = childrenStyles && childrenStyles[0];
21522
21639
  if (firstStyle) {
21523
21640
  return createAsyncAdapter(
21524
- __spreadProps$8(__spreadValues$c({}, layerOptions), { resource: firstStyle.resource.id }),
21641
+ __spreadProps$9(__spreadValues$c({}, layerOptions), { resource: firstStyle.resource.id }),
21525
21642
  webMap,
21526
21643
  connector
21527
21644
  );
@@ -21544,7 +21661,7 @@ var NgwLeaflet = (function () {
21544
21661
  }
21545
21662
  if (item) {
21546
21663
  const cls = item.resource.cls;
21547
- const layerOptions = __spreadProps$8(__spreadValues$c({}, options), {
21664
+ const layerOptions = __spreadProps$9(__spreadValues$c({}, options), {
21548
21665
  resource: resourceId
21549
21666
  });
21550
21667
  const adapterOptions = {
@@ -21581,10 +21698,10 @@ var NgwLeaflet = (function () {
21581
21698
  item.resource.parent.id
21582
21699
  );
21583
21700
  if (parentItem) {
21584
- const parentOptions = __spreadProps$8(__spreadValues$c({}, options), {
21701
+ const parentOptions = __spreadProps$9(__spreadValues$c({}, options), {
21585
21702
  resource: item.resource.parent.id
21586
21703
  });
21587
- adapter = createGeoJsonAdapter(__spreadProps$8(__spreadValues$c({}, adapterOptions), {
21704
+ adapter = createGeoJsonAdapter(__spreadProps$9(__spreadValues$c({}, adapterOptions), {
21588
21705
  item: parentItem,
21589
21706
  layerOptions: parentOptions
21590
21707
  }));
@@ -21628,31 +21745,46 @@ var NgwLeaflet = (function () {
21628
21745
  });
21629
21746
  }
21630
21747
 
21631
- var __defProp$i = Object.defineProperty;
21748
+ var __defProp$j = Object.defineProperty;
21749
+ var __defProps$8 = Object.defineProperties;
21750
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
21632
21751
  var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
21633
21752
  var __hasOwnProp$c = Object.prototype.hasOwnProperty;
21634
21753
  var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
21635
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21754
+ var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21636
21755
  var __spreadValues$b = (a, b) => {
21637
21756
  for (var prop in b || (b = {}))
21638
21757
  if (__hasOwnProp$c.call(b, prop))
21639
- __defNormalProp$i(a, prop, b[prop]);
21758
+ __defNormalProp$j(a, prop, b[prop]);
21640
21759
  if (__getOwnPropSymbols$c)
21641
21760
  for (var prop of __getOwnPropSymbols$c(b)) {
21642
21761
  if (__propIsEnum$c.call(b, prop))
21643
- __defNormalProp$i(a, prop, b[prop]);
21762
+ __defNormalProp$j(a, prop, b[prop]);
21644
21763
  }
21645
21764
  return a;
21646
21765
  };
21766
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
21767
+ var __objRest$1 = (source, exclude) => {
21768
+ var target = {};
21769
+ for (var prop in source)
21770
+ if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
21771
+ target[prop] = source[prop];
21772
+ if (source != null && __getOwnPropSymbols$c)
21773
+ for (var prop of __getOwnPropSymbols$c(source)) {
21774
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
21775
+ target[prop] = source[prop];
21776
+ }
21777
+ return target;
21778
+ };
21647
21779
  function updateImageParams(params, resourceId) {
21648
- const { bbox, width, height, nd } = params;
21649
- return {
21780
+ const _a = params, { bbox, width, height, nd } = _a, rest = __objRest$1(_a, ["bbox", "width", "height", "nd"]);
21781
+ return __spreadProps$8(__spreadValues$b({}, rest), {
21650
21782
  resource: Array.isArray(resourceId) ? resourceId.join(",") : resourceId,
21651
21783
  extent: bbox,
21652
21784
  size: width + "," + height,
21653
21785
  timestamp: Date.now(),
21654
21786
  nd: nd != null ? nd : 200
21655
- };
21787
+ });
21656
21788
  }
21657
21789
  const vectorLayerGeomToPaintTypeAlias = {
21658
21790
  POINT: "point",
@@ -21712,26 +21844,26 @@ var NgwLeaflet = (function () {
21712
21844
  return zoom;
21713
21845
  }
21714
21846
 
21715
- var __defProp$h = Object.defineProperty;
21847
+ var __defProp$i = Object.defineProperty;
21716
21848
  var __defProps$7 = Object.defineProperties;
21717
21849
  var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
21718
21850
  var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
21719
21851
  var __hasOwnProp$b = Object.prototype.hasOwnProperty;
21720
21852
  var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
21721
- var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21853
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21722
21854
  var __spreadValues$a = (a, b) => {
21723
21855
  for (var prop in b || (b = {}))
21724
21856
  if (__hasOwnProp$b.call(b, prop))
21725
- __defNormalProp$h(a, prop, b[prop]);
21857
+ __defNormalProp$i(a, prop, b[prop]);
21726
21858
  if (__getOwnPropSymbols$b)
21727
21859
  for (var prop of __getOwnPropSymbols$b(b)) {
21728
21860
  if (__propIsEnum$b.call(b, prop))
21729
- __defNormalProp$h(a, prop, b[prop]);
21861
+ __defNormalProp$i(a, prop, b[prop]);
21730
21862
  }
21731
21863
  return a;
21732
21864
  };
21733
21865
  var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
21734
- var __publicField$d = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
21866
+ var __publicField$e = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
21735
21867
  var __async$c = (__this, __arguments, generator) => {
21736
21868
  return new Promise((resolve, reject) => {
21737
21869
  var fulfilled = (value) => {
@@ -21756,11 +21888,11 @@ var NgwLeaflet = (function () {
21756
21888
  constructor(webMap, item, options, connector, parent, noInit) {
21757
21889
  super(__spreadValues$a(__spreadValues$a({}, _NgwWebmapItem.options), options));
21758
21890
  this.webMap = webMap;
21759
- __publicField$d(this, "item");
21760
- __publicField$d(this, "connector");
21761
- __publicField$d(this, "layer");
21762
- __publicField$d(this, "emitter", new EventEmitter());
21763
- __publicField$d(this, "_rootDescendantsCount", 0);
21891
+ __publicField$e(this, "item");
21892
+ __publicField$e(this, "connector");
21893
+ __publicField$e(this, "layer");
21894
+ __publicField$e(this, "emitter", new EventEmitter());
21895
+ __publicField$e(this, "_rootDescendantsCount", 0);
21764
21896
  if (connector) {
21765
21897
  this.connector = connector;
21766
21898
  }
@@ -21822,10 +21954,12 @@ var NgwLeaflet = (function () {
21822
21954
  }, options));
21823
21955
  const legend = {
21824
21956
  layerId: id,
21825
- legend: ngwLegend.map(({ display_name, icon }) => ({
21826
- name: display_name,
21827
- symbol: icon
21828
- }))
21957
+ legend: ngwLegend.map((legend2) => __spreadValues$a({
21958
+ /** @deprecated use display_name instead */
21959
+ name: legend2.display_name,
21960
+ /** @deprecated use icon instead */
21961
+ symbol: legend2.icon
21962
+ }, legend2))
21829
21963
  };
21830
21964
  return [legend];
21831
21965
  }
@@ -21948,8 +22082,8 @@ var NgwLeaflet = (function () {
21948
22082
  return totalValue;
21949
22083
  }
21950
22084
  };
21951
- __publicField$d(_NgwWebmapItem, "GetAdapterFromLayerType", {});
21952
- __publicField$d(_NgwWebmapItem, "options", {
22085
+ __publicField$e(_NgwWebmapItem, "GetAdapterFromLayerType", {});
22086
+ __publicField$e(_NgwWebmapItem, "options", {
21953
22087
  properties: [
21954
22088
  {
21955
22089
  type: "boolean",
@@ -21989,23 +22123,23 @@ var NgwLeaflet = (function () {
21989
22123
  });
21990
22124
  let NgwWebmapItem = _NgwWebmapItem;
21991
22125
 
21992
- var __defProp$g = Object.defineProperty;
22126
+ var __defProp$h = Object.defineProperty;
21993
22127
  var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
21994
22128
  var __hasOwnProp$a = Object.prototype.hasOwnProperty;
21995
22129
  var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
21996
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
22130
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21997
22131
  var __spreadValues$9 = (a, b) => {
21998
22132
  for (var prop in b || (b = {}))
21999
22133
  if (__hasOwnProp$a.call(b, prop))
22000
- __defNormalProp$g(a, prop, b[prop]);
22134
+ __defNormalProp$h(a, prop, b[prop]);
22001
22135
  if (__getOwnPropSymbols$a)
22002
22136
  for (var prop of __getOwnPropSymbols$a(b)) {
22003
22137
  if (__propIsEnum$a.call(b, prop))
22004
- __defNormalProp$g(a, prop, b[prop]);
22138
+ __defNormalProp$h(a, prop, b[prop]);
22005
22139
  }
22006
22140
  return a;
22007
22141
  };
22008
- var __publicField$c = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
22142
+ var __publicField$d = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
22009
22143
  var __async$b = (__this, __arguments, generator) => {
22010
22144
  return new Promise((resolve, reject) => {
22011
22145
  var fulfilled = (value) => {
@@ -22035,10 +22169,10 @@ var NgwLeaflet = (function () {
22035
22169
  }) {
22036
22170
  class OnFirstShowAdapter {
22037
22171
  constructor() {
22038
- __publicField$c(this, "options", {});
22039
- __publicField$c(this, "layer", []);
22040
- __publicField$c(this, "_removed", false);
22041
- __publicField$c(this, "_creatingInProgress", false);
22172
+ __publicField$d(this, "options", {});
22173
+ __publicField$d(this, "layer", []);
22174
+ __publicField$d(this, "_removed", false);
22175
+ __publicField$d(this, "_creatingInProgress", false);
22042
22176
  }
22043
22177
  addLayer() {
22044
22178
  return this.layer;
@@ -22166,26 +22300,26 @@ var NgwLeaflet = (function () {
22166
22300
 
22167
22301
  const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
22168
22302
 
22169
- var __defProp$f = Object.defineProperty;
22303
+ var __defProp$g = Object.defineProperty;
22170
22304
  var __defProps$6 = Object.defineProperties;
22171
22305
  var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
22172
22306
  var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
22173
22307
  var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
22174
22308
  var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
22175
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
22309
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
22176
22310
  var __spreadValues$8 = (a, b) => {
22177
22311
  for (var prop in b || (b = {}))
22178
22312
  if (__hasOwnProp$9.call(b, prop))
22179
- __defNormalProp$f(a, prop, b[prop]);
22313
+ __defNormalProp$g(a, prop, b[prop]);
22180
22314
  if (__getOwnPropSymbols$9)
22181
22315
  for (var prop of __getOwnPropSymbols$9(b)) {
22182
22316
  if (__propIsEnum$9.call(b, prop))
22183
- __defNormalProp$f(a, prop, b[prop]);
22317
+ __defNormalProp$g(a, prop, b[prop]);
22184
22318
  }
22185
22319
  return a;
22186
22320
  };
22187
22321
  var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
22188
- var __publicField$b = (obj, key, value) => __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
22322
+ var __publicField$c = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
22189
22323
  var __async$9 = (__this, __arguments, generator) => {
22190
22324
  return new Promise((resolve, reject) => {
22191
22325
  var fulfilled = (value) => {
@@ -22210,21 +22344,21 @@ var NgwLeaflet = (function () {
22210
22344
  constructor(map, options) {
22211
22345
  this.map = map;
22212
22346
  this.options = options;
22213
- __publicField$b(this, "layer");
22214
- __publicField$b(this, "NgwWebmapItem", NgwWebmapItem);
22347
+ __publicField$c(this, "layer");
22348
+ __publicField$c(this, "NgwWebmapItem", NgwWebmapItem);
22215
22349
  /**
22216
22350
  * Radius for searching objects in pixels
22217
22351
  */
22218
- __publicField$b(this, "pixelRadius", 10);
22352
+ __publicField$c(this, "pixelRadius", 10);
22219
22353
  // webmapSettings.identify_radius,
22220
- __publicField$b(this, "resourceId");
22221
- __publicField$b(this, "webmapClassName", "webmap");
22222
- __publicField$b(this, "emitter", new EventEmitter());
22223
- __publicField$b(this, "_extent");
22224
- __publicField$b(this, "response");
22225
- __publicField$b(this, "_webmapLayersIds");
22226
- __publicField$b(this, "_webmapBaselayersIds", []);
22227
- __publicField$b(this, "_lastActiveBaselayer");
22354
+ __publicField$c(this, "resourceId");
22355
+ __publicField$c(this, "webmapClassName", "webmap");
22356
+ __publicField$c(this, "emitter", new EventEmitter());
22357
+ __publicField$c(this, "_extent");
22358
+ __publicField$c(this, "response");
22359
+ __publicField$c(this, "_webmapLayersIds");
22360
+ __publicField$c(this, "_webmapBaselayersIds", []);
22361
+ __publicField$c(this, "_lastActiveBaselayer");
22228
22362
  const r = options.resourceId;
22229
22363
  if (Array.isArray(r)) {
22230
22364
  this.resourceId = r[0];
@@ -22533,23 +22667,23 @@ var NgwLeaflet = (function () {
22533
22667
  }
22534
22668
  }
22535
22669
 
22536
- var __defProp$e = Object.defineProperty;
22670
+ var __defProp$f = Object.defineProperty;
22537
22671
  var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
22538
22672
  var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
22539
22673
  var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
22540
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
22674
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
22541
22675
  var __spreadValues$7 = (a, b) => {
22542
22676
  for (var prop in b || (b = {}))
22543
22677
  if (__hasOwnProp$8.call(b, prop))
22544
- __defNormalProp$e(a, prop, b[prop]);
22678
+ __defNormalProp$f(a, prop, b[prop]);
22545
22679
  if (__getOwnPropSymbols$8)
22546
22680
  for (var prop of __getOwnPropSymbols$8(b)) {
22547
22681
  if (__propIsEnum$8.call(b, prop))
22548
- __defNormalProp$e(a, prop, b[prop]);
22682
+ __defNormalProp$f(a, prop, b[prop]);
22549
22683
  }
22550
22684
  return a;
22551
22685
  };
22552
- var __publicField$a = (obj, key, value) => __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
22686
+ var __publicField$b = (obj, key, value) => __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
22553
22687
  var __async$8 = (__this, __arguments, generator) => {
22554
22688
  return new Promise((resolve, reject) => {
22555
22689
  var fulfilled = (value) => {
@@ -22573,9 +22707,9 @@ var NgwLeaflet = (function () {
22573
22707
  class NgwKit {
22574
22708
  constructor(options) {
22575
22709
  this.options = options;
22576
- __publicField$a(this, "url");
22577
- __publicField$a(this, "connector");
22578
- __publicField$a(this, "webMap");
22710
+ __publicField$b(this, "url");
22711
+ __publicField$b(this, "connector");
22712
+ __publicField$b(this, "webMap");
22579
22713
  if (this.options.connector) {
22580
22714
  this.url = this.options.connector.options.baseUrl || "";
22581
22715
  this.connector = this.options.connector;
@@ -22636,37 +22770,37 @@ var NgwLeaflet = (function () {
22636
22770
  }
22637
22771
  }
22638
22772
 
22639
- var __defProp$d = Object.defineProperty;
22773
+ var __defProp$e = Object.defineProperty;
22640
22774
  var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
22641
22775
  var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
22642
22776
  var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
22643
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
22777
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
22644
22778
  var __spreadValues$6 = (a, b) => {
22645
22779
  for (var prop in b || (b = {}))
22646
22780
  if (__hasOwnProp$7.call(b, prop))
22647
- __defNormalProp$d(a, prop, b[prop]);
22781
+ __defNormalProp$e(a, prop, b[prop]);
22648
22782
  if (__getOwnPropSymbols$7)
22649
22783
  for (var prop of __getOwnPropSymbols$7(b)) {
22650
22784
  if (__propIsEnum$7.call(b, prop))
22651
- __defNormalProp$d(a, prop, b[prop]);
22785
+ __defNormalProp$e(a, prop, b[prop]);
22652
22786
  }
22653
22787
  return a;
22654
22788
  };
22655
- var __publicField$9 = (obj, key, value) => __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
22789
+ var __publicField$a = (obj, key, value) => __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
22656
22790
  class IdentifyItem {
22657
22791
  constructor(options) {
22658
- __publicField$9(this, "id");
22659
- __publicField$9(this, "label");
22660
- __publicField$9(this, "layerId");
22661
- __publicField$9(this, "parent");
22662
- __publicField$9(this, "fields");
22663
- __publicField$9(this, "geom");
22664
- __publicField$9(this, "extensions");
22665
- __publicField$9(this, "connector");
22666
- __publicField$9(this, "_item");
22667
- __publicField$9(this, "_geojson");
22668
- __publicField$9(this, "_resource");
22669
- __publicField$9(this, "_extent");
22792
+ __publicField$a(this, "id");
22793
+ __publicField$a(this, "label");
22794
+ __publicField$a(this, "layerId");
22795
+ __publicField$a(this, "parent");
22796
+ __publicField$a(this, "fields");
22797
+ __publicField$a(this, "geom");
22798
+ __publicField$a(this, "extensions");
22799
+ __publicField$a(this, "connector");
22800
+ __publicField$a(this, "_item");
22801
+ __publicField$a(this, "_geojson");
22802
+ __publicField$a(this, "_resource");
22803
+ __publicField$a(this, "_extent");
22670
22804
  const f = options.feature;
22671
22805
  this.id = f.id;
22672
22806
  this.geom = f.geom;
@@ -22752,21 +22886,21 @@ var NgwLeaflet = (function () {
22752
22886
  });
22753
22887
  }
22754
22888
 
22755
- var __defProp$c = Object.defineProperty;
22889
+ var __defProp$d = Object.defineProperty;
22756
22890
  var __defProps$5 = Object.defineProperties;
22757
22891
  var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
22758
22892
  var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
22759
22893
  var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
22760
22894
  var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
22761
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
22895
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
22762
22896
  var __spreadValues$5 = (a, b) => {
22763
22897
  for (var prop in b || (b = {}))
22764
22898
  if (__hasOwnProp$6.call(b, prop))
22765
- __defNormalProp$c(a, prop, b[prop]);
22899
+ __defNormalProp$d(a, prop, b[prop]);
22766
22900
  if (__getOwnPropSymbols$6)
22767
22901
  for (var prop of __getOwnPropSymbols$6(b)) {
22768
22902
  if (__propIsEnum$6.call(b, prop))
22769
- __defNormalProp$c(a, prop, b[prop]);
22903
+ __defNormalProp$d(a, prop, b[prop]);
22770
22904
  }
22771
22905
  return a;
22772
22906
  };
@@ -22970,95 +23104,95 @@ var NgwLeaflet = (function () {
22970
23104
  });
22971
23105
  }
22972
23106
 
22973
- var __defProp$b = Object.defineProperty;
22974
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
22975
- var __publicField$8 = (obj, key, value) => __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
23107
+ var __defProp$c = Object.defineProperty;
23108
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
23109
+ var __publicField$9 = (obj, key, value) => __defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
22976
23110
  class KeyCodes {
22977
23111
  constructor() {
22978
- __publicField$8(this, "backspace", 8);
22979
- __publicField$8(this, "tab", 9);
22980
- __publicField$8(this, "enter", 13);
22981
- __publicField$8(this, "shift", 16);
22982
- __publicField$8(this, "ctrl", 17);
22983
- __publicField$8(this, "alt", 18);
22984
- __publicField$8(this, "pause/break", 19);
22985
- __publicField$8(this, "caps_lock", 20);
22986
- __publicField$8(this, "escape", 27);
22987
- __publicField$8(this, "page_up", 33);
22988
- __publicField$8(this, "page_down", 34);
22989
- __publicField$8(this, "end", 35);
22990
- __publicField$8(this, "home", 36);
22991
- __publicField$8(this, "left_arrow", 37);
22992
- __publicField$8(this, "up_arrow", 38);
22993
- __publicField$8(this, "right_arrow", 39);
22994
- __publicField$8(this, "down_arrow", 40);
22995
- __publicField$8(this, "insert", 45);
22996
- __publicField$8(this, "delete", 46);
22997
- __publicField$8(this, "left_window_key", 91);
22998
- __publicField$8(this, "right_window_key", 92);
22999
- __publicField$8(this, "select_key", 93);
23000
- __publicField$8(this, "numpad_0", 96);
23001
- __publicField$8(this, "numpad_1", 97);
23002
- __publicField$8(this, "numpad_2", 98);
23003
- __publicField$8(this, "numpad_3", 99);
23004
- __publicField$8(this, "numpad_4", 100);
23005
- __publicField$8(this, "numpad_5", 101);
23006
- __publicField$8(this, "numpad_6", 102);
23007
- __publicField$8(this, "numpad_7", 103);
23008
- __publicField$8(this, "numpad_8", 104);
23009
- __publicField$8(this, "numpad_9", 105);
23010
- __publicField$8(this, "multiply", 106);
23011
- __publicField$8(this, "add", 107);
23012
- __publicField$8(this, "subtract", 109);
23013
- __publicField$8(this, "decimal_point", 110);
23014
- __publicField$8(this, "divide", 111);
23015
- __publicField$8(this, "f1", 112);
23016
- __publicField$8(this, "f2", 113);
23017
- __publicField$8(this, "f3", 114);
23018
- __publicField$8(this, "f4", 115);
23019
- __publicField$8(this, "f5", 116);
23020
- __publicField$8(this, "f6", 117);
23021
- __publicField$8(this, "f7", 118);
23022
- __publicField$8(this, "f8", 119);
23023
- __publicField$8(this, "f9", 120);
23024
- __publicField$8(this, "f10", 121);
23025
- __publicField$8(this, "f11", 122);
23026
- __publicField$8(this, "f12", 123);
23027
- __publicField$8(this, "num_lock", 144);
23028
- __publicField$8(this, "scroll_lock", 145);
23029
- __publicField$8(this, "semi-colon", 186);
23030
- __publicField$8(this, "equal_sign", 187);
23031
- __publicField$8(this, ",", 188);
23112
+ __publicField$9(this, "backspace", 8);
23113
+ __publicField$9(this, "tab", 9);
23114
+ __publicField$9(this, "enter", 13);
23115
+ __publicField$9(this, "shift", 16);
23116
+ __publicField$9(this, "ctrl", 17);
23117
+ __publicField$9(this, "alt", 18);
23118
+ __publicField$9(this, "pause/break", 19);
23119
+ __publicField$9(this, "caps_lock", 20);
23120
+ __publicField$9(this, "escape", 27);
23121
+ __publicField$9(this, "page_up", 33);
23122
+ __publicField$9(this, "page_down", 34);
23123
+ __publicField$9(this, "end", 35);
23124
+ __publicField$9(this, "home", 36);
23125
+ __publicField$9(this, "left_arrow", 37);
23126
+ __publicField$9(this, "up_arrow", 38);
23127
+ __publicField$9(this, "right_arrow", 39);
23128
+ __publicField$9(this, "down_arrow", 40);
23129
+ __publicField$9(this, "insert", 45);
23130
+ __publicField$9(this, "delete", 46);
23131
+ __publicField$9(this, "left_window_key", 91);
23132
+ __publicField$9(this, "right_window_key", 92);
23133
+ __publicField$9(this, "select_key", 93);
23134
+ __publicField$9(this, "numpad_0", 96);
23135
+ __publicField$9(this, "numpad_1", 97);
23136
+ __publicField$9(this, "numpad_2", 98);
23137
+ __publicField$9(this, "numpad_3", 99);
23138
+ __publicField$9(this, "numpad_4", 100);
23139
+ __publicField$9(this, "numpad_5", 101);
23140
+ __publicField$9(this, "numpad_6", 102);
23141
+ __publicField$9(this, "numpad_7", 103);
23142
+ __publicField$9(this, "numpad_8", 104);
23143
+ __publicField$9(this, "numpad_9", 105);
23144
+ __publicField$9(this, "multiply", 106);
23145
+ __publicField$9(this, "add", 107);
23146
+ __publicField$9(this, "subtract", 109);
23147
+ __publicField$9(this, "decimal_point", 110);
23148
+ __publicField$9(this, "divide", 111);
23149
+ __publicField$9(this, "f1", 112);
23150
+ __publicField$9(this, "f2", 113);
23151
+ __publicField$9(this, "f3", 114);
23152
+ __publicField$9(this, "f4", 115);
23153
+ __publicField$9(this, "f5", 116);
23154
+ __publicField$9(this, "f6", 117);
23155
+ __publicField$9(this, "f7", 118);
23156
+ __publicField$9(this, "f8", 119);
23157
+ __publicField$9(this, "f9", 120);
23158
+ __publicField$9(this, "f10", 121);
23159
+ __publicField$9(this, "f11", 122);
23160
+ __publicField$9(this, "f12", 123);
23161
+ __publicField$9(this, "num_lock", 144);
23162
+ __publicField$9(this, "scroll_lock", 145);
23163
+ __publicField$9(this, "semi-colon", 186);
23164
+ __publicField$9(this, "equal_sign", 187);
23165
+ __publicField$9(this, ",", 188);
23032
23166
  // "comma";
23033
- __publicField$8(this, "-", 189);
23167
+ __publicField$9(this, "-", 189);
23034
23168
  // "dash";
23035
- __publicField$8(this, ".", 190);
23169
+ __publicField$9(this, ".", 190);
23036
23170
  // "period";
23037
- __publicField$8(this, "/", 191);
23171
+ __publicField$9(this, "/", 191);
23038
23172
  // "forward slash";
23039
- __publicField$8(this, "`", 192);
23173
+ __publicField$9(this, "`", 192);
23040
23174
  // "grave accent";
23041
- __publicField$8(this, "[", 219);
23175
+ __publicField$9(this, "[", 219);
23042
23176
  // "open bracket";
23043
- __publicField$8(this, "\\", 220);
23177
+ __publicField$9(this, "\\", 220);
23044
23178
  // "back slash";
23045
- __publicField$8(this, "]", 221);
23179
+ __publicField$9(this, "]", 221);
23046
23180
  // "close braket";
23047
- __publicField$8(this, "'", 222);
23181
+ __publicField$9(this, "'", 222);
23048
23182
  }
23049
23183
  // "single quote"
23050
23184
  }
23051
23185
 
23052
- var __defProp$a = Object.defineProperty;
23053
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
23054
- var __publicField$7 = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
23186
+ var __defProp$b = Object.defineProperty;
23187
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
23188
+ var __publicField$8 = (obj, key, value) => __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
23055
23189
  class Keys {
23056
23190
  constructor() {
23057
- __publicField$7(this, "keyCodeAlias", new KeyCodes());
23058
- __publicField$7(this, "keys", {});
23059
- __publicField$7(this, "_windowOnFocus");
23060
- __publicField$7(this, "_keysPressed");
23061
- __publicField$7(this, "_keysReleased");
23191
+ __publicField$8(this, "keyCodeAlias", new KeyCodes());
23192
+ __publicField$8(this, "keys", {});
23193
+ __publicField$8(this, "_windowOnFocus");
23194
+ __publicField$8(this, "_keysPressed");
23195
+ __publicField$8(this, "_keysReleased");
23062
23196
  this._windowOnFocus = this.windowOnFocus.bind(this);
23063
23197
  this._keysPressed = this.keysPressed.bind(this);
23064
23198
  this._keysReleased = this.keysReleased.bind(this);
@@ -23097,15 +23231,15 @@ var NgwLeaflet = (function () {
23097
23231
  }
23098
23232
  }
23099
23233
 
23100
- var __defProp$9 = Object.defineProperty;
23101
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
23102
- var __publicField$6 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
23234
+ var __defProp$a = Object.defineProperty;
23235
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
23236
+ var __publicField$7 = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
23103
23237
  class StateItem {
23104
23238
  constructor(webMap, opt) {
23105
23239
  this.webMap = webMap;
23106
- __publicField$6(this, "name");
23107
- __publicField$6(this, "event");
23108
- __publicField$6(this, "value");
23240
+ __publicField$7(this, "name");
23241
+ __publicField$7(this, "event");
23242
+ __publicField$7(this, "value");
23109
23243
  if (opt) {
23110
23244
  if (opt.value) {
23111
23245
  this.setValue(opt.value);
@@ -23114,7 +23248,11 @@ var NgwLeaflet = (function () {
23114
23248
  this.name = opt.name;
23115
23249
  }
23116
23250
  if (opt.event) {
23117
- this.event = opt.event;
23251
+ if (typeof opt.event === "string") {
23252
+ this.event = [opt.event];
23253
+ } else {
23254
+ this.event = opt.event;
23255
+ }
23118
23256
  }
23119
23257
  }
23120
23258
  }
@@ -23126,6 +23264,34 @@ var NgwLeaflet = (function () {
23126
23264
  }
23127
23265
  }
23128
23266
 
23267
+ var __defProp$9 = Object.defineProperty;
23268
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
23269
+ var __publicField$6 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
23270
+ class BoundState extends StateItem {
23271
+ constructor() {
23272
+ super(...arguments);
23273
+ __publicField$6(this, "name", "bounds");
23274
+ __publicField$6(this, "event", ["moveend"]);
23275
+ }
23276
+ getValue() {
23277
+ return this.webMap.getBounds();
23278
+ }
23279
+ setValue(bounds) {
23280
+ this.webMap.setView({ bounds });
23281
+ }
23282
+ toString() {
23283
+ const data = this.getValue();
23284
+ if (data) {
23285
+ return data.slice(0, 4).map((x) => x.toFixed(5)).join("_");
23286
+ }
23287
+ return void 0;
23288
+ }
23289
+ parse(str) {
23290
+ const lngLat = str.split("_").map(Number);
23291
+ return lngLat;
23292
+ }
23293
+ }
23294
+
23129
23295
  var __defProp$8 = Object.defineProperty;
23130
23296
  var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
23131
23297
  var __publicField$5 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -23133,7 +23299,7 @@ var NgwLeaflet = (function () {
23133
23299
  constructor() {
23134
23300
  super(...arguments);
23135
23301
  __publicField$5(this, "name", "center");
23136
- __publicField$5(this, "event", "moveend");
23302
+ __publicField$5(this, "event", ["moveend"]);
23137
23303
  }
23138
23304
  getValue() {
23139
23305
  return this.webMap.getCenter();
@@ -23141,9 +23307,13 @@ var NgwLeaflet = (function () {
23141
23307
  setValue(val) {
23142
23308
  this.webMap.setCenter(val);
23143
23309
  }
23144
- toString(data) {
23145
- const d = data.map((x) => x.toFixed(5));
23146
- return d[0] + "_" + d[1];
23310
+ toString() {
23311
+ const data = this.getValue();
23312
+ if (data) {
23313
+ const d = data.map((x) => x.toFixed(5));
23314
+ return d[0] + "_" + d[1];
23315
+ }
23316
+ return "";
23147
23317
  }
23148
23318
  parse(str) {
23149
23319
  const lngLat = str.split("_").map(Number);
@@ -23158,7 +23328,7 @@ var NgwLeaflet = (function () {
23158
23328
  constructor() {
23159
23329
  super(...arguments);
23160
23330
  __publicField$4(this, "name", "zoom");
23161
- __publicField$4(this, "event", "zoomend");
23331
+ __publicField$4(this, "event", ["zoomend"]);
23162
23332
  }
23163
23333
  getValue() {
23164
23334
  const zoom = this.webMap.getZoom();
@@ -23167,8 +23337,8 @@ var NgwLeaflet = (function () {
23167
23337
  setValue(val) {
23168
23338
  this.webMap.setZoom(val);
23169
23339
  }
23170
- toString(val) {
23171
- return String(val);
23340
+ toString() {
23341
+ return String(this.getValue());
23172
23342
  }
23173
23343
  parse(str) {
23174
23344
  return Number(str);
@@ -23237,14 +23407,14 @@ var NgwLeaflet = (function () {
23237
23407
  __publicField$3(this, "mapAdapter");
23238
23408
  __publicField$3(this, "runtimeParams", []);
23239
23409
  __publicField$3(this, "getPaintFunctions", _WebMapMain.getPaintFunctions);
23240
- __publicField$3(this, "mapState", [CenterState, ZoomState]);
23410
+ __publicField$3(this, "mapStateItems", [CenterState, ZoomState, BoundState]);
23241
23411
  __publicField$3(this, "id", ID++);
23242
23412
  /**
23243
23413
  * From runtime params
23244
23414
  */
23415
+ __publicField$3(this, "mapState", []);
23245
23416
  __publicField$3(this, "_initMapState", {});
23246
23417
  __publicField$3(this, "_starterKits");
23247
- __publicField$3(this, "_mapState", []);
23248
23418
  __publicField$3(this, "_extent");
23249
23419
  __publicField$3(this, "_eventsStatus", {});
23250
23420
  __publicField$3(this, "_coordFromMapClickAbort");
@@ -23279,7 +23449,7 @@ var NgwLeaflet = (function () {
23279
23449
  create() {
23280
23450
  return __async$5(this, null, function* () {
23281
23451
  if (!this.getEventStatus("create")) {
23282
- yield this._setInitMapState(this.mapState);
23452
+ yield this._setInitMapState(this.mapStateItems);
23283
23453
  yield this._setupMap();
23284
23454
  this._emitStatusEvent("create", this);
23285
23455
  }
@@ -23299,16 +23469,22 @@ var NgwLeaflet = (function () {
23299
23469
  this.mapAdapter.destroy();
23300
23470
  }
23301
23471
  }
23302
- getState() {
23472
+ mapStateWithFunc(func) {
23303
23473
  const state = {};
23304
- this._mapState.forEach((x) => {
23305
- state[x.name] = x.getValue();
23474
+ this.mapState.forEach((x) => {
23475
+ state[x.name] = func(x);
23306
23476
  });
23307
23477
  return state;
23308
23478
  }
23479
+ getStateAsString() {
23480
+ return this.mapStateWithFunc((x) => x.toString());
23481
+ }
23482
+ getState() {
23483
+ return this.mapStateWithFunc((x) => x.getValue());
23484
+ }
23309
23485
  getRuntimeParams() {
23310
23486
  const state = {};
23311
- this._mapState.forEach((x) => {
23487
+ this.mapState.forEach((x) => {
23312
23488
  for (const r of this.runtimeParams) {
23313
23489
  const val = r.get(x.name);
23314
23490
  if (val !== void 0) {
@@ -23650,7 +23826,7 @@ var NgwLeaflet = (function () {
23650
23826
  _setInitMapState(states) {
23651
23827
  for (const X of states) {
23652
23828
  const state = new X(this);
23653
- this._mapState.push(state);
23829
+ this.mapState.push(state);
23654
23830
  for (const r of this.runtimeParams) {
23655
23831
  const str = r.get(state.name);
23656
23832
  if (str !== void 0) {
@@ -23686,13 +23862,15 @@ var NgwLeaflet = (function () {
23686
23862
  events.forEach((x) => {
23687
23863
  this._mapEvents[x] = (data) => {
23688
23864
  if (this.runtimeParams.length) {
23689
- const mapStatusEvent = this._mapState.find((y) => y.event === x);
23690
- if (mapStatusEvent) {
23691
- const value = mapStatusEvent.toString(mapStatusEvent.getValue());
23865
+ const mapStatusEvents = this.mapState.filter(
23866
+ (y) => y.event.includes(x)
23867
+ );
23868
+ mapStatusEvents.forEach((mapStatusEvent) => {
23869
+ const value = mapStatusEvent.toString();
23692
23870
  this.runtimeParams.forEach((r) => {
23693
23871
  r.set(mapStatusEvent.name, value);
23694
23872
  });
23695
- }
23873
+ });
23696
23874
  }
23697
23875
  if (this._eventsStatus) {
23698
23876
  this.emitter.emit(x, data);
@@ -24268,11 +24446,11 @@ var NgwLeaflet = (function () {
24268
24446
  }
24269
24447
  return Promise.resolve();
24270
24448
  }
24271
- updateLayer(layerDef) {
24449
+ updateLayer(layerDef, options) {
24272
24450
  const layer = this.getLayer(layerDef);
24273
24451
  if (layer) {
24274
24452
  if (layer.updateLayer) {
24275
- return Promise.resolve(layer.updateLayer());
24453
+ return Promise.resolve(layer.updateLayer(options));
24276
24454
  } else if (this.isLayerVisible(layer)) {
24277
24455
  return this.hideLayer(layer, { silent: true }).then(() => {
24278
24456
  return this.showLayer(layer, { silent: true });