@arenarium/maps 1.3.7 → 1.3.9

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.
Files changed (2) hide show
  1. package/dist/main.js +916 -912
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- class Ht {
1
+ class Zt {
2
2
  invoked = !1;
3
3
  running = !1;
4
4
  interval;
@@ -18,7 +18,7 @@ class Ht {
18
18
  this.invoked = !1, this.running = !1, this.timeout && window.clearTimeout(this.timeout), this.timeout = void 0;
19
19
  }
20
20
  }
21
- class yi {
21
+ class Mi {
22
22
  properites;
23
23
  state;
24
24
  constructor(e, n, r, i, s, a, u) {
@@ -36,7 +36,7 @@ class yi {
36
36
  };
37
37
  }
38
38
  }
39
- class bi {
39
+ class Ei {
40
40
  callback;
41
41
  timeout;
42
42
  id;
@@ -51,8 +51,8 @@ class bi {
51
51
  this.id != null && (window.clearInterval(this.id), this.id = void 0);
52
52
  }
53
53
  }
54
- const _i = 100;
55
- class Mi {
54
+ const xi = 100;
55
+ class Si {
56
56
  viewport = void 0;
57
57
  state = "idle";
58
58
  provider;
@@ -63,7 +63,7 @@ class Mi {
63
63
  onIdle;
64
64
  onClick;
65
65
  constructor(e, n, r, i, s, a) {
66
- this.provider = e, this.interval = new bi(this.onInterval.bind(this), _i / (navigator?.hardwareConcurrency ?? 1)), this.onCancel = n, this.onError = r, this.onMove = i, this.onIdle = s, this.onClick = a;
66
+ this.provider = e, this.interval = new Ei(this.onInterval.bind(this), xi / (navigator?.hardwareConcurrency ?? 1)), this.onCancel = n, this.onError = r, this.onMove = i, this.onIdle = s, this.onClick = a;
67
67
  }
68
68
  start() {
69
69
  this.interval.start(), this.provider.getContainer().addEventListener("click", this.onClick.bind(this));
@@ -87,7 +87,7 @@ class Mi {
87
87
  }
88
88
  }
89
89
  }
90
- class nr {
90
+ class sr {
91
91
  worker;
92
92
  workerInvocations;
93
93
  workerInvocationCounter = 0;
@@ -126,11 +126,11 @@ class We {
126
126
  return new We([], []);
127
127
  }
128
128
  }
129
- const rr = '(function(){"use strict";function w(l,t,e){return{x:T(t)*e,y:I(l)*e}}function m(l,t,e){return{lat:R(t/e),lng:P(l/e)}}function T(l){return(180+l)/360}function I(l){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l*Math.PI/360)))/360}function P(l){return l*360-180}function R(l){return 360/Math.PI*Math.atan(Math.exp((180-l*360)*Math.PI/180))-90}class c{sw;ne;constructor(t,e,n,s){if(n<t)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);if(s<e)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);this.sw={lat:t,lng:e},this.ne={lat:n,lng:s}}contains(t,e){return!(t<this.sw.lat||this.ne.lat<t||e<this.sw.lng||this.ne.lng<e)}intersects(t){return!(t.ne.lat<this.sw.lat||this.ne.lat<t.sw.lat||t.ne.lng<this.sw.lng||this.ne.lng<t.sw.lng)}}class h{blockL;blockR;sw;ne;constructor(t,e,n,s){if(n<t)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);this.sw={lat:t,lng:e},this.ne={lat:n,lng:s},e<s?(this.blockL=new c(t,e,n,s),this.blockR=new c(0,0,0,0)):(this.blockL=new c(t,-180,n,s),this.blockR=new c(t,e,n,180))}static bounds(t){const e=t.bounds,n=t.center;return e.sw.lng<=n.lng&&e.ne.lng<=n.lng?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:e.sw.lng>=n.lng&&e.ne.lng>=n.lng?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:Math.abs(e.ne.lng-n.lng)+Math.abs(e.sw.lng-n.lng)>360?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:e.ne.lng-e.sw.lng>360?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:t.bounds}static create(t){const e=this.bounds(t),n=e.sw,s=e.ne;return new h(n.lat,n.lng,s.lat,s.lng)}static offset(t,e,n){const s=this.bounds(t),r=t.zoom,o=e*Math.pow(2,r),i=w(s.sw.lat,s.sw.lng,o),a=w(s.ne.lat,s.ne.lng,o);let g=Math.max(i.x-n.left,0),f=Math.min(i.y+n.bottom,o),D=Math.min(a.x+n.right,o),N=Math.max(a.y-n.top,0);const z=m(g,f,o),C=m(D,N,o);return new h(z.lat,z.lng,C.lat,C.lng)}contains(t,e){return this.blockL.contains(t,e)||this.blockR.contains(t,e)}intersects(t){return this.blockL.intersects(t)||this.blockR.intersects(t)}}class S{id;bounds;markers;constructor(t,e){this.id=t,this.bounds=e,this.markers=[]}belongs(t){const e=this.bounds.sw;if(t.lat<e.lat||t.lng<e.lng)return!1;const n=this.bounds.ne;return!(n.lat<t.lat||n.lng<t.lng)}neighbours(t,e){const n=Math.abs(t.id.length-this.id.length);if(n>e)return!1;const s=Math.min(this.id.length,t.id.length)-e+n;for(let r=0;r<s;r++)if(this.id[r]!=t.id[r])return!1;return!0}}class u{tree;zoom;cell;branches;constructor(t,e,n,s){this.tree=t,this.zoom=n,this.cell=new S(e,s),this.branches=new Array}split(){const t=this.cell.bounds,e=Math.pow(2,this.tree.depth),n=(t.ne.lat-t.sw.lat)/e,s=(t.ne.lng-t.sw.lng)/e;for(let r=0;r<e;r++)for(let o=0;o<e;o++){const i=t.sw.lat+r*n,a=t.sw.lng+o*s,g=i+n,f=a+s;this.branches.push(new u(this.tree,`${this.cell.id}${r*2+o}`,this.zoom+this.tree.depth,{sw:{lat:i,lng:a},ne:{lat:g,lng:f}}))}}add(t){if(this.cell.belongs(t)==!1)return!1;if(this.cell.markers.length<this.tree.capacity)return this.cell.markers.push(t),!0;this.branches.length==0&&this.split();for(let e=0;e<this.branches.length;e++)if(this.branches[e].add(t))return!0;throw new Error("Failed to add marker to branch")}compact(){if(this.branches.length==0)return;for(let s=0;s<this.branches.length;s++)this.branches[s].compact();const t=new Array,e=new Array;for(let s=0;s<this.branches.length;s++){const r=this.branches[s];t.push(...r.branches),e.push(...r.cell.markers)}const n=new u(this.tree,this.cell.id,this.zoom+this.tree.depth,this.cell.bounds);n.branches=t,n.cell.markers=e,this.branches=[n]}cells(t,e,n){if(t<this.zoom||e.intersects(this.cell.bounds)==!1)return n;n.push(this.cell);for(let s=0;s<this.branches.length;s++)this.branches[s].cells(t,e,n);return n}print(t){console.log(`${"---".repeat(t)}|${this.cell.id} zoom=[${this.zoom}] markers=[${this.cell.markers.length}]`);for(let e=0;e<this.branches.length;e++)this.branches[e].print(t+1)}count(){return this.cell.markers.length+this.branches.reduce((t,e)=>t+e.count(),0)}}class x{capacity;depth;root;constructor(t,e,n){this.capacity=n,this.depth=e,this.root=new u(this,"R",t,{sw:{lat:-90,lng:-180},ne:{lat:90,lng:180}})}add(t){return this.root.add(t)}compact(){this.root.compact()}cells(t,e){const n=new Array;return this.root.cells(t,e,n),n}print(){this.root.print(0)}}const A=16,p=2,k=1,M=A*4;let b,d,E=p,$=k,y=M;const v={update(l,t,e){const n=-Math.floor(Math.log2(l.mapSize/y)),s=new x(n,$,E);for(let o=0;o<t.length;o++){const i=t[o];if(!s.add(i))throw new Error("Failed to add marker to tree")}const r=-n;for(let o=0;o<r;o++)s.compact();b=s,d=e},configure(l){E=l?.process?.visibility?.cell?.capacity??p,$=l?.process?.visibility?.cell?.depth??k,y=l?.process?.visibility?.cell?.size??M},filter(l,t){if(!b||!d)return[];const e=h.create(t);let n=[],s=t.zoom;for(;s<l.zoomMax&&n.length<d;)n=b.cells(s,e).flatMap(r=>r.markers),s++;return n.map(r=>r.index)}};class _{methods;constructor(t){this.methods=t}listen(){self.onmessage=this.onmessage.bind(this)}async onmessage(t){const{id:e,method:n,args:s}=t.data;try{const r=this.methods[n];if(typeof r!="function")throw new Error(`Unknown method: ${n}`);const o=await r(...s),i={id:e,result:o};self.postMessage(i)}catch(r){const o=r instanceof Error?r.message:String(r),i={id:e,error:o};self.postMessage(i)}}}new _(v).listen()})();\n', Pn = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", rr], { type: "text/javascript;charset=utf-8" });
130
- function Ei(t) {
129
+ const ar = '(function(){"use strict";function w(l,t,e){return{x:T(t)*e,y:I(l)*e}}function m(l,t,e){return{lat:R(t/e),lng:P(l/e)}}function T(l){return(180+l)/360}function I(l){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l*Math.PI/360)))/360}function P(l){return l*360-180}function R(l){return 360/Math.PI*Math.atan(Math.exp((180-l*360)*Math.PI/180))-90}class c{sw;ne;constructor(t,e,n,s){if(n<t)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);if(s<e)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);this.sw={lat:t,lng:e},this.ne={lat:n,lng:s}}contains(t,e){return!(t<this.sw.lat||this.ne.lat<t||e<this.sw.lng||this.ne.lng<e)}intersects(t){return!(t.ne.lat<this.sw.lat||this.ne.lat<t.sw.lat||t.ne.lng<this.sw.lng||this.ne.lng<t.sw.lng)}}class h{blockL;blockR;sw;ne;constructor(t,e,n,s){if(n<t)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);this.sw={lat:t,lng:e},this.ne={lat:n,lng:s},e<s?(this.blockL=new c(t,e,n,s),this.blockR=new c(0,0,0,0)):(this.blockL=new c(t,-180,n,s),this.blockR=new c(t,e,n,180))}static bounds(t){const e=t.bounds,n=t.center;return e.sw.lng<=n.lng&&e.ne.lng<=n.lng?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:e.sw.lng>=n.lng&&e.ne.lng>=n.lng?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:Math.abs(e.ne.lng-n.lng)+Math.abs(e.sw.lng-n.lng)>360?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:e.ne.lng-e.sw.lng>360?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:t.bounds}static create(t){const e=this.bounds(t),n=e.sw,s=e.ne;return new h(n.lat,n.lng,s.lat,s.lng)}static offset(t,e,n){const s=this.bounds(t),r=t.zoom,o=e*Math.pow(2,r),i=w(s.sw.lat,s.sw.lng,o),a=w(s.ne.lat,s.ne.lng,o);let g=Math.max(i.x-n.left,0),f=Math.min(i.y+n.bottom,o),D=Math.min(a.x+n.right,o),N=Math.max(a.y-n.top,0);const z=m(g,f,o),C=m(D,N,o);return new h(z.lat,z.lng,C.lat,C.lng)}contains(t,e){return this.blockL.contains(t,e)||this.blockR.contains(t,e)}intersects(t){return this.blockL.intersects(t)||this.blockR.intersects(t)}}class S{id;bounds;markers;constructor(t,e){this.id=t,this.bounds=e,this.markers=[]}belongs(t){const e=this.bounds.sw;if(t.lat<e.lat||t.lng<e.lng)return!1;const n=this.bounds.ne;return!(n.lat<t.lat||n.lng<t.lng)}neighbours(t,e){const n=Math.abs(t.id.length-this.id.length);if(n>e)return!1;const s=Math.min(this.id.length,t.id.length)-e+n;for(let r=0;r<s;r++)if(this.id[r]!=t.id[r])return!1;return!0}}class u{tree;zoom;cell;branches;constructor(t,e,n,s){this.tree=t,this.zoom=n,this.cell=new S(e,s),this.branches=new Array}split(){const t=this.cell.bounds,e=Math.pow(2,this.tree.depth),n=(t.ne.lat-t.sw.lat)/e,s=(t.ne.lng-t.sw.lng)/e;for(let r=0;r<e;r++)for(let o=0;o<e;o++){const i=t.sw.lat+r*n,a=t.sw.lng+o*s,g=i+n,f=a+s;this.branches.push(new u(this.tree,`${this.cell.id}${r*2+o}`,this.zoom+this.tree.depth,{sw:{lat:i,lng:a},ne:{lat:g,lng:f}}))}}add(t){if(this.cell.belongs(t)==!1)return!1;if(this.cell.markers.length<this.tree.capacity)return this.cell.markers.push(t),!0;this.branches.length==0&&this.split();for(let e=0;e<this.branches.length;e++)if(this.branches[e].add(t))return!0;throw new Error("Failed to add marker to branch")}compact(){if(this.branches.length==0)return;for(let s=0;s<this.branches.length;s++)this.branches[s].compact();const t=new Array,e=new Array;for(let s=0;s<this.branches.length;s++){const r=this.branches[s];t.push(...r.branches),e.push(...r.cell.markers)}const n=new u(this.tree,this.cell.id,this.zoom+this.tree.depth,this.cell.bounds);n.branches=t,n.cell.markers=e,this.branches=[n]}cells(t,e,n){if(t<this.zoom||e.intersects(this.cell.bounds)==!1)return n;n.push(this.cell);for(let s=0;s<this.branches.length;s++)this.branches[s].cells(t,e,n);return n}print(t){console.log(`${"---".repeat(t)}|${this.cell.id} zoom=[${this.zoom}] markers=[${this.cell.markers.length}]`);for(let e=0;e<this.branches.length;e++)this.branches[e].print(t+1)}count(){return this.cell.markers.length+this.branches.reduce((t,e)=>t+e.count(),0)}}class x{capacity;depth;root;constructor(t,e,n){this.capacity=n,this.depth=e,this.root=new u(this,"R",t,{sw:{lat:-90,lng:-180},ne:{lat:90,lng:180}})}add(t){return this.root.add(t)}compact(){this.root.compact()}cells(t,e){const n=new Array;return this.root.cells(t,e,n),n}print(){this.root.print(0)}}const A=16,p=2,k=1,M=A*4;let b,d,E=p,$=k,y=M;const v={update(l,t,e){const n=-Math.floor(Math.log2(l.mapSize/y)),s=new x(n,$,E);for(let o=0;o<t.length;o++){const i=t[o];if(!s.add(i))throw new Error("Failed to add marker to tree")}const r=-n;for(let o=0;o<r;o++)s.compact();b=s,d=e},configure(l){E=l?.process?.visibility?.cell?.capacity??p,$=l?.process?.visibility?.cell?.depth??k,y=l?.process?.visibility?.cell?.size??M},filter(l,t){if(!b||!d)return[];const e=h.create(t);let n=[],s=t.zoom;for(;s<l.zoomMax&&n.length<d;)n=b.cells(s,e).flatMap(r=>r.markers),s++;return n.map(r=>r.index)}};class _{methods;constructor(t){this.methods=t}listen(){self.onmessage=this.onmessage.bind(this)}async onmessage(t){const{id:e,method:n,args:s}=t.data;try{const r=this.methods[n];if(typeof r!="function")throw new Error(`Unknown method: ${n}`);const o=await r(...s),i={id:e,result:o};self.postMessage(i)}catch(r){const o=r instanceof Error?r.message:String(r),i={id:e,error:o};self.postMessage(i)}}}new _(v).listen()})();\n', Nn = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", ar], { type: "text/javascript;charset=utf-8" });
130
+ function Pi(t) {
131
131
  let e;
132
132
  try {
133
- if (e = Pn && (self.URL || self.webkitURL).createObjectURL(Pn), !e) throw "";
133
+ if (e = Nn && (self.URL || self.webkitURL).createObjectURL(Nn), !e) throw "";
134
134
  const n = new Worker(e, {
135
135
  name: t?.name
136
136
  });
@@ -139,32 +139,32 @@ function Ei(t) {
139
139
  }), n;
140
140
  } catch {
141
141
  return new Worker(
142
- "data:text/javascript;charset=utf-8," + encodeURIComponent(rr),
142
+ "data:text/javascript;charset=utf-8," + encodeURIComponent(ar),
143
143
  {
144
144
  name: t?.name
145
145
  }
146
146
  );
147
147
  }
148
148
  }
149
- function it(t, e, n) {
150
- return { x: xi(e) * n, y: Si(t) * n };
149
+ function at(t, e, n) {
150
+ return { x: Ti(e) * n, y: Ii(t) * n };
151
151
  }
152
- function Tn(t, e, n) {
153
- return { lat: Ti(e / n), lng: Pi(t / n) };
152
+ function Cn(t, e, n) {
153
+ return { lat: Ni(e / n), lng: Ai(t / n) };
154
154
  }
155
- function xi(t) {
155
+ function Ti(t) {
156
156
  return (180 + t) / 360;
157
157
  }
158
- function Si(t) {
158
+ function Ii(t) {
159
159
  return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + t * Math.PI / 360))) / 360;
160
160
  }
161
- function Pi(t) {
161
+ function Ai(t) {
162
162
  return t * 360 - 180;
163
163
  }
164
- function Ti(t) {
164
+ function Ni(t) {
165
165
  return 360 / Math.PI * Math.atan(Math.exp((180 - t * 360) * Math.PI / 180)) - 90;
166
166
  }
167
- class kt {
167
+ class _t {
168
168
  sw;
169
169
  ne;
170
170
  constructor(e, n, r, i) {
@@ -179,14 +179,14 @@ class kt {
179
179
  return !(e.ne.lat < this.sw.lat || this.ne.lat < e.sw.lat || e.ne.lng < this.sw.lng || this.ne.lng < e.sw.lng);
180
180
  }
181
181
  }
182
- class ot {
182
+ class ut {
183
183
  blockL;
184
184
  blockR;
185
185
  sw;
186
186
  ne;
187
187
  constructor(e, n, r, i) {
188
188
  if (r < e) throw new Error(`Invalid bounds: ${e}, ${n}, ${r}, ${i}`);
189
- this.sw = { lat: e, lng: n }, this.ne = { lat: r, lng: i }, n < i ? (this.blockL = new kt(e, n, r, i), this.blockR = new kt(0, 0, 0, 0)) : (this.blockL = new kt(e, -180, r, i), this.blockR = new kt(e, n, r, 180));
189
+ this.sw = { lat: e, lng: n }, this.ne = { lat: r, lng: i }, n < i ? (this.blockL = new _t(e, n, r, i), this.blockR = new _t(0, 0, 0, 0)) : (this.blockL = new _t(e, -180, r, i), this.blockR = new _t(e, n, r, 180));
190
190
  }
191
191
  static bounds(e) {
192
192
  const n = e.bounds, r = e.center;
@@ -194,7 +194,7 @@ class ot {
194
194
  }
195
195
  static create(e) {
196
196
  const n = this.bounds(e), r = n.sw, i = n.ne;
197
- return new ot(r.lat, r.lng, i.lat, i.lng);
197
+ return new ut(r.lat, r.lng, i.lat, i.lng);
198
198
  }
199
199
  /**
200
200
  * @param viewport - The viewport of the map.
@@ -203,10 +203,10 @@ class ot {
203
203
  * @param offsetY - The y offset of the map in pixels at zoom level n.
204
204
  */
205
205
  static offset(e, n, r) {
206
- const i = this.bounds(e), s = e.zoom, a = n * Math.pow(2, s), u = it(i.sw.lat, i.sw.lng, a), o = it(i.ne.lat, i.ne.lng, a);
207
- let l = Math.max(u.x - r.left, 0), c = Math.min(u.y + r.bottom, a), f = Math.min(o.x + r.right, a), h = Math.max(o.y - r.top, 0);
208
- const m = Tn(l, c, a), d = Tn(f, h, a);
209
- return new ot(m.lat, m.lng, d.lat, d.lng);
206
+ const i = this.bounds(e), s = e.zoom, a = n * Math.pow(2, s), u = at(i.sw.lat, i.sw.lng, a), o = at(i.ne.lat, i.ne.lng, a);
207
+ let l = Math.max(u.x - r.left, 0), c = Math.min(u.y + r.bottom, a), f = Math.min(o.x + r.right, a), p = Math.max(o.y - r.top, 0);
208
+ const m = Cn(l, c, a), h = Cn(f, p, a);
209
+ return new ut(m.lat, m.lng, h.lat, h.lng);
210
210
  }
211
211
  contains(e, n) {
212
212
  return this.blockL.contains(e, n) || this.blockR.contains(e, n);
@@ -215,16 +215,16 @@ class ot {
215
215
  return this.blockL.intersects(e) || this.blockR.intersects(e);
216
216
  }
217
217
  }
218
- const Ii = 75, Ai = 150, In = 25e-5, Ni = 1e6, Ci = 2e6, An = 3e6, ir = 10, Nn = 16, Ri = 8, Cn = 2, je = 0.5, Di = "0px 2px 2px rgba(0, 0, 0, 0.5)", Rn = 8, zi = 8, Oi = "drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.5))", Dn = "white", Li = "darkgreen", zn = 1024;
219
- class Fi {
218
+ const Ci = 75, Ri = 150, Rn = 25e-5, Di = 1e6, zi = 2e6, Dn = 3e6, or = 10, zn = 16, Oi = 8, On = 2, je = 0.5, Li = "0px 2px 2px rgba(0, 0, 0, 0.5)", Fi = 8, $i = 8, Vi = "drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.5))", Ln = "white", ji = "darkgreen", Fn = 1024;
219
+ class Ui {
220
220
  // State
221
221
  markers;
222
222
  markersVisible;
223
223
  markerVisibilityTreeWorker;
224
224
  markerVisibilityTreeWorkerClient;
225
- markerVisibilityTreeLimit = zn;
225
+ markerVisibilityTreeLimit = Fn;
226
226
  set configuration(e) {
227
- this.markerVisibilityTreeWorkerClient?.invoke("configure", e), this.markerVisibilityTreeLimit = e?.process?.visibility?.limit ?? zn;
227
+ this.markerVisibilityTreeWorkerClient?.invoke("configure", e), this.markerVisibilityTreeLimit = e?.process?.visibility?.limit ?? Fn;
228
228
  }
229
229
  getMarkers() {
230
230
  return Array.from(this.markersVisible ?? []);
@@ -240,7 +240,7 @@ class Fi {
240
240
  return We.empty();
241
241
  }
242
242
  async updateMarkers(e, n) {
243
- this.markers = n, n.length > this.markerVisibilityTreeLimit ? (this.markerVisibilityTreeWorker = new Ei(), this.markerVisibilityTreeWorkerClient = new nr(this.markerVisibilityTreeWorker), await this.markerVisibilityTreeWorkerClient.invoke(
243
+ this.markers = n, n.length > this.markerVisibilityTreeLimit ? (this.markerVisibilityTreeWorker = new Pi(), this.markerVisibilityTreeWorkerClient = new sr(this.markerVisibilityTreeWorker), await this.markerVisibilityTreeWorkerClient.invoke(
244
244
  "update",
245
245
  e,
246
246
  n.map((r, i) => ({ index: i, lat: r.properites.lat, lng: r.properites.lng })),
@@ -251,56 +251,56 @@ class Fi {
251
251
  this.markers = void 0, this.markersVisible = void 0, this.markerVisibilityTreeWorker = void 0, this.markerVisibilityTreeWorkerClient = void 0;
252
252
  }
253
253
  }
254
- const Kt = !1;
255
- var $i = Array.isArray, Vi = Array.prototype.indexOf, Ye = Array.prototype.includes, ji = Array.from, Ui = Object.defineProperty, st = Object.getOwnPropertyDescriptor, Wi = Object.prototype, Bi = Array.prototype, Hi = Object.getPrototypeOf, On = Object.isExtensible;
256
- const qi = () => {
254
+ const Qt = !1;
255
+ var Wi = Array.isArray, Bi = Array.prototype.indexOf, Ye = Array.prototype.includes, Hi = Array.from, qi = Object.defineProperty, ot = Object.getOwnPropertyDescriptor, Zi = Object.prototype, Yi = Array.prototype, Ji = Object.getPrototypeOf, $n = Object.isExtensible;
256
+ const Xi = () => {
257
257
  };
258
- function Zi(t) {
258
+ function Ki(t) {
259
259
  for (var e = 0; e < t.length; e++)
260
260
  t[e]();
261
261
  }
262
- function sr() {
262
+ function lr() {
263
263
  var t, e, n = new Promise((r, i) => {
264
264
  t = r, e = i;
265
265
  });
266
266
  return { promise: n, resolve: t, reject: e };
267
267
  }
268
- const O = 2, ft = 4, Ct = 8, ar = 1 << 24, ge = 16, Se = 32, Fe = 64, Gt = 128, te = 512, z = 1024, $ = 2048, oe = 4096, be = 8192, _e = 16384, Je = 32768, It = 65536, Ln = 1 << 17, or = 1 << 18, et = 1 << 19, Yi = 1 << 20, Le = 65536, Qt = 1 << 21, sn = 1 << 22, Me = 1 << 23, xt = /* @__PURE__ */ Symbol("$state"), Ne = new class extends Error {
268
+ const z = 2, pt = 4, Dt = 8, ur = 1 << 24, we = 16, Pe = 32, Fe = 64, en = 128, ee = 512, D = 1024, F = 2048, se = 4096, _e = 8192, Me = 16384, Je = 32768, Nt = 65536, Vn = 1 << 17, cr = 1 << 18, et = 1 << 19, Gi = 1 << 20, Le = 65536, tn = 1 << 21, on = 1 << 22, Ee = 1 << 23, Tt = /* @__PURE__ */ Symbol("$state"), Ne = new class extends Error {
269
269
  name = "StaleReactionError";
270
270
  message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
271
271
  }();
272
- function Ji() {
272
+ function Qi() {
273
273
  throw new Error("https://svelte.dev/e/async_derived_orphan");
274
274
  }
275
- function Xi() {
275
+ function es() {
276
276
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
277
277
  }
278
- function Ki() {
278
+ function ts() {
279
279
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
280
280
  }
281
- function Gi() {
281
+ function ns() {
282
282
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
283
283
  }
284
- function Qi() {
284
+ function rs() {
285
285
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
286
286
  }
287
- function es() {
287
+ function is() {
288
288
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
289
289
  }
290
- const D = /* @__PURE__ */ Symbol(), ts = "http://www.w3.org/1999/xhtml";
291
- function ns() {
290
+ const R = /* @__PURE__ */ Symbol(), ss = "http://www.w3.org/1999/xhtml";
291
+ function as() {
292
292
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
293
293
  }
294
- function lr(t) {
294
+ function fr(t) {
295
295
  return t === this.v;
296
296
  }
297
- let rs = !1, le = null;
297
+ let os = !1, ae = null;
298
298
  function Xe(t) {
299
- le = t;
299
+ ae = t;
300
300
  }
301
- function an(t, e = !1, n) {
302
- le = {
303
- p: le,
301
+ function ln(t, e = !1, n) {
302
+ ae = {
303
+ p: ae,
304
304
  i: !1,
305
305
  c: null,
306
306
  e: null,
@@ -309,47 +309,47 @@ function an(t, e = !1, n) {
309
309
  l: null
310
310
  };
311
311
  }
312
- function on(t) {
312
+ function un(t) {
313
313
  var e = (
314
314
  /** @type {ComponentContext} */
315
- le
315
+ ae
316
316
  ), n = e.e;
317
317
  if (n !== null) {
318
318
  e.e = null;
319
319
  for (var r of n)
320
- Ss(r);
320
+ As(r);
321
321
  }
322
- return t !== void 0 && (e.x = t), e.i = !0, le = e.p, t ?? /** @type {T} */
322
+ return t !== void 0 && (e.x = t), e.i = !0, ae = e.p, t ?? /** @type {T} */
323
323
  {};
324
324
  }
325
- function ur() {
325
+ function hr() {
326
326
  return !0;
327
327
  }
328
328
  let Ue = [];
329
- function is() {
329
+ function ls() {
330
330
  var t = Ue;
331
- Ue = [], Zi(t);
331
+ Ue = [], Ki(t);
332
332
  }
333
333
  function Re(t) {
334
334
  if (Ue.length === 0) {
335
335
  var e = Ue;
336
336
  queueMicrotask(() => {
337
- e === Ue && is();
337
+ e === Ue && ls();
338
338
  });
339
339
  }
340
340
  Ue.push(t);
341
341
  }
342
- function cr(t) {
343
- var e = b;
342
+ function pr(t) {
343
+ var e = y;
344
344
  if (e === null)
345
- return k.f |= Me, t;
346
- if ((e.f & Je) === 0 && (e.f & ft) === 0)
345
+ return k.f |= Ee, t;
346
+ if ((e.f & Je) === 0 && (e.f & pt) === 0)
347
347
  throw t;
348
- ye(t, e);
348
+ be(t, e);
349
349
  }
350
- function ye(t, e) {
350
+ function be(t, e) {
351
351
  for (; e !== null; ) {
352
- if ((e.f & Gt) !== 0) {
352
+ if ((e.f & en) !== 0) {
353
353
  if ((e.f & Je) === 0)
354
354
  throw t;
355
355
  try {
@@ -363,27 +363,27 @@ function ye(t, e) {
363
363
  }
364
364
  throw t;
365
365
  }
366
- const ss = -7169;
366
+ const us = -7169;
367
367
  function S(t, e) {
368
- t.f = t.f & ss | e;
368
+ t.f = t.f & us | e;
369
369
  }
370
- function ln(t) {
371
- (t.f & te) !== 0 || t.deps === null ? S(t, z) : S(t, oe);
370
+ function cn(t) {
371
+ (t.f & ee) !== 0 || t.deps === null ? S(t, D) : S(t, se);
372
372
  }
373
- function fr(t) {
373
+ function dr(t) {
374
374
  if (t !== null)
375
375
  for (const e of t)
376
- (e.f & O) === 0 || (e.f & Le) === 0 || (e.f ^= Le, fr(
376
+ (e.f & z) === 0 || (e.f & Le) === 0 || (e.f ^= Le, dr(
377
377
  /** @type {Derived} */
378
378
  e.deps
379
379
  ));
380
380
  }
381
- function hr(t, e, n) {
382
- (t.f & $) !== 0 ? e.add(t) : (t.f & oe) !== 0 && n.add(t), fr(t.deps), S(t, z);
381
+ function mr(t, e, n) {
382
+ (t.f & F) !== 0 ? e.add(t) : (t.f & se) !== 0 && n.add(t), dr(t.deps), S(t, D);
383
383
  }
384
- const yt = /* @__PURE__ */ new Set();
385
- let x = null, se = null, Q = [], un = null, en = !1;
386
- class Ee {
384
+ const Mt = /* @__PURE__ */ new Set();
385
+ let x = null, re = null, G = [], fn = null, nn = !1;
386
+ class xe {
387
387
  /**
388
388
  * The current values of any sources that are updated in this batch
389
389
  * They keys of this map are identical to `this.#previous`
@@ -461,9 +461,9 @@ class Ee {
461
461
  if (n) {
462
462
  this.#t.delete(e);
463
463
  for (var r of n.d)
464
- S(r, $), ce(r);
464
+ S(r, F), ce(r);
465
465
  for (r of n.m)
466
- S(r, oe), ce(r);
466
+ S(r, se), ce(r);
467
467
  }
468
468
  }
469
469
  /**
@@ -471,19 +471,19 @@ class Ee {
471
471
  * @param {Effect[]} root_effects
472
472
  */
473
473
  process(e) {
474
- Q = [], this.apply();
474
+ G = [], this.apply();
475
475
  var n = [], r = [];
476
476
  for (const i of e)
477
477
  this.#l(i, n, r);
478
478
  if (this.#u()) {
479
479
  this.#c(r), this.#c(n);
480
480
  for (const [i, s] of this.#t)
481
- mr(i, s);
481
+ wr(i, s);
482
482
  } else {
483
483
  for (const i of this.#r) i();
484
- this.#r.clear(), this.#i === 0 && this.#h(), x = null, Fn(r), Fn(n), this.#s.clear(), this.#e.clear(), this.#n?.resolve();
484
+ this.#r.clear(), this.#i === 0 && this.#h(), x = null, jn(r), jn(n), this.#s.clear(), this.#e.clear(), this.#n?.resolve();
485
485
  }
486
- se = null;
486
+ re = null;
487
487
  }
488
488
  /**
489
489
  * Traverse the effect tree, executing effects or stashing
@@ -493,11 +493,11 @@ class Ee {
493
493
  * @param {Effect[]} render_effects
494
494
  */
495
495
  #l(e, n, r) {
496
- e.f ^= z;
496
+ e.f ^= D;
497
497
  for (var i = e.first; i !== null; ) {
498
- var s = i.f, a = (s & (Se | Fe)) !== 0, u = a && (s & z) !== 0, o = u || (s & be) !== 0 || this.#t.has(i);
498
+ var s = i.f, a = (s & (Pe | Fe)) !== 0, u = a && (s & D) !== 0, o = u || (s & _e) !== 0 || this.#t.has(i);
499
499
  if (!o && i.fn !== null) {
500
- a ? i.f ^= z : (s & ft) !== 0 ? n.push(i) : ht(i) && ((s & ge) !== 0 && this.#e.add(i), Ge(i));
500
+ a ? i.f ^= D : (s & pt) !== 0 ? n.push(i) : dt(i) && ((s & we) !== 0 && this.#e.add(i), Ge(i));
501
501
  var l = i.first;
502
502
  if (l !== null) {
503
503
  i = l;
@@ -519,7 +519,7 @@ class Ee {
519
519
  */
520
520
  #c(e) {
521
521
  for (var n = 0; n < e.length; n += 1)
522
- hr(e[n], this.#s, this.#e);
522
+ mr(e[n], this.#s, this.#e);
523
523
  }
524
524
  /**
525
525
  * Associate a change to a given source with the current
@@ -528,17 +528,17 @@ class Ee {
528
528
  * @param {any} value
529
529
  */
530
530
  capture(e, n) {
531
- n !== D && !this.previous.has(e) && this.previous.set(e, n), (e.f & Me) === 0 && (this.current.set(e, e.v), se?.set(e, e.v));
531
+ n !== R && !this.previous.has(e) && this.previous.set(e, n), (e.f & Ee) === 0 && (this.current.set(e, e.v), re?.set(e, e.v));
532
532
  }
533
533
  activate() {
534
534
  x = this, this.apply();
535
535
  }
536
536
  deactivate() {
537
- x === this && (x = null, se = null);
537
+ x === this && (x = null, re = null);
538
538
  }
539
539
  flush() {
540
- if (this.activate(), Q.length > 0) {
541
- if (as(), x !== null && x !== this)
540
+ if (this.activate(), G.length > 0) {
541
+ if (cs(), x !== null && x !== this)
542
542
  return;
543
543
  } else this.#i === 0 && this.process([]);
544
544
  this.deactivate();
@@ -548,10 +548,10 @@ class Ee {
548
548
  this.#p.clear();
549
549
  }
550
550
  #h() {
551
- if (yt.size > 1) {
551
+ if (Mt.size > 1) {
552
552
  this.previous.clear();
553
- var e = se, n = !0;
554
- for (const i of yt) {
553
+ var e = re, n = !0;
554
+ for (const i of Mt) {
555
555
  if (i === this) {
556
556
  n = !1;
557
557
  continue;
@@ -569,23 +569,23 @@ class Ee {
569
569
  continue;
570
570
  const a = [...i.current.keys()].filter((u) => !this.current.has(u));
571
571
  if (a.length > 0) {
572
- var r = Q;
573
- Q = [];
572
+ var r = G;
573
+ G = [];
574
574
  const u = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
575
575
  for (const l of s)
576
- pr(l, a, u, o);
577
- if (Q.length > 0) {
576
+ vr(l, a, u, o);
577
+ if (G.length > 0) {
578
578
  x = i, i.apply();
579
- for (const l of Q)
579
+ for (const l of G)
580
580
  i.#l(l, [], []);
581
581
  i.deactivate();
582
582
  }
583
- Q = r;
583
+ G = r;
584
584
  }
585
585
  }
586
- x = null, se = e;
586
+ x = null, re = e;
587
587
  }
588
- this.#t.clear(), yt.delete(this);
588
+ this.#t.clear(), Mt.delete(this);
589
589
  }
590
590
  /**
591
591
  *
@@ -600,14 +600,14 @@ class Ee {
600
600
  */
601
601
  decrement(e) {
602
602
  this.#i -= 1, e && (this.#o -= 1), !this.#a && (this.#a = !0, Re(() => {
603
- this.#a = !1, this.#u() ? Q.length > 0 && this.flush() : this.revive();
603
+ this.#a = !1, this.#u() ? G.length > 0 && this.flush() : this.revive();
604
604
  }));
605
605
  }
606
606
  revive() {
607
607
  for (const e of this.#s)
608
- this.#e.delete(e), S(e, $), ce(e);
608
+ this.#e.delete(e), S(e, F), ce(e);
609
609
  for (const e of this.#e)
610
- S(e, oe), ce(e);
610
+ S(e, se), ce(e);
611
611
  this.flush();
612
612
  }
613
613
  /** @param {() => void} fn */
@@ -619,12 +619,12 @@ class Ee {
619
619
  this.#p.add(e);
620
620
  }
621
621
  settled() {
622
- return (this.#n ??= sr()).promise;
622
+ return (this.#n ??= lr()).promise;
623
623
  }
624
624
  static ensure() {
625
625
  if (x === null) {
626
- const e = x = new Ee();
627
- yt.add(x), Re(() => {
626
+ const e = x = new xe();
627
+ Mt.add(x), Re(() => {
628
628
  x === e && e.flush();
629
629
  });
630
630
  }
@@ -633,78 +633,78 @@ class Ee {
633
633
  apply() {
634
634
  }
635
635
  }
636
- function as() {
637
- en = !0;
636
+ function cs() {
637
+ nn = !0;
638
638
  var t = null;
639
639
  try {
640
- for (var e = 0; Q.length > 0; ) {
641
- var n = Ee.ensure();
640
+ for (var e = 0; G.length > 0; ) {
641
+ var n = xe.ensure();
642
642
  if (e++ > 1e3) {
643
643
  var r, i;
644
- os();
644
+ fs();
645
645
  }
646
- n.process(Q), xe.clear();
646
+ n.process(G), Se.clear();
647
647
  }
648
648
  } finally {
649
- Q = [], en = !1, un = null;
649
+ G = [], nn = !1, fn = null;
650
650
  }
651
651
  }
652
- function os() {
652
+ function fs() {
653
653
  try {
654
- Xi();
654
+ es();
655
655
  } catch (t) {
656
- ye(t, un);
656
+ be(t, fn);
657
657
  }
658
658
  }
659
- let me = null;
660
- function Fn(t) {
659
+ let ve = null;
660
+ function jn(t) {
661
661
  var e = t.length;
662
662
  if (e !== 0) {
663
663
  for (var n = 0; n < e; ) {
664
664
  var r = t[n++];
665
- if ((r.f & (_e | be)) === 0 && ht(r) && (me = /* @__PURE__ */ new Set(), Ge(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Ir(r), me?.size > 0)) {
666
- xe.clear();
667
- for (const i of me) {
668
- if ((i.f & (_e | be)) !== 0) continue;
665
+ if ((r.f & (Me | _e)) === 0 && dt(r) && (ve = /* @__PURE__ */ new Set(), Ge(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Cr(r), ve?.size > 0)) {
666
+ Se.clear();
667
+ for (const i of ve) {
668
+ if ((i.f & (Me | _e)) !== 0) continue;
669
669
  const s = [i];
670
670
  let a = i.parent;
671
671
  for (; a !== null; )
672
- me.has(a) && (me.delete(a), s.push(a)), a = a.parent;
672
+ ve.has(a) && (ve.delete(a), s.push(a)), a = a.parent;
673
673
  for (let u = s.length - 1; u >= 0; u--) {
674
674
  const o = s[u];
675
- (o.f & (_e | be)) === 0 && Ge(o);
675
+ (o.f & (Me | _e)) === 0 && Ge(o);
676
676
  }
677
677
  }
678
- me.clear();
678
+ ve.clear();
679
679
  }
680
680
  }
681
- me = null;
681
+ ve = null;
682
682
  }
683
683
  }
684
- function pr(t, e, n, r) {
684
+ function vr(t, e, n, r) {
685
685
  if (!n.has(t) && (n.add(t), t.reactions !== null))
686
686
  for (const i of t.reactions) {
687
687
  const s = i.f;
688
- (s & O) !== 0 ? pr(
688
+ (s & z) !== 0 ? vr(
689
689
  /** @type {Derived} */
690
690
  i,
691
691
  e,
692
692
  n,
693
693
  r
694
- ) : (s & (sn | ge)) !== 0 && (s & $) === 0 && dr(i, e, r) && (S(i, $), ce(
694
+ ) : (s & (on | we)) !== 0 && (s & F) === 0 && gr(i, e, r) && (S(i, F), ce(
695
695
  /** @type {Effect} */
696
696
  i
697
697
  ));
698
698
  }
699
699
  }
700
- function dr(t, e, n) {
700
+ function gr(t, e, n) {
701
701
  const r = n.get(t);
702
702
  if (r !== void 0) return r;
703
703
  if (t.deps !== null)
704
704
  for (const i of t.deps) {
705
705
  if (Ye.call(e, i))
706
706
  return !0;
707
- if ((i.f & O) !== 0 && dr(
707
+ if ((i.f & z) !== 0 && gr(
708
708
  /** @type {Derived} */
709
709
  i,
710
710
  e,
@@ -719,46 +719,46 @@ function dr(t, e, n) {
719
719
  return n.set(t, !1), !1;
720
720
  }
721
721
  function ce(t) {
722
- var e = un = t, n = e.b;
723
- if (n?.is_pending && (t.f & (ft | Ct | ar)) !== 0 && (t.f & Je) === 0) {
722
+ var e = fn = t, n = e.b;
723
+ if (n?.is_pending && (t.f & (pt | Dt | ur)) !== 0 && (t.f & Je) === 0) {
724
724
  n.defer_effect(t);
725
725
  return;
726
726
  }
727
727
  for (; e.parent !== null; ) {
728
728
  e = e.parent;
729
729
  var r = e.f;
730
- if (en && e === b && (r & ge) !== 0 && (r & or) === 0 && (r & Je) !== 0)
730
+ if (nn && e === y && (r & we) !== 0 && (r & cr) === 0 && (r & Je) !== 0)
731
731
  return;
732
- if ((r & (Fe | Se)) !== 0) {
733
- if ((r & z) === 0)
732
+ if ((r & (Fe | Pe)) !== 0) {
733
+ if ((r & D) === 0)
734
734
  return;
735
- e.f ^= z;
735
+ e.f ^= D;
736
736
  }
737
737
  }
738
- Q.push(e);
738
+ G.push(e);
739
739
  }
740
- function mr(t, e) {
741
- if (!((t.f & Se) !== 0 && (t.f & z) !== 0)) {
742
- (t.f & $) !== 0 ? e.d.push(t) : (t.f & oe) !== 0 && e.m.push(t), S(t, z);
740
+ function wr(t, e) {
741
+ if (!((t.f & Pe) !== 0 && (t.f & D) !== 0)) {
742
+ (t.f & F) !== 0 ? e.d.push(t) : (t.f & se) !== 0 && e.m.push(t), S(t, D);
743
743
  for (var n = t.first; n !== null; )
744
- mr(n, e), n = n.next;
744
+ wr(n, e), n = n.next;
745
745
  }
746
746
  }
747
- function ls(t) {
748
- let e = 0, n = Rt(0), r;
747
+ function hs(t) {
748
+ let e = 0, n = zt(0), r;
749
749
  return () => {
750
- hn() && (E(n), Sr(() => (e === 0 && (r = ee(() => t(() => at(n)))), e += 1, () => {
750
+ dn() && (E(n), Ir(() => (e === 0 && (r = Q(() => t(() => lt(n)))), e += 1, () => {
751
751
  Re(() => {
752
- e -= 1, e === 0 && (r?.(), r = void 0, at(n));
752
+ e -= 1, e === 0 && (r?.(), r = void 0, lt(n));
753
753
  });
754
754
  })));
755
755
  };
756
756
  }
757
- var us = It | et;
758
- function cs(t, e, n, r) {
759
- new fs(t, e, n, r);
757
+ var ps = Nt | et;
758
+ function ds(t, e, n, r) {
759
+ new ms(t, e, n, r);
760
760
  }
761
- class fs {
761
+ class ms {
762
762
  /** @type {Boundary | null} */
763
763
  parent;
764
764
  is_pending = !1;
@@ -801,7 +801,7 @@ class fs {
801
801
  * @type {Source<number> | null}
802
802
  */
803
803
  #f = null;
804
- #k = ls(() => (this.#f = Rt(this.#u), () => {
804
+ #k = hs(() => (this.#f = zt(this.#u), () => {
805
805
  this.#f = null;
806
806
  }));
807
807
  /**
@@ -814,13 +814,13 @@ class fs {
814
814
  this.#r = e, this.#i = n, this.#o = (s) => {
815
815
  var a = (
816
816
  /** @type {Effect} */
817
- b
817
+ y
818
818
  );
819
- a.b = this, a.f |= Gt, r(s);
819
+ a.b = this, a.f |= en, r(s);
820
820
  }, this.parent = /** @type {Effect} */
821
- b.b, this.transform_error = i ?? this.parent?.transform_error ?? ((s) => s), this.#n = As(() => {
821
+ y.b, this.transform_error = i ?? this.parent?.transform_error ?? ((s) => s), this.#n = Ds(() => {
822
822
  this.#g();
823
- }, us);
823
+ }, ps);
824
824
  }
825
825
  #y() {
826
826
  try {
@@ -846,8 +846,8 @@ class fs {
846
846
  #_() {
847
847
  const e = this.#i.pending;
848
848
  e && (this.is_pending = !0, this.#e = Ae(() => e(this.#r)), Re(() => {
849
- var n = this.#a = document.createDocumentFragment(), r = Mr();
850
- n.append(r), this.#s = this.#v(() => (Ee.ensure(), Ae(() => this.#o(r)))), this.#l === 0 && (this.#r.before(n), this.#a = null, St(
849
+ var n = this.#a = document.createDocumentFragment(), r = Sr();
850
+ n.append(r), this.#s = this.#v(() => (xe.ensure(), Ae(() => this.#o(r)))), this.#l === 0 && (this.#r.before(n), this.#a = null, It(
851
851
  /** @type {Effect} */
852
852
  this.#e,
853
853
  () => {
@@ -862,7 +862,7 @@ class fs {
862
862
  this.#o(this.#r);
863
863
  }), this.#l > 0) {
864
864
  var e = this.#a = document.createDocumentFragment();
865
- Rs(this.#s, e);
865
+ Ls(this.#s, e);
866
866
  const n = (
867
867
  /** @type {(anchor: Node) => void} */
868
868
  this.#i.pending
@@ -877,9 +877,9 @@ class fs {
877
877
  #m() {
878
878
  this.is_pending = !1;
879
879
  for (const e of this.#h)
880
- S(e, $), ce(e);
880
+ S(e, F), ce(e);
881
881
  for (const e of this.#d)
882
- S(e, oe), ce(e);
882
+ S(e, se), ce(e);
883
883
  this.#h.clear(), this.#d.clear();
884
884
  }
885
885
  /**
@@ -887,7 +887,7 @@ class fs {
887
887
  * @param {Effect} effect
888
888
  */
889
889
  defer_effect(e) {
890
- hr(e, this.#h, this.#d);
890
+ mr(e, this.#h, this.#d);
891
891
  }
892
892
  /**
893
893
  * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
@@ -904,14 +904,14 @@ class fs {
904
904
  * @param {() => T} fn
905
905
  */
906
906
  #v(e) {
907
- var n = b, r = k, i = le;
908
- he(this.#n), re(this.#n), Xe(this.#n.ctx);
907
+ var n = y, r = k, i = ae;
908
+ he(this.#n), ne(this.#n), Xe(this.#n.ctx);
909
909
  try {
910
910
  return e();
911
911
  } catch (s) {
912
- return cr(s), null;
912
+ return pr(s), null;
913
913
  } finally {
914
- he(n), re(r), Xe(i);
914
+ he(n), ne(r), Xe(i);
915
915
  }
916
916
  }
917
917
  /**
@@ -924,7 +924,7 @@ class fs {
924
924
  this.parent && this.parent.#w(e);
925
925
  return;
926
926
  }
927
- this.#l += e, this.#l === 0 && (this.#m(), this.#e && St(this.#e, () => {
927
+ this.#l += e, this.#l === 0 && (this.#m(), this.#e && It(this.#e, () => {
928
928
  this.#e = null;
929
929
  }), this.#a && (this.#r.before(this.#a), this.#a = null));
930
930
  }
@@ -936,7 +936,7 @@ class fs {
936
936
  */
937
937
  update_pending_count(e) {
938
938
  this.#w(e), this.#u += e, !(!this.#f || this.#c) && (this.#c = !0, Re(() => {
939
- this.#c = !1, this.#f && At(this.#f, this.#u);
939
+ this.#c = !1, this.#f && Ct(this.#f, this.#u);
940
940
  }));
941
941
  }
942
942
  get_effect_pending() {
@@ -955,36 +955,36 @@ class fs {
955
955
  var i = !1, s = !1;
956
956
  const a = () => {
957
957
  if (i) {
958
- ns();
958
+ as();
959
959
  return;
960
960
  }
961
- i = !0, s && es(), this.#t !== null && St(this.#t, () => {
961
+ i = !0, s && is(), this.#t !== null && It(this.#t, () => {
962
962
  this.#t = null;
963
963
  }), this.#v(() => {
964
- Ee.ensure(), this.#g();
964
+ xe.ensure(), this.#g();
965
965
  });
966
966
  }, u = (o) => {
967
967
  try {
968
968
  s = !0, n?.(o, a), s = !1;
969
969
  } catch (l) {
970
- ye(l, this.#n && this.#n.parent);
970
+ be(l, this.#n && this.#n.parent);
971
971
  }
972
972
  r && (this.#t = this.#v(() => {
973
- Ee.ensure();
973
+ xe.ensure();
974
974
  try {
975
975
  return Ae(() => {
976
976
  var l = (
977
977
  /** @type {Effect} */
978
- b
978
+ y
979
979
  );
980
- l.b = this, l.f |= Gt, r(
980
+ l.b = this, l.f |= en, r(
981
981
  this.#r,
982
982
  () => o,
983
983
  () => a
984
984
  );
985
985
  });
986
986
  } catch (l) {
987
- return ye(
987
+ return be(
988
988
  l,
989
989
  /** @type {Effect} */
990
990
  this.#n.parent
@@ -997,20 +997,20 @@ class fs {
997
997
  try {
998
998
  o = this.transform_error(e);
999
999
  } catch (l) {
1000
- ye(l, this.#n && this.#n.parent);
1000
+ be(l, this.#n && this.#n.parent);
1001
1001
  return;
1002
1002
  }
1003
1003
  o !== null && typeof o == "object" && typeof /** @type {any} */
1004
1004
  o.then == "function" ? o.then(
1005
1005
  u,
1006
1006
  /** @param {unknown} e */
1007
- (l) => ye(l, this.#n && this.#n.parent)
1007
+ (l) => be(l, this.#n && this.#n.parent)
1008
1008
  ) : u(o);
1009
1009
  });
1010
1010
  }
1011
1011
  }
1012
- function hs(t, e, n, r) {
1013
- const i = ms;
1012
+ function vs(t, e, n, r) {
1013
+ const i = ks;
1014
1014
  var s = t.filter((f) => !f.settled);
1015
1015
  if (n.length === 0 && s.length === 0) {
1016
1016
  r(e.map(i));
@@ -1018,40 +1018,40 @@ function hs(t, e, n, r) {
1018
1018
  }
1019
1019
  var a = (
1020
1020
  /** @type {Effect} */
1021
- b
1022
- ), u = ps(), o = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((f) => f.promise)) : null;
1021
+ y
1022
+ ), u = gs(), o = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((f) => f.promise)) : null;
1023
1023
  function l(f) {
1024
1024
  u();
1025
1025
  try {
1026
1026
  r(f);
1027
- } catch (h) {
1028
- (a.f & _e) === 0 && ye(h, a);
1027
+ } catch (p) {
1028
+ (a.f & Me) === 0 && be(p, a);
1029
1029
  }
1030
- tn();
1030
+ rn();
1031
1031
  }
1032
1032
  if (n.length === 0) {
1033
1033
  o.then(() => l(e.map(i)));
1034
1034
  return;
1035
1035
  }
1036
1036
  function c() {
1037
- u(), Promise.all(n.map((f) => /* @__PURE__ */ vs(f))).then((f) => l([...e.map(i), ...f])).catch((f) => ye(f, a));
1037
+ u(), Promise.all(n.map((f) => /* @__PURE__ */ ys(f))).then((f) => l([...e.map(i), ...f])).catch((f) => be(f, a));
1038
1038
  }
1039
1039
  o ? o.then(c) : c();
1040
1040
  }
1041
- function ps() {
1042
- var t = b, e = k, n = le, r = x;
1041
+ function gs() {
1042
+ var t = y, e = k, n = ae, r = x;
1043
1043
  return function(s = !0) {
1044
- he(t), re(e), Xe(n), s && r?.activate();
1044
+ he(t), ne(e), Xe(n), s && r?.activate();
1045
1045
  };
1046
1046
  }
1047
- function tn(t = !0) {
1048
- he(null), re(null), Xe(null), t && x?.deactivate();
1047
+ function rn(t = !0) {
1048
+ he(null), ne(null), Xe(null), t && x?.deactivate();
1049
1049
  }
1050
- function ds() {
1050
+ function ws() {
1051
1051
  var t = (
1052
1052
  /** @type {Boundary} */
1053
1053
  /** @type {Effect} */
1054
- b.b
1054
+ y.b
1055
1055
  ), e = (
1056
1056
  /** @type {Batch} */
1057
1057
  x
@@ -1061,71 +1061,71 @@ function ds() {
1061
1061
  };
1062
1062
  }
1063
1063
  // @__NO_SIDE_EFFECTS__
1064
- function ms(t) {
1065
- var e = O | $, n = k !== null && (k.f & O) !== 0 ? (
1064
+ function ks(t) {
1065
+ var e = z | F, n = k !== null && (k.f & z) !== 0 ? (
1066
1066
  /** @type {Derived} */
1067
1067
  k
1068
1068
  ) : null;
1069
- return b !== null && (b.f |= et), {
1070
- ctx: le,
1069
+ return y !== null && (y.f |= et), {
1070
+ ctx: ae,
1071
1071
  deps: null,
1072
1072
  effects: null,
1073
- equals: lr,
1073
+ equals: fr,
1074
1074
  f: e,
1075
1075
  fn: t,
1076
1076
  reactions: null,
1077
1077
  rv: 0,
1078
1078
  v: (
1079
1079
  /** @type {V} */
1080
- D
1080
+ R
1081
1081
  ),
1082
1082
  wv: 0,
1083
- parent: n ?? b,
1083
+ parent: n ?? y,
1084
1084
  ac: null
1085
1085
  };
1086
1086
  }
1087
1087
  // @__NO_SIDE_EFFECTS__
1088
- function vs(t, e, n) {
1088
+ function ys(t, e, n) {
1089
1089
  /** @type {Effect | null} */
1090
- b === null && Ji();
1090
+ y === null && Qi();
1091
1091
  var i = (
1092
1092
  /** @type {Promise<V>} */
1093
1093
  /** @type {unknown} */
1094
1094
  void 0
1095
- ), s = Rt(
1095
+ ), s = zt(
1096
1096
  /** @type {V} */
1097
- D
1097
+ R
1098
1098
  ), a = !k, u = /* @__PURE__ */ new Map();
1099
- return Is(() => {
1100
- var o = sr();
1099
+ return Rs(() => {
1100
+ var o = lr();
1101
1101
  i = o.promise;
1102
1102
  try {
1103
- Promise.resolve(t()).then(o.resolve, o.reject).finally(tn);
1104
- } catch (h) {
1105
- o.reject(h), tn();
1103
+ Promise.resolve(t()).then(o.resolve, o.reject).finally(rn);
1104
+ } catch (p) {
1105
+ o.reject(p), rn();
1106
1106
  }
1107
1107
  var l = (
1108
1108
  /** @type {Batch} */
1109
1109
  x
1110
1110
  );
1111
1111
  if (a) {
1112
- var c = ds();
1112
+ var c = ws();
1113
1113
  u.get(l)?.reject(Ne), u.delete(l), u.set(l, o);
1114
1114
  }
1115
- const f = (h, m = void 0) => {
1115
+ const f = (p, m = void 0) => {
1116
1116
  if (l.activate(), m)
1117
- m !== Ne && (s.f |= Me, At(s, m));
1117
+ m !== Ne && (s.f |= Ee, Ct(s, m));
1118
1118
  else {
1119
- (s.f & Me) !== 0 && (s.f ^= Me), At(s, h);
1120
- for (const [d, v] of u) {
1121
- if (u.delete(d), d === l) break;
1119
+ (s.f & Ee) !== 0 && (s.f ^= Ee), Ct(s, p);
1120
+ for (const [h, v] of u) {
1121
+ if (u.delete(h), h === l) break;
1122
1122
  v.reject(Ne);
1123
1123
  }
1124
1124
  }
1125
1125
  c && c();
1126
1126
  };
1127
- o.promise.then(f, (h) => f(null, h || "unknown"));
1128
- }), xs(() => {
1127
+ o.promise.then(f, (p) => f(null, p || "unknown"));
1128
+ }), Is(() => {
1129
1129
  for (const o of u.values())
1130
1130
  o.reject(Ne);
1131
1131
  }), new Promise((o) => {
@@ -1138,7 +1138,7 @@ function vs(t, e, n) {
1138
1138
  l(i);
1139
1139
  });
1140
1140
  }
1141
- function gs(t) {
1141
+ function bs(t) {
1142
1142
  var e = t.effects;
1143
1143
  if (e !== null) {
1144
1144
  t.effects = null;
@@ -1149,10 +1149,10 @@ function gs(t) {
1149
1149
  );
1150
1150
  }
1151
1151
  }
1152
- function ws(t) {
1152
+ function _s(t) {
1153
1153
  for (var e = t.parent; e !== null; ) {
1154
- if ((e.f & O) === 0)
1155
- return (e.f & _e) === 0 ? (
1154
+ if ((e.f & z) === 0)
1155
+ return (e.f & Me) === 0 ? (
1156
1156
  /** @type {Effect} */
1157
1157
  e
1158
1158
  ) : null;
@@ -1160,98 +1160,98 @@ function ws(t) {
1160
1160
  }
1161
1161
  return null;
1162
1162
  }
1163
- function cn(t) {
1164
- var e, n = b;
1165
- he(ws(t));
1163
+ function hn(t) {
1164
+ var e, n = y;
1165
+ he(_s(t));
1166
1166
  try {
1167
- t.f &= ~Le, gs(t), e = Dr(t);
1167
+ t.f &= ~Le, bs(t), e = Lr(t);
1168
1168
  } finally {
1169
1169
  he(n);
1170
1170
  }
1171
1171
  return e;
1172
1172
  }
1173
- function vr(t) {
1174
- var e = cn(t);
1175
- if (!t.equals(e) && (t.wv = Cr(), (!x?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
1176
- S(t, z);
1173
+ function kr(t) {
1174
+ var e = hn(t);
1175
+ if (!t.equals(e) && (t.wv = zr(), (!x?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
1176
+ S(t, D);
1177
1177
  return;
1178
1178
  }
1179
- Ke || (se !== null ? (hn() || x?.is_fork) && se.set(t, e) : ln(t));
1179
+ Ke || (re !== null ? (dn() || x?.is_fork) && re.set(t, e) : cn(t));
1180
1180
  }
1181
- function ks(t) {
1181
+ function Ms(t) {
1182
1182
  if (t.effects !== null)
1183
1183
  for (const e of t.effects)
1184
- (e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Ne), e.teardown = qi, e.ac = null, lt(e, 0), pn(e));
1184
+ (e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Ne), e.teardown = Xi, e.ac = null, ct(e, 0), mn(e));
1185
1185
  }
1186
- function gr(t) {
1186
+ function yr(t) {
1187
1187
  if (t.effects !== null)
1188
1188
  for (const e of t.effects)
1189
1189
  e.teardown && Ge(e);
1190
1190
  }
1191
- let nn = /* @__PURE__ */ new Set();
1192
- const xe = /* @__PURE__ */ new Map();
1193
- let wr = !1;
1194
- function Rt(t, e) {
1191
+ let sn = /* @__PURE__ */ new Set();
1192
+ const Se = /* @__PURE__ */ new Map();
1193
+ let br = !1;
1194
+ function zt(t, e) {
1195
1195
  var n = {
1196
1196
  f: 0,
1197
1197
  // TODO ideally we could skip this altogether, but it causes type errors
1198
1198
  v: t,
1199
1199
  reactions: null,
1200
- equals: lr,
1200
+ equals: fr,
1201
1201
  rv: 0,
1202
1202
  wv: 0
1203
1203
  };
1204
1204
  return n;
1205
1205
  }
1206
1206
  // @__NO_SIDE_EFFECTS__
1207
- function U(t, e) {
1208
- const n = Rt(t);
1209
- return Ds(n), n;
1207
+ function V(t, e) {
1208
+ const n = zt(t);
1209
+ return Fs(n), n;
1210
1210
  }
1211
- function B(t, e, n = !1) {
1211
+ function U(t, e, n = !1) {
1212
1212
  k !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
1213
1213
  // to ensure we error if state is set inside an inspect effect
1214
- (!ae || (k.f & Ln) !== 0) && ur() && (k.f & (O | ge | sn | Ln)) !== 0 && (ne === null || !Ye.call(ne, t)) && Qi();
1215
- let r = n ? nt(e) : e;
1216
- return At(t, r);
1214
+ (!ie || (k.f & Vn) !== 0) && hr() && (k.f & (z | we | on | Vn)) !== 0 && (te === null || !Ye.call(te, t)) && rs();
1215
+ let r = n ? rt(e) : e;
1216
+ return Ct(t, r);
1217
1217
  }
1218
- function At(t, e) {
1218
+ function Ct(t, e) {
1219
1219
  if (!t.equals(e)) {
1220
1220
  var n = t.v;
1221
- Ke ? xe.set(t, e) : xe.set(t, n), t.v = e;
1222
- var r = Ee.ensure();
1223
- if (r.capture(t, n), (t.f & O) !== 0) {
1221
+ Ke ? Se.set(t, e) : Se.set(t, n), t.v = e;
1222
+ var r = xe.ensure();
1223
+ if (r.capture(t, n), (t.f & z) !== 0) {
1224
1224
  const i = (
1225
1225
  /** @type {Derived} */
1226
1226
  t
1227
1227
  );
1228
- (t.f & $) !== 0 && cn(i), ln(i);
1228
+ (t.f & F) !== 0 && hn(i), cn(i);
1229
1229
  }
1230
- t.wv = Cr(), kr(t, $), b !== null && (b.f & z) !== 0 && (b.f & (Se | Fe)) === 0 && (G === null ? zs([t]) : G.push(t)), !r.is_fork && nn.size > 0 && !wr && ys();
1230
+ t.wv = zr(), _r(t, F), y !== null && (y.f & D) !== 0 && (y.f & (Pe | Fe)) === 0 && (K === null ? $s([t]) : K.push(t)), !r.is_fork && sn.size > 0 && !br && Es();
1231
1231
  }
1232
1232
  return e;
1233
1233
  }
1234
- function ys() {
1235
- wr = !1;
1236
- for (const t of nn)
1237
- (t.f & z) !== 0 && S(t, oe), ht(t) && Ge(t);
1238
- nn.clear();
1234
+ function Es() {
1235
+ br = !1;
1236
+ for (const t of sn)
1237
+ (t.f & D) !== 0 && S(t, se), dt(t) && Ge(t);
1238
+ sn.clear();
1239
1239
  }
1240
- function at(t) {
1241
- B(t, t.v + 1);
1240
+ function lt(t) {
1241
+ U(t, t.v + 1);
1242
1242
  }
1243
- function kr(t, e) {
1243
+ function _r(t, e) {
1244
1244
  var n = t.reactions;
1245
1245
  if (n !== null)
1246
1246
  for (var r = n.length, i = 0; i < r; i++) {
1247
- var s = n[i], a = s.f, u = (a & $) === 0;
1248
- if (u && S(s, e), (a & O) !== 0) {
1247
+ var s = n[i], a = s.f, u = (a & F) === 0;
1248
+ if (u && S(s, e), (a & z) !== 0) {
1249
1249
  var o = (
1250
1250
  /** @type {Derived} */
1251
1251
  s
1252
1252
  );
1253
- se?.delete(o), (a & Le) === 0 && (a & te && (s.f |= Le), kr(o, oe));
1254
- } else u && ((a & ge) !== 0 && me !== null && me.add(
1253
+ re?.delete(o), (a & Le) === 0 && (a & ee && (s.f |= Le), _r(o, se));
1254
+ } else u && ((a & we) !== 0 && ve !== null && ve.add(
1255
1255
  /** @type {Effect} */
1256
1256
  s
1257
1257
  ), ce(
@@ -1260,21 +1260,21 @@ function kr(t, e) {
1260
1260
  ));
1261
1261
  }
1262
1262
  }
1263
- function nt(t) {
1264
- if (typeof t != "object" || t === null || xt in t)
1263
+ function rt(t) {
1264
+ if (typeof t != "object" || t === null || Tt in t)
1265
1265
  return t;
1266
- const e = Hi(t);
1267
- if (e !== Wi && e !== Bi)
1266
+ const e = Ji(t);
1267
+ if (e !== Zi && e !== Yi)
1268
1268
  return t;
1269
- var n = /* @__PURE__ */ new Map(), r = $i(t), i = /* @__PURE__ */ U(0), s = De, a = (u) => {
1269
+ var n = /* @__PURE__ */ new Map(), r = Wi(t), i = /* @__PURE__ */ V(0), s = De, a = (u) => {
1270
1270
  if (De === s)
1271
1271
  return u();
1272
1272
  var o = k, l = De;
1273
- re(null), Un(s);
1273
+ ne(null), Hn(s);
1274
1274
  var c = u();
1275
- return re(o), Un(l), c;
1275
+ return ne(o), Hn(l), c;
1276
1276
  };
1277
- return r && n.set("length", /* @__PURE__ */ U(
1277
+ return r && n.set("length", /* @__PURE__ */ V(
1278
1278
  /** @type {any[]} */
1279
1279
  t.length
1280
1280
  )), new Proxy(
@@ -1282,34 +1282,34 @@ function nt(t) {
1282
1282
  t,
1283
1283
  {
1284
1284
  defineProperty(u, o, l) {
1285
- (!("value" in l) || l.configurable === !1 || l.enumerable === !1 || l.writable === !1) && Ki();
1285
+ (!("value" in l) || l.configurable === !1 || l.enumerable === !1 || l.writable === !1) && ts();
1286
1286
  var c = n.get(o);
1287
1287
  return c === void 0 ? a(() => {
1288
- var f = /* @__PURE__ */ U(l.value);
1288
+ var f = /* @__PURE__ */ V(l.value);
1289
1289
  return n.set(o, f), f;
1290
- }) : B(c, l.value, !0), !0;
1290
+ }) : U(c, l.value, !0), !0;
1291
1291
  },
1292
1292
  deleteProperty(u, o) {
1293
1293
  var l = n.get(o);
1294
1294
  if (l === void 0) {
1295
1295
  if (o in u) {
1296
- const c = a(() => /* @__PURE__ */ U(D));
1297
- n.set(o, c), at(i);
1296
+ const c = a(() => /* @__PURE__ */ V(R));
1297
+ n.set(o, c), lt(i);
1298
1298
  }
1299
1299
  } else
1300
- B(l, D), at(i);
1300
+ U(l, R), lt(i);
1301
1301
  return !0;
1302
1302
  },
1303
1303
  get(u, o, l) {
1304
- if (o === xt)
1304
+ if (o === Tt)
1305
1305
  return t;
1306
1306
  var c = n.get(o), f = o in u;
1307
- if (c === void 0 && (!f || st(u, o)?.writable) && (c = a(() => {
1308
- var m = nt(f ? u[o] : D), d = /* @__PURE__ */ U(m);
1309
- return d;
1307
+ if (c === void 0 && (!f || ot(u, o)?.writable) && (c = a(() => {
1308
+ var m = rt(f ? u[o] : R), h = /* @__PURE__ */ V(m);
1309
+ return h;
1310
1310
  }), n.set(o, c)), c !== void 0) {
1311
- var h = E(c);
1312
- return h === D ? void 0 : h;
1311
+ var p = E(c);
1312
+ return p === R ? void 0 : p;
1313
1313
  }
1314
1314
  return Reflect.get(u, o, l);
1315
1315
  },
@@ -1319,138 +1319,138 @@ function nt(t) {
1319
1319
  var c = n.get(o);
1320
1320
  c && (l.value = E(c));
1321
1321
  } else if (l === void 0) {
1322
- var f = n.get(o), h = f?.v;
1323
- if (f !== void 0 && h !== D)
1322
+ var f = n.get(o), p = f?.v;
1323
+ if (f !== void 0 && p !== R)
1324
1324
  return {
1325
1325
  enumerable: !0,
1326
1326
  configurable: !0,
1327
- value: h,
1327
+ value: p,
1328
1328
  writable: !0
1329
1329
  };
1330
1330
  }
1331
1331
  return l;
1332
1332
  },
1333
1333
  has(u, o) {
1334
- if (o === xt)
1334
+ if (o === Tt)
1335
1335
  return !0;
1336
- var l = n.get(o), c = l !== void 0 && l.v !== D || Reflect.has(u, o);
1337
- if (l !== void 0 || b !== null && (!c || st(u, o)?.writable)) {
1336
+ var l = n.get(o), c = l !== void 0 && l.v !== R || Reflect.has(u, o);
1337
+ if (l !== void 0 || y !== null && (!c || ot(u, o)?.writable)) {
1338
1338
  l === void 0 && (l = a(() => {
1339
- var h = c ? nt(u[o]) : D, m = /* @__PURE__ */ U(h);
1339
+ var p = c ? rt(u[o]) : R, m = /* @__PURE__ */ V(p);
1340
1340
  return m;
1341
1341
  }), n.set(o, l));
1342
1342
  var f = E(l);
1343
- if (f === D)
1343
+ if (f === R)
1344
1344
  return !1;
1345
1345
  }
1346
1346
  return c;
1347
1347
  },
1348
1348
  set(u, o, l, c) {
1349
- var f = n.get(o), h = o in u;
1349
+ var f = n.get(o), p = o in u;
1350
1350
  if (r && o === "length")
1351
1351
  for (var m = l; m < /** @type {Source<number>} */
1352
1352
  f.v; m += 1) {
1353
- var d = n.get(m + "");
1354
- d !== void 0 ? B(d, D) : m in u && (d = a(() => /* @__PURE__ */ U(D)), n.set(m + "", d));
1353
+ var h = n.get(m + "");
1354
+ h !== void 0 ? U(h, R) : m in u && (h = a(() => /* @__PURE__ */ V(R)), n.set(m + "", h));
1355
1355
  }
1356
1356
  if (f === void 0)
1357
- (!h || st(u, o)?.writable) && (f = a(() => /* @__PURE__ */ U(void 0)), B(f, nt(l)), n.set(o, f));
1357
+ (!p || ot(u, o)?.writable) && (f = a(() => /* @__PURE__ */ V(void 0)), U(f, rt(l)), n.set(o, f));
1358
1358
  else {
1359
- h = f.v !== D;
1360
- var v = a(() => nt(l));
1361
- B(f, v);
1359
+ p = f.v !== R;
1360
+ var v = a(() => rt(l));
1361
+ U(f, v);
1362
1362
  }
1363
- var _ = Reflect.getOwnPropertyDescriptor(u, o);
1364
- if (_?.set && _.set.call(c, l), !h) {
1363
+ var b = Reflect.getOwnPropertyDescriptor(u, o);
1364
+ if (b?.set && b.set.call(c, l), !p) {
1365
1365
  if (r && typeof o == "string") {
1366
- var R = (
1366
+ var C = (
1367
1367
  /** @type {Source<number>} */
1368
1368
  n.get("length")
1369
- ), j = Number(o);
1370
- Number.isInteger(j) && j >= R.v && B(R, j + 1);
1369
+ ), J = Number(o);
1370
+ Number.isInteger(J) && J >= C.v && U(C, J + 1);
1371
1371
  }
1372
- at(i);
1372
+ lt(i);
1373
1373
  }
1374
1374
  return !0;
1375
1375
  },
1376
1376
  ownKeys(u) {
1377
1377
  E(i);
1378
1378
  var o = Reflect.ownKeys(u).filter((f) => {
1379
- var h = n.get(f);
1380
- return h === void 0 || h.v !== D;
1379
+ var p = n.get(f);
1380
+ return p === void 0 || p.v !== R;
1381
1381
  });
1382
1382
  for (var [l, c] of n)
1383
- c.v !== D && !(l in u) && o.push(l);
1383
+ c.v !== R && !(l in u) && o.push(l);
1384
1384
  return o;
1385
1385
  },
1386
1386
  setPrototypeOf() {
1387
- Gi();
1387
+ ns();
1388
1388
  }
1389
1389
  }
1390
1390
  );
1391
1391
  }
1392
- var $n, yr, br, _r;
1393
- function bs() {
1394
- if ($n === void 0) {
1395
- $n = window, yr = /Firefox/.test(navigator.userAgent);
1392
+ var Un, Mr, Er, xr;
1393
+ function xs() {
1394
+ if (Un === void 0) {
1395
+ Un = window, Mr = /Firefox/.test(navigator.userAgent);
1396
1396
  var t = Element.prototype, e = Node.prototype, n = Text.prototype;
1397
- br = st(e, "firstChild").get, _r = st(e, "nextSibling").get, On(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), On(n) && (n.__t = void 0);
1397
+ Er = ot(e, "firstChild").get, xr = ot(e, "nextSibling").get, $n(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), $n(n) && (n.__t = void 0);
1398
1398
  }
1399
1399
  }
1400
- function Mr(t = "") {
1400
+ function Sr(t = "") {
1401
1401
  return document.createTextNode(t);
1402
1402
  }
1403
1403
  // @__NO_SIDE_EFFECTS__
1404
- function Er(t) {
1404
+ function Pr(t) {
1405
1405
  return (
1406
1406
  /** @type {TemplateNode | null} */
1407
- br.call(t)
1407
+ Er.call(t)
1408
1408
  );
1409
1409
  }
1410
1410
  // @__NO_SIDE_EFFECTS__
1411
- function fn(t) {
1411
+ function pn(t) {
1412
1412
  return (
1413
1413
  /** @type {TemplateNode | null} */
1414
- _r.call(t)
1414
+ xr.call(t)
1415
1415
  );
1416
1416
  }
1417
- function Vn(t, e) {
1418
- return /* @__PURE__ */ Er(t);
1417
+ function Wn(t, e) {
1418
+ return /* @__PURE__ */ Pr(t);
1419
1419
  }
1420
- function _s(t, e = 1, n = !1) {
1420
+ function Ss(t, e = 1, n = !1) {
1421
1421
  let r = t;
1422
1422
  for (; e--; )
1423
1423
  r = /** @type {TemplateNode} */
1424
- /* @__PURE__ */ fn(r);
1424
+ /* @__PURE__ */ pn(r);
1425
1425
  return r;
1426
1426
  }
1427
- function Ms(t, e, n) {
1427
+ function Ps(t, e, n) {
1428
1428
  return (
1429
1429
  /** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
1430
- document.createElementNS(ts, t, void 0)
1430
+ document.createElementNS(ss, t, void 0)
1431
1431
  );
1432
1432
  }
1433
- function xr(t) {
1434
- var e = k, n = b;
1435
- re(null), he(null);
1433
+ function Tr(t) {
1434
+ var e = k, n = y;
1435
+ ne(null), he(null);
1436
1436
  try {
1437
1437
  return t();
1438
1438
  } finally {
1439
- re(e), he(n);
1439
+ ne(e), he(n);
1440
1440
  }
1441
1441
  }
1442
- function Es(t, e) {
1442
+ function Ts(t, e) {
1443
1443
  var n = e.last;
1444
1444
  n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
1445
1445
  }
1446
- function we(t, e, n) {
1447
- var r = b;
1448
- r !== null && (r.f & be) !== 0 && (t |= be);
1446
+ function ke(t, e, n) {
1447
+ var r = y;
1448
+ r !== null && (r.f & _e) !== 0 && (t |= _e);
1449
1449
  var i = {
1450
- ctx: le,
1450
+ ctx: ae,
1451
1451
  deps: null,
1452
1452
  nodes: null,
1453
- f: t | $ | te,
1453
+ f: t | F | ee,
1454
1454
  first: null,
1455
1455
  fn: e,
1456
1456
  last: null,
@@ -1471,7 +1471,7 @@ function we(t, e, n) {
1471
1471
  else e !== null && ce(i);
1472
1472
  var s = i;
1473
1473
  if (n && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
1474
- (s.f & et) === 0 && (s = s.first, (t & ge) !== 0 && (t & It) !== 0 && s !== null && (s.f |= It)), s !== null && (s.parent = r, r !== null && Es(s, r), k !== null && (k.f & O) !== 0 && (t & Fe) === 0)) {
1474
+ (s.f & et) === 0 && (s = s.first, (t & we) !== 0 && (t & Nt) !== 0 && s !== null && (s.f |= Nt)), s !== null && (s.parent = r, r !== null && Ts(s, r), k !== null && (k.f & z) !== 0 && (t & Fe) === 0)) {
1475
1475
  var a = (
1476
1476
  /** @type {Derived} */
1477
1477
  k
@@ -1480,103 +1480,103 @@ function we(t, e, n) {
1480
1480
  }
1481
1481
  return i;
1482
1482
  }
1483
- function hn() {
1484
- return k !== null && !ae;
1483
+ function dn() {
1484
+ return k !== null && !ie;
1485
1485
  }
1486
- function xs(t) {
1487
- const e = we(Ct, null, !1);
1488
- return S(e, z), e.teardown = t, e;
1486
+ function Is(t) {
1487
+ const e = ke(Dt, null, !1);
1488
+ return S(e, D), e.teardown = t, e;
1489
1489
  }
1490
- function Ss(t) {
1491
- return we(ft | Yi, t, !1);
1490
+ function As(t) {
1491
+ return ke(pt | Gi, t, !1);
1492
1492
  }
1493
- function Ps(t) {
1494
- Ee.ensure();
1495
- const e = we(Fe | et, t, !0);
1493
+ function Ns(t) {
1494
+ xe.ensure();
1495
+ const e = ke(Fe | et, t, !0);
1496
1496
  return (n = {}) => new Promise((r) => {
1497
- n.outro ? St(e, () => {
1497
+ n.outro ? It(e, () => {
1498
1498
  fe(e), r(void 0);
1499
1499
  }) : (fe(e), r(void 0));
1500
1500
  });
1501
1501
  }
1502
- function Ts(t) {
1503
- return we(ft, t, !1);
1502
+ function Cs(t) {
1503
+ return ke(pt, t, !1);
1504
1504
  }
1505
- function Is(t) {
1506
- return we(sn | et, t, !0);
1505
+ function Rs(t) {
1506
+ return ke(on | et, t, !0);
1507
1507
  }
1508
- function Sr(t, e = 0) {
1509
- return we(Ct | e, t, !0);
1508
+ function Ir(t, e = 0) {
1509
+ return ke(Dt | e, t, !0);
1510
1510
  }
1511
- function Pr(t, e = [], n = [], r = []) {
1512
- hs(r, e, n, (i) => {
1513
- we(Ct, () => t(...i.map(E)), !0);
1511
+ function Ar(t, e = [], n = [], r = []) {
1512
+ vs(r, e, n, (i) => {
1513
+ ke(Dt, () => t(...i.map(E)), !0);
1514
1514
  });
1515
1515
  }
1516
- function As(t, e = 0) {
1517
- var n = we(ge | e, t, !0);
1516
+ function Ds(t, e = 0) {
1517
+ var n = ke(we | e, t, !0);
1518
1518
  return n;
1519
1519
  }
1520
1520
  function Ae(t) {
1521
- return we(Se | et, t, !0);
1521
+ return ke(Pe | et, t, !0);
1522
1522
  }
1523
- function Tr(t) {
1523
+ function Nr(t) {
1524
1524
  var e = t.teardown;
1525
1525
  if (e !== null) {
1526
1526
  const n = Ke, r = k;
1527
- jn(!0), re(null);
1527
+ Bn(!0), ne(null);
1528
1528
  try {
1529
1529
  e.call(null);
1530
1530
  } finally {
1531
- jn(n), re(r);
1531
+ Bn(n), ne(r);
1532
1532
  }
1533
1533
  }
1534
1534
  }
1535
- function pn(t, e = !1) {
1535
+ function mn(t, e = !1) {
1536
1536
  var n = t.first;
1537
1537
  for (t.first = t.last = null; n !== null; ) {
1538
1538
  const i = n.ac;
1539
- i !== null && xr(() => {
1539
+ i !== null && Tr(() => {
1540
1540
  i.abort(Ne);
1541
1541
  });
1542
1542
  var r = n.next;
1543
1543
  (n.f & Fe) !== 0 ? n.parent = null : fe(n, e), n = r;
1544
1544
  }
1545
1545
  }
1546
- function Ns(t) {
1546
+ function zs(t) {
1547
1547
  for (var e = t.first; e !== null; ) {
1548
1548
  var n = e.next;
1549
- (e.f & Se) === 0 && fe(e), e = n;
1549
+ (e.f & Pe) === 0 && fe(e), e = n;
1550
1550
  }
1551
1551
  }
1552
1552
  function fe(t, e = !0) {
1553
1553
  var n = !1;
1554
- (e || (t.f & or) !== 0) && t.nodes !== null && t.nodes.end !== null && (Cs(
1554
+ (e || (t.f & cr) !== 0) && t.nodes !== null && t.nodes.end !== null && (Os(
1555
1555
  t.nodes.start,
1556
1556
  /** @type {TemplateNode} */
1557
1557
  t.nodes.end
1558
- ), n = !0), pn(t, e && !n), lt(t, 0), S(t, _e);
1558
+ ), n = !0), mn(t, e && !n), ct(t, 0), S(t, Me);
1559
1559
  var r = t.nodes && t.nodes.t;
1560
1560
  if (r !== null)
1561
1561
  for (const s of r)
1562
1562
  s.stop();
1563
- Tr(t);
1563
+ Nr(t);
1564
1564
  var i = t.parent;
1565
- i !== null && i.first !== null && Ir(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
1565
+ i !== null && i.first !== null && Cr(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
1566
1566
  }
1567
- function Cs(t, e) {
1567
+ function Os(t, e) {
1568
1568
  for (; t !== null; ) {
1569
- var n = t === e ? null : /* @__PURE__ */ fn(t);
1569
+ var n = t === e ? null : /* @__PURE__ */ pn(t);
1570
1570
  t.remove(), t = n;
1571
1571
  }
1572
1572
  }
1573
- function Ir(t) {
1573
+ function Cr(t) {
1574
1574
  var e = t.parent, n = t.prev, r = t.next;
1575
1575
  n !== null && (n.next = r), r !== null && (r.prev = n), e !== null && (e.first === t && (e.first = r), e.last === t && (e.last = n));
1576
1576
  }
1577
- function St(t, e, n = !0) {
1577
+ function It(t, e, n = !0) {
1578
1578
  var r = [];
1579
- Ar(t, r, !0);
1579
+ Rr(t, r, !0);
1580
1580
  var i = () => {
1581
1581
  n && fe(t), e && e();
1582
1582
  }, s = r.length;
@@ -1587,127 +1587,127 @@ function St(t, e, n = !0) {
1587
1587
  } else
1588
1588
  i();
1589
1589
  }
1590
- function Ar(t, e, n) {
1591
- if ((t.f & be) === 0) {
1592
- t.f ^= be;
1590
+ function Rr(t, e, n) {
1591
+ if ((t.f & _e) === 0) {
1592
+ t.f ^= _e;
1593
1593
  var r = t.nodes && t.nodes.t;
1594
1594
  if (r !== null)
1595
1595
  for (const u of r)
1596
1596
  (u.is_global || n) && e.push(u);
1597
1597
  for (var i = t.first; i !== null; ) {
1598
- var s = i.next, a = (i.f & It) !== 0 || // If this is a branch effect without a block effect parent,
1598
+ var s = i.next, a = (i.f & Nt) !== 0 || // If this is a branch effect without a block effect parent,
1599
1599
  // it means the parent block effect was pruned. In that case,
1600
1600
  // transparency information was transferred to the branch effect.
1601
- (i.f & Se) !== 0 && (t.f & ge) !== 0;
1602
- Ar(i, e, a ? n : !1), i = s;
1601
+ (i.f & Pe) !== 0 && (t.f & we) !== 0;
1602
+ Rr(i, e, a ? n : !1), i = s;
1603
1603
  }
1604
1604
  }
1605
1605
  }
1606
- function Rs(t, e) {
1606
+ function Ls(t, e) {
1607
1607
  if (t.nodes)
1608
1608
  for (var n = t.nodes.start, r = t.nodes.end; n !== null; ) {
1609
- var i = n === r ? null : /* @__PURE__ */ fn(n);
1609
+ var i = n === r ? null : /* @__PURE__ */ pn(n);
1610
1610
  e.append(n), n = i;
1611
1611
  }
1612
1612
  }
1613
- let Pt = !1, Ke = !1;
1614
- function jn(t) {
1613
+ let At = !1, Ke = !1;
1614
+ function Bn(t) {
1615
1615
  Ke = t;
1616
1616
  }
1617
- let k = null, ae = !1;
1618
- function re(t) {
1617
+ let k = null, ie = !1;
1618
+ function ne(t) {
1619
1619
  k = t;
1620
1620
  }
1621
- let b = null;
1621
+ let y = null;
1622
1622
  function he(t) {
1623
- b = t;
1623
+ y = t;
1624
1624
  }
1625
- let ne = null;
1626
- function Ds(t) {
1627
- k !== null && (ne === null ? ne = [t] : ne.push(t));
1625
+ let te = null;
1626
+ function Fs(t) {
1627
+ k !== null && (te === null ? te = [t] : te.push(t));
1628
1628
  }
1629
- let W = null, Y = 0, G = null;
1630
- function zs(t) {
1631
- G = t;
1629
+ let j = null, Z = 0, K = null;
1630
+ function $s(t) {
1631
+ K = t;
1632
1632
  }
1633
- let Nr = 1, Ce = 0, De = Ce;
1634
- function Un(t) {
1633
+ let Dr = 1, Ce = 0, De = Ce;
1634
+ function Hn(t) {
1635
1635
  De = t;
1636
1636
  }
1637
- function Cr() {
1638
- return ++Nr;
1637
+ function zr() {
1638
+ return ++Dr;
1639
1639
  }
1640
- function ht(t) {
1640
+ function dt(t) {
1641
1641
  var e = t.f;
1642
- if ((e & $) !== 0)
1642
+ if ((e & F) !== 0)
1643
1643
  return !0;
1644
- if (e & O && (t.f &= ~Le), (e & oe) !== 0) {
1644
+ if (e & z && (t.f &= ~Le), (e & se) !== 0) {
1645
1645
  for (var n = (
1646
1646
  /** @type {Value[]} */
1647
1647
  t.deps
1648
1648
  ), r = n.length, i = 0; i < r; i++) {
1649
1649
  var s = n[i];
1650
- if (ht(
1650
+ if (dt(
1651
1651
  /** @type {Derived} */
1652
1652
  s
1653
- ) && vr(
1653
+ ) && kr(
1654
1654
  /** @type {Derived} */
1655
1655
  s
1656
1656
  ), s.wv > t.wv)
1657
1657
  return !0;
1658
1658
  }
1659
- (e & te) !== 0 && // During time traveling we don't want to reset the status so that
1659
+ (e & ee) !== 0 && // During time traveling we don't want to reset the status so that
1660
1660
  // traversal of the graph in the other batches still happens
1661
- se === null && S(t, z);
1661
+ re === null && S(t, D);
1662
1662
  }
1663
1663
  return !1;
1664
1664
  }
1665
- function Rr(t, e, n = !0) {
1665
+ function Or(t, e, n = !0) {
1666
1666
  var r = t.reactions;
1667
- if (r !== null && !(ne !== null && Ye.call(ne, t)))
1667
+ if (r !== null && !(te !== null && Ye.call(te, t)))
1668
1668
  for (var i = 0; i < r.length; i++) {
1669
1669
  var s = r[i];
1670
- (s.f & O) !== 0 ? Rr(
1670
+ (s.f & z) !== 0 ? Or(
1671
1671
  /** @type {Derived} */
1672
1672
  s,
1673
1673
  e,
1674
1674
  !1
1675
- ) : e === s && (n ? S(s, $) : (s.f & z) !== 0 && S(s, oe), ce(
1675
+ ) : e === s && (n ? S(s, F) : (s.f & D) !== 0 && S(s, se), ce(
1676
1676
  /** @type {Effect} */
1677
1677
  s
1678
1678
  ));
1679
1679
  }
1680
1680
  }
1681
- function Dr(t) {
1682
- var e = W, n = Y, r = G, i = k, s = ne, a = le, u = ae, o = De, l = t.f;
1683
- W = /** @type {null | Value[]} */
1684
- null, Y = 0, G = null, k = (l & (Se | Fe)) === 0 ? t : null, ne = null, Xe(t.ctx), ae = !1, De = ++Ce, t.ac !== null && (xr(() => {
1681
+ function Lr(t) {
1682
+ var e = j, n = Z, r = K, i = k, s = te, a = ae, u = ie, o = De, l = t.f;
1683
+ j = /** @type {null | Value[]} */
1684
+ null, Z = 0, K = null, k = (l & (Pe | Fe)) === 0 ? t : null, te = null, Xe(t.ctx), ie = !1, De = ++Ce, t.ac !== null && (Tr(() => {
1685
1685
  t.ac.abort(Ne);
1686
1686
  }), t.ac = null);
1687
1687
  try {
1688
- t.f |= Qt;
1688
+ t.f |= tn;
1689
1689
  var c = (
1690
1690
  /** @type {Function} */
1691
1691
  t.fn
1692
1692
  ), f = c();
1693
1693
  t.f |= Je;
1694
- var h = t.deps, m = x?.is_fork;
1695
- if (W !== null) {
1696
- var d;
1697
- if (m || lt(t, Y), h !== null && Y > 0)
1698
- for (h.length = Y + W.length, d = 0; d < W.length; d++)
1699
- h[Y + d] = W[d];
1694
+ var p = t.deps, m = x?.is_fork;
1695
+ if (j !== null) {
1696
+ var h;
1697
+ if (m || ct(t, Z), p !== null && Z > 0)
1698
+ for (p.length = Z + j.length, h = 0; h < j.length; h++)
1699
+ p[Z + h] = j[h];
1700
1700
  else
1701
- t.deps = h = W;
1702
- if (hn() && (t.f & te) !== 0)
1703
- for (d = Y; d < h.length; d++)
1704
- (h[d].reactions ??= []).push(t);
1705
- } else !m && h !== null && Y < h.length && (lt(t, Y), h.length = Y);
1706
- if (ur() && G !== null && !ae && h !== null && (t.f & (O | oe | $)) === 0)
1707
- for (d = 0; d < /** @type {Source[]} */
1708
- G.length; d++)
1709
- Rr(
1710
- G[d],
1701
+ t.deps = p = j;
1702
+ if (dn() && (t.f & ee) !== 0)
1703
+ for (h = Z; h < p.length; h++)
1704
+ (p[h].reactions ??= []).push(t);
1705
+ } else !m && p !== null && Z < p.length && (ct(t, Z), p.length = Z);
1706
+ if (hr() && K !== null && !ie && p !== null && (t.f & (z | se | F)) === 0)
1707
+ for (h = 0; h < /** @type {Source[]} */
1708
+ K.length; h++)
1709
+ Or(
1710
+ K[h],
1711
1711
  /** @type {Effect} */
1712
1712
  t
1713
1713
  );
@@ -1718,67 +1718,67 @@ function Dr(t) {
1718
1718
  if (e !== null)
1719
1719
  for (const v of e)
1720
1720
  v.rv = Ce;
1721
- G !== null && (r === null ? r = G : r.push(.../** @type {Source[]} */
1722
- G));
1721
+ K !== null && (r === null ? r = K : r.push(.../** @type {Source[]} */
1722
+ K));
1723
1723
  }
1724
- return (t.f & Me) !== 0 && (t.f ^= Me), f;
1724
+ return (t.f & Ee) !== 0 && (t.f ^= Ee), f;
1725
1725
  } catch (v) {
1726
- return cr(v);
1726
+ return pr(v);
1727
1727
  } finally {
1728
- t.f ^= Qt, W = e, Y = n, G = r, k = i, ne = s, Xe(a), ae = u, De = o;
1728
+ t.f ^= tn, j = e, Z = n, K = r, k = i, te = s, Xe(a), ie = u, De = o;
1729
1729
  }
1730
1730
  }
1731
- function Os(t, e) {
1731
+ function Vs(t, e) {
1732
1732
  let n = e.reactions;
1733
1733
  if (n !== null) {
1734
- var r = Vi.call(n, t);
1734
+ var r = Bi.call(n, t);
1735
1735
  if (r !== -1) {
1736
1736
  var i = n.length - 1;
1737
1737
  i === 0 ? n = e.reactions = null : (n[r] = n[i], n.pop());
1738
1738
  }
1739
1739
  }
1740
- if (n === null && (e.f & O) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1740
+ if (n === null && (e.f & z) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1741
1741
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
1742
1742
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
1743
- (W === null || !Ye.call(W, e))) {
1743
+ (j === null || !Ye.call(j, e))) {
1744
1744
  var s = (
1745
1745
  /** @type {Derived} */
1746
1746
  e
1747
1747
  );
1748
- (s.f & te) !== 0 && (s.f ^= te, s.f &= ~Le), ln(s), ks(s), lt(s, 0);
1748
+ (s.f & ee) !== 0 && (s.f ^= ee, s.f &= ~Le), cn(s), Ms(s), ct(s, 0);
1749
1749
  }
1750
1750
  }
1751
- function lt(t, e) {
1751
+ function ct(t, e) {
1752
1752
  var n = t.deps;
1753
1753
  if (n !== null)
1754
1754
  for (var r = e; r < n.length; r++)
1755
- Os(t, n[r]);
1755
+ Vs(t, n[r]);
1756
1756
  }
1757
1757
  function Ge(t) {
1758
1758
  var e = t.f;
1759
- if ((e & _e) === 0) {
1760
- S(t, z);
1761
- var n = b, r = Pt;
1762
- b = t, Pt = !0;
1759
+ if ((e & Me) === 0) {
1760
+ S(t, D);
1761
+ var n = y, r = At;
1762
+ y = t, At = !0;
1763
1763
  try {
1764
- (e & (ge | ar)) !== 0 ? Ns(t) : pn(t), Tr(t);
1765
- var i = Dr(t);
1766
- t.teardown = typeof i == "function" ? i : null, t.wv = Nr;
1764
+ (e & (we | ur)) !== 0 ? zs(t) : mn(t), Nr(t);
1765
+ var i = Lr(t);
1766
+ t.teardown = typeof i == "function" ? i : null, t.wv = Dr;
1767
1767
  var s;
1768
- Kt && rs && (t.f & $) !== 0 && t.deps;
1768
+ Qt && os && (t.f & F) !== 0 && t.deps;
1769
1769
  } finally {
1770
- Pt = r, b = n;
1770
+ At = r, y = n;
1771
1771
  }
1772
1772
  }
1773
1773
  }
1774
1774
  function E(t) {
1775
- var e = t.f, n = (e & O) !== 0;
1776
- if (k !== null && !ae) {
1777
- var r = b !== null && (b.f & _e) !== 0;
1778
- if (!r && (ne === null || !Ye.call(ne, t))) {
1775
+ var e = t.f, n = (e & z) !== 0;
1776
+ if (k !== null && !ie) {
1777
+ var r = y !== null && (y.f & Me) !== 0;
1778
+ if (!r && (te === null || !Ye.call(te, t))) {
1779
1779
  var i = k.deps;
1780
- if ((k.f & Qt) !== 0)
1781
- t.rv < Ce && (t.rv = Ce, W === null && i !== null && i[Y] === t ? Y++ : W === null ? W = [t] : W.push(t));
1780
+ if ((k.f & tn) !== 0)
1781
+ t.rv < Ce && (t.rv = Ce, j === null && i !== null && i[Z] === t ? Z++ : j === null ? j = [t] : j.push(t));
1782
1782
  else {
1783
1783
  (k.deps ??= []).push(t);
1784
1784
  var s = t.reactions;
@@ -1786,8 +1786,8 @@ function E(t) {
1786
1786
  }
1787
1787
  }
1788
1788
  }
1789
- if (Ke && xe.has(t))
1790
- return xe.get(t);
1789
+ if (Ke && Se.has(t))
1790
+ return Se.get(t);
1791
1791
  if (n) {
1792
1792
  var a = (
1793
1793
  /** @type {Derived} */
@@ -1795,54 +1795,54 @@ function E(t) {
1795
1795
  );
1796
1796
  if (Ke) {
1797
1797
  var u = a.v;
1798
- return ((a.f & z) === 0 && a.reactions !== null || Or(a)) && (u = cn(a)), xe.set(a, u), u;
1798
+ return ((a.f & D) === 0 && a.reactions !== null || $r(a)) && (u = hn(a)), Se.set(a, u), u;
1799
1799
  }
1800
- var o = (a.f & te) === 0 && !ae && k !== null && (Pt || (k.f & te) !== 0), l = (a.f & Je) === 0;
1801
- ht(a) && (o && (a.f |= te), vr(a)), o && !l && (gr(a), zr(a));
1800
+ var o = (a.f & ee) === 0 && !ie && k !== null && (At || (k.f & ee) !== 0), l = (a.f & Je) === 0;
1801
+ dt(a) && (o && (a.f |= ee), kr(a)), o && !l && (yr(a), Fr(a));
1802
1802
  }
1803
- if (se?.has(t))
1804
- return se.get(t);
1805
- if ((t.f & Me) !== 0)
1803
+ if (re?.has(t))
1804
+ return re.get(t);
1805
+ if ((t.f & Ee) !== 0)
1806
1806
  throw t.v;
1807
1807
  return t.v;
1808
1808
  }
1809
- function zr(t) {
1810
- if (t.f |= te, t.deps !== null)
1809
+ function Fr(t) {
1810
+ if (t.f |= ee, t.deps !== null)
1811
1811
  for (const e of t.deps)
1812
- (e.reactions ??= []).push(t), (e.f & O) !== 0 && (e.f & te) === 0 && (gr(
1812
+ (e.reactions ??= []).push(t), (e.f & z) !== 0 && (e.f & ee) === 0 && (yr(
1813
1813
  /** @type {Derived} */
1814
1814
  e
1815
- ), zr(
1815
+ ), Fr(
1816
1816
  /** @type {Derived} */
1817
1817
  e
1818
1818
  ));
1819
1819
  }
1820
- function Or(t) {
1821
- if (t.v === D) return !0;
1820
+ function $r(t) {
1821
+ if (t.v === R) return !0;
1822
1822
  if (t.deps === null) return !1;
1823
1823
  for (const e of t.deps)
1824
- if (xe.has(e) || (e.f & O) !== 0 && Or(
1824
+ if (Se.has(e) || (e.f & z) !== 0 && $r(
1825
1825
  /** @type {Derived} */
1826
1826
  e
1827
1827
  ))
1828
1828
  return !0;
1829
1829
  return !1;
1830
1830
  }
1831
- function ee(t) {
1832
- var e = ae;
1831
+ function Q(t) {
1832
+ var e = ie;
1833
1833
  try {
1834
- return ae = !0, t();
1834
+ return ie = !0, t();
1835
1835
  } finally {
1836
- ae = e;
1836
+ ie = e;
1837
1837
  }
1838
1838
  }
1839
- const Ls = ["touchstart", "touchmove"];
1840
- function Fs(t) {
1841
- return Ls.includes(t);
1839
+ const js = ["touchstart", "touchmove"];
1840
+ function Us(t) {
1841
+ return js.includes(t);
1842
1842
  }
1843
- const bt = /* @__PURE__ */ Symbol("events"), $s = /* @__PURE__ */ new Set(), Wn = /* @__PURE__ */ new Set();
1844
- let Bn = null;
1845
- function Hn(t) {
1843
+ const Et = /* @__PURE__ */ Symbol("events"), Ws = /* @__PURE__ */ new Set(), qn = /* @__PURE__ */ new Set();
1844
+ let Zn = null;
1845
+ function Yn(t) {
1846
1846
  var e = this, n = (
1847
1847
  /** @type {Node} */
1848
1848
  e.ownerDocument
@@ -1850,13 +1850,13 @@ function Hn(t) {
1850
1850
  /** @type {null | Element} */
1851
1851
  i[0] || t.target
1852
1852
  );
1853
- Bn = t;
1854
- var a = 0, u = Bn === t && t[bt];
1853
+ Zn = t;
1854
+ var a = 0, u = Zn === t && t[Et];
1855
1855
  if (u) {
1856
1856
  var o = i.indexOf(u);
1857
1857
  if (o !== -1 && (e === document || e === /** @type {any} */
1858
1858
  window)) {
1859
- t[bt] = e;
1859
+ t[Et] = e;
1860
1860
  return;
1861
1861
  }
1862
1862
  var l = i.indexOf(e);
@@ -1866,95 +1866,95 @@ function Hn(t) {
1866
1866
  }
1867
1867
  if (s = /** @type {Element} */
1868
1868
  i[a] || t.target, s !== e) {
1869
- Ui(t, "currentTarget", {
1869
+ qi(t, "currentTarget", {
1870
1870
  configurable: !0,
1871
1871
  get() {
1872
1872
  return s || n;
1873
1873
  }
1874
1874
  });
1875
- var c = k, f = b;
1876
- re(null), he(null);
1875
+ var c = k, f = y;
1876
+ ne(null), he(null);
1877
1877
  try {
1878
- for (var h, m = []; s !== null; ) {
1879
- var d = s.assignedSlot || s.parentNode || /** @type {any} */
1878
+ for (var p, m = []; s !== null; ) {
1879
+ var h = s.assignedSlot || s.parentNode || /** @type {any} */
1880
1880
  s.host || null;
1881
1881
  try {
1882
- var v = s[bt]?.[r];
1882
+ var v = s[Et]?.[r];
1883
1883
  v != null && (!/** @type {any} */
1884
1884
  s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1885
1885
  // -> the target could not have been disabled because it emits the event in the first place
1886
1886
  t.target === s) && v.call(s, t);
1887
- } catch (_) {
1888
- h ? m.push(_) : h = _;
1887
+ } catch (b) {
1888
+ p ? m.push(b) : p = b;
1889
1889
  }
1890
- if (t.cancelBubble || d === e || d === null)
1890
+ if (t.cancelBubble || h === e || h === null)
1891
1891
  break;
1892
- s = d;
1892
+ s = h;
1893
1893
  }
1894
- if (h) {
1895
- for (let _ of m)
1894
+ if (p) {
1895
+ for (let b of m)
1896
1896
  queueMicrotask(() => {
1897
- throw _;
1897
+ throw b;
1898
1898
  });
1899
- throw h;
1899
+ throw p;
1900
1900
  }
1901
1901
  } finally {
1902
- t[bt] = e, delete t.currentTarget, re(c), he(f);
1902
+ t[Et] = e, delete t.currentTarget, ne(c), he(f);
1903
1903
  }
1904
1904
  }
1905
1905
  }
1906
- const Vs = (
1906
+ const Bs = (
1907
1907
  // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
1908
1908
  globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
1909
1909
  /** @param {string} html */
1910
1910
  createHTML: (t) => t
1911
1911
  })
1912
1912
  );
1913
- function js(t) {
1913
+ function Hs(t) {
1914
1914
  return (
1915
1915
  /** @type {string} */
1916
- Vs?.createHTML(t) ?? t
1916
+ Bs?.createHTML(t) ?? t
1917
1917
  );
1918
1918
  }
1919
- function Us(t) {
1920
- var e = Ms("template");
1921
- return e.innerHTML = js(t.replaceAll("<!>", "<!---->")), e.content;
1919
+ function qs(t) {
1920
+ var e = Ps("template");
1921
+ return e.innerHTML = Hs(t.replaceAll("<!>", "<!---->")), e.content;
1922
1922
  }
1923
- function Ws(t, e) {
1923
+ function Zs(t, e) {
1924
1924
  var n = (
1925
1925
  /** @type {Effect} */
1926
- b
1926
+ y
1927
1927
  );
1928
1928
  n.nodes === null && (n.nodes = { start: t, end: e, a: null, t: null });
1929
1929
  }
1930
1930
  // @__NO_SIDE_EFFECTS__
1931
- function Lr(t, e) {
1931
+ function Vr(t, e) {
1932
1932
  var n, r = !t.startsWith("<!>");
1933
1933
  return () => {
1934
- n === void 0 && (n = Us(r ? t : "<!>" + t), n = /** @type {TemplateNode} */
1935
- /* @__PURE__ */ Er(n));
1934
+ n === void 0 && (n = qs(r ? t : "<!>" + t), n = /** @type {TemplateNode} */
1935
+ /* @__PURE__ */ Pr(n));
1936
1936
  var i = (
1937
1937
  /** @type {TemplateNode} */
1938
- yr ? document.importNode(n, !0) : n.cloneNode(!0)
1938
+ Mr ? document.importNode(n, !0) : n.cloneNode(!0)
1939
1939
  );
1940
- return Ws(i, i), i;
1940
+ return Zs(i, i), i;
1941
1941
  };
1942
1942
  }
1943
- function Fr(t, e) {
1943
+ function jr(t, e) {
1944
1944
  t !== null && t.before(
1945
1945
  /** @type {Node} */
1946
1946
  e
1947
1947
  );
1948
1948
  }
1949
- function dn(t, e) {
1950
- return Bs(t, e);
1949
+ function vn(t, e) {
1950
+ return Ys(t, e);
1951
1951
  }
1952
- const _t = /* @__PURE__ */ new Map();
1953
- function Bs(t, { target: e, anchor: n, props: r = {}, events: i, context: s, intro: a = !0, transformError: u }) {
1954
- bs();
1955
- var o = void 0, l = Ps(() => {
1956
- var c = n ?? e.appendChild(Mr());
1957
- cs(
1952
+ const xt = /* @__PURE__ */ new Map();
1953
+ function Ys(t, { target: e, anchor: n, props: r = {}, events: i, context: s, intro: a = !0, transformError: u }) {
1954
+ xs();
1955
+ var o = void 0, l = Ns(() => {
1956
+ var c = n ?? e.appendChild(Sr());
1957
+ ds(
1958
1958
  /** @type {TemplateNode} */
1959
1959
  c,
1960
1960
  {
@@ -1962,69 +1962,69 @@ function Bs(t, { target: e, anchor: n, props: r = {}, events: i, context: s, int
1962
1962
  }
1963
1963
  },
1964
1964
  (m) => {
1965
- an({});
1966
- var d = (
1965
+ ln({});
1966
+ var h = (
1967
1967
  /** @type {ComponentContext} */
1968
- le
1968
+ ae
1969
1969
  );
1970
- s && (d.c = s), i && (r.$$events = i), o = t(m, r) || {}, on();
1970
+ s && (h.c = s), i && (r.$$events = i), o = t(m, r) || {}, un();
1971
1971
  },
1972
1972
  u
1973
1973
  );
1974
- var f = /* @__PURE__ */ new Set(), h = (m) => {
1975
- for (var d = 0; d < m.length; d++) {
1976
- var v = m[d];
1974
+ var f = /* @__PURE__ */ new Set(), p = (m) => {
1975
+ for (var h = 0; h < m.length; h++) {
1976
+ var v = m[h];
1977
1977
  if (!f.has(v)) {
1978
1978
  f.add(v);
1979
- var _ = Fs(v);
1980
- for (const X of [e, document]) {
1981
- var R = _t.get(X);
1982
- R === void 0 && (R = /* @__PURE__ */ new Map(), _t.set(X, R));
1983
- var j = R.get(v);
1984
- j === void 0 ? (X.addEventListener(v, Hn, { passive: _ }), R.set(v, 1)) : R.set(v, j + 1);
1979
+ var b = Us(v);
1980
+ for (const oe of [e, document]) {
1981
+ var C = xt.get(oe);
1982
+ C === void 0 && (C = /* @__PURE__ */ new Map(), xt.set(oe, C));
1983
+ var J = C.get(v);
1984
+ J === void 0 ? (oe.addEventListener(v, Yn, { passive: b }), C.set(v, 1)) : C.set(v, J + 1);
1985
1985
  }
1986
1986
  }
1987
1987
  }
1988
1988
  };
1989
- return h(ji($s)), Wn.add(h), () => {
1989
+ return p(Hi(Ws)), qn.add(p), () => {
1990
1990
  for (var m of f)
1991
- for (const _ of [e, document]) {
1992
- var d = (
1991
+ for (const b of [e, document]) {
1992
+ var h = (
1993
1993
  /** @type {Map<string, number>} */
1994
- _t.get(_)
1994
+ xt.get(b)
1995
1995
  ), v = (
1996
1996
  /** @type {number} */
1997
- d.get(m)
1997
+ h.get(m)
1998
1998
  );
1999
- --v == 0 ? (_.removeEventListener(m, Hn), d.delete(m), d.size === 0 && _t.delete(_)) : d.set(m, v);
1999
+ --v == 0 ? (b.removeEventListener(m, Yn), h.delete(m), h.size === 0 && xt.delete(b)) : h.set(m, v);
2000
2000
  }
2001
- Wn.delete(h), c !== n && c.parentNode?.removeChild(c);
2001
+ qn.delete(p), c !== n && c.parentNode?.removeChild(c);
2002
2002
  };
2003
2003
  });
2004
- return Hs.set(o, l), o;
2004
+ return Js.set(o, l), o;
2005
2005
  }
2006
- let Hs = /* @__PURE__ */ new WeakMap();
2007
- function $r(t) {
2006
+ let Js = /* @__PURE__ */ new WeakMap();
2007
+ function Ur(t) {
2008
2008
  var e, n, r = "";
2009
2009
  if (typeof t == "string" || typeof t == "number") r += t;
2010
2010
  else if (typeof t == "object") if (Array.isArray(t)) {
2011
2011
  var i = t.length;
2012
- for (e = 0; e < i; e++) t[e] && (n = $r(t[e])) && (r && (r += " "), r += n);
2012
+ for (e = 0; e < i; e++) t[e] && (n = Ur(t[e])) && (r && (r += " "), r += n);
2013
2013
  } else for (n in t) t[n] && (r && (r += " "), r += n);
2014
2014
  return r;
2015
2015
  }
2016
- function qs() {
2017
- for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = $r(t)) && (r && (r += " "), r += e);
2016
+ function Xs() {
2017
+ for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = Ur(t)) && (r && (r += " "), r += e);
2018
2018
  return r;
2019
2019
  }
2020
- function Vr(t) {
2021
- return typeof t == "object" ? qs(t) : t ?? "";
2020
+ function Wr(t) {
2021
+ return typeof t == "object" ? Xs(t) : t ?? "";
2022
2022
  }
2023
- function Zs(t, e, n) {
2023
+ function Ks(t, e, n) {
2024
2024
  var r = t == null ? "" : "" + t;
2025
2025
  return e && (r = r ? r + " " + e : e), r === "" ? null : r;
2026
2026
  }
2027
- function qn(t, e = !1) {
2027
+ function Jn(t, e = !1) {
2028
2028
  var n = e ? " !important;" : ";", r = "";
2029
2029
  for (var i of Object.keys(t)) {
2030
2030
  var s = t[i];
@@ -2032,53 +2032,53 @@ function qn(t, e = !1) {
2032
2032
  }
2033
2033
  return r;
2034
2034
  }
2035
- function Ys(t, e) {
2035
+ function Gs(t, e) {
2036
2036
  if (e) {
2037
2037
  var n = "", r, i;
2038
- return Array.isArray(e) ? (r = e[0], i = e[1]) : r = e, r && (n += qn(r)), i && (n += qn(i, !0)), n = n.trim(), n === "" ? null : n;
2038
+ return Array.isArray(e) ? (r = e[0], i = e[1]) : r = e, r && (n += Jn(r)), i && (n += Jn(i, !0)), n = n.trim(), n === "" ? null : n;
2039
2039
  }
2040
2040
  return String(t);
2041
2041
  }
2042
- function jr(t, e, n, r, i, s) {
2042
+ function Br(t, e, n, r, i, s) {
2043
2043
  var a = t.__className;
2044
2044
  if (a !== n || a === void 0) {
2045
- var u = Zs(n, r);
2045
+ var u = Ks(n, r);
2046
2046
  u == null ? t.removeAttribute("class") : t.className = u, t.__className = n;
2047
2047
  }
2048
2048
  return s;
2049
2049
  }
2050
- function qt(t, e = {}, n, r) {
2050
+ function Yt(t, e = {}, n, r) {
2051
2051
  for (var i in n) {
2052
2052
  var s = n[i];
2053
2053
  e[i] !== s && (n[i] == null ? t.style.removeProperty(i) : t.style.setProperty(i, s, r));
2054
2054
  }
2055
2055
  }
2056
- function Tt(t, e, n, r) {
2056
+ function it(t, e, n, r) {
2057
2057
  var i = t.__style;
2058
2058
  if (i !== e) {
2059
- var s = Ys(e, r);
2059
+ var s = Gs(e, r);
2060
2060
  s == null ? t.removeAttribute("style") : t.style.cssText = s, t.__style = e;
2061
- } else r && (Array.isArray(r) ? (qt(t, n?.[0], r[0]), qt(t, n?.[1], r[1], "important")) : qt(t, n, r));
2061
+ } else r && (Array.isArray(r) ? (Yt(t, n?.[0], r[0]), Yt(t, n?.[1], r[1], "important")) : Yt(t, n, r));
2062
2062
  return r;
2063
2063
  }
2064
- function Zn(t, e) {
2065
- return t === e || t?.[xt] === e;
2064
+ function Xn(t, e) {
2065
+ return t === e || t?.[Tt] === e;
2066
2066
  }
2067
- function rt(t = {}, e, n, r) {
2068
- return Ts(() => {
2067
+ function st(t = {}, e, n, r) {
2068
+ return Cs(() => {
2069
2069
  var i, s;
2070
- return Sr(() => {
2071
- i = s, s = [], ee(() => {
2072
- t !== n(...s) && (e(t, ...s), i && Zn(n(...i), t) && e(null, ...i));
2070
+ return Ir(() => {
2071
+ i = s, s = [], Q(() => {
2072
+ t !== n(...s) && (e(t, ...s), i && Xn(n(...i), t) && e(null, ...i));
2073
2073
  });
2074
2074
  }), () => {
2075
2075
  Re(() => {
2076
- s && Zn(n(...s), t) && e(null, ...s);
2076
+ s && Xn(n(...s), t) && e(null, ...s);
2077
2077
  });
2078
2078
  };
2079
2079
  }), t;
2080
2080
  }
2081
- class mn {
2081
+ class gn {
2082
2082
  div;
2083
2083
  marker;
2084
2084
  constructor(e, n, r, i) {
@@ -2094,7 +2094,7 @@ class mn {
2094
2094
  this.marker.update(e);
2095
2095
  }
2096
2096
  }
2097
- class pt {
2097
+ class mt {
2098
2098
  shown;
2099
2099
  id;
2100
2100
  lat;
@@ -2102,16 +2102,16 @@ class pt {
2102
2102
  rank;
2103
2103
  marker;
2104
2104
  constructor(e, n, r, i, s) {
2105
- if (new.target === pt) throw new Error("Unsupported code");
2105
+ if (new.target === mt) throw new Error("Unsupported code");
2106
2106
  this.shown = !0, this.id = e, this.lat = n, this.lng = r, this.rank = i, this.marker = s;
2107
2107
  }
2108
2108
  }
2109
- const Js = "5";
2110
- typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(Js);
2111
- function Ur(t) {
2109
+ const Qs = "5";
2110
+ typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(Qs);
2111
+ function Hr(t) {
2112
2112
  return -0.5 * (Math.cos(Math.PI * t) - 1);
2113
2113
  }
2114
- class Wr {
2114
+ class qr {
2115
2115
  animating;
2116
2116
  animationEasing;
2117
2117
  animationCallback;
@@ -2155,100 +2155,100 @@ class Wr {
2155
2155
  return performance.now() > this.time.end;
2156
2156
  }
2157
2157
  }
2158
- var Xs = /* @__PURE__ */ Lr("<div></div>");
2159
- function Ks(t, e) {
2160
- an(e, !0);
2161
- let n = ee(() => e.id), r = ee(() => e.element), i = ee(() => e.style), s = ee(() => e.dimensions), a = ee(() => e.initialize), u = {
2162
- setDisplayed: j,
2163
- getDisplayed: X,
2164
- setSuppressed: ke,
2165
- setCollapsed: Pe,
2166
- getCollapsed: ie,
2167
- setScale: Dt
2158
+ var ea = /* @__PURE__ */ Vr("<div></div>");
2159
+ function ta(t, e) {
2160
+ ln(e, !0);
2161
+ let n = Q(() => e.id), r = Q(() => e.element), i = Q(() => e.style), s = Q(() => e.dimensions), a = Q(() => e.initialize), u = {
2162
+ setDisplayed: J,
2163
+ getDisplayed: oe,
2164
+ setSuppressed: de,
2165
+ setCollapsed: ye,
2166
+ getCollapsed: Te,
2167
+ setScale: Ot
2168
2168
  };
2169
2169
  function o() {
2170
2170
  return u;
2171
2171
  }
2172
- let l, c = s.width, f = s.height, h = s.padding, m = i?.background ?? Li, d = i?.radius ?? Ri, v = i?.shadow ?? Di, _ = /* @__PURE__ */ U(!1), R = !1;
2173
- function j(y) {
2174
- y == !0 && (l && r && r.parentElement != l && l.appendChild(r), R == !1 && a && r && (R = !0, setTimeout(async () => await a(n, r), 0))), y != E(_) && (B(_, y, !0), y == !1 && I.end());
2172
+ let l, c = s.width, f = s.height, p = s.padding, m = i?.background ?? ji, h = i?.radius ?? Oi, v = i?.shadow ?? Li, b = /* @__PURE__ */ V(!1), C = !1;
2173
+ function J(_) {
2174
+ _ == !0 && (l && r && r.parentElement != l && l.appendChild(r), C == !1 && a && r && (C = !0, setTimeout(async () => await a(n, r), 0))), _ != E(b) && (U(b, _, !0), _ == !1 && q.end());
2175
2175
  }
2176
- function X() {
2177
- return E(_);
2176
+ function oe() {
2177
+ return E(b);
2178
2178
  }
2179
- let pe = /* @__PURE__ */ U(!0);
2180
- function ke(y) {
2181
- y != E(pe) && (B(pe, y, !0), y && (K = je, I.set(je)));
2179
+ let pe = /* @__PURE__ */ V(!0);
2180
+ function de(_) {
2181
+ _ != E(pe) && (U(pe, _, !0), _ && (X = je, q.set(je)));
2182
2182
  }
2183
- let de = /* @__PURE__ */ U(!0);
2184
- function Pe(y) {
2185
- y != E(de) && (B(de, y, !0), I.target(E(de) ? 0 : K));
2183
+ let le = /* @__PURE__ */ V(!0);
2184
+ function ye(_) {
2185
+ _ != E(le) && (U(le, _, !0), q.target(E(le) ? 0 : X));
2186
2186
  }
2187
- function ie() {
2188
- return E(_) ? I.expired() : !0;
2187
+ function Te() {
2188
+ return E(b) ? q.expired() : !0;
2189
2189
  }
2190
- let K = je, I = new Wr({
2190
+ let X = je, q = new qr({
2191
2191
  value: je,
2192
2192
  min: 0,
2193
2193
  max: 1,
2194
- timespan: Ii,
2195
- easing: Ur,
2196
- callback: zt
2194
+ timespan: Ci,
2195
+ easing: Hr,
2196
+ callback: Lt
2197
2197
  });
2198
- function Dt(y) {
2199
- K = y, I.target(y);
2198
+ function Ot(_) {
2199
+ X = _, q.target(_);
2200
2200
  }
2201
- function zt(y) {
2202
- l.style.scale = y.toString(), l.style.filter = `brightness(${$e(y)})`;
2201
+ function Lt(_) {
2202
+ l.style.scale = _.toString(), l.style.filter = `brightness(${vt(_)})`;
2203
2203
  }
2204
- function $e(y) {
2205
- return 0.25 + 0.75 * y;
2204
+ function vt(_) {
2205
+ return 0.25 + 0.75 * _;
2206
2206
  }
2207
- var Ot = { invoke: o }, Ve = Xs();
2208
- let dt;
2209
- return rt(Ve, (y) => l = y, () => l), Pr(
2210
- (y) => {
2211
- jr(
2212
- Ve,
2207
+ var me = { invoke: o }, $e = ea();
2208
+ let tt;
2209
+ return st($e, (_) => l = _, () => l), Ar(
2210
+ (_) => {
2211
+ Br(
2212
+ $e,
2213
2213
  1,
2214
- Vr([
2214
+ Wr([
2215
2215
  "pin",
2216
- E(_) && "displayed",
2216
+ E(b) && "displayed",
2217
2217
  E(pe) && "suppressed"
2218
2218
  ]),
2219
2219
  "svelte-10kxbrm"
2220
- ), dt = Tt(Ve, "", dt, y);
2220
+ ), tt = it($e, "", tt, _);
2221
2221
  },
2222
2222
  [
2223
2223
  () => ({
2224
2224
  width: `${c}px`,
2225
2225
  height: `${f}px`,
2226
- padding: `${h}px`,
2227
- "border-radius": `${d}px`,
2226
+ padding: `${p}px`,
2227
+ "border-radius": `${h}px`,
2228
2228
  "background-color": `rgb(from ${m} r g b / 1)`,
2229
2229
  "box-shadow": v,
2230
2230
  scale: je,
2231
- filter: `brightness(${$e(je)})`
2231
+ filter: `brightness(${vt(je)})`
2232
2232
  })
2233
2233
  ]
2234
- ), Fr(t, Ve), on(Ot);
2234
+ ), jr(t, $e), un(me);
2235
2235
  }
2236
- class Gs extends pt {
2236
+ class na extends mt {
2237
2237
  width;
2238
2238
  height;
2239
2239
  zoom;
2240
2240
  component;
2241
2241
  constructor(e, n, r, i, s, a) {
2242
- super(n, r, i, s, new mn(e, r, i, s)), this.width = a.dimensions.width, this.height = a.dimensions.height, this.zoom = NaN, this.component = dn(Ks, {
2242
+ super(n, r, i, s, new gn(e, r, i, s)), this.width = a.dimensions.width, this.height = a.dimensions.height, this.zoom = NaN, this.component = vn(ta, {
2243
2243
  target: this.marker.div,
2244
2244
  props: a
2245
2245
  });
2246
2246
  }
2247
2247
  get zIndex() {
2248
- return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * ir) + Ni;
2248
+ return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * or) + Di;
2249
2249
  }
2250
2250
  }
2251
- class Yn {
2251
+ class Kn {
2252
2252
  animating;
2253
2253
  animationTimestamp;
2254
2254
  animationEnd;
@@ -2302,122 +2302,126 @@ class Yn {
2302
2302
  return performance.now() > this.animationEnd;
2303
2303
  }
2304
2304
  }
2305
- function rn(t, e, n) {
2305
+ function an(t, e, n) {
2306
2306
  if (t <= 0 || e <= 0) return { x: 0, y: 0 };
2307
2307
  let r = t / 2, i = e / 2, s = Math.sqrt(r * r + i * i), a = Math.atan(i / r) * (180 / Math.PI), u = n * (Math.PI / 180);
2308
2308
  return n < 180 ? n < 90 ? n < a ? { x: 0, y: s * Math.sin(u) - i } : { x: s * Math.cos(u) - r, y: 0 } : n < 180 - a ? { x: s * Math.cos(u) - r, y: 0 } : { x: -t, y: s * Math.sin(u) - i } : n < 270 ? n < 180 + a ? { x: -t, y: s * Math.sin(u) - i } : { x: s * Math.cos(u) - r, y: -e } : n < 360 - a ? { x: s * Math.cos(u) - r, y: -e } : { x: 0, y: s * Math.sin(u) - i };
2309
2309
  }
2310
- var Qs = /* @__PURE__ */ Lr('<div><div class="element pointer svelte-1no6o2a"></div> <div class="element bubble svelte-1no6o2a"><div class="element body svelte-1no6o2a"></div></div></div>');
2311
- function Br(t, e) {
2312
- an(e, !0);
2313
- let n = ee(() => e.id), r = ee(() => e.element), i = ee(() => e.style), s = ee(() => e.dimensions), a = ee(() => e.initialize), u = {
2314
- setDisplayed: Dt,
2315
- getDisplayed: zt,
2316
- setCollapsed: Ot,
2317
- getCollapsed: Ve,
2318
- getExpanded: dt,
2319
- setAngle: ai
2310
+ var ra = /* @__PURE__ */ Vr('<div><div class="element pointer svelte-1no6o2a"></div> <div class="element bubble svelte-1no6o2a"><div class="element body svelte-1no6o2a"></div></div></div>');
2311
+ function Zr(t, e) {
2312
+ ln(e, !0);
2313
+ let n = Q(() => e.id), r = Q(() => e.element), i = Q(() => e.style), s = Q(() => e.dimensions), a = Q(() => e.initialize), u = {
2314
+ setDisplayed: li,
2315
+ getDisplayed: ui,
2316
+ setCollapsed: ci,
2317
+ getCollapsed: fi,
2318
+ getExpanded: hi,
2319
+ setAngle: di
2320
2320
  };
2321
2321
  function o() {
2322
2322
  return u;
2323
2323
  }
2324
- let l = s.width + 2 * s.padding, c = s.height + 2 * s.padding, f = s.padding, h, m = i?.filter ?? Oi, d, v = s.padding * 2, _ = Math.max(2, (i?.radius ?? Rn) / v), R = i?.background ?? Dn, j, X = s.width, pe = s.height, ke = Math.min(i?.radius ?? Rn, Math.min(X, pe) / 2), de = Math.min(1, 2 * ke / Math.min(pe, X)), Pe = i?.background ?? Dn, ie;
2325
- s.width, s.height, i?.radius;
2326
- let K = !1, I = /* @__PURE__ */ U(!1);
2327
- function Dt(g) {
2328
- g != E(I) && (B(I, g, !0), g == !0 && (r && r.parentElement != ie && ie.appendChild(r), K == !1 && a && r && (K = !0, setTimeout(async () => await a(n, r), 0))), g == !1 && (y.end(), $t.end(), jt.end()));
2324
+ let l, c, f, p, m = i?.filter ?? Vi;
2325
+ const h = s.width + 2 * s.padding, v = s.height + 2 * s.padding, b = s.padding, C = s.width, J = s.height, oe = i?.radius, pe = s.width, de = s.height, le = Math.min(i?.radius ?? Fi, Math.min(pe, de) / 2), ye = Math.min(1, 2 * le / Math.min(de, pe)), Te = i?.background ?? Ln, X = s.padding * 2, q = s.padding * 0.5 * ye, Ot = i?.background ?? Ln, Lt = v < h ? v / h : 1, vt = h < v ? h / v : 1, me = Math.min(h, v) / 2, $e = me * Math.SQRT2, tt = 15, _ = 15 * Math.SQRT2;
2326
+ let bn = !1, Ve = /* @__PURE__ */ V(!1);
2327
+ function li(g) {
2328
+ g != E(Ve) && (U(Ve, g, !0), g == !0 && (r && r.parentElement != c && c.appendChild(r), bn == !1 && a && r && (bn = !0, setTimeout(async () => await a(n, r), 0))), g == !1 && (gt.end(), jt.end(), Wt.end()));
2329
2329
  }
2330
- function zt() {
2331
- return E(I);
2330
+ function ui() {
2331
+ return E(Ve);
2332
2332
  }
2333
- let $e = /* @__PURE__ */ U(!0);
2334
- function Ot(g) {
2335
- g != E($e) && (B($e, g, !0), y.target(E($e) ? 0 : 1));
2333
+ let Ft = /* @__PURE__ */ V(!0);
2334
+ function ci(g) {
2335
+ g != E(Ft) && (U(Ft, g, !0), gt.target(E(Ft) ? 0 : 1));
2336
2336
  }
2337
- function Ve() {
2338
- return E(I) ? y.expired() : !0;
2337
+ function fi() {
2338
+ return E(Ve) ? gt.expired() : !0;
2339
2339
  }
2340
- function dt() {
2341
- return E(I) ? y.expired() : !1;
2340
+ function hi() {
2341
+ return E(Ve) ? gt.expired() : !1;
2342
2342
  }
2343
- let y = new Wr({
2343
+ let gt = new qr({
2344
2344
  value: 0,
2345
2345
  min: 0,
2346
2346
  max: 1,
2347
- timespan: Ai,
2348
- easing: Ur,
2349
- callback: si
2347
+ timespan: Ri,
2348
+ easing: Hr,
2349
+ callback: pi
2350
2350
  });
2351
- function si(g) {
2352
- h.style.opacity = `${g}`, h.style.scale = `${g}`, ie.style.opacity = `${g}`;
2351
+ function pi(g) {
2352
+ l.style.opacity = `${g}`, l.style.scale = `${g}`, c.style.opacity = `${g}`;
2353
2353
  }
2354
- let mt = NaN, Lt = /* @__PURE__ */ U(!1), Ft = -l / 2, $t = new Yn({
2355
- value: -l / 2,
2356
- min: -l,
2354
+ let wt = NaN, $t = /* @__PURE__ */ V(!1), Vt = -h / 2, jt = new Kn({
2355
+ value: -h / 2,
2356
+ min: -h,
2357
2357
  max: 0,
2358
2358
  precision: 1,
2359
- stiffness: In,
2360
- callback: oi
2361
- }), Vt = -c / 2, jt = new Yn({
2362
- value: -c / 2,
2363
- min: -c,
2359
+ stiffness: Rn,
2360
+ callback: mi
2361
+ }), Ut = -v / 2, Wt = new Kn({
2362
+ value: -v / 2,
2363
+ min: -v,
2364
2364
  max: 0,
2365
2365
  precision: 1,
2366
- stiffness: In,
2367
- callback: li
2366
+ stiffness: Rn,
2367
+ callback: vi
2368
2368
  });
2369
- function ai(g, vt) {
2369
+ function di(g, kt) {
2370
2370
  if (Number.isNaN(g)) {
2371
- mt = NaN, B(Lt, !1);
2371
+ wt = NaN, U($t, !1);
2372
2372
  return;
2373
2373
  }
2374
- if (E(Lt) == !1 || vt == !0) {
2375
- B(Lt, !0), mt = g;
2376
- const Ie = rn(l, c, g);
2377
- $t.set(Math.round(Ie.x)), jt.set(Math.round(Ie.y));
2374
+ if (E($t) == !1 || kt == !0) {
2375
+ U($t, !0), wt = g;
2376
+ const Ie = an(h, v, g);
2377
+ jt.set(Math.round(Ie.x)), Wt.set(Math.round(Ie.y));
2378
2378
  return;
2379
2379
  }
2380
- if (mt != g) {
2381
- mt = g;
2382
- const Ie = rn(l, c, g);
2383
- $t.target(Math.round(Ie.x)), jt.target(Math.round(Ie.y));
2380
+ if (wt != g) {
2381
+ wt = g;
2382
+ const Ie = an(h, v, g);
2383
+ jt.target(Math.round(Ie.x)), Wt.target(Math.round(Ie.y));
2384
2384
  return;
2385
2385
  }
2386
2386
  }
2387
- function oi(g) {
2388
- Ft = g, yn(Ft, Vt);
2387
+ function mi(g) {
2388
+ Vt = g, _n(Vt, Ut);
2389
2389
  }
2390
- function li(g) {
2391
- Vt = g, yn(Ft, Vt);
2392
- }
2393
- const ui = c < l ? c / l : 1, ci = l < c ? l / c : 1, Te = Math.min(l, c) / 2, fi = Te * Math.SQRT2, kn = 15, hi = 15 * Math.SQRT2;
2394
- function yn(g, vt) {
2395
- const Ie = g + l / 2, mi = vt + c / 2, gt = Ie * ui, wt = mi * ci, Bt = Math.sqrt(gt * gt + wt * wt), En = (Bt - Te) / (fi - Te), vi = Math.atan2(wt, gt) / Math.PI * 180 - 45, xn = kn + En * (hi - kn), gi = Bt < Te ? Bt / Te : 1, Sn = 0.5 * ((1 + 0.5 * de) * En), wi = g + f * (1 - Sn * (gt / Te)), ki = vt + f * (1 - Sn * (wt / Te));
2396
- d.style.transform = `scale(${gi}) rotate(${vi}deg) skew(${xn}deg, ${xn}deg)`, j.style.transform = `translate(${Math.round(wi)}px, ${Math.round(ki)}px)`;
2397
- }
2398
- var pi = { invoke: o }, tt = Qs();
2399
- let bn;
2400
- var Ut = Vn(tt);
2401
- let _n;
2402
- rt(Ut, (g) => d = g, () => d);
2403
- var Wt = _s(Ut, 2);
2390
+ function vi(g) {
2391
+ Ut = g, _n(Vt, Ut);
2392
+ }
2393
+ function _n(g, kt) {
2394
+ const Ie = g + h / 2, wi = kt + v / 2, yt = Ie * Lt, bt = wi * vt, qt = Math.sqrt(yt * yt + bt * bt), Tn = (qt - me) / ($e - me), ki = Math.atan2(bt, yt) / Math.PI * 180 - 45, In = tt + Tn * (_ - tt), yi = qt < me ? qt / me : 1, An = 0.5 * ((1 + 0.5 * ye) * Tn), bi = g + b * (1 - An * (yt / me)), _i = kt + b * (1 - An * (bt / me));
2395
+ p.style.transform = `scale(${yi}) rotate(${ki}deg) skew(${In}deg, ${In}deg)`, f.style.transform = `translate(${Math.round(bi)}px, ${Math.round(_i)}px)`;
2396
+ }
2397
+ var gi = { invoke: o }, nt = ra();
2404
2398
  let Mn;
2405
- var di = Vn(Wt);
2406
- return rt(di, (g) => ie = g, () => ie), rt(Wt, (g) => j = g, () => j), rt(tt, (g) => h = g, () => h), Pr(() => {
2407
- jr(tt, 1, Vr(["element anchor", E(I) && "displayed"]), "svelte-1no6o2a"), bn = Tt(tt, "", bn, { filter: m }), _n = Tt(Ut, "", _n, {
2408
- width: `${v}px`,
2409
- height: `${v}px`,
2410
- "border-radius": `${_}px`,
2411
- "background-color": `rgb(from ${R} r g b / 1)`
2412
- }), Mn = Tt(Wt, "", Mn, {
2399
+ var Bt = Wn(nt);
2400
+ let En;
2401
+ st(Bt, (g) => p = g, () => p);
2402
+ var Ht = Ss(Bt, 2);
2403
+ let xn;
2404
+ var Sn = Wn(Ht);
2405
+ let Pn;
2406
+ return st(Sn, (g) => c = g, () => c), st(Ht, (g) => f = g, () => f), st(nt, (g) => l = g, () => l), Ar(() => {
2407
+ Br(nt, 1, Wr(["element anchor", E(Ve) && "displayed"]), "svelte-1no6o2a"), Mn = it(nt, "", Mn, { filter: m }), En = it(Bt, "", En, {
2413
2408
  width: `${X}px`,
2414
- height: `${pe}px`,
2415
- "border-radius": `${ke}px`,
2416
- "background-color": `rgb(from ${Pe} r g b / 1)`
2409
+ height: `${X}px`,
2410
+ "border-radius": `${q}px`,
2411
+ "background-color": `rgb(from ${Ot} r g b / 1)`
2412
+ }), xn = it(Ht, "", xn, {
2413
+ width: `${pe}px`,
2414
+ height: `${de}px`,
2415
+ "border-radius": `${le}px`,
2416
+ "background-color": `rgb(from ${Te} r g b / 1)`
2417
+ }), Pn = it(Sn, "", Pn, {
2418
+ width: `${C}px`,
2419
+ height: `${J}px`,
2420
+ "border-radius": `${oe}px`
2417
2421
  });
2418
- }), Fr(t, tt), on(pi);
2422
+ }), jr(t, nt), un(gi);
2419
2423
  }
2420
- class ea extends pt {
2424
+ class ia extends mt {
2421
2425
  width;
2422
2426
  height;
2423
2427
  zoom;
@@ -2425,32 +2429,32 @@ class ea extends pt {
2425
2429
  directions;
2426
2430
  component;
2427
2431
  constructor(e, n, r, i, s, a) {
2428
- super(n, r, i, s, new mn(e, r, i, s)), this.width = a.dimensions.width + a.dimensions.padding * 2, this.height = a.dimensions.height + a.dimensions.padding * 2, this.zoom = NaN, this.angle = NaN, this.directions = [], this.component = dn(Br, {
2432
+ super(n, r, i, s, new gn(e, r, i, s)), this.width = a.dimensions.width + a.dimensions.padding * 2, this.height = a.dimensions.height + a.dimensions.padding * 2, this.zoom = NaN, this.angle = NaN, this.directions = [], this.component = vn(Zr, {
2429
2433
  target: this.marker.div,
2430
2434
  props: a
2431
2435
  });
2432
2436
  }
2433
2437
  get zIndex() {
2434
- return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * ir) + Ci;
2438
+ return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * or) + zi;
2435
2439
  }
2436
2440
  }
2437
- class ta extends pt {
2441
+ class sa extends mt {
2438
2442
  width;
2439
2443
  height;
2440
2444
  padding;
2441
2445
  angle;
2442
2446
  component;
2443
2447
  constructor(e, n, r, i, s, a) {
2444
- super(n, r, i, s, new mn(e, r, i, An)), this.width = a.dimensions.width, this.height = a.dimensions.height, this.padding = a.dimensions.padding, this.angle = NaN, this.shown = !1, this.component = dn(Br, {
2448
+ super(n, r, i, s, new gn(e, r, i, Dn)), this.width = a.dimensions.width, this.height = a.dimensions.height, this.padding = a.dimensions.padding, this.angle = NaN, this.shown = !1, this.component = vn(Zr, {
2445
2449
  target: this.marker.div,
2446
2450
  props: a
2447
2451
  });
2448
2452
  }
2449
2453
  get zIndex() {
2450
- return An;
2454
+ return Dn;
2451
2455
  }
2452
2456
  }
2453
- class na {
2457
+ class aa {
2454
2458
  id;
2455
2459
  state = void 0;
2456
2460
  pin;
@@ -2458,21 +2462,21 @@ class na {
2458
2462
  popup;
2459
2463
  constructor(e, n) {
2460
2464
  const r = n.properites.id, i = n.properites.lat, s = n.properites.lng, a = n.properites.rank, u = n.properites.pin, o = n.properites.tooltip, l = n.properites.popup;
2461
- this.id = r, this.pin = new Gs(e, r, i, s, a, u), this.tooltip = new ea(e, r, i, s, a, o), this.popup = l ? new ta(e, r, i, s, a, l) : void 0;
2465
+ this.id = r, this.pin = new na(e, r, i, s, a, u), this.tooltip = new ia(e, r, i, s, a, o), this.popup = l ? new sa(e, r, i, s, a, l) : void 0;
2462
2466
  }
2463
2467
  }
2464
- const Zt = 4;
2465
- class ra {
2468
+ const Jt = 4;
2469
+ class oa {
2466
2470
  // Elements
2467
2471
  pins = /* @__PURE__ */ new Set();
2468
2472
  // Configuration
2469
2473
  pinMaxWidth = 0;
2470
2474
  pinMaxHeight = 0;
2471
2475
  pinFade = !1;
2472
- pinZoomMax = Zt;
2473
- pinZoomDelta = Zt;
2476
+ pinZoomMax = Jt;
2477
+ pinZoomDelta = Jt;
2474
2478
  set configuration(e) {
2475
- this.pinFade = e?.pin?.fade ?? !0, this.pinZoomMax = e?.pin?.maxZoom ?? Zt, this.pinZoomDelta = this.pinZoomMax;
2479
+ this.pinFade = e?.pin?.fade ?? !0, this.pinZoomMax = e?.pin?.maxZoom ?? Jt, this.pinZoomDelta = this.pinZoomMax;
2476
2480
  }
2477
2481
  insert(e, n) {
2478
2482
  this.update(e, n), this.pins.add(e);
@@ -2491,7 +2495,7 @@ class ra {
2491
2495
  this.pinMaxWidth = e.reduce((n, r) => Math.max(n, r.width), 0), this.pinMaxHeight = e.reduce((n, r) => Math.max(n, r.height), 0), this.pinZoomDelta = Math.max(1, this.pinZoomMax - Math.log10(e.length));
2492
2496
  }
2493
2497
  render(e, n) {
2494
- const r = e.zoom, i = n.mapSize, s = ot.offset(e, i, {
2498
+ const r = e.zoom, i = n.mapSize, s = ut.offset(e, i, {
2495
2499
  top: this.pinMaxHeight,
2496
2500
  bottom: this.pinMaxHeight,
2497
2501
  right: this.pinMaxWidth,
@@ -2501,8 +2505,8 @@ class ra {
2501
2505
  s.contains(a.lat, a.lng) ? Number.isNaN(a.zoom) ? (a.component.invoke().setDisplayed(!0), a.component.invoke().setSuppressed(!0), a.component.invoke().setCollapsed(!1), a.marker.insert()) : (a.component.invoke().setSuppressed(!1), a.shown && r < a.zoom && a.zoom < r + this.pinZoomDelta ? (a.component.invoke().setDisplayed(!0), a.component.invoke().setCollapsed(!1), a.component.invoke().setScale(this.pinFade ? Math.max(0, 1 - (a.zoom - r) * 0.2) : 1), a.marker.insert()) : (a.component.invoke().setCollapsed(!0), a.component.invoke().getCollapsed() && (a.component.invoke().setDisplayed(!1), a.marker.remove()))) : (a.component.invoke().setDisplayed(!1), a.marker.remove());
2502
2506
  }
2503
2507
  }
2504
- var ia = (t) => 9;
2505
- class sa {
2508
+ var la = (t) => 9;
2509
+ class ua {
2506
2510
  // Elements
2507
2511
  tooltips = /* @__PURE__ */ new Set();
2508
2512
  // Configuration
@@ -2525,7 +2529,7 @@ class sa {
2525
2529
  this.tooltipMaxWidth = e.reduce((n, r) => Math.max(n, r.width), 0), this.tooltipMaxHeight = e.reduce((n, r) => Math.max(n, r.height), 0);
2526
2530
  }
2527
2531
  render(e, n) {
2528
- const r = e.zoom, i = n.mapSize, s = ot.offset(e, i, {
2532
+ const r = e.zoom, i = n.mapSize, s = ut.offset(e, i, {
2529
2533
  top: this.tooltipMaxHeight,
2530
2534
  bottom: this.tooltipMaxHeight,
2531
2535
  right: this.tooltipMaxWidth,
@@ -2543,7 +2547,7 @@ class sa {
2543
2547
  a.component.invoke().setDisplayed(!1), a.marker.remove();
2544
2548
  }
2545
2549
  }
2546
- class aa {
2550
+ class ca {
2547
2551
  // Elements
2548
2552
  popups = /* @__PURE__ */ new Set();
2549
2553
  // Configuration
@@ -2562,11 +2566,11 @@ class aa {
2562
2566
  }
2563
2567
  show(e, n) {
2564
2568
  if (!e.popup || !e.tooltip || !e.pin || (e.pin.shown = !1, e.tooltip.shown = !1, e.popup.angle = e.tooltip.angle, e.popup.shown = !0, this.pan == !1)) return;
2565
- const r = e.popup, i = n.getViewport(), s = i.bounds, a = i.zoom, o = n.getParameters().mapSize * Math.pow(2, a), l = it(s.ne.lat, s.sw.lng, o), c = it(s.sw.lat, s.ne.lng, o), f = c.x - l.x, h = c.y - l.y, m = r.width + r.padding * 8, d = r.height + r.padding * 8, v = it(r.lat, r.lng, o), _ = rn(m, d, e.tooltip.angle), R = v.x + _.x, j = R + m, X = v.y + _.y, pe = X + d, ke = R - l.x, de = c.x - j, Pe = X - l.y, ie = c.y - pe;
2566
- let K = 0;
2567
- f < m ? K = (ke - de) / 2 : (ke < 0 && (K = ke), de < 0 && (K = -de));
2568
- let I = 0;
2569
- h < d ? I = (Pe - ie) / 2 : (Pe < 0 && (I = Pe), ie < 0 && (I = -ie)), (K != 0 || I != 0) && n.panBy(K, I);
2569
+ const r = e.popup, i = n.getViewport(), s = i.bounds, a = i.zoom, o = n.getParameters().mapSize * Math.pow(2, a), l = at(s.ne.lat, s.sw.lng, o), c = at(s.sw.lat, s.ne.lng, o), f = c.x - l.x, p = c.y - l.y, m = r.width + r.padding * 8, h = r.height + r.padding * 8, v = at(r.lat, r.lng, o), b = an(m, h, e.tooltip.angle), C = v.x + b.x, J = C + m, oe = v.y + b.y, pe = oe + h, de = C - l.x, le = c.x - J, ye = oe - l.y, Te = c.y - pe;
2570
+ let X = 0;
2571
+ f < m ? X = (de - le) / 2 : (de < 0 && (X = de), le < 0 && (X = -le));
2572
+ let q = 0;
2573
+ p < h ? q = (ye - Te) / 2 : (ye < 0 && (q = ye), Te < 0 && (q = -Te)), (X != 0 || q != 0) && n.panBy(X, q);
2570
2574
  }
2571
2575
  hide(e) {
2572
2576
  !e.popup || !e.tooltip || !e.pin || (e.pin.shown = !0, e.tooltip.shown = !0, e.popup.shown = !1);
@@ -2576,14 +2580,14 @@ class aa {
2576
2580
  e.shown ? (e.component.invoke().setDisplayed(!0), e.component.invoke().setCollapsed(!1), e.component.invoke().setAngle(e.angle, !0), e.marker.insert()) : (e.component.invoke().setCollapsed(!0), e.component.invoke().getCollapsed() && (e.component.invoke().setDisplayed(!1), e.marker.remove()));
2577
2581
  }
2578
2582
  }
2579
- class oa {
2583
+ class fa {
2580
2584
  provider;
2581
2585
  pinManager;
2582
2586
  tooltipManager;
2583
2587
  popupManager;
2584
2588
  elementsStore;
2585
2589
  constructor(e) {
2586
- this.provider = e, this.pinManager = new ra(), this.tooltipManager = new sa(), this.popupManager = new aa(), this.elementsStore = /* @__PURE__ */ new Map();
2590
+ this.provider = e, this.pinManager = new oa(), this.tooltipManager = new ua(), this.popupManager = new ca(), this.elementsStore = /* @__PURE__ */ new Map();
2587
2591
  }
2588
2592
  set configuration(e) {
2589
2593
  this.pinManager.configuration = e, this.popupManager.configuration = e;
@@ -2608,7 +2612,7 @@ class oa {
2608
2612
  insertElements(e, n) {
2609
2613
  for (const r of e) {
2610
2614
  let i = this.elementsStore.get(r.properites.id);
2611
- i == null && (i = new na(this.provider, r), i.tooltip.marker.div.addEventListener("click", (s) => n(s, r.properites.id)), this.elementsStore.set(r.properites.id, i)), this.pinManager.insert(i.pin, r.state), this.tooltipManager.insert(i.tooltip, r.state), i.popup != null && this.popupManager.insert(i.popup);
2615
+ i == null && (i = new aa(this.provider, r), i.tooltip.marker.div.addEventListener("click", (s) => n(s, r.properites.id)), this.elementsStore.set(r.properites.id, i)), this.pinManager.insert(i.pin, r.state), this.tooltipManager.insert(i.tooltip, r.state), i.popup != null && this.popupManager.insert(i.popup);
2612
2616
  }
2613
2617
  this.pinManager.refresh(), this.tooltipManager.refresh();
2614
2618
  }
@@ -2633,11 +2637,11 @@ class oa {
2633
2637
  }
2634
2638
  //#endregion
2635
2639
  }
2636
- const Hr = '(function(){"use strict";var h=[0,30,60,90,120,150,180,210,240,270,300,330],l=",";function i(e,t){return parseFloat(e[t]+e[t+1]+"."+e[t+2])}function f(e,t){return h[parseInt(e[t],16)]}function m(e){if(!e||e.length===0)return[];let t=[],n=e.split(l);for(let o=0;o<n.length;o++){let s=n[o],r=i(s,0),a=[];for(let c=3;c<s.length;c+=4){let v=i(s,c),T=f(s,c+3);a.push({zoom:v,angle:T})}t.push({zoom:r,directions:a})}return t}var d=e=>new Promise(t=>setTimeout(t,e));async function u(e,t){let n=0,o=Math.max(1,t?.retry?.times??1);for(;n<o;)try{return{data:await e(),error:null}}catch(s){if(n++,n==o){if(s instanceof Error)return(!t?.exceptions||t.exceptions.some(r=>s instanceof r)==!1)&&t?.catch?.(s),{data:null,error:s};throw t?.catch?.(s),s}else t?.retry?.delay&&await d(t.retry.delay)}throw Error("Unreachable code")}async function w(e,t,n,o,s){let r=await u(async()=>await fetch(e,{...n,method:"POST",body:t?JSON.stringify(t):void 0}),{retry:{times:o,delay:s}});if(r.error)throw r.error;let a=r.data;if(!a.ok)throw Error(await a.text());return await a.json()}const y="https://maps.api.arenarium.dev/states",p=3,E=500,S={async fetch(e){const n={headers:{"Cache-Control":self?.location.host.startsWith("localhost")||self?.location.host.startsWith("127.0.0.1")?"no-cache":""}},o=await w(y,e,n,p,E),s=m(o.states),r=o.jwt;return{states:s,jwt:r}}};class k{methods;constructor(t){this.methods=t}listen(){self.onmessage=this.onmessage.bind(this)}async onmessage(t){const{id:n,method:o,args:s}=t.data;try{const r=this.methods[o];if(typeof r!="function")throw new Error(`Unknown method: ${o}`);const a=await r(...s),c={id:n,result:a};self.postMessage(c)}catch(r){const a=r instanceof Error?r.message:String(r),c={id:n,error:a};self.postMessage(c)}}}new k(S).listen()})();\n', Jn = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", Hr], { type: "text/javascript;charset=utf-8" });
2637
- function la(t) {
2640
+ const Yr = '(function(){"use strict";var h=[0,30,60,90,120,150,180,210,240,270,300,330],l=",";function i(e,t){return parseFloat(e[t]+e[t+1]+"."+e[t+2])}function f(e,t){return h[parseInt(e[t],16)]}function m(e){if(!e||e.length===0)return[];let t=[],n=e.split(l);for(let o=0;o<n.length;o++){let s=n[o],r=i(s,0),a=[];for(let c=3;c<s.length;c+=4){let v=i(s,c),T=f(s,c+3);a.push({zoom:v,angle:T})}t.push({zoom:r,directions:a})}return t}var d=e=>new Promise(t=>setTimeout(t,e));async function u(e,t){let n=0,o=Math.max(1,t?.retry?.times??1);for(;n<o;)try{return{data:await e(),error:null}}catch(s){if(n++,n==o){if(s instanceof Error)return(!t?.exceptions||t.exceptions.some(r=>s instanceof r)==!1)&&t?.catch?.(s),{data:null,error:s};throw t?.catch?.(s),s}else t?.retry?.delay&&await d(t.retry.delay)}throw Error("Unreachable code")}async function w(e,t,n,o,s){let r=await u(async()=>await fetch(e,{...n,method:"POST",body:t?JSON.stringify(t):void 0}),{retry:{times:o,delay:s}});if(r.error)throw r.error;let a=r.data;if(!a.ok)throw Error(await a.text());return await a.json()}const y="https://maps.api.arenarium.dev/states",p=3,E=500,S={async fetch(e){const n={headers:{"Cache-Control":self?.location.host.startsWith("localhost")||self?.location.host.startsWith("127.0.0.1")?"no-cache":""}},o=await w(y,e,n,p,E),s=m(o.states),r=o.jwt;return{states:s,jwt:r}}};class k{methods;constructor(t){this.methods=t}listen(){self.onmessage=this.onmessage.bind(this)}async onmessage(t){const{id:n,method:o,args:s}=t.data;try{const r=this.methods[o];if(typeof r!="function")throw new Error(`Unknown method: ${o}`);const a=await r(...s),c={id:n,result:a};self.postMessage(c)}catch(r){const a=r instanceof Error?r.message:String(r),c={id:n,error:a};self.postMessage(c)}}}new k(S).listen()})();\n', Gn = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", Yr], { type: "text/javascript;charset=utf-8" });
2641
+ function ha(t) {
2638
2642
  let e;
2639
2643
  try {
2640
- if (e = Jn && (self.URL || self.webkitURL).createObjectURL(Jn), !e) throw "";
2644
+ if (e = Gn && (self.URL || self.webkitURL).createObjectURL(Gn), !e) throw "";
2641
2645
  const n = new Worker(e, {
2642
2646
  name: t?.name
2643
2647
  });
@@ -2646,15 +2650,15 @@ function la(t) {
2646
2650
  }), n;
2647
2651
  } catch {
2648
2652
  return new Worker(
2649
- "data:text/javascript;charset=utf-8," + encodeURIComponent(Hr),
2653
+ "data:text/javascript;charset=utf-8," + encodeURIComponent(Yr),
2650
2654
  {
2651
2655
  name: t?.name
2652
2656
  }
2653
2657
  );
2654
2658
  }
2655
2659
  }
2656
- var ua = (t) => new Promise((e) => setTimeout(e, t));
2657
- async function qr(t, e) {
2660
+ var pa = (t) => new Promise((e) => setTimeout(e, t));
2661
+ async function Jr(t, e) {
2658
2662
  let n = 0, r = Math.max(1, e?.retry?.times ?? 1);
2659
2663
  for (; n < r; ) try {
2660
2664
  return { data: await t(), error: null };
@@ -2663,146 +2667,146 @@ async function qr(t, e) {
2663
2667
  if (i instanceof Error)
2664
2668
  return (!e?.exceptions || e.exceptions.some((s) => i instanceof s) == !1) && e?.catch?.(i), { data: null, error: i };
2665
2669
  throw e?.catch?.(i), i;
2666
- } else e?.retry?.delay && await ua(e.retry.delay);
2670
+ } else e?.retry?.delay && await pa(e.retry.delay);
2667
2671
  }
2668
2672
  throw Error("Unreachable code");
2669
2673
  }
2670
- async function ca(t, e, n, r, i) {
2671
- let s = await qr(async () => await fetch(t, { ...n, method: "POST", body: e ? JSON.stringify(e) : void 0 }), { retry: { times: r, delay: i } });
2674
+ async function da(t, e, n, r, i) {
2675
+ let s = await Jr(async () => await fetch(t, { ...n, method: "POST", body: e ? JSON.stringify(e) : void 0 }), { retry: { times: r, delay: i } });
2672
2676
  if (s.error) throw s.error;
2673
2677
  let a = s.data;
2674
2678
  if (!a.ok) throw Error(await a.text());
2675
2679
  return await a.json();
2676
2680
  }
2677
- async function fa(t, e, n, r, i) {
2678
- let s = await qr(async () => await fetch(t, { ...n, method: "PUT", body: e ? JSON.stringify(e) : void 0 }), { retry: { times: r, delay: i } });
2681
+ async function ma(t, e, n, r, i) {
2682
+ let s = await Jr(async () => await fetch(t, { ...n, method: "PUT", body: e ? JSON.stringify(e) : void 0 }), { retry: { times: r, delay: i } });
2679
2683
  if (s.error) throw s.error;
2680
2684
  let a = s.data;
2681
2685
  if (!a.ok) throw Error(await a.text());
2682
2686
  }
2683
- const Be = 0xc3a5c85c97cb3127n, ue = 0xb492b66fbe98f273n, He = 0x9ae16a3b2f90404fn, Zr = 0xc949d7c7509e6557n, H = 0xffffffffffffffffn;
2684
- function p(t) {
2685
- return t & H;
2687
+ const Be = 0xc3a5c85c97cb3127n, ue = 0xb492b66fbe98f273n, He = 0x9ae16a3b2f90404fn, Xr = 0xc949d7c7509e6557n, W = 0xffffffffffffffffn;
2688
+ function d(t) {
2689
+ return t & W;
2686
2690
  }
2687
- function N(t, e) {
2688
- return e === 0 ? t & H : (t = t & H, (t >> BigInt(e) | t << BigInt(64 - e)) & H);
2691
+ function A(t, e) {
2692
+ return e === 0 ? t & W : (t = t & W, (t >> BigInt(e) | t << BigInt(64 - e)) & W);
2689
2693
  }
2690
- function ha(t, e) {
2691
- return t = t & H, (t >> BigInt(e) | t << BigInt(64 - e)) & H;
2694
+ function va(t, e) {
2695
+ return t = t & W, (t >> BigInt(e) | t << BigInt(64 - e)) & W;
2692
2696
  }
2693
- function ut(t) {
2694
- return p(t ^ t >> 47n);
2697
+ function ft(t) {
2698
+ return d(t ^ t >> 47n);
2695
2699
  }
2696
2700
  function M(t, e = 0) {
2697
2701
  let n = 0n;
2698
2702
  for (let r = 0; r < 8; r++)
2699
2703
  e + r < t.length && (n |= BigInt(t[e + r]) << BigInt(r * 8));
2700
- return n & H;
2704
+ return n & W;
2701
2705
  }
2702
- function Xn(t, e = 0) {
2706
+ function Qn(t, e = 0) {
2703
2707
  let n = 0n;
2704
2708
  for (let r = 0; r < 4; r++)
2705
2709
  e + r < t.length && (n |= BigInt(t[e + r]) << BigInt(r * 8));
2706
2710
  return n & 0xffffffffn;
2707
2711
  }
2708
- function pa(t) {
2712
+ function ga(t) {
2709
2713
  const e = 0x9ddfea08eb382d69n;
2710
- let n = (t.first ^ t.second) * e & H;
2711
- n ^= n >> 47n, n = n & H;
2712
- let r = (t.second ^ n) * e & H;
2713
- return r ^= r >> 47n, r = r * e & H, r;
2714
+ let n = (t.first ^ t.second) * e & W;
2715
+ n ^= n >> 47n, n = n & W;
2716
+ let r = (t.second ^ n) * e & W;
2717
+ return r ^= r >> 47n, r = r * e & W, r;
2714
2718
  }
2715
2719
  function qe(t, e) {
2716
- return pa({ first: t, second: e });
2720
+ return ga({ first: t, second: e });
2717
2721
  }
2718
- function da(t) {
2722
+ function wa(t) {
2719
2723
  const e = t.length;
2720
2724
  if (e > 8) {
2721
2725
  const n = M(t), r = M(t, e - 8);
2722
- return (qe(n, ha(r + BigInt(e) & H, e)) ^ r) & H;
2726
+ return (qe(n, va(r + BigInt(e) & W, e)) ^ r) & W;
2723
2727
  }
2724
2728
  if (e >= 4) {
2725
- const n = Xn(t);
2726
- return qe(BigInt(e) + (n << 3n) & H, Xn(t, e - 4));
2729
+ const n = Qn(t);
2730
+ return qe(BigInt(e) + (n << 3n) & W, Qn(t, e - 4));
2727
2731
  }
2728
2732
  if (e > 0) {
2729
- const n = BigInt(t[0]), r = BigInt(t[e >> 1]), i = BigInt(t[e - 1]), s = p(n + (r << 8n)), a = p(BigInt(e) + (i << 2n));
2730
- return p(ut(p(s * He) ^ p(a * Zr)) * He);
2733
+ const n = BigInt(t[0]), r = BigInt(t[e >> 1]), i = BigInt(t[e - 1]), s = d(n + (r << 8n)), a = d(BigInt(e) + (i << 2n));
2734
+ return d(ft(d(s * He) ^ d(a * Xr)) * He);
2731
2735
  }
2732
2736
  return He;
2733
2737
  }
2734
- function ma(t) {
2735
- const e = t.length, n = p(M(t) * ue), r = M(t, 8), i = p(M(t, e - 8) * He), s = p(M(t, e - 16) * Be);
2736
- return qe(p(N(p(n - r), 43) + N(i, 30) + s), p(n + N(r ^ Zr, 20) - i + BigInt(e)));
2738
+ function ka(t) {
2739
+ const e = t.length, n = d(M(t) * ue), r = M(t, 8), i = d(M(t, e - 8) * He), s = d(M(t, e - 16) * Be);
2740
+ return qe(d(A(d(n - r), 43) + A(i, 30) + s), d(n + A(r ^ Xr, 20) - i + BigInt(e)));
2737
2741
  }
2738
- function va(t, e, n, r, i, s) {
2739
- i = p(i + t), s = N(p(s + i + r), 21);
2742
+ function ya(t, e, n, r, i, s) {
2743
+ i = d(i + t), s = A(d(s + i + r), 21);
2740
2744
  const a = i;
2741
- return i = p(i + e), i = p(i + n), s = p(s + N(i, 44)), { first: p(i + r), second: p(s + a) };
2745
+ return i = d(i + e), i = d(i + n), s = d(s + A(i, 44)), { first: d(i + r), second: d(s + a) };
2742
2746
  }
2743
- function Mt(t, e, n, r) {
2744
- return va(M(t, e), M(t, e + 8), M(t, e + 16), M(t, e + 24), n, r);
2747
+ function St(t, e, n, r) {
2748
+ return ya(M(t, e), M(t, e + 8), M(t, e + 16), M(t, e + 24), n, r);
2745
2749
  }
2746
- function ga(t) {
2750
+ function ba(t) {
2747
2751
  const e = t.length, n = M(t, 24);
2748
- let r = p(M(t) + p((BigInt(e) + M(t, e - 16)) * Be)), i = N(p(r + n), 52), s = N(r, 37);
2749
- r = p(r + M(t, 8)), s = p(s + N(r, 7)), r = p(r + M(t, 16));
2750
- const a = p(r + n), u = p(i + N(r, 31) + s);
2751
- r = p(M(t, 16) + M(t, e - 32));
2752
+ let r = d(M(t) + d((BigInt(e) + M(t, e - 16)) * Be)), i = A(d(r + n), 52), s = A(r, 37);
2753
+ r = d(r + M(t, 8)), s = d(s + A(r, 7)), r = d(r + M(t, 16));
2754
+ const a = d(r + n), u = d(i + A(r, 31) + s);
2755
+ r = d(M(t, 16) + M(t, e - 32));
2752
2756
  const o = M(t, e - 8);
2753
- i = N(p(r + o), 52), s = N(r, 37), r = p(r + M(t, e - 24)), s = p(s + N(r, 7)), r = p(r + M(t, e - 16));
2754
- const l = p(r + o), c = p(i + N(r, 31) + s), f = ut(p(p(a + c) * He + p(l + u) * Be));
2755
- return p(ut(p(f * Be + u)) * He);
2757
+ i = A(d(r + o), 52), s = A(r, 37), r = d(r + M(t, e - 24)), s = d(s + A(r, 7)), r = d(r + M(t, e - 16));
2758
+ const l = d(r + o), c = d(i + A(r, 31) + s), f = ft(d(d(a + c) * He + d(l + u) * Be));
2759
+ return d(ft(d(f * Be + u)) * He);
2756
2760
  }
2757
- function wa(t) {
2761
+ function _a(t) {
2758
2762
  let e;
2759
2763
  typeof t == "string" ? e = new TextEncoder().encode(t) : e = t;
2760
2764
  const n = e.length;
2761
2765
  if (n <= 32)
2762
- return n <= 16 ? da(e) : ma(e);
2766
+ return n <= 16 ? wa(e) : ka(e);
2763
2767
  if (n <= 64)
2764
- return ga(e);
2765
- let r = M(e), i = p(M(e, n - 16) ^ ue), s = p(M(e, n - 56) ^ Be), a = Mt(e, n - 64, BigInt(n), i), u = Mt(e, n - 32, p(BigInt(n) * ue), Be);
2766
- s = p(s + ut(a.second) * ue), r = p(N(p(s + r), 39) * ue), i = p(N(i, 33) * ue);
2768
+ return ba(e);
2769
+ let r = M(e), i = d(M(e, n - 16) ^ ue), s = d(M(e, n - 56) ^ Be), a = St(e, n - 64, BigInt(n), i), u = St(e, n - 32, d(BigInt(n) * ue), Be);
2770
+ s = d(s + ft(a.second) * ue), r = d(A(d(s + r), 39) * ue), i = d(A(i, 33) * ue);
2767
2771
  let o = n - 1 & -64, l = 0;
2768
2772
  for (; o > 0; )
2769
- r = p(N(p(r + i + a.first + M(e, l + 16)), 37) * ue), i = p(N(p(i + a.second + M(e, l + 48)), 42) * ue), r ^= u.second, i ^= a.first, s = N(s ^ u.first, 33), a = Mt(e, l, p(a.second * ue), p(r + u.first)), u = Mt(e, l + 32, p(s + u.second), i), [s, r] = [r, s], l += 64, o -= 64;
2770
- return qe(qe(a.first, u.first) + p(ut(i) * ue) + s, qe(a.second, u.second) + r);
2773
+ r = d(A(d(r + i + a.first + M(e, l + 16)), 37) * ue), i = d(A(d(i + a.second + M(e, l + 48)), 42) * ue), r ^= u.second, i ^= a.first, s = A(s ^ u.first, 33), a = St(e, l, d(a.second * ue), d(r + u.first)), u = St(e, l + 32, d(s + u.second), i), [s, r] = [r, s], l += 64, o -= 64;
2774
+ return qe(qe(a.first, u.first) + d(ft(i) * ue) + s, qe(a.second, u.second) + r);
2771
2775
  }
2772
- function ka(t) {
2773
- return wa(JSON.stringify(t)).toString();
2776
+ function Ma(t) {
2777
+ return _a(JSON.stringify(t)).toString();
2774
2778
  }
2775
- let Yt;
2779
+ let Xt;
2776
2780
  // @__NO_SIDE_EFFECTS__
2777
- function Yr(t) {
2781
+ function Kr(t) {
2778
2782
  return {
2779
- lang: Yt?.lang,
2783
+ lang: Xt?.lang,
2780
2784
  message: t?.message,
2781
- abortEarly: Yt?.abortEarly,
2782
- abortPipeEarly: Yt?.abortPipeEarly
2785
+ abortEarly: Xt?.abortEarly,
2786
+ abortPipeEarly: Xt?.abortPipeEarly
2783
2787
  };
2784
2788
  }
2785
- let ya;
2789
+ let Ea;
2786
2790
  // @__NO_SIDE_EFFECTS__
2787
- function ba(t) {
2788
- return ya?.get(t);
2791
+ function xa(t) {
2792
+ return Ea?.get(t);
2789
2793
  }
2790
- let _a;
2794
+ let Sa;
2791
2795
  // @__NO_SIDE_EFFECTS__
2792
- function Ma(t) {
2793
- return _a?.get(t);
2796
+ function Pa(t) {
2797
+ return Sa?.get(t);
2794
2798
  }
2795
- let Ea;
2799
+ let Ta;
2796
2800
  // @__NO_SIDE_EFFECTS__
2797
- function xa(t, e) {
2798
- return Ea?.get(t)?.get(e);
2801
+ function Ia(t, e) {
2802
+ return Ta?.get(t)?.get(e);
2799
2803
  }
2800
2804
  // @__NO_SIDE_EFFECTS__
2801
2805
  function Qe(t) {
2802
2806
  const e = typeof t;
2803
2807
  return e === "string" ? `"${t}"` : e === "number" || e === "bigint" || e === "boolean" ? `${t}` : e === "object" || e === "function" ? (t && Object.getPrototypeOf(t)?.constructor?.name) ?? "null" : e;
2804
2808
  }
2805
- function C(t, e, n, r, i) {
2809
+ function N(t, e, n, r, i) {
2806
2810
  const s = i && "input" in i ? i.input : n.value, a = i?.expected ?? t.expects ?? null, u = i?.received ?? /* @__PURE__ */ Qe(s), o = {
2807
2811
  kind: t.kind,
2808
2812
  type: t.type,
@@ -2816,25 +2820,25 @@ function C(t, e, n, r, i) {
2816
2820
  lang: r.lang,
2817
2821
  abortEarly: r.abortEarly,
2818
2822
  abortPipeEarly: r.abortPipeEarly
2819
- }, l = t.kind === "schema", c = i?.message ?? t.message ?? /* @__PURE__ */ xa(t.reference, o.lang) ?? (l ? /* @__PURE__ */ Ma(o.lang) : null) ?? r.message ?? /* @__PURE__ */ ba(o.lang);
2823
+ }, l = t.kind === "schema", c = i?.message ?? t.message ?? /* @__PURE__ */ Ia(t.reference, o.lang) ?? (l ? /* @__PURE__ */ Pa(o.lang) : null) ?? r.message ?? /* @__PURE__ */ xa(o.lang);
2820
2824
  c !== void 0 && (o.message = typeof c == "function" ? c(o) : c), l && (n.typed = !1), n.issues ? n.issues.push(o) : n.issues = [o];
2821
2825
  }
2822
2826
  // @__NO_SIDE_EFFECTS__
2823
- function J(t) {
2827
+ function Y(t) {
2824
2828
  return {
2825
2829
  version: 1,
2826
2830
  vendor: "valibot",
2827
2831
  validate(e) {
2828
- return t["~run"]({ value: e }, /* @__PURE__ */ Yr());
2832
+ return t["~run"]({ value: e }, /* @__PURE__ */ Kr());
2829
2833
  }
2830
2834
  };
2831
2835
  }
2832
2836
  // @__NO_SIDE_EFFECTS__
2833
- function Sa(t, e) {
2837
+ function Aa(t, e) {
2834
2838
  const n = [...new Set(t)];
2835
2839
  return n.length > 1 ? `(${n.join(` ${e} `)})` : n[0] ?? "never";
2836
2840
  }
2837
- var vn = class extends Error {
2841
+ var wn = class extends Error {
2838
2842
  /**
2839
2843
  * Creates a Valibot error with useful information.
2840
2844
  *
@@ -2845,136 +2849,136 @@ var vn = class extends Error {
2845
2849
  }
2846
2850
  };
2847
2851
  // @__NO_SIDE_EFFECTS__
2848
- function L(t) {
2852
+ function O(t) {
2849
2853
  return {
2850
2854
  kind: "transformation",
2851
2855
  type: "args",
2852
- reference: L,
2856
+ reference: O,
2853
2857
  async: !1,
2854
2858
  schema: t,
2855
2859
  "~run"(e, n) {
2856
2860
  const r = e.value;
2857
2861
  return e.value = (...i) => {
2858
2862
  const s = this.schema["~run"]({ value: i }, n);
2859
- if (s.issues) throw new vn(s.issues);
2863
+ if (s.issues) throw new wn(s.issues);
2860
2864
  return r(...s.value);
2861
2865
  }, e;
2862
2866
  }
2863
2867
  };
2864
2868
  }
2865
2869
  // @__NO_SIDE_EFFECTS__
2866
- function Jr(t, e) {
2870
+ function Gr(t, e) {
2867
2871
  return {
2868
2872
  kind: "validation",
2869
2873
  type: "check",
2870
- reference: Jr,
2874
+ reference: Gr,
2871
2875
  async: !1,
2872
2876
  expects: null,
2873
2877
  requirement: t,
2874
2878
  message: e,
2875
2879
  "~run"(n, r) {
2876
- return n.typed && !this.requirement(n.value) && C(this, "input", n, r), n;
2880
+ return n.typed && !this.requirement(n.value) && N(this, "input", n, r), n;
2877
2881
  }
2878
2882
  };
2879
2883
  }
2880
2884
  // @__NO_SIDE_EFFECTS__
2881
- function Xr(t, e) {
2885
+ function Qr(t, e) {
2882
2886
  return {
2883
2887
  kind: "validation",
2884
2888
  type: "length",
2885
- reference: Xr,
2889
+ reference: Qr,
2886
2890
  async: !1,
2887
2891
  expects: `${t}`,
2888
2892
  requirement: t,
2889
2893
  message: e,
2890
2894
  "~run"(n, r) {
2891
- return n.typed && n.value.length !== this.requirement && C(this, "length", n, r, { received: `${n.value.length}` }), n;
2895
+ return n.typed && n.value.length !== this.requirement && N(this, "length", n, r, { received: `${n.value.length}` }), n;
2892
2896
  }
2893
2897
  };
2894
2898
  }
2895
2899
  // @__NO_SIDE_EFFECTS__
2896
- function ct(t, e) {
2900
+ function ht(t, e) {
2897
2901
  return {
2898
2902
  kind: "validation",
2899
2903
  type: "max_value",
2900
- reference: ct,
2904
+ reference: ht,
2901
2905
  async: !1,
2902
2906
  expects: `<=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Qe(t)}`,
2903
2907
  requirement: t,
2904
2908
  message: e,
2905
2909
  "~run"(n, r) {
2906
- return n.typed && !(n.value <= this.requirement) && C(this, "value", n, r, { received: n.value instanceof Date ? n.value.toJSON() : /* @__PURE__ */ Qe(n.value) }), n;
2910
+ return n.typed && !(n.value <= this.requirement) && N(this, "value", n, r, { received: n.value instanceof Date ? n.value.toJSON() : /* @__PURE__ */ Qe(n.value) }), n;
2907
2911
  }
2908
2912
  };
2909
2913
  }
2910
2914
  // @__NO_SIDE_EFFECTS__
2911
- function gn(t, e) {
2915
+ function kn(t, e) {
2912
2916
  return {
2913
2917
  kind: "validation",
2914
2918
  type: "min_length",
2915
- reference: gn,
2919
+ reference: kn,
2916
2920
  async: !1,
2917
2921
  expects: `>=${t}`,
2918
2922
  requirement: t,
2919
2923
  message: e,
2920
2924
  "~run"(n, r) {
2921
- return n.typed && n.value.length < this.requirement && C(this, "length", n, r, { received: `${n.value.length}` }), n;
2925
+ return n.typed && n.value.length < this.requirement && N(this, "length", n, r, { received: `${n.value.length}` }), n;
2922
2926
  }
2923
2927
  };
2924
2928
  }
2925
2929
  // @__NO_SIDE_EFFECTS__
2926
- function Z(t, e) {
2930
+ function H(t, e) {
2927
2931
  return {
2928
2932
  kind: "validation",
2929
2933
  type: "min_value",
2930
- reference: Z,
2934
+ reference: H,
2931
2935
  async: !1,
2932
2936
  expects: `>=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Qe(t)}`,
2933
2937
  requirement: t,
2934
2938
  message: e,
2935
2939
  "~run"(n, r) {
2936
- return n.typed && !(n.value >= this.requirement) && C(this, "value", n, r, { received: n.value instanceof Date ? n.value.toJSON() : /* @__PURE__ */ Qe(n.value) }), n;
2940
+ return n.typed && !(n.value >= this.requirement) && N(this, "value", n, r, { received: n.value instanceof Date ? n.value.toJSON() : /* @__PURE__ */ Qe(n.value) }), n;
2937
2941
  }
2938
2942
  };
2939
2943
  }
2940
2944
  // @__NO_SIDE_EFFECTS__
2941
- function V(t) {
2945
+ function $(t) {
2942
2946
  return {
2943
2947
  kind: "transformation",
2944
2948
  type: "returns",
2945
- reference: V,
2949
+ reference: $,
2946
2950
  async: !1,
2947
2951
  schema: t,
2948
2952
  "~run"(e, n) {
2949
2953
  const r = e.value;
2950
2954
  return e.value = (...i) => {
2951
2955
  const s = this.schema["~run"]({ value: r(...i) }, n);
2952
- if (s.issues) throw new vn(s.issues);
2956
+ if (s.issues) throw new wn(s.issues);
2953
2957
  return s.value;
2954
2958
  }, e;
2955
2959
  }
2956
2960
  };
2957
2961
  }
2958
2962
  // @__NO_SIDE_EFFECTS__
2959
- function Pa(t, e, n) {
2963
+ function Na(t, e, n) {
2960
2964
  return typeof t.fallback == "function" ? t.fallback(e, n) : t.fallback;
2961
2965
  }
2962
2966
  // @__NO_SIDE_EFFECTS__
2963
- function Kr(t, e, n) {
2967
+ function ei(t, e, n) {
2964
2968
  return typeof t.default == "function" ? t.default(e, n) : t.default;
2965
2969
  }
2966
2970
  // @__NO_SIDE_EFFECTS__
2967
- function Gr(t, e) {
2971
+ function ti(t, e) {
2968
2972
  return {
2969
2973
  kind: "schema",
2970
2974
  type: "array",
2971
- reference: Gr,
2975
+ reference: ti,
2972
2976
  expects: "Array",
2973
2977
  async: !1,
2974
2978
  item: t,
2975
2979
  message: e,
2976
2980
  get "~standard"() {
2977
- return /* @__PURE__ */ J(this);
2981
+ return /* @__PURE__ */ Y(this);
2978
2982
  },
2979
2983
  "~run"(n, r) {
2980
2984
  const i = n.value;
@@ -2999,60 +3003,60 @@ function Gr(t, e) {
2999
3003
  }
3000
3004
  u.typed || (n.typed = !1), n.value.push(u.value);
3001
3005
  }
3002
- } else C(this, "type", n, r);
3006
+ } else N(this, "type", n, r);
3003
3007
  return n;
3004
3008
  }
3005
3009
  };
3006
3010
  }
3007
3011
  // @__NO_SIDE_EFFECTS__
3008
- function Qr(t) {
3012
+ function ni(t) {
3009
3013
  return {
3010
3014
  kind: "schema",
3011
3015
  type: "boolean",
3012
- reference: Qr,
3016
+ reference: ni,
3013
3017
  expects: "boolean",
3014
3018
  async: !1,
3015
3019
  message: t,
3016
3020
  get "~standard"() {
3017
- return /* @__PURE__ */ J(this);
3021
+ return /* @__PURE__ */ Y(this);
3018
3022
  },
3019
3023
  "~run"(e, n) {
3020
- return typeof e.value == "boolean" ? e.typed = !0 : C(this, "type", e, n), e;
3024
+ return typeof e.value == "boolean" ? e.typed = !0 : N(this, "type", e, n), e;
3021
3025
  }
3022
3026
  };
3023
3027
  }
3024
3028
  // @__NO_SIDE_EFFECTS__
3025
- function ei(t, e) {
3029
+ function ri(t, e) {
3026
3030
  return {
3027
3031
  kind: "schema",
3028
3032
  type: "custom",
3029
- reference: ei,
3033
+ reference: ri,
3030
3034
  expects: "unknown",
3031
3035
  async: !1,
3032
3036
  check: t,
3033
3037
  message: e,
3034
3038
  get "~standard"() {
3035
- return /* @__PURE__ */ J(this);
3039
+ return /* @__PURE__ */ Y(this);
3036
3040
  },
3037
3041
  "~run"(n, r) {
3038
- return this.check(n.value) ? n.typed = !0 : C(this, "type", n, r), n;
3042
+ return this.check(n.value) ? n.typed = !0 : N(this, "type", n, r), n;
3039
3043
  }
3040
3044
  };
3041
3045
  }
3042
3046
  // @__NO_SIDE_EFFECTS__
3043
- function A(t) {
3047
+ function I(t) {
3044
3048
  return {
3045
3049
  kind: "schema",
3046
3050
  type: "function",
3047
- reference: A,
3051
+ reference: I,
3048
3052
  expects: "Function",
3049
3053
  async: !1,
3050
3054
  message: t,
3051
3055
  get "~standard"() {
3052
- return /* @__PURE__ */ J(this);
3056
+ return /* @__PURE__ */ Y(this);
3053
3057
  },
3054
3058
  "~run"(e, n) {
3055
- return typeof e.value == "function" ? e.typed = !0 : C(this, "type", e, n), e;
3059
+ return typeof e.value == "function" ? e.typed = !0 : N(this, "type", e, n), e;
3056
3060
  }
3057
3061
  };
3058
3062
  }
@@ -3067,10 +3071,10 @@ function ze(t, e) {
3067
3071
  literal: t,
3068
3072
  message: e,
3069
3073
  get "~standard"() {
3070
- return /* @__PURE__ */ J(this);
3074
+ return /* @__PURE__ */ Y(this);
3071
3075
  },
3072
3076
  "~run"(n, r) {
3073
- return n.value === this.literal ? n.typed = !0 : C(this, "type", n, r), n;
3077
+ return n.value === this.literal ? n.typed = !0 : N(this, "type", n, r), n;
3074
3078
  }
3075
3079
  };
3076
3080
  }
@@ -3084,25 +3088,25 @@ function P(t) {
3084
3088
  async: !1,
3085
3089
  message: t,
3086
3090
  get "~standard"() {
3087
- return /* @__PURE__ */ J(this);
3091
+ return /* @__PURE__ */ Y(this);
3088
3092
  },
3089
3093
  "~run"(e, n) {
3090
- return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : C(this, "type", e, n), e;
3094
+ return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : N(this, "type", e, n), e;
3091
3095
  }
3092
3096
  };
3093
3097
  }
3094
3098
  // @__NO_SIDE_EFFECTS__
3095
- function q(t, e) {
3099
+ function B(t, e) {
3096
3100
  return {
3097
3101
  kind: "schema",
3098
3102
  type: "object",
3099
- reference: q,
3103
+ reference: B,
3100
3104
  expects: "Object",
3101
3105
  async: !1,
3102
3106
  entries: t,
3103
3107
  message: e,
3104
3108
  get "~standard"() {
3105
- return /* @__PURE__ */ J(this);
3109
+ return /* @__PURE__ */ Y(this);
3106
3110
  },
3107
3111
  "~run"(n, r) {
3108
3112
  const i = n.value;
@@ -3111,7 +3115,7 @@ function q(t, e) {
3111
3115
  for (const s in this.entries) {
3112
3116
  const a = this.entries[s];
3113
3117
  if (s in i || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
3114
- const u = s in i ? i[s] : /* @__PURE__ */ Kr(a), o = a["~run"]({ value: u }, r);
3118
+ const u = s in i ? i[s] : /* @__PURE__ */ ei(a), o = a["~run"]({ value: u }, r);
3115
3119
  if (o.issues) {
3116
3120
  const l = {
3117
3121
  type: "object",
@@ -3128,8 +3132,8 @@ function q(t, e) {
3128
3132
  }
3129
3133
  }
3130
3134
  o.typed || (n.typed = !1), n.value[s] = o.value;
3131
- } else if (a.fallback !== void 0) n.value[s] = /* @__PURE__ */ Pa(a);
3132
- else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (C(this, "key", n, r, {
3135
+ } else if (a.fallback !== void 0) n.value[s] = /* @__PURE__ */ Na(a);
3136
+ else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (N(this, "key", n, r, {
3133
3137
  input: void 0,
3134
3138
  expected: `"${s}"`,
3135
3139
  path: [{
@@ -3142,7 +3146,7 @@ function q(t, e) {
3142
3146
  }), r.abortEarly))
3143
3147
  break;
3144
3148
  }
3145
- } else C(this, "type", n, r);
3149
+ } else N(this, "type", n, r);
3146
3150
  return n;
3147
3151
  }
3148
3152
  };
@@ -3158,42 +3162,42 @@ function T(t, e) {
3158
3162
  wrapped: t,
3159
3163
  default: e,
3160
3164
  get "~standard"() {
3161
- return /* @__PURE__ */ J(this);
3165
+ return /* @__PURE__ */ Y(this);
3162
3166
  },
3163
3167
  "~run"(n, r) {
3164
- return n.value === void 0 && (this.default !== void 0 && (n.value = /* @__PURE__ */ Kr(this, n, r)), n.value === void 0) ? (n.typed = !0, n) : this.wrapped["~run"](n, r);
3168
+ return n.value === void 0 && (this.default !== void 0 && (n.value = /* @__PURE__ */ ei(this, n, r)), n.value === void 0) ? (n.typed = !0, n) : this.wrapped["~run"](n, r);
3165
3169
  }
3166
3170
  };
3167
3171
  }
3168
3172
  // @__NO_SIDE_EFFECTS__
3169
- function ve(t) {
3173
+ function ge(t) {
3170
3174
  return {
3171
3175
  kind: "schema",
3172
3176
  type: "string",
3173
- reference: ve,
3177
+ reference: ge,
3174
3178
  expects: "string",
3175
3179
  async: !1,
3176
3180
  message: t,
3177
3181
  get "~standard"() {
3178
- return /* @__PURE__ */ J(this);
3182
+ return /* @__PURE__ */ Y(this);
3179
3183
  },
3180
3184
  "~run"(e, n) {
3181
- return typeof e.value == "string" ? e.typed = !0 : C(this, "type", e, n), e;
3185
+ return typeof e.value == "string" ? e.typed = !0 : N(this, "type", e, n), e;
3182
3186
  }
3183
3187
  };
3184
3188
  }
3185
3189
  // @__NO_SIDE_EFFECTS__
3186
- function F(t, e) {
3190
+ function L(t, e) {
3187
3191
  return {
3188
3192
  kind: "schema",
3189
3193
  type: "tuple",
3190
- reference: F,
3194
+ reference: L,
3191
3195
  expects: "Array",
3192
3196
  async: !1,
3193
3197
  items: t,
3194
3198
  message: e,
3195
3199
  get "~standard"() {
3196
- return /* @__PURE__ */ J(this);
3200
+ return /* @__PURE__ */ Y(this);
3197
3201
  },
3198
3202
  "~run"(n, r) {
3199
3203
  const i = n.value;
@@ -3218,29 +3222,29 @@ function F(t, e) {
3218
3222
  }
3219
3223
  u.typed || (n.typed = !1), n.value.push(u.value);
3220
3224
  }
3221
- } else C(this, "type", n, r);
3225
+ } else N(this, "type", n, r);
3222
3226
  return n;
3223
3227
  }
3224
3228
  };
3225
3229
  }
3226
3230
  // @__NO_SIDE_EFFECTS__
3227
- function Kn(t) {
3231
+ function er(t) {
3228
3232
  let e;
3229
3233
  if (t) for (const n of t) e ? e.push(...n.issues) : e = n.issues;
3230
3234
  return e;
3231
3235
  }
3232
3236
  // @__NO_SIDE_EFFECTS__
3233
- function wn(t, e) {
3237
+ function yn(t, e) {
3234
3238
  return {
3235
3239
  kind: "schema",
3236
3240
  type: "union",
3237
- reference: wn,
3238
- expects: /* @__PURE__ */ Sa(t.map((n) => n.expects), "|"),
3241
+ reference: yn,
3242
+ expects: /* @__PURE__ */ Aa(t.map((n) => n.expects), "|"),
3239
3243
  async: !1,
3240
3244
  options: t,
3241
3245
  message: e,
3242
3246
  get "~standard"() {
3243
- return /* @__PURE__ */ J(this);
3247
+ return /* @__PURE__ */ Y(this);
3244
3248
  },
3245
3249
  "~run"(n, r) {
3246
3250
  let i, s, a;
@@ -3256,10 +3260,10 @@ function wn(t, e) {
3256
3260
  if (i) return i;
3257
3261
  if (s) {
3258
3262
  if (s.length === 1) return s[0];
3259
- C(this, "type", n, r, { issues: /* @__PURE__ */ Kn(s) }), n.typed = !0;
3263
+ N(this, "type", n, r, { issues: /* @__PURE__ */ er(s) }), n.typed = !0;
3260
3264
  } else {
3261
3265
  if (a?.length === 1) return a[0];
3262
- C(this, "type", n, r, { issues: /* @__PURE__ */ Kn(a) });
3266
+ N(this, "type", n, r, { issues: /* @__PURE__ */ er(a) });
3263
3267
  }
3264
3268
  return n;
3265
3269
  }
@@ -3275,16 +3279,16 @@ function Oe(t) {
3275
3279
  async: !1,
3276
3280
  message: t,
3277
3281
  get "~standard"() {
3278
- return /* @__PURE__ */ J(this);
3282
+ return /* @__PURE__ */ Y(this);
3279
3283
  },
3280
3284
  "~run"(e, n) {
3281
- return e.value === void 0 ? e.typed = !0 : C(this, "type", e, n), e;
3285
+ return e.value === void 0 ? e.typed = !0 : N(this, "type", e, n), e;
3282
3286
  }
3283
3287
  };
3284
3288
  }
3285
- function Et(t, e, n) {
3286
- const r = t["~run"]({ value: e }, /* @__PURE__ */ Yr(n));
3287
- if (r.issues) throw new vn(r.issues);
3289
+ function Pt(t, e, n) {
3290
+ const r = t["~run"]({ value: e }, /* @__PURE__ */ Kr(n));
3291
+ if (r.issues) throw new wn(r.issues);
3288
3292
  return r.value;
3289
3293
  }
3290
3294
  // @__NO_SIDE_EFFECTS__
@@ -3293,7 +3297,7 @@ function w(...t) {
3293
3297
  ...t[0],
3294
3298
  pipe: t,
3295
3299
  get "~standard"() {
3296
- return /* @__PURE__ */ J(this);
3300
+ return /* @__PURE__ */ Y(this);
3297
3301
  },
3298
3302
  "~run"(e, n) {
3299
3303
  for (const r of t) if (r.kind !== "metadata") {
@@ -3307,16 +3311,16 @@ function w(...t) {
3307
3311
  }
3308
3312
  };
3309
3313
  }
3310
- var ti = /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(-90), /* @__PURE__ */ ct(90)), ni = /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(-180), /* @__PURE__ */ ct(180)), Nt = /* @__PURE__ */ q({ lat: ti, lng: ni }), ri = /* @__PURE__ */ q({ sw: Nt, ne: Nt }), Ta = /* @__PURE__ */ q({ bounds: ri, center: Nt, zoom: /* @__PURE__ */ P() }), Ze = /* @__PURE__ */ ei((t) => t instanceof HTMLElement, "Must be an HTMLElement"), Ia = /* @__PURE__ */ q({ mapSize: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(1)), zoomMin: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0)), zoomMax: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0)), zoomScale: /* @__PURE__ */ wn([/* @__PURE__ */ ze(1), /* @__PURE__ */ ze(2), /* @__PURE__ */ ze(10)]) }), Aa = /* @__PURE__ */ q({ inserted: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(/* @__PURE__ */ Qr())), insert: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), remove: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), update: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([/* @__PURE__ */ P()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())) }), Gn = /* @__PURE__ */ wn([/* @__PURE__ */ ze("idle"), /* @__PURE__ */ ze("move"), /* @__PURE__ */ ze("click")]), Na = /* @__PURE__ */ q({ getParameters: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(Ia)), getContainer: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(Ze)), getZoom: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(/* @__PURE__ */ P())), getBounds: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(ri)), getCenter: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(Nt)), getViewport: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(Ta)), panBy: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([/* @__PURE__ */ P(), /* @__PURE__ */ P()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), createMarker: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([Ze, ti, ni, /* @__PURE__ */ P()])), /* @__PURE__ */ V(Aa)), subscribe: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([Gn, /* @__PURE__ */ A()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), unsubscribe: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([Gn, /* @__PURE__ */ A()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())) }), Jt = /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([/* @__PURE__ */ ve(), Ze]))), Xt = /* @__PURE__ */ w(/* @__PURE__ */ q({ width: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0)), height: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0)), padding: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0)) }), /* @__PURE__ */ Jr((t) => Math.min(t.width, t.height) / t.padding >= 4, "Minimum of width or height must be greater than or equal to 4 * padding")), Ca = /* @__PURE__ */ q({ background: /* @__PURE__ */ T(/* @__PURE__ */ ve()), radius: /* @__PURE__ */ T(/* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0))), shadow: /* @__PURE__ */ T(/* @__PURE__ */ ve()) }), Qn = /* @__PURE__ */ q({ background: /* @__PURE__ */ T(/* @__PURE__ */ ve()), radius: /* @__PURE__ */ T(/* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0))), filter: /* @__PURE__ */ T(/* @__PURE__ */ ve()) }), Ra = /* @__PURE__ */ q({ id: /* @__PURE__ */ w(/* @__PURE__ */ ve(), /* @__PURE__ */ gn(1)), rank: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0)), lat: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(-90), /* @__PURE__ */ ct(90)), lng: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(-180), /* @__PURE__ */ ct(180)), tooltip: /* @__PURE__ */ q({ element: Ze, style: /* @__PURE__ */ T(Qn), dimensions: /* @__PURE__ */ T(Xt), initialize: /* @__PURE__ */ T(Jt) }), pin: /* @__PURE__ */ T(/* @__PURE__ */ q({ element: /* @__PURE__ */ T(Ze), style: /* @__PURE__ */ T(Ca), dimensions: /* @__PURE__ */ T(Xt), initialize: /* @__PURE__ */ T(Jt) })), popup: /* @__PURE__ */ T(/* @__PURE__ */ q({ element: Ze, style: /* @__PURE__ */ T(Qn), dimensions: /* @__PURE__ */ T(Xt), initialize: /* @__PURE__ */ T(Jt) })) }), Da = /* @__PURE__ */ w(/* @__PURE__ */ ve(), /* @__PURE__ */ Xr(32)), za = /* @__PURE__ */ w(/* @__PURE__ */ ve(), /* @__PURE__ */ gn(1));
3311
- const Oa = "1.3.6";
3312
- class La {
3314
+ var ii = /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(-90), /* @__PURE__ */ ht(90)), si = /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(-180), /* @__PURE__ */ ht(180)), Rt = /* @__PURE__ */ B({ lat: ii, lng: si }), ai = /* @__PURE__ */ B({ sw: Rt, ne: Rt }), Ca = /* @__PURE__ */ B({ bounds: ai, center: Rt, zoom: /* @__PURE__ */ P() }), Ze = /* @__PURE__ */ ri((t) => t instanceof HTMLElement, "Must be an HTMLElement"), Ra = /* @__PURE__ */ B({ mapSize: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(1)), zoomMin: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)), zoomMax: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)), zoomScale: /* @__PURE__ */ yn([/* @__PURE__ */ ze(1), /* @__PURE__ */ ze(2), /* @__PURE__ */ ze(10)]) }), Da = /* @__PURE__ */ B({ inserted: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ ni())), insert: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), remove: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), update: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ P()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())) }), tr = /* @__PURE__ */ yn([/* @__PURE__ */ ze("idle"), /* @__PURE__ */ ze("move"), /* @__PURE__ */ ze("click")]), za = /* @__PURE__ */ B({ getParameters: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(Ra)), getContainer: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(Ze)), getZoom: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ P())), getBounds: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(ai)), getCenter: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(Rt)), getViewport: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(Ca)), panBy: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ P(), /* @__PURE__ */ P()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), createMarker: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([Ze, ii, si, /* @__PURE__ */ P()])), /* @__PURE__ */ $(Da)), subscribe: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([tr, /* @__PURE__ */ I()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), unsubscribe: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([tr, /* @__PURE__ */ I()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())) }), Kt = /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ ge(), Ze]))), Gt = /* @__PURE__ */ w(/* @__PURE__ */ B({ width: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)), height: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)), padding: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)) }), /* @__PURE__ */ Gr((t) => Math.min(t.width, t.height) / t.padding >= 4, "Minimum of width or height must be greater than or equal to 4 * padding")), Oa = /* @__PURE__ */ B({ background: /* @__PURE__ */ T(/* @__PURE__ */ ge()), radius: /* @__PURE__ */ T(/* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0))), shadow: /* @__PURE__ */ T(/* @__PURE__ */ ge()) }), nr = /* @__PURE__ */ B({ background: /* @__PURE__ */ T(/* @__PURE__ */ ge()), radius: /* @__PURE__ */ T(/* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0))), filter: /* @__PURE__ */ T(/* @__PURE__ */ ge()) }), La = /* @__PURE__ */ B({ id: /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ kn(1)), rank: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)), lat: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(-90), /* @__PURE__ */ ht(90)), lng: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(-180), /* @__PURE__ */ ht(180)), tooltip: /* @__PURE__ */ B({ element: Ze, style: /* @__PURE__ */ T(nr), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Kt) }), pin: /* @__PURE__ */ T(/* @__PURE__ */ B({ element: /* @__PURE__ */ T(Ze), style: /* @__PURE__ */ T(Oa), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Kt) })), popup: /* @__PURE__ */ T(/* @__PURE__ */ B({ element: Ze, style: /* @__PURE__ */ T(nr), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Kt) })) }), Fa = /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ Qr(32)), $a = /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ kn(1));
3315
+ const Va = "1.3.8";
3316
+ class ja {
3313
3317
  apiKey;
3314
3318
  apiJwt;
3315
3319
  markerStatesStore;
3316
3320
  markerStatesWorker;
3317
3321
  markerStatesWorkerClient;
3318
3322
  constructor(e, n) {
3319
- this.apiKey = e, this.apiJwt = n, this.markerStatesStore = /* @__PURE__ */ new Map(), this.markerStatesWorker = new la(), this.markerStatesWorkerClient = new nr(this.markerStatesWorker);
3323
+ this.apiKey = e, this.apiJwt = n, this.markerStatesStore = /* @__PURE__ */ new Map(), this.markerStatesWorker = new ha(), this.markerStatesWorkerClient = new sr(this.markerStatesWorker);
3320
3324
  }
3321
3325
  clearStates() {
3322
3326
  this.markerStatesStore.clear();
@@ -3330,7 +3334,7 @@ class La {
3330
3334
  async updateStates(e, n) {
3331
3335
  if (e.length == 0) return;
3332
3336
  e.sort((a, u) => a.properites.id.localeCompare(u.properites.id));
3333
- const r = e.map((a) => a.input), i = ka(r);
3337
+ const r = e.map((a) => a.input), i = Ma(r);
3334
3338
  let s = this.markerStatesStore.get(i);
3335
3339
  s == null && (s = await this.fetchStates(r, n), this.markerStatesStore.set(i, s));
3336
3340
  for (let a = 0; a < e.length; a++) {
@@ -3340,19 +3344,19 @@ class La {
3340
3344
  }
3341
3345
  async fetchStates(e, n) {
3342
3346
  if (e.length == 0) return [];
3343
- if (e.length == 1) return [{ zoom: 0, directions: [{ zoom: 0, angle: ia() }] }];
3347
+ if (e.length == 1) return [{ zoom: 0, directions: [{ zoom: 0, angle: la() }] }];
3344
3348
  const r = {
3345
3349
  key: this.apiKey,
3346
3350
  jwt: this.apiJwt,
3347
- version: Oa,
3351
+ version: Va,
3348
3352
  input: e,
3349
3353
  parameters: n
3350
3354
  }, i = await this.markerStatesWorkerClient.invoke("fetch", r);
3351
3355
  return i.jwt && (this.apiJwt = i.jwt), i.states;
3352
3356
  }
3353
3357
  }
3354
- const er = "1.3.6", Fa = "https://maps.api.arenarium.dev/auth", $a = "https://maps.api.arenarium.dev/log", tr = 500;
3355
- class ii {
3358
+ const rr = "1.3.8", Ua = "https://maps.api.arenarium.dev/auth", Wa = "https://maps.api.arenarium.dev/log", ir = 500;
3359
+ class oi {
3356
3360
  apiKey;
3357
3361
  mapProvider;
3358
3362
  mapStateProvider;
@@ -3363,26 +3367,26 @@ class ii {
3363
3367
  markerVisibilityProcessor;
3364
3368
  markerElementsProcessor;
3365
3369
  markerStateProcessor;
3366
- markerStatesProcessDelay = tr;
3370
+ markerStatesProcessDelay = ir;
3367
3371
  markerStatesProcessTimeout = void 0;
3368
3372
  constructor(e, n, r, i) {
3369
- Et(Da, e), Et(za, n), Et(Na, r), this.apiKey = e, this.mapProvider = r, this.mapStateProvider = new Mi(
3373
+ Pt(Fa, e), Pt($a, n), Pt(za, r), this.apiKey = e, this.mapProvider = r, this.mapStateProvider = new Si(
3370
3374
  this.mapProvider,
3371
3375
  this.detached.bind(this),
3372
3376
  this.error.bind(this),
3373
3377
  this.onMapMove.bind(this),
3374
3378
  this.onMapIdle.bind(this),
3375
3379
  this.onMapClick.bind(this)
3376
- ), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new Fi(), this.markerElementsManager = new oa(this.mapProvider), this.markerStatesManager = new La(e, n), this.markerVisibilityProcessor = new Ht(this.onMarkersVisiblityProcess.bind(this)), this.markerElementsProcessor = new Ht(this.onMarkersRenderProcess.bind(this)), this.markerStateProcessor = new Ht(this.onMarkersStateProcess.bind(this)), this.configuration = i;
3380
+ ), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new Ui(), this.markerElementsManager = new fa(this.mapProvider), this.markerStatesManager = new ja(e, n), this.markerVisibilityProcessor = new Zt(this.onMarkersVisiblityProcess.bind(this)), this.markerElementsProcessor = new Zt(this.onMarkersRenderProcess.bind(this)), this.markerStateProcessor = new Zt(this.onMarkersStateProcess.bind(this)), this.configuration = i;
3377
3381
  }
3378
3382
  //#region Core
3379
3383
  static async create(e, n, r) {
3380
- let a = (await ca(Fa, { key: e, version: er })).jwt;
3384
+ let a = (await da(Ua, { key: e, version: rr })).jwt;
3381
3385
  if (!a) throw new Error("Failed to get api jwt");
3382
- return new ii(e, a, n, r);
3386
+ return new oi(e, a, n, r);
3383
3387
  }
3384
3388
  set configuration(e) {
3385
- this.markerStatesProcessDelay = e?.process?.states?.delay ?? tr, this.markerVisibilityManager.configuration = e, this.markerElementsManager.configuration = e;
3389
+ this.markerStatesProcessDelay = e?.process?.states?.delay ?? ir, this.markerVisibilityManager.configuration = e, this.markerElementsManager.configuration = e;
3386
3390
  }
3387
3391
  clear() {
3388
3392
  this.markers.clear(), this.markerVisibilityManager.clearMarkers(), this.markerStatesManager.clearStates(), this.markerElementsManager.clearElements(), this.mapStateProvider.stop(), this.markerVisibilityProcessor.stop(), this.markerStateProcessor.stop(), this.markerElementsProcessor.stop();
@@ -3411,7 +3415,7 @@ class ii {
3411
3415
  title: n,
3412
3416
  level: e,
3413
3417
  content: {
3414
- version: er,
3418
+ version: rr,
3415
3419
  key: this.apiKey,
3416
3420
  name: r.name,
3417
3421
  message: r.message,
@@ -3419,7 +3423,7 @@ class ii {
3419
3423
  stack: r.stack
3420
3424
  }
3421
3425
  };
3422
- await fa($a, i);
3426
+ await ma(Wa, i);
3423
3427
  } catch (i) {
3424
3428
  console.error(i);
3425
3429
  }
@@ -3486,24 +3490,24 @@ class ii {
3486
3490
  }, a = (o, l) => {
3487
3491
  if (l) return l;
3488
3492
  if (o) {
3489
- const c = s(o), f = c.width, h = c.height;
3490
- return { width: f, height: h, padding: Cn };
3493
+ const c = s(o), f = c.width, p = c.height;
3494
+ return { width: f, height: p, padding: On };
3491
3495
  } else
3492
- return { width: Nn, height: Nn, padding: Cn };
3496
+ return { width: zn, height: zn, padding: On };
3493
3497
  }, u = (o, l) => {
3494
3498
  if (l) return l;
3495
- const c = s(o), f = c.width, h = c.height, m = Math.min(Math.round(Math.min(f, h) / 4), zi);
3496
- return { width: f, height: h, padding: m };
3499
+ const c = s(o), f = c.width, p = c.height, m = Math.min(Math.round(Math.min(f, p) / 4), $i);
3500
+ return { width: f, height: p, padding: m };
3497
3501
  };
3498
3502
  for (const o of r) {
3499
- const l = o.id, c = o.lat, f = o.lng, h = o.rank;
3503
+ const l = o.id, c = o.lat, f = o.lng, p = o.rank;
3500
3504
  let m = {
3501
3505
  id: l,
3502
3506
  initialize: o.pin?.initialize,
3503
3507
  element: o.pin?.element,
3504
3508
  style: o.pin?.style,
3505
3509
  dimensions: a(o.pin?.element, o.pin?.dimensions)
3506
- }, d = {
3510
+ }, h = {
3507
3511
  id: l,
3508
3512
  initialize: o.tooltip.initialize,
3509
3513
  element: o.tooltip.element,
@@ -3517,13 +3521,13 @@ class ii {
3517
3521
  style: o.popup.style,
3518
3522
  dimensions: u(o.popup.element, o.popup.dimensions)
3519
3523
  });
3520
- const _ = new yi(l, c, f, h, m, d, v);
3521
- n.push(_);
3524
+ const b = new Mi(l, c, f, p, m, h, v);
3525
+ n.push(b);
3522
3526
  }
3523
3527
  return n.forEach((o) => this.markers.set(o.properites.id, o)), n.sort((o, l) => l.properites.rank - o.properites.rank), n;
3524
3528
  }
3525
3529
  async updateMarkers(e) {
3526
- Et(/* @__PURE__ */ Gr(Ra), e);
3530
+ Pt(/* @__PURE__ */ ti(La), e);
3527
3531
  try {
3528
3532
  const n = this.mapProvider.getParameters(), r = this.getMarkers(e);
3529
3533
  await this.markerVisibilityManager.updateMarkers(n, r), this.mapStateProvider.start(), this.markerVisibilityProcessor.run();
@@ -3563,5 +3567,5 @@ class ii {
3563
3567
  //#endregion
3564
3568
  }
3565
3569
  export {
3566
- ii as MapManager
3570
+ oi as MapManager
3567
3571
  };