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