@graffiti-garden/wrapper-vue 1.1.0 → 1.1.1
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/browser/plugin.mjs +517 -512
- package/dist/browser/plugin.mjs.map +1 -1
- package/dist/node/composables/discover.d.ts.map +1 -1
- package/dist/node/composables/get-media.d.ts.map +1 -1
- package/dist/node/composables/get.d.ts.map +1 -1
- package/dist/node/composables/resolve-string.d.ts +1 -1
- package/dist/node/composables/resolve-string.d.ts.map +1 -1
- package/dist/node/plugin.js +1 -1
- package/dist/node/plugin.js.map +1 -1
- package/dist/node/plugin.mjs +340 -335
- package/dist/node/plugin.mjs.map +1 -1
- package/package.json +6 -5
- package/src/composables/discover.ts +6 -5
- package/src/composables/get-media.ts +8 -5
- package/src/composables/get.ts +6 -2
- package/src/composables/resolve-string.ts +5 -1
package/dist/browser/plugin.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as E, onScopeDispose as Pe, watch as W, toValue as j, defineComponent as C, toRef as k, renderSlot as X, unref as v, createElementVNode as y, toDisplayString as S, createElementBlock as g, openBlock as w, createCommentVNode as xe, createTextVNode as $e, createVNode as L, Fragment as be, renderList as ge } from "vue";
|
|
2
2
|
class T extends Error {
|
|
3
3
|
constructor(n) {
|
|
4
4
|
super(n), this.name = "GraffitiErrorNotFound", Object.setPrototypeOf(this, T.prototype);
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
class
|
|
7
|
+
class je extends Error {
|
|
8
8
|
constructor(n) {
|
|
9
|
-
super(n), this.name = "GraffitiErrorInvalidSchema", Object.setPrototypeOf(this,
|
|
9
|
+
super(n), this.name = "GraffitiErrorInvalidSchema", Object.setPrototypeOf(this, je.prototype);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
class
|
|
12
|
+
class ke extends Error {
|
|
13
13
|
constructor(n) {
|
|
14
|
-
super(n), this.name = "GraffitiErrorCursorExpired", Object.setPrototypeOf(this,
|
|
14
|
+
super(n), this.name = "GraffitiErrorCursorExpired", Object.setPrototypeOf(this, ke.prototype);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function me(e) {
|
|
18
18
|
return typeof e == "string" ? e : e.url;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function Qe(e, n) {
|
|
21
21
|
return (
|
|
22
22
|
// If there is no allowed list, the actor is allowed.
|
|
23
23
|
!Array.isArray(e.allowed) || // Otherwise...
|
|
@@ -26,7 +26,7 @@ function Je(e, n) {
|
|
|
26
26
|
e.allowed.includes(n.actor))
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Ye(e, n, t) {
|
|
30
30
|
if (t === e.actor) return e;
|
|
31
31
|
const r = e.allowed && t ? [t] : void 0, i = e.channels.filter((o) => n.includes(o));
|
|
32
32
|
return {
|
|
@@ -35,21 +35,21 @@ function Ke(e, n, t) {
|
|
|
35
35
|
channels: i
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
let
|
|
39
|
-
async function
|
|
40
|
-
if (!
|
|
38
|
+
let ye;
|
|
39
|
+
async function et(e) {
|
|
40
|
+
if (!ye) {
|
|
41
41
|
const { default: n } = await import("./ajv-D_HICdxS.mjs").then((t) => t.a);
|
|
42
|
-
|
|
42
|
+
ye = new n({ strict: !1 });
|
|
43
43
|
}
|
|
44
44
|
try {
|
|
45
|
-
return
|
|
45
|
+
return ye.compile(e);
|
|
46
46
|
} catch (n) {
|
|
47
|
-
throw new
|
|
47
|
+
throw new je(
|
|
48
48
|
n instanceof Error ? n.message : String(n)
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function _(e, n, t) {
|
|
53
53
|
function r(u, c) {
|
|
54
54
|
if (u._zod || Object.defineProperty(u, "_zod", {
|
|
55
55
|
value: {
|
|
@@ -83,19 +83,19 @@ function w(e, n, t) {
|
|
|
83
83
|
value: (u) => t?.Parent && u instanceof t.Parent ? !0 : u?._zod?.traits?.has(e)
|
|
84
84
|
}), Object.defineProperty(s, "name", { value: e }), s;
|
|
85
85
|
}
|
|
86
|
-
class
|
|
86
|
+
class V extends Error {
|
|
87
87
|
constructor() {
|
|
88
88
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
const
|
|
92
|
-
function
|
|
93
|
-
return
|
|
91
|
+
const tt = {};
|
|
92
|
+
function ae(e) {
|
|
93
|
+
return tt;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function nt(e, n) {
|
|
96
96
|
return typeof n == "bigint" ? n.toString() : n;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function rt(e) {
|
|
99
99
|
return {
|
|
100
100
|
get value() {
|
|
101
101
|
{
|
|
@@ -105,17 +105,17 @@ function tt(e) {
|
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function ot(e) {
|
|
109
109
|
const n = e.startsWith("^") ? 1 : 0, t = e.endsWith("$") ? e.length - 1 : e.length;
|
|
110
110
|
return e.slice(n, t);
|
|
111
111
|
}
|
|
112
|
-
const
|
|
113
|
-
function
|
|
112
|
+
const Ae = /* @__PURE__ */ Symbol("evaluating");
|
|
113
|
+
function B(e, n, t) {
|
|
114
114
|
let r;
|
|
115
115
|
Object.defineProperty(e, n, {
|
|
116
116
|
get() {
|
|
117
|
-
if (r !==
|
|
118
|
-
return r === void 0 && (r =
|
|
117
|
+
if (r !== Ae)
|
|
118
|
+
return r === void 0 && (r = Ae, r = t()), r;
|
|
119
119
|
},
|
|
120
120
|
set(i) {
|
|
121
121
|
Object.defineProperty(e, n, {
|
|
@@ -126,29 +126,29 @@ function W(e, n, t) {
|
|
|
126
126
|
configurable: !0
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
const
|
|
129
|
+
const Re = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
130
130
|
};
|
|
131
|
-
function
|
|
131
|
+
function it(e) {
|
|
132
132
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function st(e, n, t) {
|
|
135
135
|
const r = new e._zod.constr(n ?? e._zod.def);
|
|
136
136
|
return (!n || t?.parent) && (r._zod.parent = e), r;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function K(e) {
|
|
139
139
|
return {};
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function ut(e) {
|
|
142
142
|
return Object.keys(e).filter((n) => e[n]._zod.optin === "optional" && e[n]._zod.optout === "optional");
|
|
143
143
|
}
|
|
144
|
-
const
|
|
144
|
+
const at = {
|
|
145
145
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
146
146
|
int32: [-2147483648, 2147483647],
|
|
147
147
|
uint32: [0, 4294967295],
|
|
148
148
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
149
149
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
150
150
|
};
|
|
151
|
-
function
|
|
151
|
+
function te(e, n = 0) {
|
|
152
152
|
if (e.aborted === !0)
|
|
153
153
|
return !0;
|
|
154
154
|
for (let t = n; t < e.issues.length; t++)
|
|
@@ -156,79 +156,79 @@ function Y(e, n = 0) {
|
|
|
156
156
|
return !0;
|
|
157
157
|
return !1;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Ce(e, n) {
|
|
160
160
|
return n.map((t) => {
|
|
161
161
|
var r;
|
|
162
162
|
return (r = t).path ?? (r.path = []), t.path.unshift(e), t;
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function ne(e) {
|
|
166
166
|
return typeof e == "string" ? e : e?.message;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function ce(e, n, t) {
|
|
169
169
|
const r = { ...e, path: e.path ?? [] };
|
|
170
170
|
if (!e.message) {
|
|
171
|
-
const i =
|
|
171
|
+
const i = ne(e.inst?._zod.def?.error?.(e)) ?? ne(n?.error?.(e)) ?? ne(t.customError?.(e)) ?? ne(t.localeError?.(e)) ?? "Invalid input";
|
|
172
172
|
r.message = i;
|
|
173
173
|
}
|
|
174
174
|
return delete r.inst, delete r.continue, n?.reportInput || delete r.input, r;
|
|
175
175
|
}
|
|
176
|
-
const
|
|
176
|
+
const De = (e, n) => {
|
|
177
177
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
178
178
|
value: e._zod,
|
|
179
179
|
enumerable: !1
|
|
180
180
|
}), Object.defineProperty(e, "issues", {
|
|
181
181
|
value: n,
|
|
182
182
|
enumerable: !1
|
|
183
|
-
}), e.message = JSON.stringify(n,
|
|
183
|
+
}), e.message = JSON.stringify(n, nt, 2), Object.defineProperty(e, "toString", {
|
|
184
184
|
value: () => e.message,
|
|
185
185
|
enumerable: !1
|
|
186
186
|
});
|
|
187
|
-
},
|
|
187
|
+
}, ct = _("$ZodError", De), le = _("$ZodError", De, { Parent: Error }), lt = (e) => (n, t, r, i) => {
|
|
188
188
|
const o = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = n._zod.run({ value: t, issues: [] }, o);
|
|
189
189
|
if (s instanceof Promise)
|
|
190
|
-
throw new
|
|
190
|
+
throw new V();
|
|
191
191
|
if (s.issues.length) {
|
|
192
|
-
const u = new (i?.Err ?? e)(s.issues.map((c) =>
|
|
193
|
-
throw
|
|
192
|
+
const u = new (i?.Err ?? e)(s.issues.map((c) => ce(c, o, ae())));
|
|
193
|
+
throw Re(u, i?.callee), u;
|
|
194
194
|
}
|
|
195
195
|
return s.value;
|
|
196
|
-
},
|
|
196
|
+
}, ft = /* @__PURE__ */ lt(le), dt = (e) => async (n, t, r, i) => {
|
|
197
197
|
const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
198
198
|
let s = n._zod.run({ value: t, issues: [] }, o);
|
|
199
199
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
200
|
-
const u = new (i?.Err ?? e)(s.issues.map((c) =>
|
|
201
|
-
throw
|
|
200
|
+
const u = new (i?.Err ?? e)(s.issues.map((c) => ce(c, o, ae())));
|
|
201
|
+
throw Re(u, i?.callee), u;
|
|
202
202
|
}
|
|
203
203
|
return s.value;
|
|
204
|
-
},
|
|
204
|
+
}, ht = /* @__PURE__ */ dt(le), pt = (e) => (n, t, r) => {
|
|
205
205
|
const i = r ? { ...r, async: !1 } : { async: !1 }, o = n._zod.run({ value: t, issues: [] }, i);
|
|
206
206
|
if (o instanceof Promise)
|
|
207
|
-
throw new
|
|
207
|
+
throw new V();
|
|
208
208
|
return o.issues.length ? {
|
|
209
209
|
success: !1,
|
|
210
|
-
error: new (e ??
|
|
210
|
+
error: new (e ?? ct)(o.issues.map((s) => ce(s, i, ae())))
|
|
211
211
|
} : { success: !0, data: o.value };
|
|
212
|
-
},
|
|
212
|
+
}, Ue = /* @__PURE__ */ pt(le), mt = (e) => async (n, t, r) => {
|
|
213
213
|
const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
214
214
|
let o = n._zod.run({ value: t, issues: [] }, i);
|
|
215
215
|
return o instanceof Promise && (o = await o), o.issues.length ? {
|
|
216
216
|
success: !1,
|
|
217
|
-
error: new e(o.issues.map((s) =>
|
|
217
|
+
error: new e(o.issues.map((s) => ce(s, i, ae())))
|
|
218
218
|
} : { success: !0, data: o.value };
|
|
219
|
-
},
|
|
219
|
+
}, Fe = /* @__PURE__ */ mt(le), yt = (e) => {
|
|
220
220
|
const n = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
221
221
|
return new RegExp(`^${n}$`);
|
|
222
|
-
},
|
|
222
|
+
}, vt = /^-?\d+$/, bt = /^-?\d+(?:\.\d+)?$/, Le = /* @__PURE__ */ _("$ZodCheck", (e, n) => {
|
|
223
223
|
var t;
|
|
224
224
|
e._zod ?? (e._zod = {}), e._zod.def = n, (t = e._zod).onattach ?? (t.onattach = []);
|
|
225
|
-
}),
|
|
225
|
+
}), gt = {
|
|
226
226
|
number: "number",
|
|
227
227
|
bigint: "bigint",
|
|
228
228
|
object: "date"
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
const t =
|
|
229
|
+
}, wt = /* @__PURE__ */ _("$ZodCheckGreaterThan", (e, n) => {
|
|
230
|
+
Le.init(e, n);
|
|
231
|
+
const t = gt[typeof n.value];
|
|
232
232
|
e._zod.onattach.push((r) => {
|
|
233
233
|
const i = r._zod.bag, o = (n.inclusive ? i.minimum : i.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
234
234
|
n.value > o && (n.inclusive ? i.minimum = n.value : i.exclusiveMinimum = n.value);
|
|
@@ -243,12 +243,12 @@ const Re = (e, n) => {
|
|
|
243
243
|
continue: !n.abort
|
|
244
244
|
});
|
|
245
245
|
};
|
|
246
|
-
}),
|
|
247
|
-
|
|
248
|
-
const t = n.format?.includes("int"), r = t ? "int" : "number", [i, o] =
|
|
246
|
+
}), _t = /* @__PURE__ */ _("$ZodCheckNumberFormat", (e, n) => {
|
|
247
|
+
Le.init(e, n), n.format = n.format || "float64";
|
|
248
|
+
const t = n.format?.includes("int"), r = t ? "int" : "number", [i, o] = at[n.format];
|
|
249
249
|
e._zod.onattach.push((s) => {
|
|
250
250
|
const u = s._zod.bag;
|
|
251
|
-
u.format = n.format, u.minimum = i, u.maximum = o, t && (u.pattern =
|
|
251
|
+
u.format = n.format, u.minimum = i, u.maximum = o, t && (u.pattern = vt);
|
|
252
252
|
}), e._zod.check = (s) => {
|
|
253
253
|
const u = s.value;
|
|
254
254
|
if (t) {
|
|
@@ -304,13 +304,13 @@ const Re = (e, n) => {
|
|
|
304
304
|
continue: !n.abort
|
|
305
305
|
});
|
|
306
306
|
};
|
|
307
|
-
}),
|
|
307
|
+
}), zt = {
|
|
308
308
|
major: 4,
|
|
309
309
|
minor: 3,
|
|
310
310
|
patch: 5
|
|
311
|
-
}, M = /* @__PURE__ */
|
|
311
|
+
}, M = /* @__PURE__ */ _("$ZodType", (e, n) => {
|
|
312
312
|
var t;
|
|
313
|
-
e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
313
|
+
e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = zt;
|
|
314
314
|
const r = [...e._zod.def.checks ?? []];
|
|
315
315
|
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
316
316
|
for (const i of r)
|
|
@@ -322,34 +322,34 @@ const Re = (e, n) => {
|
|
|
322
322
|
});
|
|
323
323
|
else {
|
|
324
324
|
const i = (s, u, c) => {
|
|
325
|
-
let a =
|
|
325
|
+
let a = te(s), f;
|
|
326
326
|
for (const d of u) {
|
|
327
327
|
if (d._zod.def.when) {
|
|
328
328
|
if (!d._zod.def.when(s))
|
|
329
329
|
continue;
|
|
330
330
|
} else if (a)
|
|
331
331
|
continue;
|
|
332
|
-
const l = s.issues.length,
|
|
333
|
-
if (
|
|
334
|
-
throw new
|
|
335
|
-
if (f ||
|
|
332
|
+
const l = s.issues.length, h = d._zod.check(s);
|
|
333
|
+
if (h instanceof Promise && c?.async === !1)
|
|
334
|
+
throw new V();
|
|
335
|
+
if (f || h instanceof Promise)
|
|
336
336
|
f = (f ?? Promise.resolve()).then(async () => {
|
|
337
|
-
await
|
|
337
|
+
await h, s.issues.length !== l && (a || (a = te(s, l)));
|
|
338
338
|
});
|
|
339
339
|
else {
|
|
340
340
|
if (s.issues.length === l)
|
|
341
341
|
continue;
|
|
342
|
-
a || (a =
|
|
342
|
+
a || (a = te(s, l));
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
return f ? f.then(() => s) : s;
|
|
346
346
|
}, o = (s, u, c) => {
|
|
347
|
-
if (
|
|
347
|
+
if (te(s))
|
|
348
348
|
return s.aborted = !0, s;
|
|
349
349
|
const a = i(u, r, c);
|
|
350
350
|
if (a instanceof Promise) {
|
|
351
351
|
if (c.async === !1)
|
|
352
|
-
throw new
|
|
352
|
+
throw new V();
|
|
353
353
|
return a.then((f) => e._zod.parse(f, c));
|
|
354
354
|
}
|
|
355
355
|
return e._zod.parse(a, c);
|
|
@@ -364,26 +364,26 @@ const Re = (e, n) => {
|
|
|
364
364
|
const c = e._zod.parse(s, u);
|
|
365
365
|
if (c instanceof Promise) {
|
|
366
366
|
if (u.async === !1)
|
|
367
|
-
throw new
|
|
367
|
+
throw new V();
|
|
368
368
|
return c.then((a) => i(a, r, u));
|
|
369
369
|
}
|
|
370
370
|
return i(c, r, u);
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
|
-
|
|
373
|
+
B(e, "~standard", () => ({
|
|
374
374
|
validate: (i) => {
|
|
375
375
|
try {
|
|
376
|
-
const o =
|
|
376
|
+
const o = Ue(e, i);
|
|
377
377
|
return o.success ? { value: o.data } : { issues: o.error?.issues };
|
|
378
378
|
} catch {
|
|
379
|
-
return
|
|
379
|
+
return Fe(e, i).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
|
|
380
380
|
}
|
|
381
381
|
},
|
|
382
382
|
vendor: "zod",
|
|
383
383
|
version: 1
|
|
384
384
|
}));
|
|
385
|
-
}),
|
|
386
|
-
M.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ??
|
|
385
|
+
}), Pt = /* @__PURE__ */ _("$ZodString", (e, n) => {
|
|
386
|
+
M.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? yt(e._zod.bag), e._zod.parse = (t, r) => {
|
|
387
387
|
if (n.coerce)
|
|
388
388
|
try {
|
|
389
389
|
t.value = String(t.value);
|
|
@@ -396,8 +396,8 @@ const Re = (e, n) => {
|
|
|
396
396
|
inst: e
|
|
397
397
|
}), t;
|
|
398
398
|
};
|
|
399
|
-
}),
|
|
400
|
-
M.init(e, n), e._zod.pattern = e._zod.bag.pattern ??
|
|
399
|
+
}), Ve = /* @__PURE__ */ _("$ZodNumber", (e, n) => {
|
|
400
|
+
M.init(e, n), e._zod.pattern = e._zod.bag.pattern ?? bt, e._zod.parse = (t, r) => {
|
|
401
401
|
if (n.coerce)
|
|
402
402
|
try {
|
|
403
403
|
t.value = Number(t.value);
|
|
@@ -415,15 +415,15 @@ const Re = (e, n) => {
|
|
|
415
415
|
...o ? { received: o } : {}
|
|
416
416
|
}), t;
|
|
417
417
|
};
|
|
418
|
-
}),
|
|
419
|
-
|
|
420
|
-
}),
|
|
418
|
+
}), jt = /* @__PURE__ */ _("$ZodNumberFormat", (e, n) => {
|
|
419
|
+
_t.init(e, n), Ve.init(e, n);
|
|
420
|
+
}), kt = /* @__PURE__ */ _("$ZodUnknown", (e, n) => {
|
|
421
421
|
M.init(e, n), e._zod.parse = (t) => t;
|
|
422
422
|
});
|
|
423
|
-
function
|
|
424
|
-
e.issues.length && n.issues.push(...
|
|
423
|
+
function Ne(e, n, t) {
|
|
424
|
+
e.issues.length && n.issues.push(...Ce(t, e.issues)), n.value[t] = e.value;
|
|
425
425
|
}
|
|
426
|
-
const
|
|
426
|
+
const Ot = /* @__PURE__ */ _("$ZodArray", (e, n) => {
|
|
427
427
|
M.init(e, n), e._zod.parse = (t, r) => {
|
|
428
428
|
const i = t.value;
|
|
429
429
|
if (!Array.isArray(i))
|
|
@@ -440,25 +440,25 @@ const jt = /* @__PURE__ */ w("$ZodArray", (e, n) => {
|
|
|
440
440
|
value: u,
|
|
441
441
|
issues: []
|
|
442
442
|
}, r);
|
|
443
|
-
c instanceof Promise ? o.push(c.then((a) =>
|
|
443
|
+
c instanceof Promise ? o.push(c.then((a) => Ne(a, t, s))) : Ne(c, t, s);
|
|
444
444
|
}
|
|
445
445
|
return o.length ? Promise.all(o).then(() => t) : t;
|
|
446
446
|
};
|
|
447
447
|
});
|
|
448
|
-
function
|
|
448
|
+
function oe(e, n, t, r, i) {
|
|
449
449
|
if (e.issues.length) {
|
|
450
450
|
if (i && !(t in r))
|
|
451
451
|
return;
|
|
452
|
-
n.issues.push(...
|
|
452
|
+
n.issues.push(...Ce(t, e.issues));
|
|
453
453
|
}
|
|
454
454
|
e.value === void 0 ? t in r && (n.value[t] = void 0) : n.value[t] = e.value;
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function St(e) {
|
|
457
457
|
const n = Object.keys(e.shape);
|
|
458
458
|
for (const r of n)
|
|
459
459
|
if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
460
460
|
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
461
|
-
const t =
|
|
461
|
+
const t = ut(e.shape);
|
|
462
462
|
return {
|
|
463
463
|
...e,
|
|
464
464
|
keys: n,
|
|
@@ -467,7 +467,7 @@ function kt(e) {
|
|
|
467
467
|
optionalKeys: new Set(t)
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Et(e, n, t, r, i, o) {
|
|
471
471
|
const s = [], u = i.keySet, c = i.catchall._zod, a = c.def.type, f = c.optout === "optional";
|
|
472
472
|
for (const d in n) {
|
|
473
473
|
if (u.has(d))
|
|
@@ -477,7 +477,7 @@ function Ot(e, n, t, r, i, o) {
|
|
|
477
477
|
continue;
|
|
478
478
|
}
|
|
479
479
|
const l = c.run({ value: n[d], issues: [] }, r);
|
|
480
|
-
l instanceof Promise ? e.push(l.then((
|
|
480
|
+
l instanceof Promise ? e.push(l.then((h) => oe(h, t, d, n, f))) : oe(l, t, d, n, f);
|
|
481
481
|
}
|
|
482
482
|
return s.length && t.issues.push({
|
|
483
483
|
code: "unrecognized_keys",
|
|
@@ -486,7 +486,7 @@ function Ot(e, n, t, r, i, o) {
|
|
|
486
486
|
inst: o
|
|
487
487
|
}), e.length ? Promise.all(e).then(() => t) : t;
|
|
488
488
|
}
|
|
489
|
-
const
|
|
489
|
+
const xt = /* @__PURE__ */ _("$ZodObject", (e, n) => {
|
|
490
490
|
if (M.init(e, n), !Object.getOwnPropertyDescriptor(n, "shape")?.get) {
|
|
491
491
|
const u = n.shape;
|
|
492
492
|
Object.defineProperty(n, "shape", {
|
|
@@ -498,8 +498,8 @@ const Et = /* @__PURE__ */ w("$ZodObject", (e, n) => {
|
|
|
498
498
|
}
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
|
-
const r =
|
|
502
|
-
|
|
501
|
+
const r = rt(() => St(n));
|
|
502
|
+
B(e._zod, "propValues", () => {
|
|
503
503
|
const u = n.shape, c = {};
|
|
504
504
|
for (const a in u) {
|
|
505
505
|
const f = u[a]._zod;
|
|
@@ -511,7 +511,7 @@ const Et = /* @__PURE__ */ w("$ZodObject", (e, n) => {
|
|
|
511
511
|
}
|
|
512
512
|
return c;
|
|
513
513
|
});
|
|
514
|
-
const i =
|
|
514
|
+
const i = it, o = n.catchall;
|
|
515
515
|
let s;
|
|
516
516
|
e._zod.parse = (u, c) => {
|
|
517
517
|
s ?? (s = r.value);
|
|
@@ -526,29 +526,29 @@ const Et = /* @__PURE__ */ w("$ZodObject", (e, n) => {
|
|
|
526
526
|
u.value = {};
|
|
527
527
|
const f = [], d = s.shape;
|
|
528
528
|
for (const l of s.keys) {
|
|
529
|
-
const
|
|
530
|
-
|
|
529
|
+
const h = d[l], p = h._zod.optout === "optional", m = h._zod.run({ value: a[l], issues: [] }, c);
|
|
530
|
+
m instanceof Promise ? f.push(m.then((b) => oe(b, u, l, a, p))) : oe(m, u, l, a, p);
|
|
531
531
|
}
|
|
532
|
-
return o ?
|
|
532
|
+
return o ? Et(f, a, u, c, r.value, e) : f.length ? Promise.all(f).then(() => u) : u;
|
|
533
533
|
};
|
|
534
534
|
});
|
|
535
|
-
function
|
|
535
|
+
function Te(e, n) {
|
|
536
536
|
return e.issues.length && n === void 0 ? { issues: [], value: void 0 } : e;
|
|
537
537
|
}
|
|
538
|
-
const
|
|
539
|
-
M.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional",
|
|
538
|
+
const $t = /* @__PURE__ */ _("$ZodOptional", (e, n) => {
|
|
539
|
+
M.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", B(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), B(e._zod, "pattern", () => {
|
|
540
540
|
const t = n.innerType._zod.pattern;
|
|
541
|
-
return t ? new RegExp(`^(${
|
|
541
|
+
return t ? new RegExp(`^(${ot(t.source)})?$`) : void 0;
|
|
542
542
|
}), e._zod.parse = (t, r) => {
|
|
543
543
|
if (n.innerType._zod.optin === "optional") {
|
|
544
544
|
const i = n.innerType._zod.run(t, r);
|
|
545
|
-
return i instanceof Promise ? i.then((o) =>
|
|
545
|
+
return i instanceof Promise ? i.then((o) => Te(o, t.value)) : Te(i, t.value);
|
|
546
546
|
}
|
|
547
547
|
return t.value === void 0 ? t : n.innerType._zod.run(t, r);
|
|
548
548
|
};
|
|
549
549
|
});
|
|
550
|
-
var
|
|
551
|
-
class
|
|
550
|
+
var Ge;
|
|
551
|
+
class At {
|
|
552
552
|
constructor() {
|
|
553
553
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
554
554
|
}
|
|
@@ -577,241 +577,244 @@ class xt {
|
|
|
577
577
|
return this._map.has(n);
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
|
-
function
|
|
581
|
-
return new
|
|
580
|
+
function Nt() {
|
|
581
|
+
return new At();
|
|
582
582
|
}
|
|
583
|
-
(
|
|
583
|
+
(Ge = globalThis).__zod_globalRegistry ?? (Ge.__zod_globalRegistry = Nt());
|
|
584
584
|
// @__NO_SIDE_EFFECTS__
|
|
585
|
-
function
|
|
585
|
+
function Tt(e, n) {
|
|
586
586
|
return new e({
|
|
587
587
|
type: "string",
|
|
588
|
-
...
|
|
588
|
+
...K()
|
|
589
589
|
});
|
|
590
590
|
}
|
|
591
591
|
// @__NO_SIDE_EFFECTS__
|
|
592
|
-
function
|
|
592
|
+
function Gt(e, n) {
|
|
593
593
|
return new e({
|
|
594
594
|
type: "number",
|
|
595
595
|
check: "number_format",
|
|
596
596
|
abort: !1,
|
|
597
597
|
format: "safeint",
|
|
598
|
-
...
|
|
598
|
+
...K()
|
|
599
599
|
});
|
|
600
600
|
}
|
|
601
601
|
// @__NO_SIDE_EFFECTS__
|
|
602
|
-
function
|
|
602
|
+
function Mt(e) {
|
|
603
603
|
return new e({
|
|
604
604
|
type: "unknown"
|
|
605
605
|
});
|
|
606
606
|
}
|
|
607
607
|
// @__NO_SIDE_EFFECTS__
|
|
608
|
-
function
|
|
609
|
-
return new
|
|
608
|
+
function Zt(e, n) {
|
|
609
|
+
return new wt({
|
|
610
610
|
check: "greater_than",
|
|
611
|
-
...
|
|
611
|
+
...K(),
|
|
612
612
|
value: e,
|
|
613
613
|
inclusive: !0
|
|
614
614
|
});
|
|
615
615
|
}
|
|
616
616
|
// @__NO_SIDE_EFFECTS__
|
|
617
|
-
function
|
|
618
|
-
return /* @__PURE__ */
|
|
617
|
+
function It(e) {
|
|
618
|
+
return /* @__PURE__ */ Zt(0);
|
|
619
619
|
}
|
|
620
|
-
const
|
|
620
|
+
const D = /* @__PURE__ */ _("ZodMiniType", (e, n) => {
|
|
621
621
|
if (!e._zod)
|
|
622
622
|
throw new Error("Uninitialized schema in ZodMiniType.");
|
|
623
|
-
M.init(e, n), e.def = n, e.type = n.type, e.parse = (t, r) =>
|
|
623
|
+
M.init(e, n), e.def = n, e.type = n.type, e.parse = (t, r) => ft(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => Ue(e, t, r), e.parseAsync = async (t, r) => ht(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => Fe(e, t, r), e.check = (...t) => e.clone({
|
|
624
624
|
...n,
|
|
625
625
|
checks: [
|
|
626
626
|
...n.checks ?? [],
|
|
627
627
|
...t.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
628
628
|
]
|
|
629
|
-
}, { parent: !0 }), e.with = e.check, e.clone = (t, r) =>
|
|
630
|
-
}),
|
|
631
|
-
|
|
629
|
+
}, { parent: !0 }), e.with = e.check, e.clone = (t, r) => st(e, t, r), e.brand = () => e, e.register = ((t, r) => (t.add(e, r), e)), e.apply = (t) => t(e);
|
|
630
|
+
}), Rt = /* @__PURE__ */ _("ZodMiniString", (e, n) => {
|
|
631
|
+
Pt.init(e, n), D.init(e, n);
|
|
632
632
|
});
|
|
633
633
|
// @__NO_SIDE_EFFECTS__
|
|
634
|
-
function
|
|
635
|
-
return /* @__PURE__ */
|
|
634
|
+
function Ct(e) {
|
|
635
|
+
return /* @__PURE__ */ Tt(Rt);
|
|
636
636
|
}
|
|
637
|
-
const
|
|
638
|
-
|
|
639
|
-
}),
|
|
640
|
-
|
|
637
|
+
const Dt = /* @__PURE__ */ _("ZodMiniNumber", (e, n) => {
|
|
638
|
+
Ve.init(e, n), D.init(e, n);
|
|
639
|
+
}), Ut = /* @__PURE__ */ _("ZodMiniNumberFormat", (e, n) => {
|
|
640
|
+
jt.init(e, n), Dt.init(e, n);
|
|
641
641
|
});
|
|
642
642
|
// @__NO_SIDE_EFFECTS__
|
|
643
|
-
function
|
|
644
|
-
return /* @__PURE__ */
|
|
643
|
+
function Ft(e) {
|
|
644
|
+
return /* @__PURE__ */ Gt(Ut);
|
|
645
645
|
}
|
|
646
|
-
const
|
|
647
|
-
|
|
646
|
+
const Lt = /* @__PURE__ */ _("ZodMiniUnknown", (e, n) => {
|
|
647
|
+
kt.init(e, n), D.init(e, n);
|
|
648
648
|
});
|
|
649
649
|
// @__NO_SIDE_EFFECTS__
|
|
650
|
-
function
|
|
651
|
-
return /* @__PURE__ */
|
|
650
|
+
function Vt() {
|
|
651
|
+
return /* @__PURE__ */ Mt(Lt);
|
|
652
652
|
}
|
|
653
|
-
const
|
|
654
|
-
|
|
653
|
+
const qt = /* @__PURE__ */ _("ZodMiniArray", (e, n) => {
|
|
654
|
+
Ot.init(e, n), D.init(e, n);
|
|
655
655
|
});
|
|
656
656
|
// @__NO_SIDE_EFFECTS__
|
|
657
|
-
function
|
|
658
|
-
return new
|
|
657
|
+
function Ht(e, n) {
|
|
658
|
+
return new qt({
|
|
659
659
|
type: "array",
|
|
660
660
|
element: e,
|
|
661
|
-
...
|
|
661
|
+
...K()
|
|
662
662
|
});
|
|
663
663
|
}
|
|
664
|
-
const
|
|
665
|
-
|
|
664
|
+
const Wt = /* @__PURE__ */ _("ZodMiniObject", (e, n) => {
|
|
665
|
+
xt.init(e, n), D.init(e, n), B(e, "shape", () => n.shape);
|
|
666
666
|
});
|
|
667
667
|
// @__NO_SIDE_EFFECTS__
|
|
668
|
-
function
|
|
669
|
-
return new
|
|
668
|
+
function Bt(e, n) {
|
|
669
|
+
return new Wt({
|
|
670
670
|
type: "object",
|
|
671
671
|
shape: e,
|
|
672
|
-
catchall: /* @__PURE__ */
|
|
673
|
-
...
|
|
672
|
+
catchall: /* @__PURE__ */ Vt(),
|
|
673
|
+
...K()
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
|
-
const
|
|
677
|
-
|
|
676
|
+
const Jt = /* @__PURE__ */ _("ZodMiniOptional", (e, n) => {
|
|
677
|
+
$t.init(e, n), D.init(e, n);
|
|
678
678
|
});
|
|
679
679
|
// @__NO_SIDE_EFFECTS__
|
|
680
|
-
function
|
|
681
|
-
return new
|
|
680
|
+
function Me(e) {
|
|
681
|
+
return new Jt({
|
|
682
682
|
type: "optional",
|
|
683
683
|
innerType: e
|
|
684
684
|
});
|
|
685
685
|
}
|
|
686
|
-
(/* @__PURE__ */
|
|
687
|
-
const
|
|
688
|
-
function
|
|
689
|
-
if (!
|
|
690
|
-
|
|
686
|
+
(/* @__PURE__ */ Ft()).check(/* @__PURE__ */ It());
|
|
687
|
+
const I = {};
|
|
688
|
+
function Xt(e) {
|
|
689
|
+
if (!I.graffitiSession)
|
|
690
|
+
I.graffitiSession = e;
|
|
691
691
|
else
|
|
692
692
|
throw new Error(
|
|
693
693
|
"Graffiti session already set - plugin installed multiple times?"
|
|
694
694
|
);
|
|
695
695
|
}
|
|
696
|
-
function
|
|
697
|
-
if (!
|
|
698
|
-
|
|
696
|
+
function Kt(e) {
|
|
697
|
+
if (!I.graffitiSynchronize)
|
|
698
|
+
I.graffitiSynchronize = e;
|
|
699
699
|
else
|
|
700
700
|
throw new Error(
|
|
701
701
|
"Graffiti synchronize already set - plugin installed multiple times?"
|
|
702
702
|
);
|
|
703
703
|
}
|
|
704
|
-
function
|
|
705
|
-
const e =
|
|
704
|
+
function fe() {
|
|
705
|
+
const e = I.graffitiSynchronize;
|
|
706
706
|
if (!e)
|
|
707
707
|
throw new Error(
|
|
708
708
|
"No Graffiti instance provided, did you forget to install the plugin?"
|
|
709
709
|
);
|
|
710
710
|
return e;
|
|
711
711
|
}
|
|
712
|
-
function
|
|
713
|
-
return
|
|
712
|
+
function Oe() {
|
|
713
|
+
return fe();
|
|
714
714
|
}
|
|
715
|
-
function
|
|
716
|
-
const e =
|
|
715
|
+
function Nn() {
|
|
716
|
+
const e = I.graffitiSession;
|
|
717
717
|
if (!e)
|
|
718
718
|
throw new Error(
|
|
719
719
|
"No Graffiti session provided, did you forget to install the plugin?"
|
|
720
720
|
);
|
|
721
721
|
return e;
|
|
722
722
|
}
|
|
723
|
-
function
|
|
724
|
-
const i =
|
|
723
|
+
function Qt(e, n, t, r = !1) {
|
|
724
|
+
const i = fe(), o = /* @__PURE__ */ new Map(), s = E([]);
|
|
725
725
|
let u = async () => {
|
|
726
726
|
};
|
|
727
|
-
const c = async () => u(), a =
|
|
727
|
+
const c = async () => u(), a = E(!0);
|
|
728
728
|
let f, d;
|
|
729
|
-
|
|
729
|
+
Pe(() => {
|
|
730
730
|
f?.return(null), d?.return({
|
|
731
731
|
continue: () => d,
|
|
732
732
|
cursor: ""
|
|
733
733
|
});
|
|
734
734
|
});
|
|
735
|
-
const l =
|
|
736
|
-
function
|
|
735
|
+
const l = E(0);
|
|
736
|
+
function h(m = 0) {
|
|
737
737
|
setTimeout(() => {
|
|
738
738
|
l.value++;
|
|
739
|
-
},
|
|
739
|
+
}, m);
|
|
740
740
|
}
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
({ args: h }, y, _) => {
|
|
741
|
+
const p = () => [j(e), j(n), j(t)];
|
|
742
|
+
return W(
|
|
743
|
+
() => `${l.value}:${JSON.stringify(p())}`,
|
|
744
|
+
(m, b, x) => {
|
|
745
|
+
const O = p();
|
|
747
746
|
o.clear(), s.value = [], a.value = !0;
|
|
748
|
-
const
|
|
749
|
-
f =
|
|
750
|
-
let
|
|
751
|
-
|
|
752
|
-
|
|
747
|
+
const z = i.synchronizeDiscover(...O);
|
|
748
|
+
f = z;
|
|
749
|
+
let Y, A = !0;
|
|
750
|
+
x(() => {
|
|
751
|
+
A = !1, z.return(null), Y?.return({
|
|
753
752
|
continue: () => d,
|
|
754
753
|
cursor: ""
|
|
755
754
|
});
|
|
756
755
|
});
|
|
757
|
-
let
|
|
756
|
+
let F;
|
|
758
757
|
(async () => {
|
|
759
|
-
for await (const P of
|
|
760
|
-
if (!
|
|
761
|
-
P.tombstone ? o.delete(P.object.url) : o.set(P.object.url, P.object),
|
|
758
|
+
for await (const P of z) {
|
|
759
|
+
if (!A) break;
|
|
760
|
+
P.tombstone ? o.delete(P.object.url) : o.set(P.object.url, P.object), F || (F = new Promise((ee) => {
|
|
762
761
|
setTimeout(() => {
|
|
763
|
-
|
|
762
|
+
A && (s.value = Array.from(o.values())), F = void 0, ee();
|
|
764
763
|
}, 50);
|
|
765
764
|
}));
|
|
766
765
|
}
|
|
767
766
|
})();
|
|
768
|
-
let
|
|
767
|
+
let pe = !1, Ee = () => i.discover(...O);
|
|
769
768
|
u = async () => {
|
|
770
|
-
if (!(
|
|
771
|
-
|
|
769
|
+
if (!(pe || !A)) {
|
|
770
|
+
pe = !0;
|
|
772
771
|
try {
|
|
773
|
-
|
|
772
|
+
Y = Ee(O[2]);
|
|
774
773
|
} catch {
|
|
775
|
-
return
|
|
774
|
+
return h(5e3);
|
|
776
775
|
}
|
|
777
|
-
if (
|
|
778
|
-
for (d =
|
|
776
|
+
if (A) {
|
|
777
|
+
for (d = Y; ; ) {
|
|
779
778
|
let P;
|
|
780
779
|
try {
|
|
781
|
-
P = await
|
|
782
|
-
} catch (
|
|
783
|
-
return
|
|
780
|
+
P = await Y.next();
|
|
781
|
+
} catch (ee) {
|
|
782
|
+
return ee instanceof ke ? h() : (console.error("Fatal error in discover"), console.error(ee), h(5e3));
|
|
784
783
|
}
|
|
785
|
-
if (!
|
|
784
|
+
if (!A) return;
|
|
786
785
|
if (P.done) {
|
|
787
|
-
|
|
786
|
+
Ee = P.value.continue;
|
|
788
787
|
break;
|
|
789
788
|
} else P.value.error && console.error(P.value.error);
|
|
790
789
|
}
|
|
791
|
-
await new Promise((P) => setTimeout(P, 0)),
|
|
790
|
+
await new Promise((P) => setTimeout(P, 0)), F && await F, A && (pe = !1, a.value = !1, j(r) && c());
|
|
792
791
|
}
|
|
793
792
|
}
|
|
794
793
|
}, c();
|
|
795
794
|
},
|
|
796
795
|
{ immediate: !0 }
|
|
797
|
-
),
|
|
796
|
+
), W(
|
|
798
797
|
() => j(r),
|
|
799
|
-
(
|
|
798
|
+
(m) => m && c()
|
|
800
799
|
), {
|
|
801
800
|
objects: s,
|
|
802
801
|
poll: c,
|
|
803
802
|
isFirstPoll: a
|
|
804
803
|
};
|
|
805
804
|
}
|
|
806
|
-
function
|
|
807
|
-
const t =
|
|
808
|
-
return
|
|
805
|
+
function qe(e, n) {
|
|
806
|
+
const t = E(void 0);
|
|
807
|
+
return W(
|
|
809
808
|
() => j(e),
|
|
810
809
|
async (r, i, o) => {
|
|
811
810
|
let s = !0;
|
|
812
|
-
o(() => {
|
|
811
|
+
if (o(() => {
|
|
813
812
|
s = !1;
|
|
814
|
-
}),
|
|
813
|
+
}), !r) {
|
|
814
|
+
t.value = r;
|
|
815
|
+
return;
|
|
816
|
+
}
|
|
817
|
+
t.value = void 0;
|
|
815
818
|
try {
|
|
816
819
|
const u = await n(r);
|
|
817
820
|
s && (t.value = u);
|
|
@@ -825,122 +828,122 @@ function Le(e, n) {
|
|
|
825
828
|
output: t
|
|
826
829
|
};
|
|
827
830
|
}
|
|
828
|
-
function
|
|
831
|
+
function He(e) {
|
|
829
832
|
return e === void 0 ? "Loading..." : e === null ? "Not found" : e;
|
|
830
833
|
}
|
|
831
|
-
function
|
|
832
|
-
const n =
|
|
834
|
+
function Yt(e) {
|
|
835
|
+
const n = Oe(), { output: t } = qe(
|
|
833
836
|
e,
|
|
834
837
|
n.actorToHandle.bind(n)
|
|
835
838
|
);
|
|
836
839
|
return { handle: t };
|
|
837
840
|
}
|
|
838
|
-
const
|
|
841
|
+
const q = /* @__PURE__ */ C({
|
|
839
842
|
__name: "ActorToHandle",
|
|
840
843
|
props: {
|
|
841
844
|
actor: {}
|
|
842
845
|
},
|
|
843
846
|
setup(e) {
|
|
844
|
-
const t = k(e, "actor"), { handle: r } =
|
|
847
|
+
const t = k(e, "actor"), { handle: r } = Yt(t);
|
|
845
848
|
return (i, o) => X(i.$slots, "default", { handle: v(r) }, () => [
|
|
846
|
-
|
|
849
|
+
y("span", null, S(v(He)(v(r))), 1)
|
|
847
850
|
]);
|
|
848
851
|
}
|
|
849
|
-
}),
|
|
852
|
+
}), en = ["data-url"], tn = { key: 0 }, nn = { key: 1 }, rn = { key: 0 }, on = { key: 1 }, sn = ["disabled"], un = { key: 1 }, an = { key: 2 }, de = /* @__PURE__ */ C({
|
|
850
853
|
__name: "ObjectInfo",
|
|
851
854
|
props: {
|
|
852
855
|
object: {}
|
|
853
856
|
},
|
|
854
857
|
setup(e) {
|
|
855
|
-
const n =
|
|
858
|
+
const n = Oe(), t = E(!1);
|
|
856
859
|
async function r(i, o) {
|
|
857
860
|
t.value = !0, await new Promise((s) => setTimeout(s, 0)), confirm(
|
|
858
861
|
"Are you sure you want to delete this object? It cannot be undone."
|
|
859
862
|
) && await n.delete(i, o), t.value = !1;
|
|
860
863
|
}
|
|
861
|
-
return (i, o) => e.object ? (
|
|
864
|
+
return (i, o) => e.object ? (w(), g("article", {
|
|
862
865
|
key: 0,
|
|
863
866
|
"data-url": e.object.url
|
|
864
867
|
}, [
|
|
865
|
-
|
|
866
|
-
o[1] || (o[1] =
|
|
867
|
-
|
|
868
|
+
y("p", null, [
|
|
869
|
+
o[1] || (o[1] = $e("@", -1)),
|
|
870
|
+
L(q, {
|
|
868
871
|
actor: e.object.actor
|
|
869
872
|
}, null, 8, ["actor"]),
|
|
870
|
-
o[2] || (o[2] =
|
|
873
|
+
o[2] || (o[2] = $e(" posted:", -1))
|
|
871
874
|
]),
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
o[14] || (o[14] =
|
|
875
|
-
|
|
876
|
-
o[8] || (o[8] =
|
|
877
|
-
|
|
878
|
-
|
|
875
|
+
y("pre", null, S(e.object.value), 1),
|
|
876
|
+
y("details", null, [
|
|
877
|
+
o[14] || (o[14] = y("summary", null, "Show object properties", -1)),
|
|
878
|
+
y("dl", null, [
|
|
879
|
+
o[8] || (o[8] = y("dt", null, "Object URL", -1)),
|
|
880
|
+
y("dd", null, [
|
|
881
|
+
y("code", null, S(e.object.url), 1)
|
|
879
882
|
]),
|
|
880
|
-
o[9] || (o[9] =
|
|
881
|
-
|
|
882
|
-
|
|
883
|
+
o[9] || (o[9] = y("dt", null, "Actor", -1)),
|
|
884
|
+
y("dd", null, [
|
|
885
|
+
y("code", null, S(e.object.actor), 1)
|
|
883
886
|
]),
|
|
884
|
-
o[10] || (o[10] =
|
|
885
|
-
|
|
886
|
-
|
|
887
|
+
o[10] || (o[10] = y("dt", null, "Handle", -1)),
|
|
888
|
+
y("dd", null, [
|
|
889
|
+
L(q, {
|
|
887
890
|
actor: e.object.actor
|
|
888
891
|
}, null, 8, ["actor"])
|
|
889
892
|
]),
|
|
890
|
-
o[11] || (o[11] =
|
|
891
|
-
|
|
892
|
-
|
|
893
|
+
o[11] || (o[11] = y("dt", null, "Content", -1)),
|
|
894
|
+
y("dd", null, [
|
|
895
|
+
y("pre", null, S(e.object.value), 1)
|
|
893
896
|
]),
|
|
894
|
-
o[12] || (o[12] =
|
|
895
|
-
|
|
896
|
-
Array.isArray(e.object.allowed) ? e.object.allowed.length === 0 ? (
|
|
897
|
-
|
|
898
|
-
])])) :
|
|
899
|
-
|
|
897
|
+
o[12] || (o[12] = y("dt", null, "Allowed actors", -1)),
|
|
898
|
+
y("dd", null, [
|
|
899
|
+
Array.isArray(e.object.allowed) ? e.object.allowed.length === 0 ? (w(), g("p", nn, [...o[4] || (o[4] = [
|
|
900
|
+
y("em", null, "No one is allowed (except you)", -1)
|
|
901
|
+
])])) : xe("", !0) : (w(), g("p", tn, [...o[3] || (o[3] = [
|
|
902
|
+
y("em", null, "Public", -1)
|
|
900
903
|
])])),
|
|
901
|
-
|
|
902
|
-
(
|
|
903
|
-
|
|
904
|
-
o[5] || (o[5] =
|
|
905
|
-
|
|
906
|
-
|
|
904
|
+
y("ul", null, [
|
|
905
|
+
(w(!0), g(be, null, ge(e.object.allowed, (s) => (w(), g("li", { key: s }, [
|
|
906
|
+
y("dl", null, [
|
|
907
|
+
o[5] || (o[5] = y("dt", null, "Actor", -1)),
|
|
908
|
+
y("dd", null, [
|
|
909
|
+
y("code", null, S(s), 1)
|
|
907
910
|
]),
|
|
908
|
-
o[6] || (o[6] =
|
|
909
|
-
|
|
910
|
-
|
|
911
|
+
o[6] || (o[6] = y("dt", null, "Handle", -1)),
|
|
912
|
+
y("dd", null, [
|
|
913
|
+
L(q, { actor: s }, null, 8, ["actor"])
|
|
911
914
|
])
|
|
912
915
|
])
|
|
913
916
|
]))), 128))
|
|
914
917
|
])
|
|
915
918
|
]),
|
|
916
|
-
o[13] || (o[13] =
|
|
917
|
-
|
|
918
|
-
e.object.channels?.length ? (
|
|
919
|
-
(
|
|
920
|
-
|
|
919
|
+
o[13] || (o[13] = y("dt", null, "Channels", -1)),
|
|
920
|
+
y("dd", null, [
|
|
921
|
+
e.object.channels?.length ? (w(), g("ul", rn, [
|
|
922
|
+
(w(!0), g(be, null, ge(e.object.channels, (s) => (w(), g("li", { key: s }, [
|
|
923
|
+
y("code", null, S(s), 1)
|
|
921
924
|
]))), 128))
|
|
922
|
-
])) : (
|
|
923
|
-
|
|
925
|
+
])) : (w(), g("p", on, [...o[7] || (o[7] = [
|
|
926
|
+
y("em", null, "No channels", -1)
|
|
924
927
|
])]))
|
|
925
928
|
])
|
|
926
929
|
])
|
|
927
930
|
]),
|
|
928
|
-
i.$graffitiSession.value?.actor === e.object.actor ? (
|
|
931
|
+
i.$graffitiSession.value?.actor === e.object.actor ? (w(), g("button", {
|
|
929
932
|
key: 0,
|
|
930
933
|
disabled: t.value,
|
|
931
934
|
onClick: o[0] || (o[0] = (s) => r(e.object, i.$graffitiSession.value))
|
|
932
|
-
},
|
|
933
|
-
], 8,
|
|
934
|
-
|
|
935
|
-
|
|
935
|
+
}, S(t.value ? "Deleting..." : "Delete"), 9, sn)) : xe("", !0)
|
|
936
|
+
], 8, en)) : e.object === null ? (w(), g("article", un, [...o[15] || (o[15] = [
|
|
937
|
+
y("p", null, [
|
|
938
|
+
y("em", null, "Graffiti object not found")
|
|
936
939
|
], -1)
|
|
937
|
-
])])) : (
|
|
938
|
-
|
|
939
|
-
|
|
940
|
+
])])) : (w(), g("article", an, [...o[16] || (o[16] = [
|
|
941
|
+
y("p", null, [
|
|
942
|
+
y("em", null, "Graffiti object loading...")
|
|
940
943
|
], -1)
|
|
941
944
|
])]));
|
|
942
945
|
}
|
|
943
|
-
}),
|
|
946
|
+
}), cn = { key: 0 }, ln = { key: 1 }, We = /* @__PURE__ */ C({
|
|
944
947
|
__name: "Discover",
|
|
945
948
|
props: {
|
|
946
949
|
channels: {},
|
|
@@ -949,7 +952,7 @@ const V = /* @__PURE__ */ R({
|
|
|
949
952
|
autopoll: { type: Boolean }
|
|
950
953
|
},
|
|
951
954
|
setup(e) {
|
|
952
|
-
const n = e, { objects: t, poll: r, isFirstPoll: i } =
|
|
955
|
+
const n = e, { objects: t, poll: r, isFirstPoll: i } = Qt(
|
|
953
956
|
k(n, "channels"),
|
|
954
957
|
k(n, "schema"),
|
|
955
958
|
k(n, "session"),
|
|
@@ -960,51 +963,54 @@ const V = /* @__PURE__ */ R({
|
|
|
960
963
|
poll: v(r),
|
|
961
964
|
isFirstPoll: v(i)
|
|
962
965
|
}, () => [
|
|
963
|
-
v(i) ? (
|
|
964
|
-
|
|
965
|
-
])])) : (
|
|
966
|
-
(
|
|
966
|
+
v(i) ? (w(), g("p", ln, [...s[0] || (s[0] = [
|
|
967
|
+
y("em", null, " Graffiti discover loading... ", -1)
|
|
968
|
+
])])) : (w(), g("ul", cn, [
|
|
969
|
+
(w(!0), g(be, null, ge(v(t), (u) => (w(), g("li", {
|
|
967
970
|
key: u.url
|
|
968
971
|
}, [
|
|
969
|
-
|
|
972
|
+
L(de, { object: u }, null, 8, ["object"])
|
|
970
973
|
]))), 128))
|
|
971
974
|
]))
|
|
972
975
|
]);
|
|
973
976
|
}
|
|
974
977
|
});
|
|
975
|
-
function
|
|
976
|
-
const r =
|
|
978
|
+
function fn(e, n, t) {
|
|
979
|
+
const r = fe(), i = E(void 0);
|
|
977
980
|
let o = async () => {
|
|
978
981
|
};
|
|
979
982
|
const s = async () => o();
|
|
980
983
|
let u;
|
|
981
|
-
|
|
984
|
+
Pe(() => {
|
|
982
985
|
u?.return(null);
|
|
983
|
-
})
|
|
984
|
-
|
|
985
|
-
|
|
986
|
+
});
|
|
987
|
+
const c = () => [j(e), j(n), j(t)];
|
|
988
|
+
return W(
|
|
989
|
+
() => JSON.stringify(c()),
|
|
990
|
+
(a, f, d) => {
|
|
991
|
+
const l = c();
|
|
986
992
|
i.value = void 0;
|
|
987
|
-
const
|
|
988
|
-
u =
|
|
989
|
-
let
|
|
990
|
-
|
|
991
|
-
|
|
993
|
+
const h = r.synchronizeGet(...l);
|
|
994
|
+
u = h;
|
|
995
|
+
let p = !0;
|
|
996
|
+
d(() => {
|
|
997
|
+
p = !1, h.return(null);
|
|
992
998
|
}), (async () => {
|
|
993
|
-
for await (const
|
|
994
|
-
if (!
|
|
995
|
-
|
|
999
|
+
for await (const b of h) {
|
|
1000
|
+
if (!p) return;
|
|
1001
|
+
b.tombstone ? i.value = null : i.value = b.object;
|
|
996
1002
|
}
|
|
997
1003
|
})();
|
|
998
|
-
let
|
|
1004
|
+
let m = !1;
|
|
999
1005
|
o = async () => {
|
|
1000
|
-
if (!(
|
|
1001
|
-
|
|
1006
|
+
if (!(m || !p)) {
|
|
1007
|
+
m = !0;
|
|
1002
1008
|
try {
|
|
1003
|
-
await r.get(...
|
|
1004
|
-
} catch (
|
|
1005
|
-
|
|
1009
|
+
await r.get(...l);
|
|
1010
|
+
} catch (b) {
|
|
1011
|
+
b instanceof T || console.error(b);
|
|
1006
1012
|
}
|
|
1007
|
-
await new Promise((
|
|
1013
|
+
await new Promise((b) => setTimeout(b, 0)), m = !1;
|
|
1008
1014
|
}
|
|
1009
1015
|
}, s();
|
|
1010
1016
|
},
|
|
@@ -1014,7 +1020,7 @@ function cn(e, n, t) {
|
|
|
1014
1020
|
poll: s
|
|
1015
1021
|
};
|
|
1016
1022
|
}
|
|
1017
|
-
const
|
|
1023
|
+
const Be = /* @__PURE__ */ C({
|
|
1018
1024
|
__name: "Get",
|
|
1019
1025
|
props: {
|
|
1020
1026
|
url: {},
|
|
@@ -1022,7 +1028,7 @@ const He = /* @__PURE__ */ R({
|
|
|
1022
1028
|
session: {}
|
|
1023
1029
|
},
|
|
1024
1030
|
setup(e) {
|
|
1025
|
-
const n = e, { object: t, poll: r } =
|
|
1031
|
+
const n = e, { object: t, poll: r } = fn(
|
|
1026
1032
|
k(n, "url"),
|
|
1027
1033
|
k(n, "schema"),
|
|
1028
1034
|
k(n, "session")
|
|
@@ -1031,60 +1037,59 @@ const He = /* @__PURE__ */ R({
|
|
|
1031
1037
|
object: v(t),
|
|
1032
1038
|
poll: v(r)
|
|
1033
1039
|
}, () => [
|
|
1034
|
-
|
|
1040
|
+
L(de, { object: v(t) }, null, 8, ["object"])
|
|
1035
1041
|
]);
|
|
1036
1042
|
}
|
|
1037
1043
|
});
|
|
1038
|
-
function
|
|
1039
|
-
const r =
|
|
1044
|
+
function dn(e, n, t) {
|
|
1045
|
+
const r = fe(), i = E(
|
|
1040
1046
|
void 0
|
|
1041
|
-
), o =
|
|
1047
|
+
), o = E(0);
|
|
1042
1048
|
let s = null, u = () => {
|
|
1043
1049
|
};
|
|
1044
1050
|
function c() {
|
|
1045
|
-
return s || (o.value++, s = new Promise((
|
|
1051
|
+
return s || (o.value++, s = new Promise((f) => {
|
|
1046
1052
|
u = () => {
|
|
1047
|
-
s = null,
|
|
1053
|
+
s = null, f();
|
|
1048
1054
|
};
|
|
1049
1055
|
}), s);
|
|
1050
1056
|
}
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
async ({ args: a }, f, d) => {
|
|
1057
|
+
const a = () => [j(e), j(n), j(t)];
|
|
1058
|
+
return W(
|
|
1059
|
+
() => `${o.value}:${JSON.stringify(a())}`,
|
|
1060
|
+
async (f, d, l) => {
|
|
1061
|
+
const h = a();
|
|
1057
1062
|
i.value?.dataUrl && URL.revokeObjectURL(i.value.dataUrl), i.value = void 0;
|
|
1058
|
-
let
|
|
1059
|
-
|
|
1060
|
-
|
|
1063
|
+
let p = !0;
|
|
1064
|
+
l(() => {
|
|
1065
|
+
p = !1;
|
|
1061
1066
|
});
|
|
1062
1067
|
try {
|
|
1063
|
-
const { data:
|
|
1064
|
-
if (!
|
|
1065
|
-
const
|
|
1068
|
+
const { data: m, actor: b, allowed: x } = await r.getMedia(...h);
|
|
1069
|
+
if (!p) return;
|
|
1070
|
+
const O = URL.createObjectURL(m);
|
|
1066
1071
|
i.value = {
|
|
1067
|
-
data:
|
|
1068
|
-
dataUrl:
|
|
1069
|
-
actor:
|
|
1070
|
-
allowed:
|
|
1072
|
+
data: m,
|
|
1073
|
+
dataUrl: O,
|
|
1074
|
+
actor: b,
|
|
1075
|
+
allowed: x
|
|
1071
1076
|
};
|
|
1072
|
-
} catch (
|
|
1073
|
-
if (!
|
|
1074
|
-
|
|
1077
|
+
} catch (m) {
|
|
1078
|
+
if (!p) return;
|
|
1079
|
+
m instanceof T ? i.value = null : console.error(m);
|
|
1075
1080
|
} finally {
|
|
1076
1081
|
u();
|
|
1077
1082
|
}
|
|
1078
1083
|
},
|
|
1079
1084
|
{ immediate: !0 }
|
|
1080
|
-
),
|
|
1085
|
+
), Pe(() => {
|
|
1081
1086
|
u(), i.value?.dataUrl && URL.revokeObjectURL(i.value.dataUrl);
|
|
1082
1087
|
}), {
|
|
1083
1088
|
media: i,
|
|
1084
1089
|
poll: c
|
|
1085
1090
|
};
|
|
1086
1091
|
}
|
|
1087
|
-
const
|
|
1092
|
+
const hn = ["src", "alt"], pn = ["src", "alt"], mn = ["src", "alt"], yn = ["src", "alt"], vn = ["data", "alt"], bn = { key: 6 }, gn = { key: 7 }, Je = /* @__PURE__ */ C({
|
|
1088
1093
|
__name: "GetMedia",
|
|
1089
1094
|
props: {
|
|
1090
1095
|
url: {},
|
|
@@ -1092,7 +1097,7 @@ const fn = ["src", "alt"], dn = ["src", "alt"], hn = ["src", "alt"], pn = ["src"
|
|
|
1092
1097
|
session: {}
|
|
1093
1098
|
},
|
|
1094
1099
|
setup(e) {
|
|
1095
|
-
const n = e, { media: t, poll: r } =
|
|
1100
|
+
const n = e, { media: t, poll: r } = dn(
|
|
1096
1101
|
k(n, "url"),
|
|
1097
1102
|
k(n, "accept"),
|
|
1098
1103
|
k(n, "session")
|
|
@@ -1104,75 +1109,75 @@ const fn = ["src", "alt"], dn = ["src", "alt"], hn = ["src", "alt"], pn = ["src"
|
|
|
1104
1109
|
media: v(t),
|
|
1105
1110
|
poll: v(r)
|
|
1106
1111
|
}, () => [
|
|
1107
|
-
v(t)?.data.type.startsWith("image/") ? (
|
|
1112
|
+
v(t)?.data.type.startsWith("image/") ? (w(), g("img", {
|
|
1108
1113
|
key: 0,
|
|
1109
1114
|
src: v(t).dataUrl,
|
|
1110
1115
|
alt: `An image by ${v(t).actor}`
|
|
1111
|
-
}, null, 8,
|
|
1116
|
+
}, null, 8, hn)) : v(t)?.data.type.startsWith("video/") ? (w(), g("video", {
|
|
1112
1117
|
key: 1,
|
|
1113
1118
|
controls: "",
|
|
1114
1119
|
src: v(t).dataUrl,
|
|
1115
1120
|
alt: `A video by ${v(t).actor}`
|
|
1116
|
-
}, null, 8,
|
|
1121
|
+
}, null, 8, pn)) : v(t)?.data.type.startsWith("audio/") ? (w(), g("audio", {
|
|
1117
1122
|
key: 2,
|
|
1118
1123
|
controls: "",
|
|
1119
1124
|
src: v(t).dataUrl,
|
|
1120
1125
|
alt: `Audio by ${v(t).actor}`
|
|
1121
|
-
}, null, 8,
|
|
1126
|
+
}, null, 8, mn)) : v(t)?.data.type === "text/html" ? (w(), g("iframe", {
|
|
1122
1127
|
key: 3,
|
|
1123
1128
|
src: v(t).dataUrl,
|
|
1124
1129
|
alt: `HTML by ${v(t).actor}`,
|
|
1125
1130
|
sandbox: ""
|
|
1126
|
-
}, null, 8,
|
|
1131
|
+
}, null, 8, yn)) : v(t)?.data.type.startsWith("application/pdf") ? (w(), g("object", {
|
|
1127
1132
|
key: 4,
|
|
1128
1133
|
data: v(t).dataUrl,
|
|
1129
1134
|
type: "application/pdf",
|
|
1130
1135
|
alt: `PDF by ${v(t).actor}`
|
|
1131
|
-
}, null, 8,
|
|
1136
|
+
}, null, 8, vn)) : v(t) ? (w(), g("button", {
|
|
1132
1137
|
key: 5,
|
|
1133
1138
|
onClick: i
|
|
1134
|
-
}, "Download media")) : v(t) === null ? (
|
|
1135
|
-
|
|
1136
|
-
])])) : (
|
|
1137
|
-
|
|
1139
|
+
}, "Download media")) : v(t) === null ? (w(), g("p", bn, [...s[0] || (s[0] = [
|
|
1140
|
+
y("em", null, "Media not found", -1)
|
|
1141
|
+
])])) : (w(), g("p", gn, [...s[1] || (s[1] = [
|
|
1142
|
+
y("em", null, " Media loading... ", -1)
|
|
1138
1143
|
])]))
|
|
1139
1144
|
]);
|
|
1140
1145
|
}
|
|
1141
1146
|
});
|
|
1142
|
-
function
|
|
1143
|
-
const n =
|
|
1147
|
+
function wn(e) {
|
|
1148
|
+
const n = Oe(), { output: t } = qe(
|
|
1144
1149
|
e,
|
|
1145
1150
|
n.handleToActor.bind(n)
|
|
1146
1151
|
);
|
|
1147
1152
|
return { actor: t };
|
|
1148
1153
|
}
|
|
1149
|
-
const
|
|
1154
|
+
const Xe = /* @__PURE__ */ C({
|
|
1150
1155
|
__name: "HandleToActor",
|
|
1151
1156
|
props: {
|
|
1152
1157
|
handle: {}
|
|
1153
1158
|
},
|
|
1154
1159
|
setup(e) {
|
|
1155
|
-
const t = k(e, "handle"), { actor: r } =
|
|
1160
|
+
const t = k(e, "handle"), { actor: r } = wn(t);
|
|
1156
1161
|
return (i, o) => X(i.$slots, "default", { actor: v(r) }, () => [
|
|
1157
|
-
|
|
1162
|
+
y("span", null, S(v(He)(v(r))), 1)
|
|
1158
1163
|
]);
|
|
1159
1164
|
}
|
|
1160
1165
|
});
|
|
1161
|
-
var
|
|
1162
|
-
return
|
|
1166
|
+
var we = function(e, n) {
|
|
1167
|
+
return we = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, r) {
|
|
1163
1168
|
t.__proto__ = r;
|
|
1164
1169
|
} || function(t, r) {
|
|
1165
1170
|
for (var i in r) r.hasOwnProperty(i) && (t[i] = r[i]);
|
|
1166
|
-
},
|
|
1171
|
+
}, we(e, n);
|
|
1167
1172
|
};
|
|
1168
|
-
function
|
|
1169
|
-
|
|
1173
|
+
function _n(e, n) {
|
|
1174
|
+
we(e, n);
|
|
1170
1175
|
function t() {
|
|
1171
1176
|
this.constructor = e;
|
|
1172
1177
|
}
|
|
1173
1178
|
e.prototype = n === null ? Object.create(n) : (t.prototype = n.prototype, new t());
|
|
1174
1179
|
}
|
|
1175
|
-
function
|
|
1180
|
+
function R(e, n, t, r) {
|
|
1176
1181
|
function i(o) {
|
|
1177
1182
|
return o instanceof t ? o : new t(function(s) {
|
|
1178
1183
|
s(o);
|
|
@@ -1259,7 +1264,7 @@ function $(e, n) {
|
|
|
1259
1264
|
return { value: a[0] ? a[1] : void 0, done: !0 };
|
|
1260
1265
|
}
|
|
1261
1266
|
}
|
|
1262
|
-
function
|
|
1267
|
+
function U(e) {
|
|
1263
1268
|
var n = typeof Symbol == "function" && Symbol.iterator, t = n && e[n], r = 0;
|
|
1264
1269
|
if (t) return t.call(e);
|
|
1265
1270
|
if (e && typeof e.length == "number") return {
|
|
@@ -1269,31 +1274,31 @@ function D(e) {
|
|
|
1269
1274
|
};
|
|
1270
1275
|
throw new TypeError(n ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1271
1276
|
}
|
|
1272
|
-
function
|
|
1273
|
-
return this instanceof
|
|
1277
|
+
function J(e) {
|
|
1278
|
+
return this instanceof J ? (this.v = e, this) : new J(e);
|
|
1274
1279
|
}
|
|
1275
|
-
function
|
|
1280
|
+
function zn(e, n, t) {
|
|
1276
1281
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1277
1282
|
var r = t.apply(e, n || []), i, o = [];
|
|
1278
1283
|
return i = {}, s("next"), s("throw"), s("return"), i[Symbol.asyncIterator] = function() {
|
|
1279
1284
|
return this;
|
|
1280
1285
|
}, i;
|
|
1281
1286
|
function s(l) {
|
|
1282
|
-
r[l] && (i[l] = function(
|
|
1283
|
-
return new Promise(function(
|
|
1284
|
-
o.push([l,
|
|
1287
|
+
r[l] && (i[l] = function(h) {
|
|
1288
|
+
return new Promise(function(p, m) {
|
|
1289
|
+
o.push([l, h, p, m]) > 1 || u(l, h);
|
|
1285
1290
|
});
|
|
1286
1291
|
});
|
|
1287
1292
|
}
|
|
1288
|
-
function u(l,
|
|
1293
|
+
function u(l, h) {
|
|
1289
1294
|
try {
|
|
1290
|
-
c(r[l](
|
|
1291
|
-
} catch (
|
|
1292
|
-
d(o[0][3],
|
|
1295
|
+
c(r[l](h));
|
|
1296
|
+
} catch (p) {
|
|
1297
|
+
d(o[0][3], p);
|
|
1293
1298
|
}
|
|
1294
1299
|
}
|
|
1295
1300
|
function c(l) {
|
|
1296
|
-
l.value instanceof
|
|
1301
|
+
l.value instanceof J ? Promise.resolve(l.value.v).then(a, f) : d(o[0][2], l);
|
|
1297
1302
|
}
|
|
1298
1303
|
function a(l) {
|
|
1299
1304
|
u("next", l);
|
|
@@ -1301,14 +1306,14 @@ function wn(e, n, t) {
|
|
|
1301
1306
|
function f(l) {
|
|
1302
1307
|
u("throw", l);
|
|
1303
1308
|
}
|
|
1304
|
-
function d(l,
|
|
1305
|
-
l(
|
|
1309
|
+
function d(l, h) {
|
|
1310
|
+
l(h), o.shift(), o.length && u(o[0][0], o[0][1]);
|
|
1306
1311
|
}
|
|
1307
1312
|
}
|
|
1308
|
-
var
|
|
1313
|
+
var Ke = (
|
|
1309
1314
|
/** @class */
|
|
1310
1315
|
(function(e) {
|
|
1311
|
-
|
|
1316
|
+
_n(n, e);
|
|
1312
1317
|
function n(t) {
|
|
1313
1318
|
var r = e.call(this, t) || this;
|
|
1314
1319
|
return Object.defineProperty(r, "name", {
|
|
@@ -1401,12 +1406,12 @@ var Xe = (
|
|
|
1401
1406
|
return this._q.shift();
|
|
1402
1407
|
}, e;
|
|
1403
1408
|
})();
|
|
1404
|
-
function
|
|
1405
|
-
e != null && typeof e.then == "function" && e.then(
|
|
1409
|
+
function _e(e) {
|
|
1410
|
+
e != null && typeof e.then == "function" && e.then(ue, ue);
|
|
1406
1411
|
}
|
|
1407
|
-
var
|
|
1412
|
+
var ve = 0, Ze = 1, G = 2, ie = 3, ze = 4, se = 1024, ue = function() {
|
|
1408
1413
|
};
|
|
1409
|
-
function
|
|
1414
|
+
function Z(e) {
|
|
1410
1415
|
var n = e.err, t = Promise.resolve(e.execution).then(function(r) {
|
|
1411
1416
|
if (n != null)
|
|
1412
1417
|
throw n;
|
|
@@ -1418,10 +1423,10 @@ function N(e) {
|
|
|
1418
1423
|
return t;
|
|
1419
1424
|
});
|
|
1420
1425
|
}
|
|
1421
|
-
function
|
|
1422
|
-
var t = e.state >=
|
|
1426
|
+
function N(e, n) {
|
|
1427
|
+
var t = e.state >= ie;
|
|
1423
1428
|
return Promise.resolve(n).then(function(r) {
|
|
1424
|
-
return !t && e.state >=
|
|
1429
|
+
return !t && e.state >= ze ? Z(e).then(function(i) {
|
|
1425
1430
|
return {
|
|
1426
1431
|
value: i,
|
|
1427
1432
|
done: !0
|
|
@@ -1429,14 +1434,14 @@ function A(e, n) {
|
|
|
1429
1434
|
}) : { value: r, done: t };
|
|
1430
1435
|
});
|
|
1431
1436
|
}
|
|
1432
|
-
function
|
|
1437
|
+
function Se(e, n) {
|
|
1433
1438
|
var t, r;
|
|
1434
1439
|
if (!(e.state >= G))
|
|
1435
1440
|
if (e.state = G, e.onnext(), e.onstop(), e.err == null && (e.err = n), e.pushes.length === 0 && (typeof e.buffer > "u" || e.buffer.empty))
|
|
1436
|
-
|
|
1441
|
+
H(e);
|
|
1437
1442
|
else
|
|
1438
1443
|
try {
|
|
1439
|
-
for (var i =
|
|
1444
|
+
for (var i = U(e.pushes), o = i.next(); !o.done; o = i.next()) {
|
|
1440
1445
|
var s = o.value;
|
|
1441
1446
|
s.resolve();
|
|
1442
1447
|
}
|
|
@@ -1450,16 +1455,16 @@ function ke(e, n) {
|
|
|
1450
1455
|
}
|
|
1451
1456
|
}
|
|
1452
1457
|
}
|
|
1453
|
-
function
|
|
1458
|
+
function H(e) {
|
|
1454
1459
|
var n, t;
|
|
1455
|
-
if (!(e.state >=
|
|
1456
|
-
e.state < G &&
|
|
1460
|
+
if (!(e.state >= ie)) {
|
|
1461
|
+
e.state < G && Se(e), e.state = ie, e.buffer = void 0;
|
|
1457
1462
|
try {
|
|
1458
|
-
for (var r =
|
|
1459
|
-
var o = i.value, s = e.pending === void 0 ?
|
|
1460
|
-
return
|
|
1463
|
+
for (var r = U(e.nexts), i = r.next(); !i.done; i = r.next()) {
|
|
1464
|
+
var o = i.value, s = e.pending === void 0 ? Z(e) : e.pending.then(function() {
|
|
1465
|
+
return Z(e);
|
|
1461
1466
|
});
|
|
1462
|
-
o.resolve(
|
|
1467
|
+
o.resolve(N(e, s));
|
|
1463
1468
|
}
|
|
1464
1469
|
} catch (u) {
|
|
1465
1470
|
n = { error: u };
|
|
@@ -1473,24 +1478,24 @@ function q(e) {
|
|
|
1473
1478
|
e.pushes = [], e.nexts = [];
|
|
1474
1479
|
}
|
|
1475
1480
|
}
|
|
1476
|
-
function
|
|
1477
|
-
e.state >=
|
|
1481
|
+
function Ie(e) {
|
|
1482
|
+
e.state >= ze || (e.state < ie && H(e), e.state = ze);
|
|
1478
1483
|
}
|
|
1479
|
-
function
|
|
1480
|
-
if (
|
|
1481
|
-
throw new
|
|
1484
|
+
function Pn(e, n) {
|
|
1485
|
+
if (_e(n), e.pushes.length >= se)
|
|
1486
|
+
throw new Ke("No more than " + se + " pending calls to push are allowed on a single repeater.");
|
|
1482
1487
|
if (e.state >= G)
|
|
1483
1488
|
return Promise.resolve(void 0);
|
|
1484
1489
|
var t = e.pending === void 0 ? Promise.resolve(n) : e.pending.then(function() {
|
|
1485
1490
|
return n;
|
|
1486
1491
|
});
|
|
1487
1492
|
t = t.catch(function(c) {
|
|
1488
|
-
e.state < G && (e.err = c),
|
|
1493
|
+
e.state < G && (e.err = c), Ie(e);
|
|
1489
1494
|
});
|
|
1490
1495
|
var r;
|
|
1491
1496
|
if (e.nexts.length) {
|
|
1492
1497
|
var i = e.nexts.shift();
|
|
1493
|
-
i.resolve(
|
|
1498
|
+
i.resolve(N(e, t)), e.nexts.length ? r = Promise.resolve(e.nexts[0].value) : typeof e.buffer < "u" && !e.buffer.full ? r = Promise.resolve(void 0) : r = new Promise(function(c) {
|
|
1494
1499
|
return e.onnext = c;
|
|
1495
1500
|
});
|
|
1496
1501
|
} else typeof e.buffer < "u" && !e.buffer.full ? (e.buffer.add(t), r = Promise.resolve(void 0)) : r = new Promise(function(c) {
|
|
@@ -1507,52 +1512,52 @@ function _n(e, n) {
|
|
|
1507
1512
|
}, s.finally = r.finally.bind(r), e.pending = t.then(function() {
|
|
1508
1513
|
return u;
|
|
1509
1514
|
}).catch(function(c) {
|
|
1510
|
-
e.err = c,
|
|
1515
|
+
e.err = c, Ie(e);
|
|
1511
1516
|
}), s;
|
|
1512
1517
|
}
|
|
1513
|
-
function
|
|
1514
|
-
var n =
|
|
1518
|
+
function jn(e) {
|
|
1519
|
+
var n = Se.bind(null, e), t = new Promise(function(r) {
|
|
1515
1520
|
return e.onstop = r;
|
|
1516
1521
|
});
|
|
1517
1522
|
return n.then = t.then.bind(t), n.catch = t.catch.bind(t), n.finally = t.finally.bind(t), n;
|
|
1518
1523
|
}
|
|
1519
|
-
function
|
|
1520
|
-
if (!(e.state >=
|
|
1521
|
-
e.state =
|
|
1522
|
-
var n =
|
|
1524
|
+
function kn(e) {
|
|
1525
|
+
if (!(e.state >= Ze)) {
|
|
1526
|
+
e.state = Ze;
|
|
1527
|
+
var n = Pn.bind(null, e), t = jn(e);
|
|
1523
1528
|
e.execution = new Promise(function(r) {
|
|
1524
1529
|
return r(e.executor(n, t));
|
|
1525
1530
|
}), e.execution.catch(function() {
|
|
1526
|
-
return
|
|
1531
|
+
return Se(e);
|
|
1527
1532
|
});
|
|
1528
1533
|
}
|
|
1529
1534
|
}
|
|
1530
|
-
var
|
|
1535
|
+
var re = /* @__PURE__ */ new WeakMap(), Q = (
|
|
1531
1536
|
/** @class */
|
|
1532
1537
|
(function() {
|
|
1533
1538
|
function e(n, t) {
|
|
1534
|
-
|
|
1539
|
+
re.set(this, {
|
|
1535
1540
|
executor: n,
|
|
1536
1541
|
buffer: t,
|
|
1537
1542
|
err: void 0,
|
|
1538
|
-
state:
|
|
1543
|
+
state: ve,
|
|
1539
1544
|
pushes: [],
|
|
1540
1545
|
nexts: [],
|
|
1541
1546
|
pending: void 0,
|
|
1542
1547
|
execution: void 0,
|
|
1543
|
-
onnext:
|
|
1544
|
-
onstop:
|
|
1548
|
+
onnext: ue,
|
|
1549
|
+
onstop: ue
|
|
1545
1550
|
});
|
|
1546
1551
|
}
|
|
1547
1552
|
return e.prototype.next = function(n) {
|
|
1548
|
-
|
|
1549
|
-
var t =
|
|
1553
|
+
_e(n);
|
|
1554
|
+
var t = re.get(this);
|
|
1550
1555
|
if (t === void 0)
|
|
1551
1556
|
throw new Error("WeakMap error");
|
|
1552
|
-
if (t.nexts.length >=
|
|
1553
|
-
throw new
|
|
1554
|
-
if (t.state <=
|
|
1555
|
-
var r =
|
|
1557
|
+
if (t.nexts.length >= se)
|
|
1558
|
+
throw new Ke("No more than " + se + " pending calls to next are allowed on a single repeater.");
|
|
1559
|
+
if (t.state <= ve && kn(t), t.onnext(n), typeof t.buffer < "u" && !t.buffer.empty) {
|
|
1560
|
+
var r = N(t, t.buffer.remove());
|
|
1556
1561
|
if (t.pushes.length) {
|
|
1557
1562
|
var i = t.pushes.shift();
|
|
1558
1563
|
t.buffer.add(i.value), t.onnext = i.resolve;
|
|
@@ -1560,44 +1565,44 @@ var te = /* @__PURE__ */ new WeakMap(), K = (
|
|
|
1560
1565
|
return r;
|
|
1561
1566
|
} else if (t.pushes.length) {
|
|
1562
1567
|
var o = t.pushes.shift();
|
|
1563
|
-
return t.onnext = o.resolve,
|
|
1568
|
+
return t.onnext = o.resolve, N(t, o.value);
|
|
1564
1569
|
} else if (t.state >= G)
|
|
1565
|
-
return
|
|
1570
|
+
return H(t), N(t, Z(t));
|
|
1566
1571
|
return new Promise(function(s) {
|
|
1567
1572
|
return t.nexts.push({ resolve: s, value: n });
|
|
1568
1573
|
});
|
|
1569
1574
|
}, e.prototype.return = function(n) {
|
|
1570
|
-
|
|
1571
|
-
var t =
|
|
1575
|
+
_e(n);
|
|
1576
|
+
var t = re.get(this);
|
|
1572
1577
|
if (t === void 0)
|
|
1573
1578
|
throw new Error("WeakMap error");
|
|
1574
|
-
return
|
|
1579
|
+
return H(t), t.execution = Promise.resolve(t.execution).then(function() {
|
|
1575
1580
|
return n;
|
|
1576
|
-
}),
|
|
1581
|
+
}), N(t, Z(t));
|
|
1577
1582
|
}, e.prototype.throw = function(n) {
|
|
1578
|
-
var t =
|
|
1583
|
+
var t = re.get(this);
|
|
1579
1584
|
if (t === void 0)
|
|
1580
1585
|
throw new Error("WeakMap error");
|
|
1581
|
-
return t.state <=
|
|
1586
|
+
return t.state <= ve || t.state >= G || typeof t.buffer < "u" && !t.buffer.empty ? (H(t), t.err == null && (t.err = n), N(t, Z(t))) : this.next(Promise.reject(n));
|
|
1582
1587
|
}, e.prototype[Symbol.asyncIterator] = function() {
|
|
1583
1588
|
return this;
|
|
1584
|
-
}, e.race =
|
|
1589
|
+
}, e.race = On, e.merge = Sn, e.zip = En, e.latest = xn, e;
|
|
1585
1590
|
})()
|
|
1586
1591
|
);
|
|
1587
|
-
function
|
|
1592
|
+
function he(e, n) {
|
|
1588
1593
|
var t, r, i = [], o = function(a) {
|
|
1589
1594
|
a != null && typeof a[Symbol.asyncIterator] == "function" ? i.push(a[Symbol.asyncIterator]()) : a != null && typeof a[Symbol.iterator] == "function" ? i.push(a[Symbol.iterator]()) : i.push((function() {
|
|
1590
|
-
return
|
|
1595
|
+
return zn(this, arguments, function() {
|
|
1591
1596
|
return $(this, function(l) {
|
|
1592
1597
|
switch (l.label) {
|
|
1593
1598
|
case 0:
|
|
1594
|
-
return n.yieldValues ? [4,
|
|
1599
|
+
return n.yieldValues ? [4, J(a)] : [3, 3];
|
|
1595
1600
|
case 1:
|
|
1596
1601
|
return [4, l.sent()];
|
|
1597
1602
|
case 2:
|
|
1598
1603
|
l.sent(), l.label = 3;
|
|
1599
1604
|
case 3:
|
|
1600
|
-
return n.returnValues ? [4,
|
|
1605
|
+
return n.returnValues ? [4, J(a)] : [3, 5];
|
|
1601
1606
|
case 4:
|
|
1602
1607
|
return [2, l.sent()];
|
|
1603
1608
|
case 5:
|
|
@@ -1611,7 +1616,7 @@ function fe(e, n) {
|
|
|
1611
1616
|
})());
|
|
1612
1617
|
};
|
|
1613
1618
|
try {
|
|
1614
|
-
for (var s =
|
|
1619
|
+
for (var s = U(e), u = s.next(); !u.done; u = s.next()) {
|
|
1615
1620
|
var c = u.value;
|
|
1616
1621
|
o(c);
|
|
1617
1622
|
}
|
|
@@ -1626,10 +1631,10 @@ function fe(e, n) {
|
|
|
1626
1631
|
}
|
|
1627
1632
|
return i;
|
|
1628
1633
|
}
|
|
1629
|
-
function
|
|
1630
|
-
var n = this, t =
|
|
1631
|
-
return new
|
|
1632
|
-
return
|
|
1634
|
+
function On(e) {
|
|
1635
|
+
var n = this, t = he(e, { returnValues: !0 });
|
|
1636
|
+
return new Q(function(r, i) {
|
|
1637
|
+
return R(n, void 0, void 0, function() {
|
|
1633
1638
|
var o, s, u, c, a, f;
|
|
1634
1639
|
return $(this, function(d) {
|
|
1635
1640
|
switch (d.label) {
|
|
@@ -1644,25 +1649,25 @@ function jn(e) {
|
|
|
1644
1649
|
}), d.label = 1;
|
|
1645
1650
|
case 1:
|
|
1646
1651
|
d.trys.push([1, , 5, 7]), c = void 0, a = 0, f = function() {
|
|
1647
|
-
var l,
|
|
1652
|
+
var l, h, p, m, b, x;
|
|
1648
1653
|
return $(this, function(O) {
|
|
1649
1654
|
switch (O.label) {
|
|
1650
1655
|
case 0:
|
|
1651
1656
|
l = a;
|
|
1652
1657
|
try {
|
|
1653
|
-
for (
|
|
1654
|
-
|
|
1658
|
+
for (h = (b = void 0, U(t)), p = h.next(); !p.done; p = h.next())
|
|
1659
|
+
m = p.value, Promise.resolve(m.next()).then(function(z) {
|
|
1655
1660
|
z.done ? (i(), u === void 0 && (u = z)) : a === l && (a++, o(z));
|
|
1656
1661
|
}, function(z) {
|
|
1657
1662
|
return i(z);
|
|
1658
1663
|
});
|
|
1659
1664
|
} catch (z) {
|
|
1660
|
-
|
|
1665
|
+
b = { error: z };
|
|
1661
1666
|
} finally {
|
|
1662
1667
|
try {
|
|
1663
|
-
|
|
1668
|
+
p && !p.done && (x = h.return) && x.call(h);
|
|
1664
1669
|
} finally {
|
|
1665
|
-
if (
|
|
1670
|
+
if (b) throw b.error;
|
|
1666
1671
|
}
|
|
1667
1672
|
}
|
|
1668
1673
|
return [4, new Promise(function(z) {
|
|
@@ -1705,10 +1710,10 @@ function jn(e) {
|
|
|
1705
1710
|
});
|
|
1706
1711
|
});
|
|
1707
1712
|
}
|
|
1708
|
-
function
|
|
1709
|
-
var n = this, t =
|
|
1710
|
-
return new
|
|
1711
|
-
return
|
|
1713
|
+
function Sn(e) {
|
|
1714
|
+
var n = this, t = he(e, { yieldValues: !0 });
|
|
1715
|
+
return new Q(function(r, i) {
|
|
1716
|
+
return R(n, void 0, void 0, function() {
|
|
1712
1717
|
var o, s, u, c = this;
|
|
1713
1718
|
return $(this, function(a) {
|
|
1714
1719
|
switch (a.label) {
|
|
@@ -1722,15 +1727,15 @@ function kn(e) {
|
|
|
1722
1727
|
var f, d;
|
|
1723
1728
|
s = !0;
|
|
1724
1729
|
try {
|
|
1725
|
-
for (var l =
|
|
1726
|
-
var
|
|
1727
|
-
|
|
1730
|
+
for (var l = U(o), h = l.next(); !h.done; h = l.next()) {
|
|
1731
|
+
var p = h.value;
|
|
1732
|
+
p();
|
|
1728
1733
|
}
|
|
1729
|
-
} catch (
|
|
1730
|
-
f = { error:
|
|
1734
|
+
} catch (m) {
|
|
1735
|
+
f = { error: m };
|
|
1731
1736
|
} finally {
|
|
1732
1737
|
try {
|
|
1733
|
-
|
|
1738
|
+
h && !h.done && (d = l.return) && d.call(l);
|
|
1734
1739
|
} finally {
|
|
1735
1740
|
if (f) throw f.error;
|
|
1736
1741
|
}
|
|
@@ -1738,35 +1743,35 @@ function kn(e) {
|
|
|
1738
1743
|
}), a.label = 1;
|
|
1739
1744
|
case 1:
|
|
1740
1745
|
return a.trys.push([1, , 3, 4]), [4, Promise.all(t.map(function(f, d) {
|
|
1741
|
-
return
|
|
1742
|
-
var l,
|
|
1743
|
-
return $(this, function(
|
|
1744
|
-
switch (
|
|
1746
|
+
return R(c, void 0, void 0, function() {
|
|
1747
|
+
var l, h;
|
|
1748
|
+
return $(this, function(p) {
|
|
1749
|
+
switch (p.label) {
|
|
1745
1750
|
case 0:
|
|
1746
|
-
|
|
1751
|
+
p.trys.push([0, , 6, 9]), p.label = 1;
|
|
1747
1752
|
case 1:
|
|
1748
|
-
return s ? [3, 5] : (Promise.resolve(f.next()).then(function(
|
|
1749
|
-
return o[d](
|
|
1750
|
-
}, function(
|
|
1751
|
-
return i(
|
|
1752
|
-
}), [4, new Promise(function(
|
|
1753
|
-
o[d] =
|
|
1753
|
+
return s ? [3, 5] : (Promise.resolve(f.next()).then(function(m) {
|
|
1754
|
+
return o[d](m);
|
|
1755
|
+
}, function(m) {
|
|
1756
|
+
return i(m);
|
|
1757
|
+
}), [4, new Promise(function(m) {
|
|
1758
|
+
o[d] = m;
|
|
1754
1759
|
})]);
|
|
1755
1760
|
case 2:
|
|
1756
|
-
return l =
|
|
1761
|
+
return l = p.sent(), l === void 0 ? [3, 4] : l.done ? (u = l, [
|
|
1757
1762
|
2
|
|
1758
1763
|
/*return*/
|
|
1759
1764
|
]) : [4, r(l.value)];
|
|
1760
1765
|
case 3:
|
|
1761
|
-
|
|
1766
|
+
p.sent(), p.label = 4;
|
|
1762
1767
|
case 4:
|
|
1763
1768
|
return [3, 1];
|
|
1764
1769
|
case 5:
|
|
1765
1770
|
return [3, 9];
|
|
1766
1771
|
case 6:
|
|
1767
|
-
return
|
|
1772
|
+
return h = f.return, h ? [4, f.return()] : [3, 8];
|
|
1768
1773
|
case 7:
|
|
1769
|
-
|
|
1774
|
+
h = p.sent(), p.label = 8;
|
|
1770
1775
|
case 8:
|
|
1771
1776
|
return [
|
|
1772
1777
|
7
|
|
@@ -1798,10 +1803,10 @@ function kn(e) {
|
|
|
1798
1803
|
});
|
|
1799
1804
|
});
|
|
1800
1805
|
}
|
|
1801
|
-
function
|
|
1802
|
-
var n = this, t =
|
|
1803
|
-
return new
|
|
1804
|
-
return
|
|
1806
|
+
function En(e) {
|
|
1807
|
+
var n = this, t = he(e, { returnValues: !0 });
|
|
1808
|
+
return new Q(function(r, i) {
|
|
1809
|
+
return R(n, void 0, void 0, function() {
|
|
1805
1810
|
var o, s, u, c;
|
|
1806
1811
|
return $(this, function(a) {
|
|
1807
1812
|
switch (a.label) {
|
|
@@ -1855,13 +1860,13 @@ function On(e) {
|
|
|
1855
1860
|
});
|
|
1856
1861
|
});
|
|
1857
1862
|
}
|
|
1858
|
-
function
|
|
1859
|
-
var n = this, t =
|
|
1863
|
+
function xn(e) {
|
|
1864
|
+
var n = this, t = he(e, {
|
|
1860
1865
|
yieldValues: !0,
|
|
1861
1866
|
returnValues: !0
|
|
1862
1867
|
});
|
|
1863
|
-
return new
|
|
1864
|
-
return
|
|
1868
|
+
return new Q(function(r, i) {
|
|
1869
|
+
return R(n, void 0, void 0, function() {
|
|
1865
1870
|
var o, s, u, c, a, f = this;
|
|
1866
1871
|
return $(this, function(d) {
|
|
1867
1872
|
switch (d.label) {
|
|
@@ -1869,18 +1874,18 @@ function En(e) {
|
|
|
1869
1874
|
if (!t.length)
|
|
1870
1875
|
return i(), [2, []];
|
|
1871
1876
|
s = [], u = !1, i.then(function() {
|
|
1872
|
-
var l,
|
|
1877
|
+
var l, h;
|
|
1873
1878
|
o();
|
|
1874
1879
|
try {
|
|
1875
|
-
for (var
|
|
1876
|
-
var
|
|
1877
|
-
|
|
1880
|
+
for (var p = U(s), m = p.next(); !m.done; m = p.next()) {
|
|
1881
|
+
var b = m.value;
|
|
1882
|
+
b();
|
|
1878
1883
|
}
|
|
1879
1884
|
} catch (x) {
|
|
1880
1885
|
l = { error: x };
|
|
1881
1886
|
} finally {
|
|
1882
1887
|
try {
|
|
1883
|
-
|
|
1888
|
+
m && !m.done && (h = p.return) && h.call(p);
|
|
1884
1889
|
} finally {
|
|
1885
1890
|
if (l) throw l.error;
|
|
1886
1891
|
}
|
|
@@ -1907,27 +1912,27 @@ function En(e) {
|
|
|
1907
1912
|
return l.done;
|
|
1908
1913
|
}) ? [2, a] : [4, r(a.slice())]);
|
|
1909
1914
|
case 3:
|
|
1910
|
-
return d.sent(), [4, Promise.all(t.map(function(l,
|
|
1911
|
-
return
|
|
1912
|
-
var
|
|
1913
|
-
return $(this, function(
|
|
1914
|
-
switch (
|
|
1915
|
+
return d.sent(), [4, Promise.all(t.map(function(l, h) {
|
|
1916
|
+
return R(f, void 0, void 0, function() {
|
|
1917
|
+
var p;
|
|
1918
|
+
return $(this, function(m) {
|
|
1919
|
+
switch (m.label) {
|
|
1915
1920
|
case 0:
|
|
1916
|
-
if (c[
|
|
1917
|
-
return [2, c[
|
|
1918
|
-
|
|
1921
|
+
if (c[h].done)
|
|
1922
|
+
return [2, c[h].value];
|
|
1923
|
+
m.label = 1;
|
|
1919
1924
|
case 1:
|
|
1920
|
-
return u ? [3, 4] : (Promise.resolve(l.next()).then(function(
|
|
1921
|
-
return s[
|
|
1922
|
-
}, function(
|
|
1923
|
-
return i(
|
|
1924
|
-
}), [4, new Promise(function(
|
|
1925
|
-
return s[
|
|
1925
|
+
return u ? [3, 4] : (Promise.resolve(l.next()).then(function(b) {
|
|
1926
|
+
return s[h](b);
|
|
1927
|
+
}, function(b) {
|
|
1928
|
+
return i(b);
|
|
1929
|
+
}), [4, new Promise(function(b) {
|
|
1930
|
+
return s[h] = b;
|
|
1926
1931
|
})]);
|
|
1927
1932
|
case 2:
|
|
1928
|
-
return
|
|
1933
|
+
return p = m.sent(), p === void 0 ? [2, c[h].value] : p.done ? [2, p.value] : (a[h] = p.value, [4, r(a.slice())]);
|
|
1929
1934
|
case 3:
|
|
1930
|
-
return
|
|
1935
|
+
return m.sent(), [3, 1];
|
|
1931
1936
|
case 4:
|
|
1932
1937
|
return [
|
|
1933
1938
|
2
|
|
@@ -1958,7 +1963,7 @@ function En(e) {
|
|
|
1958
1963
|
});
|
|
1959
1964
|
});
|
|
1960
1965
|
}
|
|
1961
|
-
class
|
|
1966
|
+
class $n {
|
|
1962
1967
|
graffiti;
|
|
1963
1968
|
callbacks = /* @__PURE__ */ new Set();
|
|
1964
1969
|
options;
|
|
@@ -1979,16 +1984,16 @@ class Sn {
|
|
|
1979
1984
|
this.options = t ?? {}, this.graffiti = n, this.login = n.login.bind(n), this.logout = n.logout.bind(n), this.sessionEvents = n.sessionEvents, this.postMedia = n.postMedia.bind(n), this.getMedia = n.getMedia.bind(n), this.deleteMedia = n.deleteMedia.bind(n), this.actorToHandle = n.actorToHandle.bind(n), this.handleToActor = n.handleToActor.bind(n);
|
|
1980
1985
|
}
|
|
1981
1986
|
synchronize(n, t, r, i, o = /* @__PURE__ */ new Set()) {
|
|
1982
|
-
const s = new
|
|
1987
|
+
const s = new Q(
|
|
1983
1988
|
async (u, c) => {
|
|
1984
|
-
const a = await
|
|
1989
|
+
const a = await et(r), f = (d) => {
|
|
1985
1990
|
if (d?.tombstone)
|
|
1986
1991
|
o.has(d.object.url) && u(d);
|
|
1987
|
-
else if (d && n(d.object) && (this.options.omniscient ||
|
|
1992
|
+
else if (d && n(d.object) && (this.options.omniscient || Qe(d.object, i))) {
|
|
1988
1993
|
let l = JSON.parse(
|
|
1989
1994
|
JSON.stringify(d.object)
|
|
1990
1995
|
);
|
|
1991
|
-
this.options.omniscient || (l =
|
|
1996
|
+
this.options.omniscient || (l = Ye(l, t, i?.actor)), a(l) && (u({ object: l }), o.add(l.url));
|
|
1992
1997
|
}
|
|
1993
1998
|
};
|
|
1994
1999
|
this.callbacks.add(f), await c, this.callbacks.delete(f);
|
|
@@ -2030,7 +2035,7 @@ class Sn {
|
|
|
2030
2035
|
* @group 0 - Synchronize Methods
|
|
2031
2036
|
*/
|
|
2032
2037
|
synchronizeGet(n, t, r) {
|
|
2033
|
-
const i =
|
|
2038
|
+
const i = me(n);
|
|
2034
2039
|
function o(s) {
|
|
2035
2040
|
return s.url === i;
|
|
2036
2041
|
}
|
|
@@ -2069,7 +2074,7 @@ class Sn {
|
|
|
2069
2074
|
} catch (t) {
|
|
2070
2075
|
throw t instanceof T && this.synchronizeDispatch({
|
|
2071
2076
|
tombstone: !0,
|
|
2072
|
-
object: { url:
|
|
2077
|
+
object: { url: me(n[0]) }
|
|
2073
2078
|
}), t;
|
|
2074
2079
|
}
|
|
2075
2080
|
};
|
|
@@ -2081,7 +2086,7 @@ class Sn {
|
|
|
2081
2086
|
delete = async (...n) => {
|
|
2082
2087
|
const t = {
|
|
2083
2088
|
tombstone: !0,
|
|
2084
|
-
object: { url:
|
|
2089
|
+
object: { url: me(n[0]) }
|
|
2085
2090
|
};
|
|
2086
2091
|
try {
|
|
2087
2092
|
const r = await this.graffiti.delete(...n);
|
|
@@ -2129,9 +2134,9 @@ class Sn {
|
|
|
2129
2134
|
return this.objectStreamContinue(t);
|
|
2130
2135
|
};
|
|
2131
2136
|
}
|
|
2132
|
-
const
|
|
2137
|
+
const Tn = {
|
|
2133
2138
|
install(e, n) {
|
|
2134
|
-
const t = n.graffiti, r = new
|
|
2139
|
+
const t = n.graffiti, r = new $n(t), i = E(void 0);
|
|
2135
2140
|
r.sessionEvents.addEventListener("initialized", async (o) => {
|
|
2136
2141
|
const s = o.detail;
|
|
2137
2142
|
if (s && s.error && console.error(s.error), s && s.href) {
|
|
@@ -2152,24 +2157,24 @@ const An = {
|
|
|
2152
2157
|
}), r.sessionEvents.addEventListener("logout", (o) => {
|
|
2153
2158
|
const s = o.detail;
|
|
2154
2159
|
s.error ? (console.error("Error logging out:"), console.error(s.error)) : i.value = null;
|
|
2155
|
-
}),
|
|
2160
|
+
}), Kt(r), Xt(i), e.component("GraffitiDiscover", We), e.component("GraffitiGet", Be), e.component("GraffitiGetMedia", Je), e.component("GraffitiActorToHandle", q), e.component("GraffitiHandleToActor", Xe), e.component("GraffitiObjectInfo", de), e.config.globalProperties.$graffiti = r, e.config.globalProperties.$graffitiSession = i;
|
|
2156
2161
|
}
|
|
2157
|
-
},
|
|
2162
|
+
}, Gn = We, Mn = Be, Zn = Je, In = q, Rn = Xe, Cn = de;
|
|
2158
2163
|
export {
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2164
|
+
In as GraffitiActorToHandle,
|
|
2165
|
+
Gn as GraffitiDiscover,
|
|
2166
|
+
Mn as GraffitiGet,
|
|
2167
|
+
Zn as GraffitiGetMedia,
|
|
2168
|
+
Rn as GraffitiHandleToActor,
|
|
2169
|
+
Cn as GraffitiObjectInfo,
|
|
2170
|
+
Tn as GraffitiPlugin,
|
|
2171
|
+
Oe as useGraffiti,
|
|
2172
|
+
Yt as useGraffitiActorToHandle,
|
|
2173
|
+
Qt as useGraffitiDiscover,
|
|
2174
|
+
fn as useGraffitiGet,
|
|
2175
|
+
dn as useGraffitiGetMedia,
|
|
2176
|
+
wn as useGraffitiHandleToActor,
|
|
2177
|
+
Nn as useGraffitiSession,
|
|
2178
|
+
fe as useGraffitiSynchronize
|
|
2174
2179
|
};
|
|
2175
2180
|
//# sourceMappingURL=plugin.mjs.map
|