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