@panomc/sdk 1.0.0-dev.2 → 1.0.0-dev.3
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/package.json +6 -8
- package/src/components/Button.svelte +13 -0
- package/src/index.js +13 -0
- package/dist/index.js +0 -1307
- package/dist/sdk.css +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panomc/sdk",
|
|
3
|
-
"version": "1.0.0-dev.
|
|
3
|
+
"version": "1.0.0-dev.3",
|
|
4
4
|
"author": "PanoMC",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/PanoMC/sdk"
|
|
@@ -10,18 +10,16 @@
|
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
12
|
"files": [
|
|
13
|
-
"
|
|
13
|
+
"src"
|
|
14
14
|
],
|
|
15
|
-
"
|
|
16
|
-
"module": "dist/index.js",
|
|
15
|
+
"svelte": "./src/index.js",
|
|
17
16
|
"exports": {
|
|
18
17
|
".": {
|
|
19
|
-
"
|
|
18
|
+
"svelte": "./src/index.js",
|
|
19
|
+
"default": "./src/index.js"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"build": "vite build"
|
|
24
|
-
},
|
|
22
|
+
"scripts": {},
|
|
25
23
|
"peerDependencies": {
|
|
26
24
|
"svelte": "^5.46.1"
|
|
27
25
|
},
|
package/src/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { setContext, getContext } from 'svelte'
|
|
2
|
+
|
|
3
|
+
export { default as PanoTestButton } from './components/Button.svelte';
|
|
4
|
+
|
|
5
|
+
export const PANO_CTX = Symbol()
|
|
6
|
+
|
|
7
|
+
export function setPanoContext(ctx) {
|
|
8
|
+
setContext(PANO_CTX, ctx)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function usePano() {
|
|
12
|
+
return getContext(PANO_CTX)
|
|
13
|
+
}
|
package/dist/index.js
DELETED
|
@@ -1,1307 +0,0 @@
|
|
|
1
|
-
import { setContext as vt, getContext as _t } from "svelte";
|
|
2
|
-
const dt = "5";
|
|
3
|
-
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(dt);
|
|
4
|
-
let Re = !1, ht = !1;
|
|
5
|
-
function pt() {
|
|
6
|
-
Re = !0;
|
|
7
|
-
}
|
|
8
|
-
pt();
|
|
9
|
-
const wt = 2, mt = 4, gt = 8, Et = 2, g = /* @__PURE__ */ Symbol(), be = !1;
|
|
10
|
-
var yt = Array.isArray, bt = Array.prototype.indexOf, ve = Object.getOwnPropertyDescriptor, xt = Object.prototype, St = Array.prototype, Tt = Object.getPrototypeOf;
|
|
11
|
-
function At(e) {
|
|
12
|
-
for (var t = 0; t < e.length; t++)
|
|
13
|
-
e[t]();
|
|
14
|
-
}
|
|
15
|
-
function Be() {
|
|
16
|
-
var e, t, n = new Promise((r, i) => {
|
|
17
|
-
e = r, t = i;
|
|
18
|
-
});
|
|
19
|
-
return { promise: n, resolve: e, reject: t };
|
|
20
|
-
}
|
|
21
|
-
const m = 2, Rt = 4, Ue = 8, Pt = 1 << 24, H = 16, ie = 32, ee = 64, Pe = 128, P = 512, y = 1024, T = 2048, N = 4096, Z = 8192, C = 16384, Ye = 32768, Ie = 65536, Me = 1 << 17, Ke = 1 << 18, ke = 1 << 19, z = 32768, xe = 1 << 21, Ne = 1 << 22, q = 1 << 23, _e = /* @__PURE__ */ Symbol("$state"), kt = /* @__PURE__ */ Symbol("legacy props"), W = new class extends Error {
|
|
22
|
-
name = "StaleReactionError";
|
|
23
|
-
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
24
|
-
}();
|
|
25
|
-
function Nt() {
|
|
26
|
-
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
27
|
-
}
|
|
28
|
-
function Ot() {
|
|
29
|
-
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
30
|
-
}
|
|
31
|
-
function Ct(e) {
|
|
32
|
-
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
33
|
-
}
|
|
34
|
-
function Dt() {
|
|
35
|
-
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
36
|
-
}
|
|
37
|
-
function Ft() {
|
|
38
|
-
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
39
|
-
}
|
|
40
|
-
function It() {
|
|
41
|
-
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
42
|
-
}
|
|
43
|
-
function Ve(e) {
|
|
44
|
-
return e === this.v;
|
|
45
|
-
}
|
|
46
|
-
function Mt(e, t) {
|
|
47
|
-
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
48
|
-
}
|
|
49
|
-
function jt(e) {
|
|
50
|
-
return !Mt(e, this.v);
|
|
51
|
-
}
|
|
52
|
-
let G = null;
|
|
53
|
-
function de(e) {
|
|
54
|
-
G = e;
|
|
55
|
-
}
|
|
56
|
-
function le() {
|
|
57
|
-
return !Re || G !== null && G.l === null;
|
|
58
|
-
}
|
|
59
|
-
let $ = [];
|
|
60
|
-
function qt() {
|
|
61
|
-
var e = $;
|
|
62
|
-
$ = [], At(e);
|
|
63
|
-
}
|
|
64
|
-
function Lt(e) {
|
|
65
|
-
if ($.length === 0) {
|
|
66
|
-
var t = $;
|
|
67
|
-
queueMicrotask(() => {
|
|
68
|
-
t === $ && qt();
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
$.push(e);
|
|
72
|
-
}
|
|
73
|
-
function Bt(e) {
|
|
74
|
-
var t = h;
|
|
75
|
-
if (t === null)
|
|
76
|
-
return d.f |= q, e;
|
|
77
|
-
if ((t.f & Ye) === 0) {
|
|
78
|
-
if ((t.f & Pe) === 0)
|
|
79
|
-
throw e;
|
|
80
|
-
t.b.error(e);
|
|
81
|
-
} else
|
|
82
|
-
he(e, t);
|
|
83
|
-
}
|
|
84
|
-
function he(e, t) {
|
|
85
|
-
for (; t !== null; ) {
|
|
86
|
-
if ((t.f & Pe) !== 0)
|
|
87
|
-
try {
|
|
88
|
-
t.b.error(e);
|
|
89
|
-
return;
|
|
90
|
-
} catch (n) {
|
|
91
|
-
e = n;
|
|
92
|
-
}
|
|
93
|
-
t = t.parent;
|
|
94
|
-
}
|
|
95
|
-
throw e;
|
|
96
|
-
}
|
|
97
|
-
const oe = /* @__PURE__ */ new Set();
|
|
98
|
-
let p = null, R = null, k = [], Oe = null, Se = !1;
|
|
99
|
-
class ne {
|
|
100
|
-
committed = !1;
|
|
101
|
-
/**
|
|
102
|
-
* The current values of any sources that are updated in this batch
|
|
103
|
-
* They keys of this map are identical to `this.#previous`
|
|
104
|
-
* @type {Map<Source, any>}
|
|
105
|
-
*/
|
|
106
|
-
current = /* @__PURE__ */ new Map();
|
|
107
|
-
/**
|
|
108
|
-
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
109
|
-
* They keys of this map are identical to `this.#current`
|
|
110
|
-
* @type {Map<Source, any>}
|
|
111
|
-
*/
|
|
112
|
-
previous = /* @__PURE__ */ new Map();
|
|
113
|
-
/**
|
|
114
|
-
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
115
|
-
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
116
|
-
* @type {Set<() => void>}
|
|
117
|
-
*/
|
|
118
|
-
#r = /* @__PURE__ */ new Set();
|
|
119
|
-
/**
|
|
120
|
-
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
121
|
-
* @type {Set<(batch: Batch) => void>}
|
|
122
|
-
*/
|
|
123
|
-
#f = /* @__PURE__ */ new Set();
|
|
124
|
-
/**
|
|
125
|
-
* The number of async effects that are currently in flight
|
|
126
|
-
*/
|
|
127
|
-
#e = 0;
|
|
128
|
-
/**
|
|
129
|
-
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
130
|
-
*/
|
|
131
|
-
#t = 0;
|
|
132
|
-
/**
|
|
133
|
-
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
134
|
-
* TODO replace with Promise.withResolvers once supported widely enough
|
|
135
|
-
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
136
|
-
*/
|
|
137
|
-
#s = null;
|
|
138
|
-
/**
|
|
139
|
-
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
140
|
-
* @type {Set<Effect>}
|
|
141
|
-
*/
|
|
142
|
-
#i = /* @__PURE__ */ new Set();
|
|
143
|
-
/**
|
|
144
|
-
* Deferred effects that are MAYBE_DIRTY
|
|
145
|
-
* @type {Set<Effect>}
|
|
146
|
-
*/
|
|
147
|
-
#l = /* @__PURE__ */ new Set();
|
|
148
|
-
/**
|
|
149
|
-
* A set of branches that still exist, but will be destroyed when this batch
|
|
150
|
-
* is committed — we skip over these during `process`
|
|
151
|
-
* @type {Set<Effect>}
|
|
152
|
-
*/
|
|
153
|
-
skipped_effects = /* @__PURE__ */ new Set();
|
|
154
|
-
is_fork = !1;
|
|
155
|
-
is_deferred() {
|
|
156
|
-
return this.is_fork || this.#t > 0;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
*
|
|
160
|
-
* @param {Effect[]} root_effects
|
|
161
|
-
*/
|
|
162
|
-
process(t) {
|
|
163
|
-
k = [], this.apply();
|
|
164
|
-
var n = {
|
|
165
|
-
parent: null,
|
|
166
|
-
effect: null,
|
|
167
|
-
effects: [],
|
|
168
|
-
render_effects: []
|
|
169
|
-
};
|
|
170
|
-
for (const r of t)
|
|
171
|
-
this.#u(r, n);
|
|
172
|
-
this.is_fork || this.#o(), this.is_deferred() ? (this.#n(n.effects), this.#n(n.render_effects)) : (p = null, je(n.render_effects), je(n.effects), this.#s?.resolve()), R = null;
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Traverse the effect tree, executing effects or stashing
|
|
176
|
-
* them for later execution as appropriate
|
|
177
|
-
* @param {Effect} root
|
|
178
|
-
* @param {EffectTarget} target
|
|
179
|
-
*/
|
|
180
|
-
#u(t, n) {
|
|
181
|
-
t.f ^= y;
|
|
182
|
-
for (var r = t.first; r !== null; ) {
|
|
183
|
-
var i = r.f, f = (i & (ie | ee)) !== 0, u = f && (i & y) !== 0, a = u || (i & Z) !== 0 || this.skipped_effects.has(r);
|
|
184
|
-
if ((r.f & Pe) !== 0 && r.b?.is_pending() && (n = {
|
|
185
|
-
parent: n,
|
|
186
|
-
effect: r,
|
|
187
|
-
effects: [],
|
|
188
|
-
render_effects: []
|
|
189
|
-
}), !a && r.fn !== null) {
|
|
190
|
-
f ? r.f ^= y : (i & Rt) !== 0 ? n.effects.push(r) : se(r) && ((r.f & H) !== 0 && this.#i.add(r), fe(r));
|
|
191
|
-
var s = r.first;
|
|
192
|
-
if (s !== null) {
|
|
193
|
-
r = s;
|
|
194
|
-
continue;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
var l = r.parent;
|
|
198
|
-
for (r = r.next; r === null && l !== null; )
|
|
199
|
-
l === n.effect && (this.#n(n.effects), this.#n(n.render_effects), n = /** @type {EffectTarget} */
|
|
200
|
-
n.parent), r = l.next, l = l.parent;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* @param {Effect[]} effects
|
|
205
|
-
*/
|
|
206
|
-
#n(t) {
|
|
207
|
-
for (const n of t)
|
|
208
|
-
(n.f & T) !== 0 ? this.#i.add(n) : (n.f & N) !== 0 && this.#l.add(n), this.#a(n.deps), b(n, y);
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* @param {Value[] | null} deps
|
|
212
|
-
*/
|
|
213
|
-
#a(t) {
|
|
214
|
-
if (t !== null)
|
|
215
|
-
for (const n of t)
|
|
216
|
-
(n.f & m) === 0 || (n.f & z) === 0 || (n.f ^= z, this.#a(
|
|
217
|
-
/** @type {Derived} */
|
|
218
|
-
n.deps
|
|
219
|
-
));
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Associate a change to a given source with the current
|
|
223
|
-
* batch, noting its previous and current values
|
|
224
|
-
* @param {Source} source
|
|
225
|
-
* @param {any} value
|
|
226
|
-
*/
|
|
227
|
-
capture(t, n) {
|
|
228
|
-
this.previous.has(t) || this.previous.set(t, n), (t.f & q) === 0 && (this.current.set(t, t.v), R?.set(t, t.v));
|
|
229
|
-
}
|
|
230
|
-
activate() {
|
|
231
|
-
p = this, this.apply();
|
|
232
|
-
}
|
|
233
|
-
deactivate() {
|
|
234
|
-
p === this && (p = null, R = null);
|
|
235
|
-
}
|
|
236
|
-
flush() {
|
|
237
|
-
if (this.activate(), k.length > 0) {
|
|
238
|
-
if (Ut(), p !== null && p !== this)
|
|
239
|
-
return;
|
|
240
|
-
} else this.#e === 0 && this.process([]);
|
|
241
|
-
this.deactivate();
|
|
242
|
-
}
|
|
243
|
-
discard() {
|
|
244
|
-
for (const t of this.#f) t(this);
|
|
245
|
-
this.#f.clear();
|
|
246
|
-
}
|
|
247
|
-
#o() {
|
|
248
|
-
if (this.#t === 0) {
|
|
249
|
-
for (const t of this.#r) t();
|
|
250
|
-
this.#r.clear();
|
|
251
|
-
}
|
|
252
|
-
this.#e === 0 && this.#c();
|
|
253
|
-
}
|
|
254
|
-
#c() {
|
|
255
|
-
if (oe.size > 1) {
|
|
256
|
-
this.previous.clear();
|
|
257
|
-
var t = R, n = !0, r = {
|
|
258
|
-
parent: null,
|
|
259
|
-
effect: null,
|
|
260
|
-
effects: [],
|
|
261
|
-
render_effects: []
|
|
262
|
-
};
|
|
263
|
-
for (const f of oe) {
|
|
264
|
-
if (f === this) {
|
|
265
|
-
n = !1;
|
|
266
|
-
continue;
|
|
267
|
-
}
|
|
268
|
-
const u = [];
|
|
269
|
-
for (const [s, l] of this.current) {
|
|
270
|
-
if (f.current.has(s))
|
|
271
|
-
if (n && l !== f.current.get(s))
|
|
272
|
-
f.current.set(s, l);
|
|
273
|
-
else
|
|
274
|
-
continue;
|
|
275
|
-
u.push(s);
|
|
276
|
-
}
|
|
277
|
-
if (u.length === 0)
|
|
278
|
-
continue;
|
|
279
|
-
const a = [...f.current.keys()].filter((s) => !this.current.has(s));
|
|
280
|
-
if (a.length > 0) {
|
|
281
|
-
var i = k;
|
|
282
|
-
k = [];
|
|
283
|
-
const s = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map();
|
|
284
|
-
for (const o of u)
|
|
285
|
-
ze(o, a, s, l);
|
|
286
|
-
if (k.length > 0) {
|
|
287
|
-
p = f, f.apply();
|
|
288
|
-
for (const o of k)
|
|
289
|
-
f.#u(o, r);
|
|
290
|
-
f.deactivate();
|
|
291
|
-
}
|
|
292
|
-
k = i;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
p = null, R = t;
|
|
296
|
-
}
|
|
297
|
-
this.committed = !0, oe.delete(this);
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
*
|
|
301
|
-
* @param {boolean} blocking
|
|
302
|
-
*/
|
|
303
|
-
increment(t) {
|
|
304
|
-
this.#e += 1, t && (this.#t += 1);
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
*
|
|
308
|
-
* @param {boolean} blocking
|
|
309
|
-
*/
|
|
310
|
-
decrement(t) {
|
|
311
|
-
this.#e -= 1, t && (this.#t -= 1), this.revive();
|
|
312
|
-
}
|
|
313
|
-
revive() {
|
|
314
|
-
for (const t of this.#i)
|
|
315
|
-
this.#l.delete(t), b(t, T), J(t);
|
|
316
|
-
for (const t of this.#l)
|
|
317
|
-
b(t, N), J(t);
|
|
318
|
-
this.flush();
|
|
319
|
-
}
|
|
320
|
-
/** @param {() => void} fn */
|
|
321
|
-
oncommit(t) {
|
|
322
|
-
this.#r.add(t);
|
|
323
|
-
}
|
|
324
|
-
/** @param {(batch: Batch) => void} fn */
|
|
325
|
-
ondiscard(t) {
|
|
326
|
-
this.#f.add(t);
|
|
327
|
-
}
|
|
328
|
-
settled() {
|
|
329
|
-
return (this.#s ??= Be()).promise;
|
|
330
|
-
}
|
|
331
|
-
static ensure() {
|
|
332
|
-
if (p === null) {
|
|
333
|
-
const t = p = new ne();
|
|
334
|
-
oe.add(p), ne.enqueue(() => {
|
|
335
|
-
p === t && t.flush();
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
return p;
|
|
339
|
-
}
|
|
340
|
-
/** @param {() => void} task */
|
|
341
|
-
static enqueue(t) {
|
|
342
|
-
Lt(t);
|
|
343
|
-
}
|
|
344
|
-
apply() {
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
function Ut() {
|
|
348
|
-
var e = K;
|
|
349
|
-
Se = !0;
|
|
350
|
-
var t = null;
|
|
351
|
-
try {
|
|
352
|
-
var n = 0;
|
|
353
|
-
for (me(!0); k.length > 0; ) {
|
|
354
|
-
var r = ne.ensure();
|
|
355
|
-
if (n++ > 1e3) {
|
|
356
|
-
var i, f;
|
|
357
|
-
Yt();
|
|
358
|
-
}
|
|
359
|
-
r.process(k), L.clear();
|
|
360
|
-
}
|
|
361
|
-
} finally {
|
|
362
|
-
Se = !1, me(e), Oe = null;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
function Yt() {
|
|
366
|
-
try {
|
|
367
|
-
Ot();
|
|
368
|
-
} catch (e) {
|
|
369
|
-
he(e, Oe);
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
let O = null;
|
|
373
|
-
function je(e) {
|
|
374
|
-
var t = e.length;
|
|
375
|
-
if (t !== 0) {
|
|
376
|
-
for (var n = 0; n < t; ) {
|
|
377
|
-
var r = e[n++];
|
|
378
|
-
if ((r.f & (C | Z)) === 0 && se(r) && (O = /* @__PURE__ */ new Set(), fe(r), r.deps === null && r.first === null && r.nodes === null && (r.teardown === null && r.ac === null ? ft(r) : r.fn = null), O?.size > 0)) {
|
|
379
|
-
L.clear();
|
|
380
|
-
for (const i of O) {
|
|
381
|
-
if ((i.f & (C | Z)) !== 0) continue;
|
|
382
|
-
const f = [i];
|
|
383
|
-
let u = i.parent;
|
|
384
|
-
for (; u !== null; )
|
|
385
|
-
O.has(u) && (O.delete(u), f.push(u)), u = u.parent;
|
|
386
|
-
for (let a = f.length - 1; a >= 0; a--) {
|
|
387
|
-
const s = f[a];
|
|
388
|
-
(s.f & (C | Z)) === 0 && fe(s);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
O.clear();
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
O = null;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
function ze(e, t, n, r) {
|
|
398
|
-
if (!n.has(e) && (n.add(e), e.reactions !== null))
|
|
399
|
-
for (const i of e.reactions) {
|
|
400
|
-
const f = i.f;
|
|
401
|
-
(f & m) !== 0 ? ze(
|
|
402
|
-
/** @type {Derived} */
|
|
403
|
-
i,
|
|
404
|
-
t,
|
|
405
|
-
n,
|
|
406
|
-
r
|
|
407
|
-
) : (f & (Ne | H)) !== 0 && (f & T) === 0 && Ge(i, t, r) && (b(i, T), J(
|
|
408
|
-
/** @type {Effect} */
|
|
409
|
-
i
|
|
410
|
-
));
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
function Ge(e, t, n) {
|
|
414
|
-
const r = n.get(e);
|
|
415
|
-
if (r !== void 0) return r;
|
|
416
|
-
if (e.deps !== null)
|
|
417
|
-
for (const i of e.deps) {
|
|
418
|
-
if (t.includes(i))
|
|
419
|
-
return !0;
|
|
420
|
-
if ((i.f & m) !== 0 && Ge(
|
|
421
|
-
/** @type {Derived} */
|
|
422
|
-
i,
|
|
423
|
-
t,
|
|
424
|
-
n
|
|
425
|
-
))
|
|
426
|
-
return n.set(
|
|
427
|
-
/** @type {Derived} */
|
|
428
|
-
i,
|
|
429
|
-
!0
|
|
430
|
-
), !0;
|
|
431
|
-
}
|
|
432
|
-
return n.set(e, !1), !1;
|
|
433
|
-
}
|
|
434
|
-
function J(e) {
|
|
435
|
-
for (var t = Oe = e; t.parent !== null; ) {
|
|
436
|
-
t = t.parent;
|
|
437
|
-
var n = t.f;
|
|
438
|
-
if (Se && t === h && (n & H) !== 0 && (n & Ke) === 0)
|
|
439
|
-
return;
|
|
440
|
-
if ((n & (ee | ie)) !== 0) {
|
|
441
|
-
if ((n & y) === 0) return;
|
|
442
|
-
t.f ^= y;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
k.push(t);
|
|
446
|
-
}
|
|
447
|
-
function Kt(e, t, n, r) {
|
|
448
|
-
const i = le() ? He : We;
|
|
449
|
-
if (n.length === 0 && e.length === 0) {
|
|
450
|
-
r(t.map(i));
|
|
451
|
-
return;
|
|
452
|
-
}
|
|
453
|
-
var f = p, u = (
|
|
454
|
-
/** @type {Effect} */
|
|
455
|
-
h
|
|
456
|
-
), a = Vt();
|
|
457
|
-
function s() {
|
|
458
|
-
Promise.all(n.map((l) => /* @__PURE__ */ zt(l))).then((l) => {
|
|
459
|
-
a();
|
|
460
|
-
try {
|
|
461
|
-
r([...t.map(i), ...l]);
|
|
462
|
-
} catch (o) {
|
|
463
|
-
(u.f & C) === 0 && he(o, u);
|
|
464
|
-
}
|
|
465
|
-
f?.deactivate(), pe();
|
|
466
|
-
}).catch((l) => {
|
|
467
|
-
he(l, u);
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
e.length > 0 ? Promise.all(e).then(() => {
|
|
471
|
-
a();
|
|
472
|
-
try {
|
|
473
|
-
return s();
|
|
474
|
-
} finally {
|
|
475
|
-
f?.deactivate(), pe();
|
|
476
|
-
}
|
|
477
|
-
}) : s();
|
|
478
|
-
}
|
|
479
|
-
function Vt() {
|
|
480
|
-
var e = h, t = d, n = G, r = p;
|
|
481
|
-
return function(f = !0) {
|
|
482
|
-
Q(e), B(t), de(n), f && r?.activate();
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
function pe() {
|
|
486
|
-
Q(null), B(null), de(null);
|
|
487
|
-
}
|
|
488
|
-
// @__NO_SIDE_EFFECTS__
|
|
489
|
-
function He(e) {
|
|
490
|
-
var t = m | T, n = d !== null && (d.f & m) !== 0 ? (
|
|
491
|
-
/** @type {Derived} */
|
|
492
|
-
d
|
|
493
|
-
) : null;
|
|
494
|
-
return h !== null && (h.f |= ke), {
|
|
495
|
-
ctx: G,
|
|
496
|
-
deps: null,
|
|
497
|
-
effects: null,
|
|
498
|
-
equals: Ve,
|
|
499
|
-
f: t,
|
|
500
|
-
fn: e,
|
|
501
|
-
reactions: null,
|
|
502
|
-
rv: 0,
|
|
503
|
-
v: (
|
|
504
|
-
/** @type {V} */
|
|
505
|
-
g
|
|
506
|
-
),
|
|
507
|
-
wv: 0,
|
|
508
|
-
parent: n ?? h,
|
|
509
|
-
ac: null
|
|
510
|
-
};
|
|
511
|
-
}
|
|
512
|
-
// @__NO_SIDE_EFFECTS__
|
|
513
|
-
function zt(e, t) {
|
|
514
|
-
let n = (
|
|
515
|
-
/** @type {Effect | null} */
|
|
516
|
-
h
|
|
517
|
-
);
|
|
518
|
-
n === null && Nt();
|
|
519
|
-
var r = (
|
|
520
|
-
/** @type {Boundary} */
|
|
521
|
-
n.b
|
|
522
|
-
), i = (
|
|
523
|
-
/** @type {Promise<V>} */
|
|
524
|
-
/** @type {unknown} */
|
|
525
|
-
void 0
|
|
526
|
-
), f = Je(
|
|
527
|
-
/** @type {V} */
|
|
528
|
-
g
|
|
529
|
-
), u = !d, a = /* @__PURE__ */ new Map();
|
|
530
|
-
return tn(() => {
|
|
531
|
-
var s = Be();
|
|
532
|
-
i = s.promise;
|
|
533
|
-
try {
|
|
534
|
-
Promise.resolve(e()).then(s.resolve, s.reject).then(() => {
|
|
535
|
-
l === p && l.committed && l.deactivate(), pe();
|
|
536
|
-
});
|
|
537
|
-
} catch (c) {
|
|
538
|
-
s.reject(c), pe();
|
|
539
|
-
}
|
|
540
|
-
var l = (
|
|
541
|
-
/** @type {Batch} */
|
|
542
|
-
p
|
|
543
|
-
);
|
|
544
|
-
if (u) {
|
|
545
|
-
var o = !r.is_pending();
|
|
546
|
-
r.update_pending_count(1), l.increment(o), a.get(l)?.reject(W), a.delete(l), a.set(l, s);
|
|
547
|
-
}
|
|
548
|
-
const _ = (c, v = void 0) => {
|
|
549
|
-
if (l.activate(), v)
|
|
550
|
-
v !== W && (f.f |= q, Ae(f, v));
|
|
551
|
-
else {
|
|
552
|
-
(f.f & q) !== 0 && (f.f ^= q), Ae(f, c);
|
|
553
|
-
for (const [x, U] of a) {
|
|
554
|
-
if (a.delete(x), x === l) break;
|
|
555
|
-
U.reject(W);
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
u && (r.update_pending_count(-1), l.decrement(o));
|
|
559
|
-
};
|
|
560
|
-
s.promise.then(_, (c) => _(null, c || "unknown"));
|
|
561
|
-
}), en(() => {
|
|
562
|
-
for (const s of a.values())
|
|
563
|
-
s.reject(W);
|
|
564
|
-
}), new Promise((s) => {
|
|
565
|
-
function l(o) {
|
|
566
|
-
function _() {
|
|
567
|
-
o === i ? s(f) : l(i);
|
|
568
|
-
}
|
|
569
|
-
o.then(_, _);
|
|
570
|
-
}
|
|
571
|
-
l(i);
|
|
572
|
-
});
|
|
573
|
-
}
|
|
574
|
-
// @__NO_SIDE_EFFECTS__
|
|
575
|
-
function We(e) {
|
|
576
|
-
const t = /* @__PURE__ */ He(e);
|
|
577
|
-
return t.equals = jt, t;
|
|
578
|
-
}
|
|
579
|
-
function $e(e) {
|
|
580
|
-
var t = e.effects;
|
|
581
|
-
if (t !== null) {
|
|
582
|
-
e.effects = null;
|
|
583
|
-
for (var n = 0; n < t.length; n += 1)
|
|
584
|
-
Ee(
|
|
585
|
-
/** @type {Effect} */
|
|
586
|
-
t[n]
|
|
587
|
-
);
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
function Gt(e) {
|
|
591
|
-
for (var t = e.parent; t !== null; ) {
|
|
592
|
-
if ((t.f & m) === 0)
|
|
593
|
-
return (t.f & C) === 0 ? (
|
|
594
|
-
/** @type {Effect} */
|
|
595
|
-
t
|
|
596
|
-
) : null;
|
|
597
|
-
t = t.parent;
|
|
598
|
-
}
|
|
599
|
-
return null;
|
|
600
|
-
}
|
|
601
|
-
function Ce(e) {
|
|
602
|
-
var t, n = h;
|
|
603
|
-
Q(Gt(e));
|
|
604
|
-
try {
|
|
605
|
-
e.f &= ~z, $e(e), t = ut(e);
|
|
606
|
-
} finally {
|
|
607
|
-
Q(n);
|
|
608
|
-
}
|
|
609
|
-
return t;
|
|
610
|
-
}
|
|
611
|
-
function Xe(e) {
|
|
612
|
-
var t = Ce(e);
|
|
613
|
-
if (e.equals(t) || (p?.is_fork || (e.v = t), e.wv = lt()), !te)
|
|
614
|
-
if (R !== null)
|
|
615
|
-
(we() || p?.is_fork) && R.set(e, t);
|
|
616
|
-
else {
|
|
617
|
-
var n = (e.f & P) === 0 ? N : y;
|
|
618
|
-
b(e, n);
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
let Te = /* @__PURE__ */ new Set();
|
|
622
|
-
const L = /* @__PURE__ */ new Map();
|
|
623
|
-
let Ze = !1;
|
|
624
|
-
function Je(e, t) {
|
|
625
|
-
var n = {
|
|
626
|
-
f: 0,
|
|
627
|
-
// TODO ideally we could skip this altogether, but it causes type errors
|
|
628
|
-
v: e,
|
|
629
|
-
reactions: null,
|
|
630
|
-
equals: Ve,
|
|
631
|
-
rv: 0,
|
|
632
|
-
wv: 0
|
|
633
|
-
};
|
|
634
|
-
return n;
|
|
635
|
-
}
|
|
636
|
-
// @__NO_SIDE_EFFECTS__
|
|
637
|
-
function I(e, t) {
|
|
638
|
-
const n = Je(e);
|
|
639
|
-
return ln(n), n;
|
|
640
|
-
}
|
|
641
|
-
function M(e, t, n = !1) {
|
|
642
|
-
d !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
643
|
-
// to ensure we error if state is set inside an inspect effect
|
|
644
|
-
(!Y || (d.f & Me) !== 0) && le() && (d.f & (m | H | Ne | Me)) !== 0 && !D?.includes(e) && It();
|
|
645
|
-
let r = n ? X(t) : t;
|
|
646
|
-
return Ae(e, r);
|
|
647
|
-
}
|
|
648
|
-
function Ae(e, t) {
|
|
649
|
-
if (!e.equals(t)) {
|
|
650
|
-
var n = e.v;
|
|
651
|
-
te ? L.set(e, t) : L.set(e, n), e.v = t;
|
|
652
|
-
var r = ne.ensure();
|
|
653
|
-
r.capture(e, n), (e.f & m) !== 0 && ((e.f & T) !== 0 && Ce(
|
|
654
|
-
/** @type {Derived} */
|
|
655
|
-
e
|
|
656
|
-
), b(e, (e.f & P) !== 0 ? y : N)), e.wv = lt(), Qe(e, T), le() && h !== null && (h.f & y) !== 0 && (h.f & (ie | ee)) === 0 && (A === null ? sn([e]) : A.push(e)), !r.is_fork && Te.size > 0 && !Ze && Ht();
|
|
657
|
-
}
|
|
658
|
-
return t;
|
|
659
|
-
}
|
|
660
|
-
function Ht() {
|
|
661
|
-
Ze = !1;
|
|
662
|
-
var e = K;
|
|
663
|
-
me(!0);
|
|
664
|
-
const t = Array.from(Te);
|
|
665
|
-
try {
|
|
666
|
-
for (const n of t)
|
|
667
|
-
(n.f & y) !== 0 && b(n, N), se(n) && fe(n);
|
|
668
|
-
} finally {
|
|
669
|
-
me(e);
|
|
670
|
-
}
|
|
671
|
-
Te.clear();
|
|
672
|
-
}
|
|
673
|
-
function ye(e) {
|
|
674
|
-
M(e, e.v + 1);
|
|
675
|
-
}
|
|
676
|
-
function Qe(e, t) {
|
|
677
|
-
var n = e.reactions;
|
|
678
|
-
if (n !== null)
|
|
679
|
-
for (var r = le(), i = n.length, f = 0; f < i; f++) {
|
|
680
|
-
var u = n[f], a = u.f;
|
|
681
|
-
if (!(!r && u === h)) {
|
|
682
|
-
var s = (a & T) === 0;
|
|
683
|
-
if (s && b(u, t), (a & m) !== 0) {
|
|
684
|
-
var l = (
|
|
685
|
-
/** @type {Derived} */
|
|
686
|
-
u
|
|
687
|
-
);
|
|
688
|
-
R?.delete(l), (a & z) === 0 && (a & P && (u.f |= z), Qe(l, N));
|
|
689
|
-
} else s && ((a & H) !== 0 && O !== null && O.add(
|
|
690
|
-
/** @type {Effect} */
|
|
691
|
-
u
|
|
692
|
-
), J(
|
|
693
|
-
/** @type {Effect} */
|
|
694
|
-
u
|
|
695
|
-
));
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
function X(e) {
|
|
700
|
-
if (typeof e != "object" || e === null || _e in e)
|
|
701
|
-
return e;
|
|
702
|
-
const t = Tt(e);
|
|
703
|
-
if (t !== xt && t !== St)
|
|
704
|
-
return e;
|
|
705
|
-
var n = /* @__PURE__ */ new Map(), r = yt(e), i = /* @__PURE__ */ I(0), f = V, u = (a) => {
|
|
706
|
-
if (V === f)
|
|
707
|
-
return a();
|
|
708
|
-
var s = d, l = V;
|
|
709
|
-
B(null), Le(f);
|
|
710
|
-
var o = a();
|
|
711
|
-
return B(s), Le(l), o;
|
|
712
|
-
};
|
|
713
|
-
return r && n.set("length", /* @__PURE__ */ I(
|
|
714
|
-
/** @type {any[]} */
|
|
715
|
-
e.length
|
|
716
|
-
)), new Proxy(
|
|
717
|
-
/** @type {any} */
|
|
718
|
-
e,
|
|
719
|
-
{
|
|
720
|
-
defineProperty(a, s, l) {
|
|
721
|
-
(!("value" in l) || l.configurable === !1 || l.enumerable === !1 || l.writable === !1) && Dt();
|
|
722
|
-
var o = n.get(s);
|
|
723
|
-
return o === void 0 ? o = u(() => {
|
|
724
|
-
var _ = /* @__PURE__ */ I(l.value);
|
|
725
|
-
return n.set(s, _), _;
|
|
726
|
-
}) : M(o, l.value, !0), !0;
|
|
727
|
-
},
|
|
728
|
-
deleteProperty(a, s) {
|
|
729
|
-
var l = n.get(s);
|
|
730
|
-
if (l === void 0) {
|
|
731
|
-
if (s in a) {
|
|
732
|
-
const o = u(() => /* @__PURE__ */ I(g));
|
|
733
|
-
n.set(s, o), ye(i);
|
|
734
|
-
}
|
|
735
|
-
} else
|
|
736
|
-
M(l, g), ye(i);
|
|
737
|
-
return !0;
|
|
738
|
-
},
|
|
739
|
-
get(a, s, l) {
|
|
740
|
-
if (s === _e)
|
|
741
|
-
return e;
|
|
742
|
-
var o = n.get(s), _ = s in a;
|
|
743
|
-
if (o === void 0 && (!_ || ve(a, s)?.writable) && (o = u(() => {
|
|
744
|
-
var v = X(_ ? a[s] : g), x = /* @__PURE__ */ I(v);
|
|
745
|
-
return x;
|
|
746
|
-
}), n.set(s, o)), o !== void 0) {
|
|
747
|
-
var c = j(o);
|
|
748
|
-
return c === g ? void 0 : c;
|
|
749
|
-
}
|
|
750
|
-
return Reflect.get(a, s, l);
|
|
751
|
-
},
|
|
752
|
-
getOwnPropertyDescriptor(a, s) {
|
|
753
|
-
var l = Reflect.getOwnPropertyDescriptor(a, s);
|
|
754
|
-
if (l && "value" in l) {
|
|
755
|
-
var o = n.get(s);
|
|
756
|
-
o && (l.value = j(o));
|
|
757
|
-
} else if (l === void 0) {
|
|
758
|
-
var _ = n.get(s), c = _?.v;
|
|
759
|
-
if (_ !== void 0 && c !== g)
|
|
760
|
-
return {
|
|
761
|
-
enumerable: !0,
|
|
762
|
-
configurable: !0,
|
|
763
|
-
value: c,
|
|
764
|
-
writable: !0
|
|
765
|
-
};
|
|
766
|
-
}
|
|
767
|
-
return l;
|
|
768
|
-
},
|
|
769
|
-
has(a, s) {
|
|
770
|
-
if (s === _e)
|
|
771
|
-
return !0;
|
|
772
|
-
var l = n.get(s), o = l !== void 0 && l.v !== g || Reflect.has(a, s);
|
|
773
|
-
if (l !== void 0 || h !== null && (!o || ve(a, s)?.writable)) {
|
|
774
|
-
l === void 0 && (l = u(() => {
|
|
775
|
-
var c = o ? X(a[s]) : g, v = /* @__PURE__ */ I(c);
|
|
776
|
-
return v;
|
|
777
|
-
}), n.set(s, l));
|
|
778
|
-
var _ = j(l);
|
|
779
|
-
if (_ === g)
|
|
780
|
-
return !1;
|
|
781
|
-
}
|
|
782
|
-
return o;
|
|
783
|
-
},
|
|
784
|
-
set(a, s, l, o) {
|
|
785
|
-
var _ = n.get(s), c = s in a;
|
|
786
|
-
if (r && s === "length")
|
|
787
|
-
for (var v = l; v < /** @type {Source<number>} */
|
|
788
|
-
_.v; v += 1) {
|
|
789
|
-
var x = n.get(v + "");
|
|
790
|
-
x !== void 0 ? M(x, g) : v in a && (x = u(() => /* @__PURE__ */ I(g)), n.set(v + "", x));
|
|
791
|
-
}
|
|
792
|
-
if (_ === void 0)
|
|
793
|
-
(!c || ve(a, s)?.writable) && (_ = u(() => /* @__PURE__ */ I(void 0)), M(_, X(l)), n.set(s, _));
|
|
794
|
-
else {
|
|
795
|
-
c = _.v !== g;
|
|
796
|
-
var U = u(() => X(l));
|
|
797
|
-
M(_, U);
|
|
798
|
-
}
|
|
799
|
-
var F = Reflect.getOwnPropertyDescriptor(a, s);
|
|
800
|
-
if (F?.set && F.set.call(o, l), !c) {
|
|
801
|
-
if (r && typeof s == "string") {
|
|
802
|
-
var ue = (
|
|
803
|
-
/** @type {Source<number>} */
|
|
804
|
-
n.get("length")
|
|
805
|
-
), w = Number(s);
|
|
806
|
-
Number.isInteger(w) && w >= ue.v && M(ue, w + 1);
|
|
807
|
-
}
|
|
808
|
-
ye(i);
|
|
809
|
-
}
|
|
810
|
-
return !0;
|
|
811
|
-
},
|
|
812
|
-
ownKeys(a) {
|
|
813
|
-
j(i);
|
|
814
|
-
var s = Reflect.ownKeys(a).filter((_) => {
|
|
815
|
-
var c = n.get(_);
|
|
816
|
-
return c === void 0 || c.v !== g;
|
|
817
|
-
});
|
|
818
|
-
for (var [l, o] of n)
|
|
819
|
-
o.v !== g && !(l in a) && s.push(l);
|
|
820
|
-
return s;
|
|
821
|
-
},
|
|
822
|
-
setPrototypeOf() {
|
|
823
|
-
Ft();
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
);
|
|
827
|
-
}
|
|
828
|
-
var Wt, $t, Xt;
|
|
829
|
-
// @__NO_SIDE_EFFECTS__
|
|
830
|
-
function et(e) {
|
|
831
|
-
return (
|
|
832
|
-
/** @type {TemplateNode | null} */
|
|
833
|
-
$t.call(e)
|
|
834
|
-
);
|
|
835
|
-
}
|
|
836
|
-
// @__NO_SIDE_EFFECTS__
|
|
837
|
-
function Zt(e) {
|
|
838
|
-
return (
|
|
839
|
-
/** @type {TemplateNode | null} */
|
|
840
|
-
Xt.call(e)
|
|
841
|
-
);
|
|
842
|
-
}
|
|
843
|
-
function Jt(e, t) {
|
|
844
|
-
return /* @__PURE__ */ et(e);
|
|
845
|
-
}
|
|
846
|
-
function tt(e) {
|
|
847
|
-
var t = d, n = h;
|
|
848
|
-
B(null), Q(null);
|
|
849
|
-
try {
|
|
850
|
-
return e();
|
|
851
|
-
} finally {
|
|
852
|
-
B(t), Q(n);
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
function Qt(e, t) {
|
|
856
|
-
var n = t.last;
|
|
857
|
-
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
858
|
-
}
|
|
859
|
-
function De(e, t, n) {
|
|
860
|
-
var r = h;
|
|
861
|
-
r !== null && (r.f & Z) !== 0 && (e |= Z);
|
|
862
|
-
var i = {
|
|
863
|
-
ctx: G,
|
|
864
|
-
deps: null,
|
|
865
|
-
nodes: null,
|
|
866
|
-
f: e | T | P,
|
|
867
|
-
first: null,
|
|
868
|
-
fn: t,
|
|
869
|
-
last: null,
|
|
870
|
-
next: null,
|
|
871
|
-
parent: r,
|
|
872
|
-
b: r && r.b,
|
|
873
|
-
prev: null,
|
|
874
|
-
teardown: null,
|
|
875
|
-
wv: 0,
|
|
876
|
-
ac: null
|
|
877
|
-
};
|
|
878
|
-
if (n)
|
|
879
|
-
try {
|
|
880
|
-
fe(i), i.f |= Ye;
|
|
881
|
-
} catch (a) {
|
|
882
|
-
throw Ee(i), a;
|
|
883
|
-
}
|
|
884
|
-
else t !== null && J(i);
|
|
885
|
-
var f = i;
|
|
886
|
-
if (n && f.deps === null && f.teardown === null && f.nodes === null && f.first === f.last && // either `null`, or a singular child
|
|
887
|
-
(f.f & ke) === 0 && (f = f.first, (e & H) !== 0 && (e & Ie) !== 0 && f !== null && (f.f |= Ie)), f !== null && (f.parent = r, r !== null && Qt(f, r), d !== null && (d.f & m) !== 0 && (e & ee) === 0)) {
|
|
888
|
-
var u = (
|
|
889
|
-
/** @type {Derived} */
|
|
890
|
-
d
|
|
891
|
-
);
|
|
892
|
-
(u.effects ??= []).push(f);
|
|
893
|
-
}
|
|
894
|
-
return i;
|
|
895
|
-
}
|
|
896
|
-
function we() {
|
|
897
|
-
return d !== null && !Y;
|
|
898
|
-
}
|
|
899
|
-
function en(e) {
|
|
900
|
-
const t = De(Ue, null, !1);
|
|
901
|
-
return b(t, y), t.teardown = e, t;
|
|
902
|
-
}
|
|
903
|
-
function tn(e) {
|
|
904
|
-
return De(Ne | ke, e, !0);
|
|
905
|
-
}
|
|
906
|
-
function nn(e, t = [], n = [], r = []) {
|
|
907
|
-
Kt(r, t, n, (i) => {
|
|
908
|
-
De(Ue, () => e(...i.map(j)), !0);
|
|
909
|
-
});
|
|
910
|
-
}
|
|
911
|
-
function nt(e) {
|
|
912
|
-
var t = e.teardown;
|
|
913
|
-
if (t !== null) {
|
|
914
|
-
const n = te, r = d;
|
|
915
|
-
qe(!0), B(null);
|
|
916
|
-
try {
|
|
917
|
-
t.call(null);
|
|
918
|
-
} finally {
|
|
919
|
-
qe(n), B(r);
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
function rt(e, t = !1) {
|
|
924
|
-
var n = e.first;
|
|
925
|
-
for (e.first = e.last = null; n !== null; ) {
|
|
926
|
-
const i = n.ac;
|
|
927
|
-
i !== null && tt(() => {
|
|
928
|
-
i.abort(W);
|
|
929
|
-
});
|
|
930
|
-
var r = n.next;
|
|
931
|
-
(n.f & ee) !== 0 ? n.parent = null : Ee(n, t), n = r;
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
function rn(e) {
|
|
935
|
-
for (var t = e.first; t !== null; ) {
|
|
936
|
-
var n = t.next;
|
|
937
|
-
(t.f & ie) === 0 && Ee(t), t = n;
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
function Ee(e, t = !0) {
|
|
941
|
-
var n = !1;
|
|
942
|
-
(t || (e.f & Ke) !== 0) && e.nodes !== null && e.nodes.end !== null && (fn(
|
|
943
|
-
e.nodes.start,
|
|
944
|
-
/** @type {TemplateNode} */
|
|
945
|
-
e.nodes.end
|
|
946
|
-
), n = !0), rt(e, t && !n), ge(e, 0), b(e, C);
|
|
947
|
-
var r = e.nodes && e.nodes.t;
|
|
948
|
-
if (r !== null)
|
|
949
|
-
for (const f of r)
|
|
950
|
-
f.stop();
|
|
951
|
-
nt(e);
|
|
952
|
-
var i = e.parent;
|
|
953
|
-
i !== null && i.first !== null && ft(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
|
|
954
|
-
}
|
|
955
|
-
function fn(e, t) {
|
|
956
|
-
for (; e !== null; ) {
|
|
957
|
-
var n = e === t ? null : /* @__PURE__ */ Zt(e);
|
|
958
|
-
e.remove(), e = n;
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
function ft(e) {
|
|
962
|
-
var t = e.parent, n = e.prev, r = e.next;
|
|
963
|
-
n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
|
|
964
|
-
}
|
|
965
|
-
let K = !1;
|
|
966
|
-
function me(e) {
|
|
967
|
-
K = e;
|
|
968
|
-
}
|
|
969
|
-
let te = !1;
|
|
970
|
-
function qe(e) {
|
|
971
|
-
te = e;
|
|
972
|
-
}
|
|
973
|
-
let d = null, Y = !1;
|
|
974
|
-
function B(e) {
|
|
975
|
-
d = e;
|
|
976
|
-
}
|
|
977
|
-
let h = null;
|
|
978
|
-
function Q(e) {
|
|
979
|
-
h = e;
|
|
980
|
-
}
|
|
981
|
-
let D = null;
|
|
982
|
-
function ln(e) {
|
|
983
|
-
d !== null && (D === null ? D = [e] : D.push(e));
|
|
984
|
-
}
|
|
985
|
-
let E = null, S = 0, A = null;
|
|
986
|
-
function sn(e) {
|
|
987
|
-
A = e;
|
|
988
|
-
}
|
|
989
|
-
let it = 1, re = 0, V = re;
|
|
990
|
-
function Le(e) {
|
|
991
|
-
V = e;
|
|
992
|
-
}
|
|
993
|
-
function lt() {
|
|
994
|
-
return ++it;
|
|
995
|
-
}
|
|
996
|
-
function se(e) {
|
|
997
|
-
var t = e.f;
|
|
998
|
-
if ((t & T) !== 0)
|
|
999
|
-
return !0;
|
|
1000
|
-
if (t & m && (e.f &= ~z), (t & N) !== 0) {
|
|
1001
|
-
var n = e.deps;
|
|
1002
|
-
if (n !== null)
|
|
1003
|
-
for (var r = n.length, i = 0; i < r; i++) {
|
|
1004
|
-
var f = n[i];
|
|
1005
|
-
if (se(
|
|
1006
|
-
/** @type {Derived} */
|
|
1007
|
-
f
|
|
1008
|
-
) && Xe(
|
|
1009
|
-
/** @type {Derived} */
|
|
1010
|
-
f
|
|
1011
|
-
), f.wv > e.wv)
|
|
1012
|
-
return !0;
|
|
1013
|
-
}
|
|
1014
|
-
(t & P) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1015
|
-
// traversal of the graph in the other batches still happens
|
|
1016
|
-
R === null && b(e, y);
|
|
1017
|
-
}
|
|
1018
|
-
return !1;
|
|
1019
|
-
}
|
|
1020
|
-
function st(e, t, n = !0) {
|
|
1021
|
-
var r = e.reactions;
|
|
1022
|
-
if (r !== null && !D?.includes(e))
|
|
1023
|
-
for (var i = 0; i < r.length; i++) {
|
|
1024
|
-
var f = r[i];
|
|
1025
|
-
(f.f & m) !== 0 ? st(
|
|
1026
|
-
/** @type {Derived} */
|
|
1027
|
-
f,
|
|
1028
|
-
t,
|
|
1029
|
-
!1
|
|
1030
|
-
) : t === f && (n ? b(f, T) : (f.f & y) !== 0 && b(f, N), J(
|
|
1031
|
-
/** @type {Effect} */
|
|
1032
|
-
f
|
|
1033
|
-
));
|
|
1034
|
-
}
|
|
1035
|
-
}
|
|
1036
|
-
function ut(e) {
|
|
1037
|
-
var t = E, n = S, r = A, i = d, f = D, u = G, a = Y, s = V, l = e.f;
|
|
1038
|
-
E = /** @type {null | Value[]} */
|
|
1039
|
-
null, S = 0, A = null, d = (l & (ie | ee)) === 0 ? e : null, D = null, de(e.ctx), Y = !1, V = ++re, e.ac !== null && (tt(() => {
|
|
1040
|
-
e.ac.abort(W);
|
|
1041
|
-
}), e.ac = null);
|
|
1042
|
-
try {
|
|
1043
|
-
e.f |= xe;
|
|
1044
|
-
var o = (
|
|
1045
|
-
/** @type {Function} */
|
|
1046
|
-
e.fn
|
|
1047
|
-
), _ = o(), c = e.deps;
|
|
1048
|
-
if (E !== null) {
|
|
1049
|
-
var v;
|
|
1050
|
-
if (ge(e, S), c !== null && S > 0)
|
|
1051
|
-
for (c.length = S + E.length, v = 0; v < E.length; v++)
|
|
1052
|
-
c[S + v] = E[v];
|
|
1053
|
-
else
|
|
1054
|
-
e.deps = c = E;
|
|
1055
|
-
if (we() && (e.f & P) !== 0)
|
|
1056
|
-
for (v = S; v < c.length; v++)
|
|
1057
|
-
(c[v].reactions ??= []).push(e);
|
|
1058
|
-
} else c !== null && S < c.length && (ge(e, S), c.length = S);
|
|
1059
|
-
if (le() && A !== null && !Y && c !== null && (e.f & (m | N | T)) === 0)
|
|
1060
|
-
for (v = 0; v < /** @type {Source[]} */
|
|
1061
|
-
A.length; v++)
|
|
1062
|
-
st(
|
|
1063
|
-
A[v],
|
|
1064
|
-
/** @type {Effect} */
|
|
1065
|
-
e
|
|
1066
|
-
);
|
|
1067
|
-
return i !== null && i !== e && (re++, A !== null && (r === null ? r = A : r.push(.../** @type {Source[]} */
|
|
1068
|
-
A))), (e.f & q) !== 0 && (e.f ^= q), _;
|
|
1069
|
-
} catch (x) {
|
|
1070
|
-
return Bt(x);
|
|
1071
|
-
} finally {
|
|
1072
|
-
e.f ^= xe, E = t, S = n, A = r, d = i, D = f, de(u), Y = a, V = s;
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
function un(e, t) {
|
|
1076
|
-
let n = t.reactions;
|
|
1077
|
-
if (n !== null) {
|
|
1078
|
-
var r = bt.call(n, e);
|
|
1079
|
-
if (r !== -1) {
|
|
1080
|
-
var i = n.length - 1;
|
|
1081
|
-
i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
n === null && (t.f & m) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1085
|
-
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1086
|
-
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1087
|
-
(E === null || !E.includes(t)) && (b(t, N), (t.f & P) !== 0 && (t.f ^= P, t.f &= ~z), $e(
|
|
1088
|
-
/** @type {Derived} **/
|
|
1089
|
-
t
|
|
1090
|
-
), ge(
|
|
1091
|
-
/** @type {Derived} **/
|
|
1092
|
-
t,
|
|
1093
|
-
0
|
|
1094
|
-
));
|
|
1095
|
-
}
|
|
1096
|
-
function ge(e, t) {
|
|
1097
|
-
var n = e.deps;
|
|
1098
|
-
if (n !== null)
|
|
1099
|
-
for (var r = t; r < n.length; r++)
|
|
1100
|
-
un(e, n[r]);
|
|
1101
|
-
}
|
|
1102
|
-
function fe(e) {
|
|
1103
|
-
var t = e.f;
|
|
1104
|
-
if ((t & C) === 0) {
|
|
1105
|
-
b(e, y);
|
|
1106
|
-
var n = h, r = K;
|
|
1107
|
-
h = e, K = !0;
|
|
1108
|
-
try {
|
|
1109
|
-
(t & (H | Pt)) !== 0 ? rn(e) : rt(e), nt(e);
|
|
1110
|
-
var i = ut(e);
|
|
1111
|
-
e.teardown = typeof i == "function" ? i : null, e.wv = it;
|
|
1112
|
-
var f;
|
|
1113
|
-
be && ht && (e.f & T) !== 0 && e.deps;
|
|
1114
|
-
} finally {
|
|
1115
|
-
K = r, h = n;
|
|
1116
|
-
}
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
function j(e) {
|
|
1120
|
-
var t = e.f, n = (t & m) !== 0;
|
|
1121
|
-
if (d !== null && !Y) {
|
|
1122
|
-
var r = h !== null && (h.f & C) !== 0;
|
|
1123
|
-
if (!r && !D?.includes(e)) {
|
|
1124
|
-
var i = d.deps;
|
|
1125
|
-
if ((d.f & xe) !== 0)
|
|
1126
|
-
e.rv < re && (e.rv = re, E === null && i !== null && i[S] === e ? S++ : E === null ? E = [e] : E.includes(e) || E.push(e));
|
|
1127
|
-
else {
|
|
1128
|
-
(d.deps ??= []).push(e);
|
|
1129
|
-
var f = e.reactions;
|
|
1130
|
-
f === null ? e.reactions = [d] : f.includes(d) || f.push(d);
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
}
|
|
1134
|
-
if (te) {
|
|
1135
|
-
if (L.has(e))
|
|
1136
|
-
return L.get(e);
|
|
1137
|
-
if (n) {
|
|
1138
|
-
var u = (
|
|
1139
|
-
/** @type {Derived} */
|
|
1140
|
-
e
|
|
1141
|
-
), a = u.v;
|
|
1142
|
-
return ((u.f & y) === 0 && u.reactions !== null || ot(u)) && (a = Ce(u)), L.set(u, a), a;
|
|
1143
|
-
}
|
|
1144
|
-
} else n && (!R?.has(e) || p?.is_fork && !we()) && (u = /** @type {Derived} */
|
|
1145
|
-
e, se(u) && Xe(u), K && we() && (u.f & P) === 0 && at(u));
|
|
1146
|
-
if (R?.has(e))
|
|
1147
|
-
return R.get(e);
|
|
1148
|
-
if ((e.f & q) !== 0)
|
|
1149
|
-
throw e.v;
|
|
1150
|
-
return e.v;
|
|
1151
|
-
}
|
|
1152
|
-
function at(e) {
|
|
1153
|
-
if (e.deps !== null) {
|
|
1154
|
-
e.f ^= P;
|
|
1155
|
-
for (const t of e.deps)
|
|
1156
|
-
(t.reactions ??= []).push(e), (t.f & m) !== 0 && (t.f & P) === 0 && at(
|
|
1157
|
-
/** @type {Derived} */
|
|
1158
|
-
t
|
|
1159
|
-
);
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
function ot(e) {
|
|
1163
|
-
if (e.v === g) return !0;
|
|
1164
|
-
if (e.deps === null) return !1;
|
|
1165
|
-
for (const t of e.deps)
|
|
1166
|
-
if (L.has(t) || (t.f & m) !== 0 && ot(
|
|
1167
|
-
/** @type {Derived} */
|
|
1168
|
-
t
|
|
1169
|
-
))
|
|
1170
|
-
return !0;
|
|
1171
|
-
return !1;
|
|
1172
|
-
}
|
|
1173
|
-
const an = -7169;
|
|
1174
|
-
function b(e, t) {
|
|
1175
|
-
e.f = e.f & an | t;
|
|
1176
|
-
}
|
|
1177
|
-
function on(e) {
|
|
1178
|
-
var t = document.createElement("template");
|
|
1179
|
-
return t.innerHTML = e.replaceAll("<!>", "<!---->"), t.content;
|
|
1180
|
-
}
|
|
1181
|
-
function cn(e, t) {
|
|
1182
|
-
var n = (
|
|
1183
|
-
/** @type {Effect} */
|
|
1184
|
-
h
|
|
1185
|
-
);
|
|
1186
|
-
n.nodes === null && (n.nodes = { start: e, end: t, a: null, t: null });
|
|
1187
|
-
}
|
|
1188
|
-
// @__NO_SIDE_EFFECTS__
|
|
1189
|
-
function vn(e, t) {
|
|
1190
|
-
var n = (t & Et) !== 0, r, i = !e.startsWith("<!>");
|
|
1191
|
-
return () => {
|
|
1192
|
-
r === void 0 && (r = on(i ? e : "<!>" + e), r = /** @type {TemplateNode} */
|
|
1193
|
-
/* @__PURE__ */ et(r));
|
|
1194
|
-
var f = (
|
|
1195
|
-
/** @type {TemplateNode} */
|
|
1196
|
-
n || Wt ? document.importNode(r, !0) : r.cloneNode(!0)
|
|
1197
|
-
);
|
|
1198
|
-
return cn(f, f), f;
|
|
1199
|
-
};
|
|
1200
|
-
}
|
|
1201
|
-
function _n(e, t) {
|
|
1202
|
-
e !== null && e.before(
|
|
1203
|
-
/** @type {Node} */
|
|
1204
|
-
t
|
|
1205
|
-
);
|
|
1206
|
-
}
|
|
1207
|
-
function dn(e, t, n, r, i) {
|
|
1208
|
-
var f = t.$$slots?.[n], u = !1;
|
|
1209
|
-
f === !0 && (f = t.children, u = !0), f === void 0 || f(e, u ? () => r : r);
|
|
1210
|
-
}
|
|
1211
|
-
function hn(e, t, n) {
|
|
1212
|
-
var r = e == null ? "" : "" + e;
|
|
1213
|
-
return r = r ? r + " " + t : t, r === "" ? null : r;
|
|
1214
|
-
}
|
|
1215
|
-
function pn(e, t, n, r, i, f) {
|
|
1216
|
-
var u = e.__className;
|
|
1217
|
-
if (u !== n || u === void 0) {
|
|
1218
|
-
var a = hn(n, r);
|
|
1219
|
-
a == null ? e.removeAttribute("class") : e.className = a, e.__className = n;
|
|
1220
|
-
}
|
|
1221
|
-
return f;
|
|
1222
|
-
}
|
|
1223
|
-
let ce = !1;
|
|
1224
|
-
function wn(e) {
|
|
1225
|
-
var t = ce;
|
|
1226
|
-
try {
|
|
1227
|
-
return ce = !1, [e(), ce];
|
|
1228
|
-
} finally {
|
|
1229
|
-
ce = t;
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
function mn(e, t, n, r) {
|
|
1233
|
-
var i = !Re || (n & wt) !== 0, f = (n & gt) !== 0, u = (
|
|
1234
|
-
/** @type {V} */
|
|
1235
|
-
r
|
|
1236
|
-
), a = !0, s = () => (a && (a = !1, u = /** @type {V} */
|
|
1237
|
-
r), u), l;
|
|
1238
|
-
{
|
|
1239
|
-
var o = _e in e || kt in e;
|
|
1240
|
-
l = ve(e, t)?.set ?? (o && t in e ? (w) => e[t] = w : void 0);
|
|
1241
|
-
}
|
|
1242
|
-
var _, c = !1;
|
|
1243
|
-
[_, c] = wn(() => (
|
|
1244
|
-
/** @type {V} */
|
|
1245
|
-
e[t]
|
|
1246
|
-
)), _ === void 0 && r !== void 0 && (_ = s(), l && (i && Ct(), l(_)));
|
|
1247
|
-
var v;
|
|
1248
|
-
if (i ? v = () => {
|
|
1249
|
-
var w = (
|
|
1250
|
-
/** @type {V} */
|
|
1251
|
-
e[t]
|
|
1252
|
-
);
|
|
1253
|
-
return w === void 0 ? s() : (a = !0, w);
|
|
1254
|
-
} : v = () => {
|
|
1255
|
-
var w = (
|
|
1256
|
-
/** @type {V} */
|
|
1257
|
-
e[t]
|
|
1258
|
-
);
|
|
1259
|
-
return w !== void 0 && (u = /** @type {V} */
|
|
1260
|
-
void 0), w === void 0 ? u : w;
|
|
1261
|
-
}, i && (n & mt) === 0)
|
|
1262
|
-
return v;
|
|
1263
|
-
if (l) {
|
|
1264
|
-
var x = e.$$legacy;
|
|
1265
|
-
return (
|
|
1266
|
-
/** @type {() => V} */
|
|
1267
|
-
(function(w, ae) {
|
|
1268
|
-
return arguments.length > 0 ? ((!i || !ae || x || c) && l(ae ? v() : w), w) : v();
|
|
1269
|
-
})
|
|
1270
|
-
);
|
|
1271
|
-
}
|
|
1272
|
-
var U = !1, F = /* @__PURE__ */ We(() => (U = !1, v()));
|
|
1273
|
-
j(F);
|
|
1274
|
-
var ue = (
|
|
1275
|
-
/** @type {Effect} */
|
|
1276
|
-
h
|
|
1277
|
-
);
|
|
1278
|
-
return (
|
|
1279
|
-
/** @type {() => V} */
|
|
1280
|
-
(function(w, ae) {
|
|
1281
|
-
if (arguments.length > 0) {
|
|
1282
|
-
const Fe = ae ? j(F) : i && f ? X(w) : w;
|
|
1283
|
-
return M(F, Fe), U = !0, u !== void 0 && (u = Fe), w;
|
|
1284
|
-
}
|
|
1285
|
-
return te && U || (ue.f & C) !== 0 ? F.v : j(F);
|
|
1286
|
-
})
|
|
1287
|
-
);
|
|
1288
|
-
}
|
|
1289
|
-
var gn = /* @__PURE__ */ vn("<button><!></button>");
|
|
1290
|
-
function bn(e, t) {
|
|
1291
|
-
let n = mn(t, "variant", 8, "primary");
|
|
1292
|
-
var r = gn(), i = Jt(r);
|
|
1293
|
-
dn(i, t, "default", {}), nn(() => pn(r, 1, `btn ${n() ?? ""}`, "svelte-1klcfz0")), _n(e, r);
|
|
1294
|
-
}
|
|
1295
|
-
const ct = /* @__PURE__ */ Symbol();
|
|
1296
|
-
function xn(e) {
|
|
1297
|
-
vt(ct, e);
|
|
1298
|
-
}
|
|
1299
|
-
function Sn() {
|
|
1300
|
-
return _t(ct);
|
|
1301
|
-
}
|
|
1302
|
-
export {
|
|
1303
|
-
ct as PANO_CTX,
|
|
1304
|
-
bn as PanoTestButton,
|
|
1305
|
-
xn as setPanoContext,
|
|
1306
|
-
Sn as usePano
|
|
1307
|
-
};
|
package/dist/sdk.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.btn.svelte-1klcfz0{padding:8px 12px}
|