@florasync/leaflet-geokit 0.7.0 → 0.8.0

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.
@@ -145,9 +145,9 @@ function ro() {
145
145
  o.push(encodeURIComponent(i ? l.toUpperCase() : l) + "=" + encodeURIComponent(t[l]));
146
146
  return (!e || e.indexOf("?") === -1 ? "?" : "&") + o.join("&");
147
147
  }
148
- var H = /\{ *([\w_ -]+) *\}/g;
149
- function S(t, e) {
150
- return t.replace(H, function(i, o) {
148
+ var F = /\{ *([\w_ -]+) *\}/g;
149
+ function C(t, e) {
150
+ return t.replace(F, function(i, o) {
151
151
  var l = e[o];
152
152
  if (l === void 0)
153
153
  throw new Error("No value provided for variable " + i);
@@ -201,7 +201,7 @@ function ro() {
201
201
  splitWords: P,
202
202
  setOptions: A,
203
203
  getParamString: N,
204
- template: S,
204
+ template: C,
205
205
  isArray: D,
206
206
  indexOf: G,
207
207
  emptyImageUrl: Y,
@@ -1132,7 +1132,7 @@ function ro() {
1132
1132
  }
1133
1133
  return i === "auto" ? null : i;
1134
1134
  }
1135
- function F(t, e, i) {
1135
+ function H(t, e, i) {
1136
1136
  var o = document.createElement(t);
1137
1137
  return o.className = e || "", i && i.appendChild(o), o;
1138
1138
  }
@@ -1261,7 +1261,7 @@ function ro() {
1261
1261
  TRANSITION_END: rn,
1262
1262
  get: sn,
1263
1263
  getStyle: ee,
1264
- create: F,
1264
+ create: H,
1265
1265
  remove: J,
1266
1266
  empty: ye,
1267
1267
  toFront: Zt,
@@ -1643,9 +1643,9 @@ function ro() {
1643
1643
  this._stop();
1644
1644
  var o = this.project(this.getCenter()), l = this.project(t), u = this.getSize(), p = this._zoom;
1645
1645
  t = U(t), e = e === void 0 ? p : e;
1646
- var v = Math.max(u.x, u.y), y = v * this.getZoomScale(p, e), b = l.distanceTo(o) || 1, M = 1.42, C = M * M;
1646
+ var v = Math.max(u.x, u.y), y = v * this.getZoomScale(p, e), b = l.distanceTo(o) || 1, M = 1.42, S = M * M;
1647
1647
  function R($) {
1648
- var Oe = $ ? -1 : 1, Ir = $ ? y : v, zr = y * y - v * v + Oe * C * C * b * b, Or = 2 * Ir * C * b, xi = zr / Or, Yn = Math.sqrt(xi * xi + 1) - xi, Br = Yn < 1e-9 ? -18 : Math.log(Yn);
1648
+ var Oe = $ ? -1 : 1, Ir = $ ? y : v, zr = y * y - v * v + Oe * S * S * b * b, Or = 2 * Ir * S * b, xi = zr / Or, Yn = Math.sqrt(xi * xi + 1) - xi, Br = Yn < 1e-9 ? -18 : Math.log(Yn);
1649
1649
  return Br;
1650
1650
  }
1651
1651
  function st($) {
@@ -1662,7 +1662,7 @@ function ro() {
1662
1662
  return v * (et(ct) / et(ct + M * $));
1663
1663
  }
1664
1664
  function Tr($) {
1665
- return v * (et(ct) * mt(ct + M * $) - st(ct)) / C;
1665
+ return v * (et(ct) * mt(ct + M * $) - st(ct)) / S;
1666
1666
  }
1667
1667
  function Cr($) {
1668
1668
  return 1 - Math.pow(1 - $, 1.5);
@@ -1849,7 +1849,7 @@ function ro() {
1849
1849
  // then returns it. The pane is created as a child of `container`, or
1850
1850
  // as a child of the main map pane if not set.
1851
1851
  createPane: function(t, e) {
1852
- var i = "leaflet-pane" + (t ? " leaflet-" + t.replace("Pane", "") + "-pane" : ""), o = F("div", i, e || this._mapPane);
1852
+ var i = "leaflet-pane" + (t ? " leaflet-" + t.replace("Pane", "") + "-pane" : ""), o = H("div", i, e || this._mapPane);
1853
1853
  return t && (this._panes[t] = o), o;
1854
1854
  },
1855
1855
  // @section Methods for Getting Map State
@@ -1886,7 +1886,7 @@ function ro() {
1886
1886
  // the given bounds in its entirety.
1887
1887
  getBoundsZoom: function(t, e, i) {
1888
1888
  t = X(t), i = I(i || [0, 0]);
1889
- var o = this.getZoom() || 0, l = this.getMinZoom(), u = this.getMaxZoom(), p = t.getNorthWest(), v = t.getSouthEast(), y = this.getSize().subtract(i), b = lt(this.project(v, o), this.project(p, o)).getSize(), M = T.any3d ? this.options.zoomSnap : 1, C = y.x / b.x, R = y.y / b.y, st = e ? Math.max(C, R) : Math.min(C, R);
1889
+ var o = this.getZoom() || 0, l = this.getMinZoom(), u = this.getMaxZoom(), p = t.getNorthWest(), v = t.getSouthEast(), y = this.getSize().subtract(i), b = lt(this.project(v, o), this.project(p, o)).getSize(), M = T.any3d ? this.options.zoomSnap : 1, S = y.x / b.x, R = y.y / b.y, st = e ? Math.max(S, R) : Math.min(S, R);
1890
1890
  return o = this.getScaleZoom(st, o), M && (o = Math.round(o / (M / 100)) * (M / 100), o = e ? Math.ceil(o / M) * M : Math.floor(o / M) * M), Math.max(l, Math.min(u, o));
1891
1891
  },
1892
1892
  // @method getSize(): Point
@@ -2269,7 +2269,7 @@ function ro() {
2269
2269
  return (e && e.animate) !== !0 && !this.getSize().contains(i) ? !1 : (this.panBy(i, e), !0);
2270
2270
  },
2271
2271
  _createAnimProxy: function() {
2272
- var t = this._proxy = F("div", "leaflet-proxy leaflet-zoom-animated");
2272
+ var t = this._proxy = H("div", "leaflet-proxy leaflet-zoom-animated");
2273
2273
  this._panes.mapPane.appendChild(t), this.on("zoomanim", function(e) {
2274
2274
  var i = $e, o = this._proxy.style[i];
2275
2275
  Dt(this._proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1)), o === this._proxy.style[i] && this._animatingZoom && this._onZoomTransitionEnd();
@@ -2374,10 +2374,10 @@ function ro() {
2374
2374
  return t.remove(), this;
2375
2375
  },
2376
2376
  _initControlPos: function() {
2377
- var t = this._controlCorners = {}, e = "leaflet-", i = this._controlContainer = F("div", e + "control-container", this._container);
2377
+ var t = this._controlCorners = {}, e = "leaflet-", i = this._controlContainer = H("div", e + "control-container", this._container);
2378
2378
  function o(l, u) {
2379
2379
  var p = e + l + " " + e + u;
2380
- t[l + u] = F("div", p, i);
2380
+ t[l + u] = H("div", p, i);
2381
2381
  }
2382
2382
  o("top", "left"), o("top", "right"), o("bottom", "left"), o("bottom", "right");
2383
2383
  },
@@ -2466,14 +2466,14 @@ function ro() {
2466
2466
  return K(this._container, "leaflet-control-layers-expanded"), this;
2467
2467
  },
2468
2468
  _initLayout: function() {
2469
- var t = "leaflet-control-layers", e = this._container = F("div", t), i = this.options.collapsed;
2469
+ var t = "leaflet-control-layers", e = this._container = H("div", t), i = this.options.collapsed;
2470
2470
  e.setAttribute("aria-haspopup", !0), re(e), di(e);
2471
- var o = this._section = F("section", t + "-list");
2471
+ var o = this._section = H("section", t + "-list");
2472
2472
  i && (this._map.on("click", this.collapse, this), O(e, {
2473
2473
  mouseenter: this._expandSafely,
2474
2474
  mouseleave: this.collapse
2475
2475
  }, this));
2476
- var l = this._layersLink = F("a", t + "-toggle", e);
2476
+ var l = this._layersLink = H("a", t + "-toggle", e);
2477
2477
  l.href = "#", l.title = "Layers", l.setAttribute("role", "button"), O(l, {
2478
2478
  keydown: function(u) {
2479
2479
  u.keyCode === 13 && this._expandSafely();
@@ -2482,7 +2482,7 @@ function ro() {
2482
2482
  click: function(u) {
2483
2483
  it(u), this._expandSafely();
2484
2484
  }
2485
- }, this), i || this.expand(), this._baseLayersList = F("div", t + "-base", o), this._separator = F("div", t + "-separator", o), this._overlaysList = F("div", t + "-overlays", o), e.appendChild(o);
2485
+ }, this), i || this.expand(), this._baseLayersList = H("div", t + "-base", o), this._separator = H("div", t + "-separator", o), this._overlaysList = H("div", t + "-overlays", o), e.appendChild(o);
2486
2486
  },
2487
2487
  _getLayer: function(t) {
2488
2488
  for (var e = 0; e < this._layers.length; e++)
@@ -2576,7 +2576,7 @@ function ro() {
2576
2576
  zoomOutTitle: "Zoom out"
2577
2577
  },
2578
2578
  onAdd: function(t) {
2579
- var e = "leaflet-control-zoom", i = F("div", e + " leaflet-bar"), o = this.options;
2579
+ var e = "leaflet-control-zoom", i = H("div", e + " leaflet-bar"), o = this.options;
2580
2580
  return this._zoomInButton = this._createButton(
2581
2581
  o.zoomInText,
2582
2582
  o.zoomInTitle,
@@ -2607,7 +2607,7 @@ function ro() {
2607
2607
  !this._disabled && this._map._zoom > this._map.getMinZoom() && this._map.zoomOut(this._map.options.zoomDelta * (t.shiftKey ? 3 : 1));
2608
2608
  },
2609
2609
  _createButton: function(t, e, i, o, l) {
2610
- var u = F("a", i, o);
2610
+ var u = H("a", i, o);
2611
2611
  return u.innerHTML = t, u.href = "#", u.title = e, u.setAttribute("role", "button"), u.setAttribute("aria-label", e), re(u), O(u, "click", Ot), O(u, "click", l, this), O(u, "click", this._refocusOnMap, this), u;
2612
2612
  },
2613
2613
  _updateDisabled: function() {
@@ -2640,14 +2640,14 @@ function ro() {
2640
2640
  // If `true`, the control is updated on [`moveend`](#map-moveend), otherwise it's always up-to-date (updated on [`move`](#map-move)).
2641
2641
  },
2642
2642
  onAdd: function(t) {
2643
- var e = "leaflet-control-scale", i = F("div", e), o = this.options;
2643
+ var e = "leaflet-control-scale", i = H("div", e), o = this.options;
2644
2644
  return this._addScales(o, e + "-line", i), t.on(o.updateWhenIdle ? "moveend" : "move", this._update, this), t.whenReady(this._update, this), i;
2645
2645
  },
2646
2646
  onRemove: function(t) {
2647
2647
  t.off(this.options.updateWhenIdle ? "moveend" : "move", this._update, this);
2648
2648
  },
2649
2649
  _addScales: function(t, e, i) {
2650
- t.metric && (this._mScale = F("div", e, i)), t.imperial && (this._iScale = F("div", e, i));
2650
+ t.metric && (this._mScale = H("div", e, i)), t.imperial && (this._iScale = H("div", e, i));
2651
2651
  },
2652
2652
  _update: function() {
2653
2653
  var t = this._map, e = t.getSize().y / 2, i = t.distance(
@@ -2689,7 +2689,7 @@ function ro() {
2689
2689
  A(this, t), this._attributions = {};
2690
2690
  },
2691
2691
  onAdd: function(t) {
2692
- t.attributionControl = this, this._container = F("div", "leaflet-control-attribution"), re(this._container);
2692
+ t.attributionControl = this, this._container = H("div", "leaflet-control-attribution"), re(this._container);
2693
2693
  for (var e in t._layers)
2694
2694
  t._layers[e].getAttribution && this.addAttribution(t._layers[e].getAttribution());
2695
2695
  return this._update(), t.on("layeradd", this._addAttribution, this), this._container;
@@ -2831,12 +2831,12 @@ function ro() {
2831
2831
  }
2832
2832
  });
2833
2833
  function _n(t, e, i) {
2834
- var o, l = [1, 4, 2, 8], u, p, v, y, b, M, C, R;
2834
+ var o, l = [1, 4, 2, 8], u, p, v, y, b, M, S, R;
2835
2835
  for (u = 0, M = t.length; u < M; u++)
2836
2836
  t[u]._code = Bt(t[u], e);
2837
2837
  for (v = 0; v < 4; v++) {
2838
- for (C = l[v], o = [], u = 0, M = t.length, p = M - 1; u < M; p = u++)
2839
- y = t[u], b = t[p], y._code & C ? b._code & C || (R = ke(b, y, C, e, i), R._code = Bt(R, e), o.push(R)) : (b._code & C && (R = ke(b, y, C, e, i), R._code = Bt(R, e), o.push(R)), o.push(y));
2838
+ for (S = l[v], o = [], u = 0, M = t.length, p = M - 1; u < M; p = u++)
2839
+ y = t[u], b = t[p], y._code & S ? b._code & S || (R = ke(b, y, S, e, i), R._code = Bt(R, e), o.push(R)) : (b._code & S && (R = ke(b, y, S, e, i), R._code = Bt(R, e), o.push(R)), o.push(y));
2840
2840
  t = o;
2841
2841
  }
2842
2842
  return t;
@@ -2846,18 +2846,18 @@ function ro() {
2846
2846
  if (!t || t.length === 0)
2847
2847
  throw new Error("latlngs not passed");
2848
2848
  pt(t) || (console.warn("latlngs are not flat! Only the first ring will be used"), t = t[0]);
2849
- var C = U([0, 0]), R = X(t), st = R.getNorthWest().distanceTo(R.getSouthWest()) * R.getNorthEast().distanceTo(R.getNorthWest());
2850
- st < 1700 && (C = mi(t));
2849
+ var S = U([0, 0]), R = X(t), st = R.getNorthWest().distanceTo(R.getSouthWest()) * R.getNorthEast().distanceTo(R.getNorthWest());
2850
+ st < 1700 && (S = mi(t));
2851
2851
  var et = t.length, mt = [];
2852
2852
  for (i = 0; i < et; i++) {
2853
2853
  var ct = U(t[i]);
2854
- mt.push(e.project(U([ct.lat - C.lat, ct.lng - C.lng])));
2854
+ mt.push(e.project(U([ct.lat - S.lat, ct.lng - S.lng])));
2855
2855
  }
2856
2856
  for (v = y = b = 0, i = 0, o = et - 1; i < et; o = i++)
2857
2857
  l = mt[i], u = mt[o], p = l.y * u.x - u.y * l.x, y += (l.x + u.x) * p, b += (l.y + u.y) * p, v += p * 3;
2858
2858
  v === 0 ? M = mt[0] : M = [y / v, b / v];
2859
2859
  var qt = e.unproject(I(M));
2860
- return U([qt.lat + C.lat, qt.lng + C.lng]);
2860
+ return U([qt.lat + S.lat, qt.lng + S.lng]);
2861
2861
  }
2862
2862
  function mi(t) {
2863
2863
  for (var e = 0, i = 0, o = 0, l = 0; l < t.length; l++) {
@@ -2941,7 +2941,7 @@ function ro() {
2941
2941
  if (!t || t.length === 0)
2942
2942
  throw new Error("latlngs not passed");
2943
2943
  pt(t) || (console.warn("latlngs are not flat! Only the first ring will be used"), t = t[0]);
2944
- var M = U([0, 0]), C = X(t), R = C.getNorthWest().distanceTo(C.getSouthWest()) * C.getNorthEast().distanceTo(C.getNorthWest());
2944
+ var M = U([0, 0]), S = X(t), R = S.getNorthWest().distanceTo(S.getSouthWest()) * S.getNorthEast().distanceTo(S.getNorthWest());
2945
2945
  R < 1700 && (M = mi(t));
2946
2946
  var st = t.length, et = [];
2947
2947
  for (i = 0; i < st; i++) {
@@ -3379,7 +3379,7 @@ function ro() {
3379
3379
  return t = e(t, /^url\((['"])?(.+)\1\)$/, 2), t && e(t, /^(.*)marker-icon\.png$/, 1);
3380
3380
  },
3381
3381
  _detectIconPath: function() {
3382
- var t = F("div", "leaflet-default-icon-path", document.body), e = ee(t, "background-image") || ee(t, "backgroundImage");
3382
+ var t = H("div", "leaflet-default-icon-path", document.body), e = ee(t, "background-image") || ee(t, "backgroundImage");
3383
3383
  if (document.body.removeChild(t), e = this._stripUrl(e), e)
3384
3384
  return e;
3385
3385
  var i = document.querySelector('link[href$="leaflet.css"]');
@@ -3802,8 +3802,8 @@ function ro() {
3802
3802
  var l = Math.PI / 180, u = this._mRadius / Pt.R / l, p = i.project([e + u, t]), v = i.project([e - u, t]), y = p.add(v).divideBy(2), b = i.unproject(y).lat, M = Math.acos((Math.cos(u * l) - Math.sin(e * l) * Math.sin(b * l)) / (Math.cos(e * l) * Math.cos(b * l))) / l;
3803
3803
  (isNaN(M) || M === 0) && (M = u / Math.cos(Math.PI / 180 * e)), this._point = y.subtract(i.getPixelOrigin()), this._radius = isNaN(M) ? 0 : y.x - i.project([b, t - M]).x, this._radiusY = y.y - p.y;
3804
3804
  } else {
3805
- var C = o.unproject(o.project(this._latlng).subtract([this._mRadius, 0]));
3806
- this._point = i.latLngToLayerPoint(this._latlng), this._radius = this._point.x - i.latLngToLayerPoint(C).x;
3805
+ var S = o.unproject(o.project(this._latlng).subtract([this._mRadius, 0]));
3806
+ this._point = i.latLngToLayerPoint(this._latlng), this._radius = this._point.x - i.latLngToLayerPoint(S).x;
3807
3807
  }
3808
3808
  this._updateBounds();
3809
3809
  }
@@ -3847,8 +3847,8 @@ function ro() {
3847
3847
  for (var e = 1 / 0, i = null, o = ae, l, u, p = 0, v = this._parts.length; p < v; p++)
3848
3848
  for (var y = this._parts[p], b = 1, M = y.length; b < M; b++) {
3849
3849
  l = y[b - 1], u = y[b];
3850
- var C = o(t, l, u, !0);
3851
- C < e && (e = C, i = o(t, l, u));
3850
+ var S = o(t, l, u, !0);
3851
+ S < e && (e = S, i = o(t, l, u));
3852
3852
  }
3853
3853
  return i && (i.distance = Math.sqrt(e)), i;
3854
3854
  },
@@ -4102,12 +4102,12 @@ function ro() {
4102
4102
  return y = Pe(o, i.type === "Polygon" ? 1 : 2, p), new Vt(y, e);
4103
4103
  case "GeometryCollection":
4104
4104
  for (b = 0, M = i.geometries.length; b < M; b++) {
4105
- var C = Ee({
4105
+ var S = Ee({
4106
4106
  geometry: i.geometries[b],
4107
4107
  type: "Feature",
4108
4108
  properties: t.properties
4109
4109
  }, e);
4110
- C && l.push(C);
4110
+ S && l.push(S);
4111
4111
  }
4112
4112
  return new kt(l);
4113
4113
  case "FeatureCollection":
@@ -4302,7 +4302,7 @@ function ro() {
4302
4302
  return this._image;
4303
4303
  },
4304
4304
  _initImage: function() {
4305
- var t = this._url.tagName === "IMG", e = this._image = t ? this._url : F("img");
4305
+ var t = this._url.tagName === "IMG", e = this._image = t ? this._url : H("img");
4306
4306
  if (B(e, "leaflet-image-layer"), this._zoomAnimated && B(e, "leaflet-zoom-animated"), this.options.className && B(e, this.options.className), e.onselectstart = w, e.onmousemove = w, e.onload = a(this.fire, this, "load"), e.onerror = a(this._overlayOnError, this, "error"), (this.options.crossOrigin || this.options.crossOrigin === "") && (e.crossOrigin = this.options.crossOrigin === !0 ? "" : this.options.crossOrigin), this.options.zIndex && this._updateZIndex(), t) {
4307
4307
  this._url = e.src;
4308
4308
  return;
@@ -4361,7 +4361,7 @@ function ro() {
4361
4361
  playsInline: !0
4362
4362
  },
4363
4363
  _initImage: function() {
4364
- var t = this._url.tagName === "VIDEO", e = this._image = t ? this._url : F("video");
4364
+ var t = this._url.tagName === "VIDEO", e = this._image = t ? this._url : H("video");
4365
4365
  if (B(e, "leaflet-image-layer"), this._zoomAnimated && B(e, "leaflet-zoom-animated"), this.options.className && B(e, this.options.className), e.onselectstart = w, e.onmousemove = w, e.onloadeddata = a(this.fire, this, "load"), t) {
4366
4366
  for (var i = e.getElementsByTagName("source"), o = [], l = 0; l < i.length; l++)
4367
4367
  o.push(i[l].src);
@@ -4370,7 +4370,7 @@ function ro() {
4370
4370
  }
4371
4371
  D(this._url) || (this._url = [this._url]), !this.options.keepAspectRatio && Object.prototype.hasOwnProperty.call(e.style, "objectFit") && (e.style.objectFit = "fill"), e.autoplay = !!this.options.autoplay, e.loop = !!this.options.loop, e.muted = !!this.options.muted, e.playsInline = !!this.options.playsInline;
4372
4372
  for (var u = 0; u < this._url.length; u++) {
4373
- var p = F("source");
4373
+ var p = H("source");
4374
4374
  p.src = this._url[u], e.appendChild(p);
4375
4375
  }
4376
4376
  }
@@ -4638,12 +4638,12 @@ function ro() {
4638
4638
  return (this.options.closeOnClick !== void 0 ? this.options.closeOnClick : this._map.options.closePopupOnClick) && (t.preclick = this.close), this.options.keepInView && (t.moveend = this._adjustPan), t;
4639
4639
  },
4640
4640
  _initLayout: function() {
4641
- var t = "leaflet-popup", e = this._container = F(
4641
+ var t = "leaflet-popup", e = this._container = H(
4642
4642
  "div",
4643
4643
  t + " " + (this.options.className || "") + " leaflet-zoom-animated"
4644
- ), i = this._wrapper = F("div", t + "-content-wrapper", e);
4645
- if (this._contentNode = F("div", t + "-content", i), re(e), di(this._contentNode), O(e, "contextmenu", zt), this._tipContainer = F("div", t + "-tip-container", e), this._tip = F("div", t + "-tip", this._tipContainer), this.options.closeButton) {
4646
- var o = this._closeButton = F("a", t + "-close-button", e);
4644
+ ), i = this._wrapper = H("div", t + "-content-wrapper", e);
4645
+ if (this._contentNode = H("div", t + "-content", i), re(e), di(this._contentNode), O(e, "contextmenu", zt), this._tipContainer = H("div", t + "-tip-container", e), this._tip = H("div", t + "-tip", this._tipContainer), this.options.closeButton) {
4646
+ var o = this._closeButton = H("a", t + "-close-button", e);
4647
4647
  o.setAttribute("role", "button"), o.setAttribute("aria-label", "Close popup"), o.href = "#close", o.innerHTML = '<span aria-hidden="true">&#215;</span>', O(o, "click", function(l) {
4648
4648
  it(l), this.close();
4649
4649
  }, this);
@@ -4669,8 +4669,8 @@ function ro() {
4669
4669
  }
4670
4670
  var t = this._map, e = parseInt(ee(this._container, "marginBottom"), 10) || 0, i = this._container.offsetHeight + e, o = this._containerWidth, l = new z(this._containerLeft, -i - this._containerBottom);
4671
4671
  l._add(It(this._container));
4672
- var u = t.layerPointToContainerPoint(l), p = I(this.options.autoPanPadding), v = I(this.options.autoPanPaddingTopLeft || p), y = I(this.options.autoPanPaddingBottomRight || p), b = t.getSize(), M = 0, C = 0;
4673
- u.x + o + y.x > b.x && (M = u.x + o - b.x + y.x), u.x - M - v.x < 0 && (M = u.x - v.x), u.y + i + y.y > b.y && (C = u.y + i - b.y + y.y), u.y - C - v.y < 0 && (C = u.y - v.y), (M || C) && (this.options.keepInView && (this._autopanning = !0), t.fire("autopanstart").panBy([M, C]));
4672
+ var u = t.layerPointToContainerPoint(l), p = I(this.options.autoPanPadding), v = I(this.options.autoPanPaddingTopLeft || p), y = I(this.options.autoPanPaddingBottomRight || p), b = t.getSize(), M = 0, S = 0;
4673
+ u.x + o + y.x > b.x && (M = u.x + o - b.x + y.x), u.x - M - v.x < 0 && (M = u.x - v.x), u.y + i + y.y > b.y && (S = u.y + i - b.y + y.y), u.y - S - v.y < 0 && (S = u.y - v.y), (M || S) && (this.options.keepInView && (this._autopanning = !0), t.fire("autopanstart").panBy([M, S]));
4674
4674
  }
4675
4675
  },
4676
4676
  _getAnchor: function() {
@@ -4804,15 +4804,15 @@ function ro() {
4804
4804
  },
4805
4805
  _initLayout: function() {
4806
4806
  var t = "leaflet-tooltip", e = t + " " + (this.options.className || "") + " leaflet-zoom-" + (this._zoomAnimated ? "animated" : "hide");
4807
- this._contentNode = this._container = F("div", e), this._container.setAttribute("role", "tooltip"), this._container.setAttribute("id", "leaflet-tooltip-" + f(this));
4807
+ this._contentNode = this._container = H("div", e), this._container.setAttribute("role", "tooltip"), this._container.setAttribute("id", "leaflet-tooltip-" + f(this));
4808
4808
  },
4809
4809
  _updateLayout: function() {
4810
4810
  },
4811
4811
  _adjustPan: function() {
4812
4812
  },
4813
4813
  _setPosition: function(t) {
4814
- var e, i, o = this._map, l = this._container, u = o.latLngToContainerPoint(o.getCenter()), p = o.layerPointToContainerPoint(t), v = this.options.direction, y = l.offsetWidth, b = l.offsetHeight, M = I(this.options.offset), C = this._getAnchor();
4815
- v === "top" ? (e = y / 2, i = b) : v === "bottom" ? (e = y / 2, i = 0) : v === "center" ? (e = y / 2, i = b / 2) : v === "right" ? (e = 0, i = b / 2) : v === "left" ? (e = y, i = b / 2) : p.x < u.x ? (v = "right", e = 0, i = b / 2) : (v = "left", e = y + (M.x + C.x) * 2, i = b / 2), t = t.subtract(I(e, i, !0)).add(M).add(C), K(l, "leaflet-tooltip-right"), K(l, "leaflet-tooltip-left"), K(l, "leaflet-tooltip-top"), K(l, "leaflet-tooltip-bottom"), B(l, "leaflet-tooltip-" + v), Q(l, t);
4814
+ var e, i, o = this._map, l = this._container, u = o.latLngToContainerPoint(o.getCenter()), p = o.layerPointToContainerPoint(t), v = this.options.direction, y = l.offsetWidth, b = l.offsetHeight, M = I(this.options.offset), S = this._getAnchor();
4815
+ v === "top" ? (e = y / 2, i = b) : v === "bottom" ? (e = y / 2, i = 0) : v === "center" ? (e = y / 2, i = b / 2) : v === "right" ? (e = 0, i = b / 2) : v === "left" ? (e = y, i = b / 2) : p.x < u.x ? (v = "right", e = 0, i = b / 2) : (v = "left", e = y + (M.x + S.x) * 2, i = b / 2), t = t.subtract(I(e, i, !0)).add(M).add(S), K(l, "leaflet-tooltip-right"), K(l, "leaflet-tooltip-left"), K(l, "leaflet-tooltip-top"), K(l, "leaflet-tooltip-bottom"), B(l, "leaflet-tooltip-" + v), Q(l, t);
4816
4816
  },
4817
4817
  _updatePosition: function() {
4818
4818
  var t = this._map.latLngToLayerPoint(this._latlng);
@@ -5124,7 +5124,7 @@ function ro() {
5124
5124
  },
5125
5125
  _onOpaqueTile: w,
5126
5126
  _initContainer: function() {
5127
- this._container || (this._container = F("div", "leaflet-layer " + (this.options.className || "")), this._updateZIndex(), this.options.opacity < 1 && this._updateOpacity(), this.getPane().appendChild(this._container));
5127
+ this._container || (this._container = H("div", "leaflet-layer " + (this.options.className || "")), this._updateZIndex(), this.options.opacity < 1 && this._updateOpacity(), this.getPane().appendChild(this._container));
5128
5128
  },
5129
5129
  _updateLevels: function() {
5130
5130
  var t = this._tileZoom, e = this.options.maxZoom;
@@ -5132,7 +5132,7 @@ function ro() {
5132
5132
  for (var i in this._levels)
5133
5133
  i = Number(i), this._levels[i].el.children.length || i === t ? (this._levels[i].el.style.zIndex = e - Math.abs(t - i), this._onUpdateLevel(i)) : (J(this._levels[i].el), this._removeTilesAtZoom(i), this._onRemoveLevel(i), delete this._levels[i]);
5134
5134
  var o = this._levels[t], l = this._map;
5135
- return o || (o = this._levels[t] = {}, o.el = F("div", "leaflet-tile-container leaflet-zoom-animated", this._container), o.el.style.zIndex = e, o.origin = l.project(l.unproject(l.getPixelOrigin()), t).round(), o.zoom = t, this._setZoomTransform(o, l.getCenter(), l.getZoom()), w(o.el.offsetWidth), this._onCreateLevel(o)), this._level = o, o;
5135
+ return o || (o = this._levels[t] = {}, o.el = H("div", "leaflet-tile-container leaflet-zoom-animated", this._container), o.el.style.zIndex = e, o.origin = l.project(l.unproject(l.getPixelOrigin()), t).round(), o.zoom = t, this._setZoomTransform(o, l.getCenter(), l.getZoom()), w(o.el.offsetWidth), this._onCreateLevel(o)), this._level = o, o;
5136
5136
  }
5137
5137
  },
5138
5138
  _onUpdateLevel: w,
@@ -5250,9 +5250,9 @@ function ro() {
5250
5250
  this._setView(t, i);
5251
5251
  return;
5252
5252
  }
5253
- for (var C = l.min.y; C <= l.max.y; C++)
5253
+ for (var S = l.min.y; S <= l.max.y; S++)
5254
5254
  for (var R = l.min.x; R <= l.max.x; R++) {
5255
- var st = new z(R, C);
5255
+ var st = new z(R, S);
5256
5256
  if (st.z = this._tileZoom, !!this._isValidTile(st)) {
5257
5257
  var et = this._tiles[this._tileCoordsToKey(st)];
5258
5258
  et ? et.current = !0 : p.push(st);
@@ -5442,7 +5442,7 @@ function ro() {
5442
5442
  var i = this._globalTileRange.max.y - t.y;
5443
5443
  this.options.tms && (e.y = i), e["-y"] = i;
5444
5444
  }
5445
- return S(this._url, n(e, this.options));
5445
+ return C(this._url, n(e, this.options));
5446
5446
  },
5447
5447
  _tileOnLoad: function(t, e) {
5448
5448
  T.ielt9 ? setTimeout(a(t, this, null, e), 0) : t(null, e);
@@ -5803,7 +5803,7 @@ function ro() {
5803
5803
  };
5804
5804
  })(), Ar = {
5805
5805
  _initContainer: function() {
5806
- this._container = F("div", "leaflet-vml-container");
5806
+ this._container = H("div", "leaflet-vml-container");
5807
5807
  },
5808
5808
  _update: function() {
5809
5809
  this._map._animatingZoom || (Et.prototype._update.call(this), this.fire("update"));
@@ -5970,7 +5970,7 @@ function ro() {
5970
5970
  }, this);
5971
5971
  },
5972
5972
  _onMouseMove: function(t) {
5973
- this._moved || (this._moved = !0, this._box = F("div", "leaflet-zoom-box", this._container), B(this._container, "leaflet-crosshair"), this._map.fire("boxzoomstart")), this._point = this._map.mouseEventToContainerPoint(t);
5973
+ this._moved || (this._moved = !0, this._box = H("div", "leaflet-zoom-box", this._container), B(this._container, "leaflet-crosshair"), this._map.fire("boxzoomstart")), this._point = this._map.mouseEventToContainerPoint(t);
5974
5974
  var e = new j(this._point, this._startPoint), i = e.getSize();
5975
5975
  Q(this._box, e.min), this._box.style.width = i.x + "px", this._box.style.height = i.y + "px";
5976
5976
  },
@@ -6118,10 +6118,10 @@ function ro() {
6118
6118
  e.fire("moveend");
6119
6119
  else {
6120
6120
  this._prunePositions(+/* @__PURE__ */ new Date());
6121
- var l = this._lastPos.subtract(this._positions[0]), u = (this._lastTime - this._times[0]) / 1e3, p = i.easeLinearity, v = l.multiplyBy(p / u), y = v.distanceTo([0, 0]), b = Math.min(i.inertiaMaxSpeed, y), M = v.multiplyBy(b / y), C = b / (i.inertiaDeceleration * p), R = M.multiplyBy(-C / 2).round();
6121
+ var l = this._lastPos.subtract(this._positions[0]), u = (this._lastTime - this._times[0]) / 1e3, p = i.easeLinearity, v = l.multiplyBy(p / u), y = v.distanceTo([0, 0]), b = Math.min(i.inertiaMaxSpeed, y), M = v.multiplyBy(b / y), S = b / (i.inertiaDeceleration * p), R = M.multiplyBy(-S / 2).round();
6122
6122
  !R.x && !R.y ? e.fire("moveend") : (R = e._limitOffset(R, e.options.maxBounds), ot(function() {
6123
6123
  e.panBy(R, {
6124
- duration: C,
6124
+ duration: S,
6125
6125
  easeLinearity: p,
6126
6126
  noMoveStart: !0,
6127
6127
  animate: !0
@@ -8247,28 +8247,28 @@ class Ds {
8247
8247
  this.map = h, this.onSave = c, this.measurementSystem = n, this.controlsGroup = tt.layerGroup().addTo(h), this.baseCircleOptions = { ...s.options }, delete this.baseCircleOptions.editing, delete this.baseCircleOptions.original, this.addLayer(s), this.installEditEventBridges(), this.renderControls();
8248
8248
  }
8249
8249
  installEditEventBridges() {
8250
- var g, w, x, E, P, A, N, H;
8251
- const h = Ne, s = (w = (g = h == null ? void 0 : h.Draw) == null ? void 0 : g.Event) == null ? void 0 : w.EDITMOVE, c = (E = (x = h == null ? void 0 : h.Draw) == null ? void 0 : x.Event) == null ? void 0 : E.EDITRESIZE, n = (A = (P = h == null ? void 0 : h.Draw) == null ? void 0 : P.Event) == null ? void 0 : A.EDITSTART, r = (H = (N = h == null ? void 0 : h.Draw) == null ? void 0 : N.Event) == null ? void 0 : H.EDITSTOP;
8250
+ var g, w, x, E, P, A, N, F;
8251
+ const h = Ne, s = (w = (g = h == null ? void 0 : h.Draw) == null ? void 0 : g.Event) == null ? void 0 : w.EDITMOVE, c = (E = (x = h == null ? void 0 : h.Draw) == null ? void 0 : x.Event) == null ? void 0 : E.EDITRESIZE, n = (A = (P = h == null ? void 0 : h.Draw) == null ? void 0 : P.Event) == null ? void 0 : A.EDITSTART, r = (F = (N = h == null ? void 0 : h.Draw) == null ? void 0 : N.Event) == null ? void 0 : F.EDITSTOP;
8252
8252
  if (!s || !c) return;
8253
- const a = (S) => {
8254
- const D = S == null ? void 0 : S.layer;
8253
+ const a = (C) => {
8254
+ const D = C == null ? void 0 : C.layer;
8255
8255
  D && this.layers.includes(D) && this.syncCenters(D);
8256
- }, d = (S) => {
8257
- const D = S == null ? void 0 : S.layer;
8256
+ }, d = (C) => {
8257
+ const D = C == null ? void 0 : C.layer;
8258
8258
  D && this.layers.includes(D) && (this.updateLabels(D), this.requestRenderControls());
8259
- }, f = (S) => {
8259
+ }, f = (C) => {
8260
8260
  var q;
8261
- const D = S == null ? void 0 : S.layer;
8261
+ const D = C == null ? void 0 : C.layer;
8262
8262
  if (!D || !this.layers.includes(D)) return;
8263
8263
  const G = D;
8264
8264
  ((q = G.getTooltip) == null ? void 0 : q.call(G)) && this.updateLabels(G);
8265
8265
  }, _ = () => {
8266
- this.layers.forEach((S) => {
8266
+ this.layers.forEach((C) => {
8267
8267
  var G;
8268
- const D = (G = S.getTooltip) == null ? void 0 : G.call(S);
8269
- D && (S.setTooltipContent(
8270
- fe(S.getRadius(), this.measurementSystem)
8271
- ), D.options.offset = [10, 0], D.options.direction = "right", S.closeTooltip(), S.openTooltip());
8268
+ const D = (G = C.getTooltip) == null ? void 0 : G.call(C);
8269
+ D && (C.setTooltipContent(
8270
+ fe(C.getRadius(), this.measurementSystem)
8271
+ ), D.options.offset = [10, 0], D.options.direction = "right", C.closeTooltip(), C.openTooltip());
8272
8272
  });
8273
8273
  };
8274
8274
  this.map.on(s, a), this.map.on(c, d), n && (this.map.on(n, f), this.detachMapListeners.push(() => this.map.off(n, f))), r && (this.map.on(r, _), this.detachMapListeners.push(() => this.map.off(r, _))), this.detachMapListeners.push(() => this.map.off(s, a)), this.detachMapListeners.push(() => this.map.off(c, d));
@@ -8461,23 +8461,23 @@ function Us(m, h, s, c) {
8461
8461
  const n = Jt(m), r = Jt(s), a = Jt(c - h), d = Math.atan((1 - Rt) * Math.tan(n)), f = Math.atan((1 - Rt) * Math.tan(r)), _ = Math.sin(d), g = Math.cos(d), w = Math.sin(f), x = Math.cos(f);
8462
8462
  let E = a, P = 0, A = 0;
8463
8463
  const N = 200;
8464
- let H = 0, S = 0, D = 0, G = 0, Y = 0;
8464
+ let F = 0, C = 0, D = 0, G = 0, Y = 0;
8465
8465
  for (; Math.abs(E - P) > 1e-12 && A < N; ) {
8466
8466
  const rt = Math.sin(E), _e = Math.cos(E);
8467
- if (H = Math.sqrt(
8467
+ if (F = Math.sqrt(
8468
8468
  (x * rt) ** 2 + (g * w - _ * x * _e) ** 2
8469
- ), H === 0)
8469
+ ), F === 0)
8470
8470
  return {
8471
8471
  distanceMeters: 0,
8472
8472
  bearingRad: 0,
8473
8473
  iterations: A,
8474
8474
  converged: !0
8475
8475
  };
8476
- S = _ * w + g * x * _e, D = Math.atan2(H, S);
8477
- const ut = g * x * rt / H;
8478
- G = 1 - ut ** 2, Y = G === 0 ? 0 : S - 2 * _ * w / G;
8476
+ C = _ * w + g * x * _e, D = Math.atan2(F, C);
8477
+ const ut = g * x * rt / F;
8478
+ G = 1 - ut ** 2, Y = G === 0 ? 0 : C - 2 * _ * w / G;
8479
8479
  const Kt = Rt / 16 * G * (4 + Rt * (4 - 3 * G));
8480
- P = E, E = a + (1 - Kt) * Rt * ut * (D + Kt * H * (Y + Kt * S * (-1 + 2 * Y ** 2))), A += 1;
8480
+ P = E, E = a + (1 - Kt) * Rt * ut * (D + Kt * F * (Y + Kt * C * (-1 + 2 * Y ** 2))), A += 1;
8481
8481
  }
8482
8482
  if (A >= N)
8483
8483
  return {
@@ -8486,7 +8486,7 @@ function Us(m, h, s, c) {
8486
8486
  iterations: A,
8487
8487
  converged: !1
8488
8488
  };
8489
- const q = (ho ** 2 - jt ** 2) / jt ** 2 * G, at = 1 + q / 16384 * (4096 + q * (-768 + q * (320 - 175 * q))), _t = q / 1024 * (256 + q * (-128 + q * (74 - 47 * q))), Nt = _t * H * (Y + _t / 4 * (S * (-1 + 2 * Y ** 2) - _t / 6 * Y * (-3 + 4 * H ** 2) * (-3 + 4 * Y ** 2))), me = jt * at * (D - Nt), ot = Math.atan2(
8489
+ const q = (ho ** 2 - jt ** 2) / jt ** 2 * G, at = 1 + q / 16384 * (4096 + q * (-768 + q * (320 - 175 * q))), _t = q / 1024 * (256 + q * (-128 + q * (74 - 47 * q))), Nt = _t * F * (Y + _t / 4 * (C * (-1 + 2 * Y ** 2) - _t / 6 * Y * (-3 + 4 * F ** 2) * (-3 + 4 * Y ** 2))), me = jt * at * (D - Nt), ot = Math.atan2(
8490
8490
  x * Math.sin(E),
8491
8491
  g * w - _ * x * Math.cos(E)
8492
8492
  );
@@ -8503,7 +8503,7 @@ function Zs(m, h, s, c) {
8503
8503
  ), P = _ * w + g * x * Math.cos(a), A = Math.atan2(E, P);
8504
8504
  if (A === 0)
8505
8505
  return { distanceMeters: 0, bearingRad: 0 };
8506
- const H = 1 - (g * x * Math.sin(a) / Math.sin(A)) ** 2, S = H === 0 ? 0 : P - 2 * _ * w / H, D = (ho ** 2 - jt ** 2) / jt ** 2 * H, G = 1 + D / 16384 * (4096 + D * (-768 + D * (320 - 175 * D))), Y = D / 1024 * (256 + D * (-128 + D * (74 - 47 * D))), q = Y * E * (S + Y / 4 * (P * (-1 + 2 * S ** 2) - Y / 6 * S * (-3 + 4 * E ** 2) * (-3 + 4 * S ** 2))), at = jt * G * (A - q), _t = Math.atan2(
8506
+ const F = 1 - (g * x * Math.sin(a) / Math.sin(A)) ** 2, C = F === 0 ? 0 : P - 2 * _ * w / F, D = (ho ** 2 - jt ** 2) / jt ** 2 * F, G = 1 + D / 16384 * (4096 + D * (-768 + D * (320 - 175 * D))), Y = D / 1024 * (256 + D * (-128 + D * (74 - 47 * D))), q = Y * E * (C + Y / 4 * (P * (-1 + 2 * C ** 2) - Y / 6 * C * (-3 + 4 * E ** 2) * (-3 + 4 * C ** 2))), at = jt * G * (A - q), _t = Math.atan2(
8507
8507
  x * Math.sin(a),
8508
8508
  g * w - _ * x * Math.cos(a)
8509
8509
  );
@@ -8556,7 +8556,14 @@ function Mi(m, h = {}) {
8556
8556
  ), n;
8557
8557
  }
8558
8558
  let eo = !1;
8559
- class Ys {
8559
+ const Ys = {
8560
+ polygon: "tool:polygon:created",
8561
+ polyline: "tool:polyline:created",
8562
+ rectangle: "tool:rectangle:created",
8563
+ circle: "tool:circle:created",
8564
+ marker: "tool:marker:created"
8565
+ };
8566
+ class qs {
8560
8567
  constructor(h) {
8561
8568
  k(this, "container");
8562
8569
  k(this, "logger");
@@ -8597,6 +8604,32 @@ class Ys {
8597
8604
  useExternalLeaflet: h.useExternalLeaflet
8598
8605
  }), bs(this.L), xs(this.L), ws(this.L);
8599
8606
  }
8607
+ emitToolEvent(h, s) {
8608
+ var n, r;
8609
+ try {
8610
+ (r = (n = this.options.toolHooks) == null ? void 0 : n[h]) == null || r.call(n, s);
8611
+ } catch (a) {
8612
+ this._error(`tool hook failed: ${h}`, a);
8613
+ }
8614
+ const c = this.options.toolEventEmitter;
8615
+ if (c)
8616
+ try {
8617
+ if (typeof c.emit == "function") {
8618
+ c.emit(h, s);
8619
+ return;
8620
+ }
8621
+ typeof c.dispatchEvent == "function" && c.dispatchEvent(
8622
+ new CustomEvent(h, {
8623
+ detail: s
8624
+ })
8625
+ );
8626
+ } catch (a) {
8627
+ this._error(`tool emitter failed: ${h}`, a);
8628
+ }
8629
+ }
8630
+ setToolObservers(h) {
8631
+ this.options.toolHooks = h.toolHooks, this.options.toolEventEmitter = h.toolEventEmitter;
8632
+ }
8600
8633
  resolveLeaflet(h) {
8601
8634
  if (!h.useExternalLeaflet)
8602
8635
  return Ne;
@@ -8624,24 +8657,24 @@ class Ys {
8624
8657
  preferCanvas: A = !0,
8625
8658
  // Default to Canvas rendering for better performance
8626
8659
  useExternalLeaflet: N
8627
- } = this.options.map, H = [f, _], S = this.L;
8628
- N && Mi(S, {
8660
+ } = this.options.map, F = [f, _], C = this.L;
8661
+ N && Mi(C, {
8629
8662
  onError: (at) => this.logger.warn("external-leaflet-missing-draw", { message: at })
8630
- }), this.map = S.map(this.container, {
8663
+ }), this.map = C.map(this.container, {
8631
8664
  zoomControl: !0,
8632
8665
  preferCanvas: A
8633
- }).setView(H, g), this.setTileLayer({
8666
+ }).setView(F, g), this.setTileLayer({
8634
8667
  urlTemplate: E,
8635
8668
  attribution: P != null ? P : "",
8636
8669
  maxZoom: x
8637
- }), this.drawnItems = S.featureGroup().addTo(this.map);
8670
+ }), this.drawnItems = C.featureGroup().addTo(this.map);
8638
8671
  const D = this.buildDrawOptions(
8639
8672
  this.options.controls,
8640
8673
  !!this.options.readOnly
8641
- ), G = S.Control.Draw;
8674
+ ), G = C.Control.Draw;
8642
8675
  this.drawControl = new G(D), this.map.addControl(this.drawControl), this.applyLayerCakeToolbarIcon(), this.applyMoveToolbarIcon(), this.options.controls.ruler && (this.logger.debug("init:ruler", {
8643
- available: typeof S.control.ruler == "function"
8644
- }), typeof S.control.ruler == "function" ? (this.addRulerControl(), this.installMeasurementSettingsControl()) : this.logger.warn("init:ruler:missing", {
8676
+ available: typeof C.control.ruler == "function"
8677
+ }), typeof C.control.ruler == "function" ? (this.addRulerControl(), this.installMeasurementSettingsControl()) : this.logger.warn("init:ruler:missing", {
8645
8678
  msg: "L.control.ruler is not defined"
8646
8679
  })), this.patchLeafletDrawBugs(), this.installPolygonFinishPatch(), this.map.invalidateSize(), setTimeout(() => {
8647
8680
  var at;
@@ -8818,7 +8851,12 @@ class Ys {
8818
8851
  return a || null;
8819
8852
  }
8820
8853
  setRulerUnits(h) {
8821
- this.measurementSystem !== h && (this.measurementSystem = h, this.logger.debug("ruler:units", { system: h }), this.syncMeasurementModalState(), this.rebuildRulerControl());
8854
+ if (this.measurementSystem === h) return;
8855
+ const s = this.measurementSystem;
8856
+ this.measurementSystem = h, this.logger.debug("ruler:units", { system: h }), this.emitToolEvent("tool:ruler:units-changed", {
8857
+ previous: s,
8858
+ current: h
8859
+ }), this.syncMeasurementModalState(), this.rebuildRulerControl();
8822
8860
  }
8823
8861
  // ---------------- Internals ----------------
8824
8862
  buildDrawOptions(h, s) {
@@ -9049,7 +9087,7 @@ class Ys {
9049
9087
  const h = this.map, s = (f = (d = this.drawControl) == null ? void 0 : d._toolbars) == null ? void 0 : f.draw;
9050
9088
  if (!s || !!!((g = (_ = s._modes) == null ? void 0 : _.polygon) != null && g.handler)) return;
9051
9089
  const n = 10, r = (w) => {
9052
- var x, E, P, A, N, H, S, D;
9090
+ var x, E, P, A, N, F, C, D;
9053
9091
  try {
9054
9092
  const G = (E = (x = s._modes) == null ? void 0 : x.polygon) == null ? void 0 : E.handler;
9055
9093
  if (!G || !G._enabled) return;
@@ -9058,7 +9096,7 @@ class Ys {
9058
9096
  const q = (A = (P = Y[0]) == null ? void 0 : P.getLatLng) == null ? void 0 : A.call(P);
9059
9097
  if (!q) return;
9060
9098
  const at = h.latLngToContainerPoint(q), _t = h.latLngToContainerPoint(w.latlng);
9061
- Math.hypot(at.x - _t.x, at.y - _t.y) <= n && typeof G._finishShape == "function" && ((H = (N = w.originalEvent) == null ? void 0 : N.preventDefault) == null || H.call(N), (D = (S = w.originalEvent) == null ? void 0 : S.stopPropagation) == null || D.call(S), G._finishShape());
9099
+ Math.hypot(at.x - _t.x, at.y - _t.y) <= n && typeof G._finishShape == "function" && ((F = (N = w.originalEvent) == null ? void 0 : N.preventDefault) == null || F.call(N), (D = (C = w.originalEvent) == null ? void 0 : C.stopPropagation) == null || D.call(C), G._finishShape());
9062
9100
  } catch (G) {
9063
9101
  this._error("polygon-finish-patch", G);
9064
9102
  }
@@ -9091,8 +9129,8 @@ class Ys {
9091
9129
  let P;
9092
9130
  if (w) {
9093
9131
  let N = ["ha", "m"];
9094
- const H = typeof w;
9095
- H === "string" ? N = [w] : H !== "boolean" && (N = Array.isArray(w) ? w : N), g >= 1e6 && N.indexOf("km") !== -1 ? P = `${_(1e-6 * g, E.km)} km²` : g >= 1e4 && N.indexOf("ha") !== -1 ? P = `${_(1e-4 * g, E.ha)} ha` : P = `${_(g, E.m)} m²`;
9132
+ const F = typeof w;
9133
+ F === "string" ? N = [w] : F !== "boolean" && (N = Array.isArray(w) ? w : N), g >= 1e6 && N.indexOf("km") !== -1 ? P = `${_(1e-6 * g, E.km)} km²` : g >= 1e4 && N.indexOf("ha") !== -1 ? P = `${_(1e-4 * g, E.ha)} ha` : P = `${_(g, E.m)} m²`;
9096
9134
  } else
9097
9135
  g = g / 0.836127, g >= 3097600 ? P = `${_(g / 3097600, E.mi)} mi²` : g >= 4840 ? P = `${_(g / 4840, E.ac)} acres` : P = `${_(g, E.yd)} yd²`;
9098
9136
  return P;
@@ -9138,22 +9176,27 @@ class Ys {
9138
9176
  this.activeCakeSession = new Ds(
9139
9177
  this.map,
9140
9178
  r,
9141
- (g) => {
9179
+ (w) => {
9142
9180
  if (!this.drawnItems) return;
9143
- const w = this.store.add(g), x = this.L.geoJSON(g);
9144
- let E = 0;
9145
- x.eachLayer((P) => {
9146
- var N, H, S;
9147
- const A = (N = w[E]) != null ? N : w[w.length - 1];
9148
- P._fid = A, this.drawnItems.addLayer(P), this.installVertexContextMenu(P), (S = (H = this.options.callbacks) == null ? void 0 : H.onCreated) == null || S.call(H, {
9149
- id: A,
9181
+ const x = this.store.add(w), E = this.L.geoJSON(w);
9182
+ let P = 0;
9183
+ E.eachLayer((A) => {
9184
+ var F, C, D;
9185
+ const N = (F = x[P]) != null ? F : x[x.length - 1];
9186
+ A._fid = N, this.drawnItems.addLayer(A), this.installVertexContextMenu(A), (D = (C = this.options.callbacks) == null ? void 0 : C.onCreated) == null || D.call(C, {
9187
+ id: N,
9150
9188
  layerType: "polygon",
9151
- geoJSON: P.toGeoJSON()
9152
- }), E++;
9153
- }), this.activeCakeSession = null;
9189
+ geoJSON: A.toGeoJSON()
9190
+ }), P++;
9191
+ }), this.activeCakeSession = null, this.emitToolEvent("tool:layer-cake:saved", {
9192
+ featureCollection: w
9193
+ });
9154
9194
  },
9155
9195
  this.measurementSystem
9156
- );
9196
+ ), this.emitToolEvent("tool:layer-cake:session-started", {
9197
+ center: r.getLatLng(),
9198
+ radius: r.getRadius()
9199
+ });
9157
9200
  return;
9158
9201
  }
9159
9202
  this.drawnItems.addLayer(r);
@@ -9162,6 +9205,11 @@ class Ys {
9162
9205
  features: [d]
9163
9206
  })[0];
9164
9207
  r._fid = _, this.installVertexContextMenu(r), (n = (c = this.options.callbacks) == null ? void 0 : c.onCreated) == null || n.call(c, { id: _, layerType: a, geoJSON: d });
9208
+ const g = Ys[a];
9209
+ g && this.emitToolEvent(g, {
9210
+ id: _,
9211
+ geoJSON: d
9212
+ });
9165
9213
  } catch (r) {
9166
9214
  this._error("onCreated handler failed", r);
9167
9215
  }
@@ -9169,20 +9217,25 @@ class Ys {
9169
9217
  var s, c;
9170
9218
  try {
9171
9219
  const n = [];
9172
- h.layers.eachLayer((a) => {
9173
- const d = a.toGeoJSON(), f = a._fid;
9174
- if (f)
9175
- this.store.update(f, d), n.push(f);
9220
+ h.layers.eachLayer((d) => {
9221
+ const f = d.toGeoJSON(), _ = d._fid;
9222
+ if (_)
9223
+ this.store.update(_, f), n.push(_);
9176
9224
  else {
9177
- const _ = this.store.add({
9225
+ const g = this.store.add({
9178
9226
  type: "FeatureCollection",
9179
- features: [d]
9227
+ features: [f]
9180
9228
  })[0];
9181
- a._fid = _, n.push(_);
9229
+ d._fid = g, n.push(g);
9182
9230
  }
9183
- }), (c = (s = this.options.callbacks) == null ? void 0 : s.onEdited) == null || c.call(s, {
9231
+ });
9232
+ const a = this.store.toFeatureCollection();
9233
+ (c = (s = this.options.callbacks) == null ? void 0 : s.onEdited) == null || c.call(s, {
9184
9234
  ids: n,
9185
- geoJSON: this.store.toFeatureCollection()
9235
+ geoJSON: a
9236
+ }), this.emitToolEvent("tool:edit:applied", {
9237
+ ids: n,
9238
+ geoJSON: a
9186
9239
  });
9187
9240
  } catch (n) {
9188
9241
  this._error("onEdited handler failed", n);
@@ -9191,36 +9244,51 @@ class Ys {
9191
9244
  var s, c;
9192
9245
  try {
9193
9246
  const n = [];
9194
- h.layers.eachLayer((a) => {
9195
- const d = a._fid;
9196
- d && (n.push(d), this.store.remove(d));
9197
- }), (c = (s = this.options.callbacks) == null ? void 0 : s.onDeleted) == null || c.call(s, {
9247
+ h.layers.eachLayer((d) => {
9248
+ const f = d._fid;
9249
+ f && (n.push(f), this.store.remove(f));
9250
+ });
9251
+ const a = this.store.toFeatureCollection();
9252
+ (c = (s = this.options.callbacks) == null ? void 0 : s.onDeleted) == null || c.call(s, {
9198
9253
  ids: n,
9199
- geoJSON: this.store.toFeatureCollection()
9254
+ geoJSON: a
9255
+ }), this.emitToolEvent("tool:delete:applied", {
9256
+ ids: n,
9257
+ geoJSON: a
9200
9258
  });
9201
9259
  } catch (n) {
9202
9260
  this._error("onDeleted handler failed", n);
9203
9261
  }
9204
9262
  }), this.map.on("draw:moveend", (h) => {
9263
+ var s;
9205
9264
  try {
9206
- this.showMoveConfirmationUI(h.layer, h.originalGeoJSON, h.newGeoJSON);
9207
- } catch (s) {
9208
- this._error("draw:moveend handler failed", s);
9265
+ this.emitToolEvent("tool:move:pending", {
9266
+ layerId: (s = h == null ? void 0 : h.layer) == null ? void 0 : s._fid,
9267
+ originalGeoJSON: h == null ? void 0 : h.originalGeoJSON,
9268
+ newGeoJSON: h == null ? void 0 : h.newGeoJSON
9269
+ }), this.showMoveConfirmationUI(h.layer);
9270
+ } catch (c) {
9271
+ this._error("draw:moveend handler failed", c);
9209
9272
  }
9210
9273
  }), this.map.on("draw:moveconfirmed", (h) => {
9211
- var s, c;
9274
+ var s, c, n;
9212
9275
  try {
9213
- const n = h.layer, r = n._fid;
9214
- if (r) {
9215
- const a = n.toGeoJSON();
9216
- this.store.update(r, a), (c = (s = this.options.callbacks) == null ? void 0 : s.onEdited) == null || c.call(s, {
9217
- ids: [r],
9276
+ this.emitToolEvent("tool:move:confirmed", {
9277
+ layerId: (s = h == null ? void 0 : h.layer) == null ? void 0 : s._fid,
9278
+ originalGeoJSON: h == null ? void 0 : h.originalGeoJSON,
9279
+ newGeoJSON: h == null ? void 0 : h.newGeoJSON
9280
+ });
9281
+ const r = h.layer, a = r._fid;
9282
+ if (a) {
9283
+ const d = r.toGeoJSON();
9284
+ this.store.update(a, d), (n = (c = this.options.callbacks) == null ? void 0 : c.onEdited) == null || n.call(c, {
9285
+ ids: [a],
9218
9286
  geoJSON: this.store.toFeatureCollection()
9219
9287
  });
9220
9288
  }
9221
9289
  this.hideMoveConfirmationUI();
9222
- } catch (n) {
9223
- this._error("draw:moveconfirmed handler failed", n);
9290
+ } catch (r) {
9291
+ this._error("draw:moveconfirmed handler failed", r);
9224
9292
  }
9225
9293
  }));
9226
9294
  }
@@ -9302,8 +9370,8 @@ class Ys {
9302
9370
  const g = h.getLatLngs();
9303
9371
  return (Array.isArray(g[0]) ? g : [g]).forEach((x, E) => {
9304
9372
  x.forEach((P, A) => {
9305
- const N = n(P), H = r(N, a);
9306
- H < d && (d = H, f = E, _ = A);
9373
+ const N = n(P), F = r(N, a);
9374
+ F < d && (d = F, f = E, _ = A);
9307
9375
  });
9308
9376
  }), f === -1 || d > c ? null : { pathIndex: f, vertexIndex: _ };
9309
9377
  }
@@ -9335,38 +9403,40 @@ class Ys {
9335
9403
  }
9336
9404
  }
9337
9405
  // -------- Move tool Save/Cancel UI --------
9338
- showMoveConfirmationUI(h, s, c) {
9339
- var n, r;
9406
+ showMoveConfirmationUI(h) {
9407
+ var s, c;
9340
9408
  try {
9341
9409
  if (this.hideMoveConfirmationUI(), !this.container || !this.map) return;
9342
- const a = this.drawControl;
9343
- if (!a) return;
9344
- const d = (n = a == null ? void 0 : a._toolbars) == null ? void 0 : n.draw;
9345
- if (!d) return;
9346
- const f = d._modes || {};
9347
- let _ = null;
9348
- for (const E in f) {
9349
- const P = f[E];
9350
- if (((r = P == null ? void 0 : P.handler) == null ? void 0 : r.type) === "move") {
9351
- _ = P.handler;
9410
+ const n = this.drawControl;
9411
+ if (!n) return;
9412
+ const r = (s = n == null ? void 0 : n._toolbars) == null ? void 0 : s.draw;
9413
+ if (!r) return;
9414
+ const a = r._modes || {};
9415
+ let d = null;
9416
+ for (const w in a) {
9417
+ const x = a[w];
9418
+ if (((c = x == null ? void 0 : x.handler) == null ? void 0 : c.type) === "move") {
9419
+ d = x.handler;
9352
9420
  break;
9353
9421
  }
9354
9422
  }
9355
- this.activeMoveHandler = _;
9356
- const g = document.createElement("div");
9357
- g.style.position = "absolute", g.style.bottom = "60px", g.style.left = "50%", g.style.transform = "translateX(-50%)", g.style.display = "flex", g.style.gap = "8px", g.style.background = "#fff", g.style.border = "2px solid #3388ff", g.style.borderRadius = "8px", g.style.padding = "12px 16px", g.style.boxShadow = "0 4px 12px rgba(0,0,0,0.2)", g.style.zIndex = "10000", g.style.fontSize = "14px", g.style.fontFamily = "system-ui, sans-serif";
9358
- const w = document.createElement("button");
9359
- w.textContent = "✓ Save", w.style.padding = "8px 16px", w.style.border = "none", w.style.background = "#28a745", w.style.color = "#fff", w.style.borderRadius = "4px", w.style.cursor = "pointer", w.style.fontWeight = "600", w.style.fontSize = "14px", w.addEventListener("click", (E) => {
9360
- E.stopPropagation(), E.preventDefault(), _ != null && _.confirmMove && _.confirmMove();
9423
+ this.activeMoveHandler = d;
9424
+ const f = document.createElement("div");
9425
+ f.style.position = "absolute", f.style.bottom = "60px", f.style.left = "50%", f.style.transform = "translateX(-50%)", f.style.display = "flex", f.style.gap = "8px", f.style.background = "#fff", f.style.border = "2px solid #3388ff", f.style.borderRadius = "8px", f.style.padding = "12px 16px", f.style.boxShadow = "0 4px 12px rgba(0,0,0,0.2)", f.style.zIndex = "10000", f.style.fontSize = "14px", f.style.fontFamily = "system-ui, sans-serif";
9426
+ const _ = document.createElement("button");
9427
+ _.textContent = "✓ Save", _.style.padding = "8px 16px", _.style.border = "none", _.style.background = "#28a745", _.style.color = "#fff", _.style.borderRadius = "4px", _.style.cursor = "pointer", _.style.fontWeight = "600", _.style.fontSize = "14px", _.addEventListener("click", (w) => {
9428
+ w.stopPropagation(), w.preventDefault(), d != null && d.confirmMove && d.confirmMove();
9361
9429
  });
9362
- const x = document.createElement("button");
9363
- x.textContent = "✕ Cancel", x.style.padding = "8px 16px", x.style.border = "1px solid #ccc", x.style.background = "#fff", x.style.color = "#333", x.style.borderRadius = "4px", x.style.cursor = "pointer", x.style.fontWeight = "600", x.style.fontSize = "14px", x.addEventListener("click", (E) => {
9364
- E.stopPropagation(), E.preventDefault(), _ != null && _.cancelMove && _.cancelMove(), this.hideMoveConfirmationUI();
9365
- }), g.appendChild(w), g.appendChild(x), this.container.appendChild(g), this.moveConfirmationUI = g, this.logger.debug("showMoveConfirmationUI", {
9430
+ const g = document.createElement("button");
9431
+ g.textContent = "✕ Cancel", g.style.padding = "8px 16px", g.style.border = "1px solid #ccc", g.style.background = "#fff", g.style.color = "#333", g.style.borderRadius = "4px", g.style.cursor = "pointer", g.style.fontWeight = "600", g.style.fontSize = "14px", g.addEventListener("click", (w) => {
9432
+ w.stopPropagation(), w.preventDefault(), this.emitToolEvent("tool:move:cancelled", {
9433
+ layerId: h == null ? void 0 : h._fid
9434
+ }), d != null && d.cancelMove && d.cancelMove(), this.hideMoveConfirmationUI();
9435
+ }), f.appendChild(_), f.appendChild(g), this.container.appendChild(f), this.moveConfirmationUI = f, this.logger.debug("showMoveConfirmationUI", {
9366
9436
  layerId: h._fid
9367
9437
  });
9368
- } catch (a) {
9369
- this._error("showMoveConfirmationUI", a);
9438
+ } catch (n) {
9439
+ this._error("showMoveConfirmationUI", n);
9370
9440
  }
9371
9441
  }
9372
9442
  hideMoveConfirmationUI() {
@@ -9403,7 +9473,7 @@ function uo(m) {
9403
9473
  const h = m.trim();
9404
9474
  return h.length > 0 ? h : void 0;
9405
9475
  }
9406
- function qs(m) {
9476
+ function js(m) {
9407
9477
  const { style: h, attribution: s } = m, c = co(m.provider), n = uo(m.apiKey);
9408
9478
  switch (c) {
9409
9479
  case "osm":
@@ -9428,7 +9498,7 @@ function qs(m) {
9428
9498
  throw new Error(`Unknown tile provider: ${m.provider}`);
9429
9499
  }
9430
9500
  }
9431
- function js(m) {
9501
+ function Js(m) {
9432
9502
  const h = co(m.provider), s = uo(m.apiKey);
9433
9503
  return h ? h === "here" && !s ? { valid: !1, error: "HERE Maps requires an API key" } : { valid: !0 } : { valid: !1, error: "Provider is required" };
9434
9504
  }
@@ -9469,6 +9539,8 @@ class zi extends HTMLElement {
9469
9539
  k(this, "_useExternalLeaflet", !1);
9470
9540
  k(this, "_skipLeafletStyles", !1);
9471
9541
  k(this, "_leafletInstance");
9542
+ k(this, "_toolHooks");
9543
+ k(this, "_toolEventEmitter");
9472
9544
  this._root = this.attachShadow({ mode: "open" }), this._root.innerHTML = `
9473
9545
  <style>
9474
9546
  :host {
@@ -9530,7 +9602,7 @@ class zi extends HTMLElement {
9530
9602
  this._logger.debug("connectedCallback", this._currentConfig()), as({
9531
9603
  root: this._root,
9532
9604
  skipStyles: this._skipLeafletStyles
9533
- }), this._applyThemeStyles(), this._controller = new Ys({
9605
+ }), this._applyThemeStyles(), this._controller = new qs({
9534
9606
  container: this._container,
9535
9607
  map: this._mapConfig(),
9536
9608
  controls: this._controlsFromAttributes(),
@@ -9560,7 +9632,9 @@ class zi extends HTMLElement {
9560
9632
  }
9561
9633
  },
9562
9634
  leaflet: (s = this._leafletInstance) != null ? s : void 0,
9563
- useExternalLeaflet: this._useExternalLeaflet
9635
+ useExternalLeaflet: this._useExternalLeaflet,
9636
+ toolHooks: this._toolHooks,
9637
+ toolEventEmitter: this._toolEventEmitter
9564
9638
  }), await this._controller.init(), this._tileProvider && this._updateTileLayer();
9565
9639
  }
9566
9640
  async disconnectedCallback() {
@@ -9683,7 +9757,7 @@ class zi extends HTMLElement {
9683
9757
  style: this._tileStyle,
9684
9758
  apiKey: this._apiKey,
9685
9759
  attribution: this._tileAttribution
9686
- }, _ = js(f);
9760
+ }, _ = Js(f);
9687
9761
  if (!_.valid) {
9688
9762
  const x = (c = _.error) != null && c.toLowerCase().includes("api key") ? "missing_api_key" : "tile_load_failed";
9689
9763
  this._handleTileProviderError(
@@ -9693,7 +9767,7 @@ class zi extends HTMLElement {
9693
9767
  );
9694
9768
  return;
9695
9769
  }
9696
- const g = qs(f), w = this._activeTileProvider;
9770
+ const g = js(f), w = this._activeTileProvider;
9697
9771
  s.setTileLayer(g, {
9698
9772
  onTileError: (x) => {
9699
9773
  if (this._tileProvider !== d) return;
@@ -9863,6 +9937,28 @@ class zi extends HTMLElement {
9863
9937
  set leafletInstance(s) {
9864
9938
  this._leafletInstance = s;
9865
9939
  }
9940
+ get toolHooks() {
9941
+ return this._toolHooks;
9942
+ }
9943
+ set toolHooks(s) {
9944
+ this._toolHooks = s;
9945
+ const c = this._controller;
9946
+ typeof (c == null ? void 0 : c.setToolObservers) == "function" && c.setToolObservers({
9947
+ toolHooks: this._toolHooks,
9948
+ toolEventEmitter: this._toolEventEmitter
9949
+ });
9950
+ }
9951
+ get toolEventEmitter() {
9952
+ return this._toolEventEmitter;
9953
+ }
9954
+ set toolEventEmitter(s) {
9955
+ this._toolEventEmitter = s;
9956
+ const c = this._controller;
9957
+ typeof (c == null ? void 0 : c.setToolObservers) == "function" && c.setToolObservers({
9958
+ toolHooks: this._toolHooks,
9959
+ toolEventEmitter: this._toolEventEmitter
9960
+ });
9961
+ }
9866
9962
  get themeCss() {
9867
9963
  return this._themeCss;
9868
9964
  }
@@ -10065,16 +10161,16 @@ if (!customElements.get(no)) {
10065
10161
  }
10066
10162
  customElements.define(no, m);
10067
10163
  }
10068
- const Js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10164
+ const Ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10069
10165
  __proto__: null,
10070
10166
  LeafletDrawMapElement: zi
10071
- }, Symbol.toStringTag, { value: "Module" })), Ks = "leaflet-geokit";
10167
+ }, Symbol.toStringTag, { value: "Module" })), Xs = "leaflet-geokit";
10072
10168
  let Re = null;
10073
- function Xs() {
10074
- return typeof customElements == "undefined" ? !1 : !!customElements.get(Ks);
10169
+ function Qs() {
10170
+ return typeof customElements == "undefined" ? !1 : !!customElements.get(Xs);
10075
10171
  }
10076
- async function Qs() {
10077
- typeof customElements != "undefined" && (Xs() || (Re || (Re = Promise.resolve().then(() => Js).then(() => {
10172
+ async function $s() {
10173
+ typeof customElements != "undefined" && (Qs() || (Re || (Re = Promise.resolve().then(() => Ks).then(() => {
10078
10174
  }).finally(() => {
10079
10175
  Re = null;
10080
10176
  })), await Re));
@@ -10085,13 +10181,13 @@ const oo = [
10085
10181
  "leaflet-draw:deleted",
10086
10182
  "leaflet-draw:merged"
10087
10183
  ];
10088
- function $s(m) {
10184
+ function ta(m) {
10089
10185
  return m ? typeof m == "string" ? m : Object.entries(m).map(([h, s]) => `${h}: ${String(s)};`).join(" ") : "";
10090
10186
  }
10091
10187
  function Ei(m) {
10092
10188
  return m instanceof Error ? m : typeof m == "string" ? new Error(m) : new Error("Unknown GeoKit React shim error");
10093
10189
  }
10094
- function ta(m, h) {
10190
+ function ea(m, h) {
10095
10191
  Object.entries(h).forEach(([s, c]) => {
10096
10192
  if (c === !1 || c === null || c === void 0) {
10097
10193
  m.removeAttribute(s);
@@ -10104,24 +10200,24 @@ function ta(m, h) {
10104
10200
  m.setAttribute(s, String(c));
10105
10201
  });
10106
10202
  }
10107
- function ea(m, h) {
10203
+ function ia(m, h) {
10108
10204
  if (h === "external") {
10109
10205
  m.useExternalLeaflet = !0, m.skipLeafletStyles = !0, m.setAttribute("use-external-leaflet", ""), m.setAttribute("skip-leaflet-styles", "");
10110
10206
  return;
10111
10207
  }
10112
10208
  m.useExternalLeaflet = !1, m.skipLeafletStyles = !1, m.removeAttribute("use-external-leaflet"), m.removeAttribute("skip-leaflet-styles");
10113
10209
  }
10114
- function ia(m) {
10210
+ function na(m) {
10115
10211
  return function(s) {
10116
- const c = Zr(null), n = Hr(() => $s(s.style), [s.style]);
10212
+ const c = Zr(null), n = Hr(() => ta(s.style), [s.style]);
10117
10213
  return Fr(() => {
10118
10214
  let r = !1, a;
10119
- return Qs().then(() => {
10215
+ return $s().then(() => {
10120
10216
  if (r) return;
10121
10217
  const d = c.current;
10122
10218
  if (!d) return;
10123
10219
  const f = s.externalLeaflet != null ? s.externalLeaflet ? "external" : "bundled" : m;
10124
- ea(d, f), s.className ? d.setAttribute("class", s.className) : d.removeAttribute("class"), n ? d.setAttribute("style", n) : d.removeAttribute("style"), s.leafletInstance && (d.leafletInstance = s.leafletInstance), s.attributes && ta(d, s.attributes);
10220
+ ia(d, f), s.className ? d.setAttribute("class", s.className) : d.removeAttribute("class"), n ? d.setAttribute("style", n) : d.removeAttribute("style"), d.leafletInstance = s.leafletInstance, d.toolHooks = s.toolHooks, d.toolEventEmitter = s.toolEventEmitter, s.attributes && ea(d, s.attributes);
10125
10221
  const _ = async () => {
10126
10222
  var x, E, P;
10127
10223
  try {
@@ -10157,6 +10253,8 @@ function ia(m) {
10157
10253
  s.className,
10158
10254
  s.externalLeaflet,
10159
10255
  s.leafletInstance,
10256
+ s.toolHooks,
10257
+ s.toolEventEmitter,
10160
10258
  s.attributes,
10161
10259
  s.initialGeoJSONText,
10162
10260
  s.onChangeText,
@@ -10170,9 +10268,9 @@ function ia(m) {
10170
10268
  });
10171
10269
  };
10172
10270
  }
10173
- const ra = ia("bundled");
10271
+ const sa = na("bundled");
10174
10272
  export {
10175
- ra as ReactLeafletGeoKit,
10176
- ra as default
10273
+ sa as ReactLeafletGeoKit,
10274
+ sa as default
10177
10275
  };
10178
10276
  //# sourceMappingURL=index.js.map