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