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