@graffiti-garden/wrapper-vue 1.2.0 → 1.2.2
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 +404 -393
- 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.map +1 -1
- package/dist/node/plugin.js +1 -1
- package/dist/node/plugin.js.map +1 -1
- package/dist/node/plugin.mjs +275 -268
- package/dist/node/plugin.mjs.map +1 -1
- package/package.json +3 -3
- package/src/composables/discover.ts +22 -10
- package/src/composables/get-media.ts +4 -1
- package/src/composables/get.ts +6 -1
- package/src/composables/resolve-string.ts +6 -1
package/dist/browser/plugin.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as x, onScopeDispose as Pe, watch as
|
|
1
|
+
import { ref as x, onScopeDispose as Pe, watch as W, toValue as j, defineComponent as F, toRef as k, renderSlot as K, unref as v, createElementVNode as y, toDisplayString as S, createElementBlock as g, openBlock as w, createCommentVNode as $e, createTextVNode as Ae, createVNode as V, 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);
|
|
@@ -17,7 +17,7 @@ class ke extends Error {
|
|
|
17
17
|
function me(e) {
|
|
18
18
|
return typeof e == "string" ? e : e.url;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function nt(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 Qe(e, n) {
|
|
|
26
26
|
e.allowed.includes(n.actor))
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function rt(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 {
|
|
@@ -36,7 +36,7 @@ function Ye(e, n, t) {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
let ye;
|
|
39
|
-
async function
|
|
39
|
+
async function ot(e) {
|
|
40
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 });
|
|
@@ -83,19 +83,19 @@ function _(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 q extends Error {
|
|
87
87
|
constructor() {
|
|
88
88
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
const
|
|
91
|
+
const it = {};
|
|
92
92
|
function ue(e) {
|
|
93
|
-
return
|
|
93
|
+
return it;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function st(e, n) {
|
|
96
96
|
return typeof n == "bigint" ? n.toString() : n;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function ut(e) {
|
|
99
99
|
return {
|
|
100
100
|
get value() {
|
|
101
101
|
{
|
|
@@ -105,17 +105,17 @@ function rt(e) {
|
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function at(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 Ne = /* @__PURE__ */ Symbol("evaluating");
|
|
113
|
+
function J(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 !== Ne)
|
|
118
|
+
return r === void 0 && (r = Ne, r = t()), r;
|
|
119
119
|
},
|
|
120
120
|
set(i) {
|
|
121
121
|
Object.defineProperty(e, n, {
|
|
@@ -126,22 +126,22 @@ function W(e, n, t) {
|
|
|
126
126
|
configurable: !0
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
const
|
|
129
|
+
const Fe = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
130
130
|
};
|
|
131
|
-
function
|
|
131
|
+
function ct(e) {
|
|
132
132
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function lt(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 Q(e) {
|
|
139
139
|
return {};
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function ft(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 dt = {
|
|
145
145
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
146
146
|
int32: [-2147483648, 2147483647],
|
|
147
147
|
uint32: [0, 4294967295],
|
|
@@ -156,7 +156,7 @@ function ee(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;
|
|
@@ -173,62 +173,62 @@ function ae(e, n, t) {
|
|
|
173
173
|
}
|
|
174
174
|
return delete r.inst, delete r.continue, n?.reportInput || delete r.input, r;
|
|
175
175
|
}
|
|
176
|
-
const
|
|
176
|
+
const Le = (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, st, 2), Object.defineProperty(e, "toString", {
|
|
184
184
|
value: () => e.message,
|
|
185
185
|
enumerable: !1
|
|
186
186
|
});
|
|
187
|
-
},
|
|
187
|
+
}, ht = _("$ZodError", Le), ce = _("$ZodError", Le, { Parent: Error }), pt = (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 q();
|
|
191
191
|
if (s.issues.length) {
|
|
192
192
|
const u = new (i?.Err ?? e)(s.issues.map((c) => ae(c, o, ue())));
|
|
193
|
-
throw
|
|
193
|
+
throw Fe(u, i?.callee), u;
|
|
194
194
|
}
|
|
195
195
|
return s.value;
|
|
196
|
-
},
|
|
196
|
+
}, mt = /* @__PURE__ */ pt(ce), yt = (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
200
|
const u = new (i?.Err ?? e)(s.issues.map((c) => ae(c, o, ue())));
|
|
201
|
-
throw
|
|
201
|
+
throw Fe(u, i?.callee), u;
|
|
202
202
|
}
|
|
203
203
|
return s.value;
|
|
204
|
-
},
|
|
204
|
+
}, vt = /* @__PURE__ */ yt(ce), bt = (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 q();
|
|
208
208
|
return o.issues.length ? {
|
|
209
209
|
success: !1,
|
|
210
|
-
error: new (e ??
|
|
210
|
+
error: new (e ?? ht)(o.issues.map((s) => ae(s, i, ue())))
|
|
211
211
|
} : { success: !0, data: o.value };
|
|
212
|
-
},
|
|
212
|
+
}, Ue = /* @__PURE__ */ bt(ce), gt = (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
217
|
error: new e(o.issues.map((s) => ae(s, i, ue())))
|
|
218
218
|
} : { success: !0, data: o.value };
|
|
219
|
-
},
|
|
219
|
+
}, Ve = /* @__PURE__ */ gt(ce), wt = (e) => {
|
|
220
220
|
const n = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
221
221
|
return new RegExp(`^${n}$`);
|
|
222
|
-
},
|
|
222
|
+
}, _t = /^-?\d+$/, zt = /^-?\d+(?:\.\d+)?$/, qe = /* @__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
|
+
}), Pt = {
|
|
226
226
|
number: "number",
|
|
227
227
|
bigint: "bigint",
|
|
228
228
|
object: "date"
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
const t =
|
|
229
|
+
}, jt = /* @__PURE__ */ _("$ZodCheckGreaterThan", (e, n) => {
|
|
230
|
+
qe.init(e, n);
|
|
231
|
+
const t = Pt[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 Ce = (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
|
+
}), kt = /* @__PURE__ */ _("$ZodCheckNumberFormat", (e, n) => {
|
|
247
|
+
qe.init(e, n), n.format = n.format || "float64";
|
|
248
|
+
const t = n.format?.includes("int"), r = t ? "int" : "number", [i, o] = dt[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 = _t);
|
|
252
252
|
}), e._zod.check = (s) => {
|
|
253
253
|
const u = s.value;
|
|
254
254
|
if (t) {
|
|
@@ -304,13 +304,13 @@ const Ce = (e, n) => {
|
|
|
304
304
|
continue: !n.abort
|
|
305
305
|
});
|
|
306
306
|
};
|
|
307
|
-
}),
|
|
307
|
+
}), Et = {
|
|
308
308
|
major: 4,
|
|
309
309
|
minor: 3,
|
|
310
310
|
patch: 6
|
|
311
|
-
},
|
|
311
|
+
}, Z = /* @__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 = Et;
|
|
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)
|
|
@@ -331,7 +331,7 @@ const Ce = (e, n) => {
|
|
|
331
331
|
continue;
|
|
332
332
|
const l = s.issues.length, h = d._zod.check(s);
|
|
333
333
|
if (h instanceof Promise && c?.async === !1)
|
|
334
|
-
throw new
|
|
334
|
+
throw new q();
|
|
335
335
|
if (f || h instanceof Promise)
|
|
336
336
|
f = (f ?? Promise.resolve()).then(async () => {
|
|
337
337
|
await h, s.issues.length !== l && (a || (a = ee(s, l)));
|
|
@@ -349,7 +349,7 @@ const Ce = (e, n) => {
|
|
|
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 q();
|
|
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 Ce = (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 q();
|
|
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
|
+
J(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 Ve(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
|
-
|
|
385
|
+
}), Ot = /* @__PURE__ */ _("$ZodString", (e, n) => {
|
|
386
|
+
Z.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? wt(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 Ce = (e, n) => {
|
|
|
396
396
|
inst: e
|
|
397
397
|
}), t;
|
|
398
398
|
};
|
|
399
|
-
}),
|
|
400
|
-
|
|
399
|
+
}), He = /* @__PURE__ */ _("$ZodNumber", (e, n) => {
|
|
400
|
+
Z.init(e, n), e._zod.pattern = e._zod.bag.pattern ?? zt, e._zod.parse = (t, r) => {
|
|
401
401
|
if (n.coerce)
|
|
402
402
|
try {
|
|
403
403
|
t.value = Number(t.value);
|
|
@@ -415,16 +415,16 @@ const Ce = (e, n) => {
|
|
|
415
415
|
...o ? { received: o } : {}
|
|
416
416
|
}), t;
|
|
417
417
|
};
|
|
418
|
-
}),
|
|
419
|
-
|
|
420
|
-
}),
|
|
421
|
-
|
|
418
|
+
}), St = /* @__PURE__ */ _("$ZodNumberFormat", (e, n) => {
|
|
419
|
+
kt.init(e, n), He.init(e, n);
|
|
420
|
+
}), xt = /* @__PURE__ */ _("$ZodUnknown", (e, n) => {
|
|
421
|
+
Z.init(e, n), e._zod.parse = (t) => t;
|
|
422
422
|
});
|
|
423
|
-
function
|
|
424
|
-
e.issues.length && n.issues.push(...
|
|
423
|
+
function Ge(e, n, t) {
|
|
424
|
+
e.issues.length && n.issues.push(...Ce(t, e.issues)), n.value[t] = e.value;
|
|
425
425
|
}
|
|
426
|
-
const
|
|
427
|
-
|
|
426
|
+
const $t = /* @__PURE__ */ _("$ZodArray", (e, n) => {
|
|
427
|
+
Z.init(e, n), e._zod.parse = (t, r) => {
|
|
428
428
|
const i = t.value;
|
|
429
429
|
if (!Array.isArray(i))
|
|
430
430
|
return t.issues.push({
|
|
@@ -440,7 +440,7 @@ const Ot = /* @__PURE__ */ _("$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) => Ge(a, t, s))) : Ge(c, t, s);
|
|
444
444
|
}
|
|
445
445
|
return o.length ? Promise.all(o).then(() => t) : t;
|
|
446
446
|
};
|
|
@@ -449,16 +449,16 @@ function re(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 At(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 = ft(e.shape);
|
|
462
462
|
return {
|
|
463
463
|
...e,
|
|
464
464
|
keys: n,
|
|
@@ -467,7 +467,7 @@ function Et(e) {
|
|
|
467
467
|
optionalKeys: new Set(t)
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Nt(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))
|
|
@@ -486,8 +486,8 @@ function St(e, n, t, r, i, o) {
|
|
|
486
486
|
inst: o
|
|
487
487
|
}), e.length ? Promise.all(e).then(() => t) : t;
|
|
488
488
|
}
|
|
489
|
-
const
|
|
490
|
-
if (
|
|
489
|
+
const Gt = /* @__PURE__ */ _("$ZodObject", (e, n) => {
|
|
490
|
+
if (Z.init(e, n), !Object.getOwnPropertyDescriptor(n, "shape")?.get) {
|
|
491
491
|
const u = n.shape;
|
|
492
492
|
Object.defineProperty(n, "shape", {
|
|
493
493
|
get: () => {
|
|
@@ -498,8 +498,8 @@ const xt = /* @__PURE__ */ _("$ZodObject", (e, n) => {
|
|
|
498
498
|
}
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
|
-
const r =
|
|
502
|
-
|
|
501
|
+
const r = ut(() => At(n));
|
|
502
|
+
J(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 xt = /* @__PURE__ */ _("$ZodObject", (e, n) => {
|
|
|
511
511
|
}
|
|
512
512
|
return c;
|
|
513
513
|
});
|
|
514
|
-
const i =
|
|
514
|
+
const i = ct, o = n.catchall;
|
|
515
515
|
let s;
|
|
516
516
|
e._zod.parse = (u, c) => {
|
|
517
517
|
s ?? (s = r.value);
|
|
@@ -526,19 +526,19 @@ const xt = /* @__PURE__ */ _("$ZodObject", (e, n) => {
|
|
|
526
526
|
u.value = {};
|
|
527
527
|
const f = [], d = s.shape;
|
|
528
528
|
for (const l of s.keys) {
|
|
529
|
-
const h = d[l], p = h._zod.optout === "optional",
|
|
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) => re(b, u, l, a, p))) : re(m, u, l, a, p);
|
|
531
531
|
}
|
|
532
|
-
return o ?
|
|
532
|
+
return o ? Nt(f, a, u, c, r.value, e) : f.length ? Promise.all(f).then(() => u) : u;
|
|
533
533
|
};
|
|
534
534
|
});
|
|
535
535
|
function Te(e, n) {
|
|
536
536
|
return e.issues.length && n === void 0 ? { issues: [], value: void 0 } : e;
|
|
537
537
|
}
|
|
538
|
-
const
|
|
539
|
-
|
|
538
|
+
const Tt = /* @__PURE__ */ _("$ZodOptional", (e, n) => {
|
|
539
|
+
Z.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", J(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), J(e._zod, "pattern", () => {
|
|
540
540
|
const t = n.innerType._zod.pattern;
|
|
541
|
-
return t ? new RegExp(`^(${
|
|
541
|
+
return t ? new RegExp(`^(${at(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);
|
|
@@ -547,8 +547,8 @@ const $t = /* @__PURE__ */ _("$ZodOptional", (e, n) => {
|
|
|
547
547
|
return t.value === void 0 ? t : n.innerType._zod.run(t, r);
|
|
548
548
|
};
|
|
549
549
|
});
|
|
550
|
-
var
|
|
551
|
-
class
|
|
550
|
+
var Me;
|
|
551
|
+
class Mt {
|
|
552
552
|
constructor() {
|
|
553
553
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
554
554
|
}
|
|
@@ -577,192 +577,199 @@ class At {
|
|
|
577
577
|
return this._map.has(n);
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
|
-
function
|
|
581
|
-
return new
|
|
580
|
+
function Zt() {
|
|
581
|
+
return new Mt();
|
|
582
582
|
}
|
|
583
|
-
(
|
|
583
|
+
(Me = globalThis).__zod_globalRegistry ?? (Me.__zod_globalRegistry = Zt());
|
|
584
584
|
// @__NO_SIDE_EFFECTS__
|
|
585
|
-
function
|
|
585
|
+
function It(e, n) {
|
|
586
586
|
return new e({
|
|
587
587
|
type: "string",
|
|
588
|
-
...
|
|
588
|
+
...Q()
|
|
589
589
|
});
|
|
590
590
|
}
|
|
591
591
|
// @__NO_SIDE_EFFECTS__
|
|
592
|
-
function
|
|
592
|
+
function Rt(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
|
+
...Q()
|
|
599
599
|
});
|
|
600
600
|
}
|
|
601
601
|
// @__NO_SIDE_EFFECTS__
|
|
602
|
-
function
|
|
602
|
+
function Dt(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 Ft(e, n) {
|
|
609
|
+
return new jt({
|
|
610
610
|
check: "greater_than",
|
|
611
|
-
...
|
|
611
|
+
...Q(),
|
|
612
612
|
value: e,
|
|
613
613
|
inclusive: !0
|
|
614
614
|
});
|
|
615
615
|
}
|
|
616
616
|
// @__NO_SIDE_EFFECTS__
|
|
617
|
-
function
|
|
618
|
-
return /* @__PURE__ */
|
|
617
|
+
function Ct(e) {
|
|
618
|
+
return /* @__PURE__ */ Ft(0);
|
|
619
619
|
}
|
|
620
620
|
const C = /* @__PURE__ */ _("ZodMiniType", (e, n) => {
|
|
621
621
|
if (!e._zod)
|
|
622
622
|
throw new Error("Uninitialized schema in ZodMiniType.");
|
|
623
|
-
|
|
623
|
+
Z.init(e, n), e.def = n, e.type = n.type, e.parse = (t, r) => mt(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => Ue(e, t, r), e.parseAsync = async (t, r) => vt(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => Ve(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) => lt(e, t, r), e.brand = () => e, e.register = ((t, r) => (t.add(e, r), e)), e.apply = (t) => t(e);
|
|
630
|
+
}), Lt = /* @__PURE__ */ _("ZodMiniString", (e, n) => {
|
|
631
|
+
Ot.init(e, n), C.init(e, n);
|
|
632
632
|
});
|
|
633
633
|
// @__NO_SIDE_EFFECTS__
|
|
634
|
-
function
|
|
635
|
-
return /* @__PURE__ */
|
|
634
|
+
function Ut(e) {
|
|
635
|
+
return /* @__PURE__ */ It(Lt);
|
|
636
636
|
}
|
|
637
|
-
const
|
|
638
|
-
|
|
639
|
-
}),
|
|
640
|
-
|
|
637
|
+
const Vt = /* @__PURE__ */ _("ZodMiniNumber", (e, n) => {
|
|
638
|
+
He.init(e, n), C.init(e, n);
|
|
639
|
+
}), qt = /* @__PURE__ */ _("ZodMiniNumberFormat", (e, n) => {
|
|
640
|
+
St.init(e, n), Vt.init(e, n);
|
|
641
641
|
});
|
|
642
642
|
// @__NO_SIDE_EFFECTS__
|
|
643
|
-
function
|
|
644
|
-
return /* @__PURE__ */
|
|
643
|
+
function Ht(e) {
|
|
644
|
+
return /* @__PURE__ */ Rt(qt);
|
|
645
645
|
}
|
|
646
|
-
const
|
|
647
|
-
|
|
646
|
+
const Bt = /* @__PURE__ */ _("ZodMiniUnknown", (e, n) => {
|
|
647
|
+
xt.init(e, n), C.init(e, n);
|
|
648
648
|
});
|
|
649
649
|
// @__NO_SIDE_EFFECTS__
|
|
650
|
-
function
|
|
651
|
-
return /* @__PURE__ */
|
|
650
|
+
function Wt() {
|
|
651
|
+
return /* @__PURE__ */ Dt(Bt);
|
|
652
652
|
}
|
|
653
|
-
const
|
|
654
|
-
|
|
653
|
+
const Jt = /* @__PURE__ */ _("ZodMiniArray", (e, n) => {
|
|
654
|
+
$t.init(e, n), C.init(e, n);
|
|
655
655
|
});
|
|
656
656
|
// @__NO_SIDE_EFFECTS__
|
|
657
|
-
function
|
|
658
|
-
return new
|
|
657
|
+
function Xt(e, n) {
|
|
658
|
+
return new Jt({
|
|
659
659
|
type: "array",
|
|
660
660
|
element: e,
|
|
661
|
-
...
|
|
661
|
+
...Q()
|
|
662
662
|
});
|
|
663
663
|
}
|
|
664
|
-
const
|
|
665
|
-
|
|
664
|
+
const Kt = /* @__PURE__ */ _("ZodMiniObject", (e, n) => {
|
|
665
|
+
Gt.init(e, n), C.init(e, n), J(e, "shape", () => n.shape);
|
|
666
666
|
});
|
|
667
667
|
// @__NO_SIDE_EFFECTS__
|
|
668
|
-
function
|
|
669
|
-
return new
|
|
668
|
+
function Qt(e, n) {
|
|
669
|
+
return new Kt({
|
|
670
670
|
type: "object",
|
|
671
671
|
shape: e,
|
|
672
|
-
catchall: /* @__PURE__ */
|
|
673
|
-
...
|
|
672
|
+
catchall: /* @__PURE__ */ Wt(),
|
|
673
|
+
...Q()
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
|
-
const
|
|
677
|
-
|
|
676
|
+
const Yt = /* @__PURE__ */ _("ZodMiniOptional", (e, n) => {
|
|
677
|
+
Tt.init(e, n), C.init(e, n);
|
|
678
678
|
});
|
|
679
679
|
// @__NO_SIDE_EFFECTS__
|
|
680
|
-
function
|
|
681
|
-
return new
|
|
680
|
+
function Ze(e) {
|
|
681
|
+
return new Yt({
|
|
682
682
|
type: "optional",
|
|
683
683
|
innerType: e
|
|
684
684
|
});
|
|
685
685
|
}
|
|
686
|
-
(/* @__PURE__ */
|
|
687
|
-
const
|
|
688
|
-
function
|
|
689
|
-
if (!
|
|
690
|
-
|
|
686
|
+
(/* @__PURE__ */ Ht()).check(/* @__PURE__ */ Ct());
|
|
687
|
+
const R = {};
|
|
688
|
+
function en(e) {
|
|
689
|
+
if (!R.graffitiSession)
|
|
690
|
+
R.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 tn(e) {
|
|
697
|
+
if (!R.graffitiSynchronize)
|
|
698
|
+
R.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
704
|
function le() {
|
|
705
|
-
const e =
|
|
705
|
+
const e = R.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
|
|
712
|
+
function Ee() {
|
|
713
713
|
return le();
|
|
714
714
|
}
|
|
715
|
-
function
|
|
716
|
-
const e =
|
|
715
|
+
function Zn() {
|
|
716
|
+
const e = R.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
|
-
|
|
723
|
+
const Ie = 50;
|
|
724
|
+
function nn(e, n, t, r = !1) {
|
|
724
725
|
const i = le(), o = /* @__PURE__ */ new Map(), s = x([]);
|
|
725
726
|
let u = async () => {
|
|
726
727
|
};
|
|
727
728
|
const c = async () => u(), a = x(!0);
|
|
728
729
|
let f, d;
|
|
729
|
-
Pe(() => {
|
|
730
|
-
f?.return(null), d?.return({ cursor: "" });
|
|
730
|
+
Pe(async () => {
|
|
731
|
+
await f?.return(null), await d?.return({ cursor: "" });
|
|
731
732
|
});
|
|
732
733
|
const l = x(0), h = () => [j(e), j(n), j(t)];
|
|
733
|
-
return
|
|
734
|
+
return W(
|
|
734
735
|
() => `${l.value}:${JSON.stringify(h())}`,
|
|
735
|
-
(p,
|
|
736
|
-
const
|
|
736
|
+
(p, m, b) => {
|
|
737
|
+
const E = h();
|
|
737
738
|
o.clear(), s.value = [], a.value = !0;
|
|
738
|
-
const
|
|
739
|
-
f =
|
|
739
|
+
const O = i.synchronizeDiscover(...E);
|
|
740
|
+
f = O;
|
|
740
741
|
let P, $ = !0;
|
|
741
|
-
b(() => {
|
|
742
|
-
$ = !1,
|
|
742
|
+
b(async () => {
|
|
743
|
+
$ = !1, await O.return(null), await P?.return({ cursor: "" });
|
|
743
744
|
});
|
|
744
745
|
function he(z = 0) {
|
|
745
746
|
setTimeout(() => {
|
|
746
747
|
$ && l.value++;
|
|
747
748
|
}, z);
|
|
748
749
|
}
|
|
749
|
-
let U;
|
|
750
|
+
let U, Se = 0;
|
|
750
751
|
(async () => {
|
|
751
|
-
for await (const z of
|
|
752
|
+
for await (const z of O) {
|
|
752
753
|
if (!$) break;
|
|
753
|
-
z.tombstone ? o.delete(z.object.url) : o.set(z.object.url, z.object)
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
754
|
+
z.tombstone ? o.delete(z.object.url) : o.set(z.object.url, z.object);
|
|
755
|
+
const N = Date.now();
|
|
756
|
+
if (!U) {
|
|
757
|
+
const et = N - Se < Ie ? Ie : 0;
|
|
758
|
+
U = new Promise((tt) => {
|
|
759
|
+
setTimeout(() => {
|
|
760
|
+
$ && (s.value = Array.from(o.values())), U = void 0, tt();
|
|
761
|
+
}, et);
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
Se = N;
|
|
758
765
|
}
|
|
759
766
|
})();
|
|
760
|
-
let pe = !1,
|
|
767
|
+
let pe = !1, xe = () => i.discover(...E);
|
|
761
768
|
u = async () => {
|
|
762
769
|
if (!(pe || !$)) {
|
|
763
770
|
pe = !0;
|
|
764
771
|
try {
|
|
765
|
-
P =
|
|
772
|
+
P = xe();
|
|
766
773
|
} catch (z) {
|
|
767
774
|
return console.error("Fatal error in discover"), console.error(z), he(5e3);
|
|
768
775
|
}
|
|
@@ -771,12 +778,12 @@ function Qt(e, n, t, r = !1) {
|
|
|
771
778
|
let z;
|
|
772
779
|
try {
|
|
773
780
|
z = await P.next();
|
|
774
|
-
} catch (
|
|
775
|
-
return
|
|
781
|
+
} catch (N) {
|
|
782
|
+
return N instanceof ke || N instanceof Error && N.name === "GraffitiErrorCursorExpired" ? he() : (console.error("Fatal error in discover"), console.error(N), he(5e3));
|
|
776
783
|
}
|
|
777
784
|
if (!$) return;
|
|
778
785
|
if (z.done) {
|
|
779
|
-
|
|
786
|
+
xe = () => i.continueDiscover(z.value.cursor, E[2]);
|
|
780
787
|
break;
|
|
781
788
|
} else z.value.error && console.error(z.value.error);
|
|
782
789
|
}
|
|
@@ -786,7 +793,7 @@ function Qt(e, n, t, r = !1) {
|
|
|
786
793
|
}, c();
|
|
787
794
|
},
|
|
788
795
|
{ immediate: !0 }
|
|
789
|
-
),
|
|
796
|
+
), W(
|
|
790
797
|
() => j(r),
|
|
791
798
|
(p) => p && c()
|
|
792
799
|
), {
|
|
@@ -795,9 +802,9 @@ function Qt(e, n, t, r = !1) {
|
|
|
795
802
|
isFirstPoll: a
|
|
796
803
|
};
|
|
797
804
|
}
|
|
798
|
-
function
|
|
805
|
+
function Be(e, n) {
|
|
799
806
|
const t = x(void 0);
|
|
800
|
-
return
|
|
807
|
+
return W(
|
|
801
808
|
() => j(e),
|
|
802
809
|
async (r, i, o) => {
|
|
803
810
|
let s = !0;
|
|
@@ -813,7 +820,7 @@ function qe(e, n) {
|
|
|
813
820
|
s && (t.value = u);
|
|
814
821
|
} catch (u) {
|
|
815
822
|
if (!s) return;
|
|
816
|
-
t.value = null, u instanceof T || console.error(u);
|
|
823
|
+
t.value = null, u instanceof T || u instanceof Error && u.name === "GraffitiErrorNotFound" || console.error(u);
|
|
817
824
|
}
|
|
818
825
|
},
|
|
819
826
|
{ immediate: !0 }
|
|
@@ -821,34 +828,34 @@ function qe(e, n) {
|
|
|
821
828
|
output: t
|
|
822
829
|
};
|
|
823
830
|
}
|
|
824
|
-
function
|
|
831
|
+
function We(e) {
|
|
825
832
|
return e === void 0 ? "Loading..." : e === null ? "Not found" : e;
|
|
826
833
|
}
|
|
827
|
-
function
|
|
828
|
-
const n =
|
|
834
|
+
function rn(e) {
|
|
835
|
+
const n = Ee(), { output: t } = Be(
|
|
829
836
|
e,
|
|
830
837
|
n.actorToHandle.bind(n)
|
|
831
838
|
);
|
|
832
839
|
return { handle: t };
|
|
833
840
|
}
|
|
834
|
-
const
|
|
841
|
+
const H = /* @__PURE__ */ F({
|
|
835
842
|
__name: "ActorToHandle",
|
|
836
843
|
props: {
|
|
837
844
|
actor: {}
|
|
838
845
|
},
|
|
839
846
|
setup(e) {
|
|
840
|
-
const t = k(e, "actor"), { handle: r } =
|
|
841
|
-
return (i, o) =>
|
|
842
|
-
|
|
847
|
+
const t = k(e, "actor"), { handle: r } = rn(t);
|
|
848
|
+
return (i, o) => K(i.$slots, "default", { handle: v(r) }, () => [
|
|
849
|
+
y("span", null, S(v(We)(v(r))), 1)
|
|
843
850
|
]);
|
|
844
851
|
}
|
|
845
|
-
}),
|
|
852
|
+
}), on = ["data-url"], sn = { key: 0 }, un = { key: 1 }, an = { key: 0 }, cn = { key: 1 }, ln = ["disabled"], fn = { key: 1 }, dn = { key: 2 }, fe = /* @__PURE__ */ F({
|
|
846
853
|
__name: "ObjectInfo",
|
|
847
854
|
props: {
|
|
848
855
|
object: {}
|
|
849
856
|
},
|
|
850
857
|
setup(e) {
|
|
851
|
-
const n =
|
|
858
|
+
const n = Ee(), t = x(!1);
|
|
852
859
|
async function r(i, o) {
|
|
853
860
|
t.value = !0, await new Promise((s) => setTimeout(s, 0)), confirm(
|
|
854
861
|
"Are you sure you want to delete this object? It cannot be undone."
|
|
@@ -858,65 +865,65 @@ const q = /* @__PURE__ */ D({
|
|
|
858
865
|
key: 0,
|
|
859
866
|
"data-url": e.object.url
|
|
860
867
|
}, [
|
|
861
|
-
|
|
862
|
-
o[1] || (o[1] =
|
|
863
|
-
|
|
868
|
+
y("p", null, [
|
|
869
|
+
o[1] || (o[1] = Ae("@", -1)),
|
|
870
|
+
V(H, {
|
|
864
871
|
actor: e.object.actor
|
|
865
872
|
}, null, 8, ["actor"]),
|
|
866
|
-
o[2] || (o[2] =
|
|
873
|
+
o[2] || (o[2] = Ae(" posted:", -1))
|
|
867
874
|
]),
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
o[14] || (o[14] =
|
|
871
|
-
|
|
872
|
-
o[8] || (o[8] =
|
|
873
|
-
|
|
874
|
-
|
|
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)
|
|
875
882
|
]),
|
|
876
|
-
o[9] || (o[9] =
|
|
877
|
-
|
|
878
|
-
|
|
883
|
+
o[9] || (o[9] = y("dt", null, "Actor", -1)),
|
|
884
|
+
y("dd", null, [
|
|
885
|
+
y("code", null, S(e.object.actor), 1)
|
|
879
886
|
]),
|
|
880
|
-
o[10] || (o[10] =
|
|
881
|
-
|
|
882
|
-
|
|
887
|
+
o[10] || (o[10] = y("dt", null, "Handle", -1)),
|
|
888
|
+
y("dd", null, [
|
|
889
|
+
V(H, {
|
|
883
890
|
actor: e.object.actor
|
|
884
891
|
}, null, 8, ["actor"])
|
|
885
892
|
]),
|
|
886
|
-
o[11] || (o[11] =
|
|
887
|
-
|
|
888
|
-
|
|
893
|
+
o[11] || (o[11] = y("dt", null, "Content", -1)),
|
|
894
|
+
y("dd", null, [
|
|
895
|
+
y("pre", null, S(e.object.value), 1)
|
|
889
896
|
]),
|
|
890
|
-
o[12] || (o[12] =
|
|
891
|
-
|
|
892
|
-
Array.isArray(e.object.allowed) ? e.object.allowed.length === 0 ? (w(), g("p",
|
|
893
|
-
|
|
894
|
-
])])) :
|
|
895
|
-
|
|
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", un, [...o[4] || (o[4] = [
|
|
900
|
+
y("em", null, "No one is allowed (except you)", -1)
|
|
901
|
+
])])) : $e("", !0) : (w(), g("p", sn, [...o[3] || (o[3] = [
|
|
902
|
+
y("em", null, "Public", -1)
|
|
896
903
|
])])),
|
|
897
|
-
|
|
904
|
+
y("ul", null, [
|
|
898
905
|
(w(!0), g(be, null, ge(e.object.allowed, (s) => (w(), g("li", { key: s }, [
|
|
899
|
-
|
|
900
|
-
o[5] || (o[5] =
|
|
901
|
-
|
|
902
|
-
|
|
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)
|
|
903
910
|
]),
|
|
904
|
-
o[6] || (o[6] =
|
|
905
|
-
|
|
906
|
-
|
|
911
|
+
o[6] || (o[6] = y("dt", null, "Handle", -1)),
|
|
912
|
+
y("dd", null, [
|
|
913
|
+
V(H, { actor: s }, null, 8, ["actor"])
|
|
907
914
|
])
|
|
908
915
|
])
|
|
909
916
|
]))), 128))
|
|
910
917
|
])
|
|
911
918
|
]),
|
|
912
|
-
o[13] || (o[13] =
|
|
913
|
-
|
|
914
|
-
e.object.channels?.length ? (w(), g("ul",
|
|
919
|
+
o[13] || (o[13] = y("dt", null, "Channels", -1)),
|
|
920
|
+
y("dd", null, [
|
|
921
|
+
e.object.channels?.length ? (w(), g("ul", an, [
|
|
915
922
|
(w(!0), g(be, null, ge(e.object.channels, (s) => (w(), g("li", { key: s }, [
|
|
916
|
-
|
|
923
|
+
y("code", null, S(s), 1)
|
|
917
924
|
]))), 128))
|
|
918
|
-
])) : (w(), g("p",
|
|
919
|
-
|
|
925
|
+
])) : (w(), g("p", cn, [...o[7] || (o[7] = [
|
|
926
|
+
y("em", null, "No channels", -1)
|
|
920
927
|
])]))
|
|
921
928
|
])
|
|
922
929
|
])
|
|
@@ -925,18 +932,18 @@ const q = /* @__PURE__ */ D({
|
|
|
925
932
|
key: 0,
|
|
926
933
|
disabled: t.value,
|
|
927
934
|
onClick: o[0] || (o[0] = (s) => r(e.object, i.$graffitiSession.value))
|
|
928
|
-
}, S(t.value ? "Deleting..." : "Delete"), 9,
|
|
929
|
-
], 8,
|
|
930
|
-
|
|
931
|
-
|
|
935
|
+
}, S(t.value ? "Deleting..." : "Delete"), 9, ln)) : $e("", !0)
|
|
936
|
+
], 8, on)) : e.object === null ? (w(), g("article", fn, [...o[15] || (o[15] = [
|
|
937
|
+
y("p", null, [
|
|
938
|
+
y("em", null, "Graffiti object not found")
|
|
932
939
|
], -1)
|
|
933
|
-
])])) : (w(), g("article",
|
|
934
|
-
|
|
935
|
-
|
|
940
|
+
])])) : (w(), g("article", dn, [...o[16] || (o[16] = [
|
|
941
|
+
y("p", null, [
|
|
942
|
+
y("em", null, "Graffiti object loading...")
|
|
936
943
|
], -1)
|
|
937
944
|
])]));
|
|
938
945
|
}
|
|
939
|
-
}),
|
|
946
|
+
}), hn = { key: 0 }, pn = { key: 1 }, Je = /* @__PURE__ */ F({
|
|
940
947
|
__name: "Discover",
|
|
941
948
|
props: {
|
|
942
949
|
channels: {},
|
|
@@ -945,30 +952,30 @@ const q = /* @__PURE__ */ D({
|
|
|
945
952
|
autopoll: { type: Boolean }
|
|
946
953
|
},
|
|
947
954
|
setup(e) {
|
|
948
|
-
const n = e, { objects: t, poll: r, isFirstPoll: i } =
|
|
955
|
+
const n = e, { objects: t, poll: r, isFirstPoll: i } = nn(
|
|
949
956
|
k(n, "channels"),
|
|
950
957
|
k(n, "schema"),
|
|
951
958
|
k(n, "session"),
|
|
952
959
|
k(n, "autopoll")
|
|
953
960
|
);
|
|
954
|
-
return (o, s) =>
|
|
961
|
+
return (o, s) => K(o.$slots, "default", {
|
|
955
962
|
objects: v(t),
|
|
956
963
|
poll: v(r),
|
|
957
964
|
isFirstPoll: v(i)
|
|
958
965
|
}, () => [
|
|
959
|
-
v(i) ? (w(), g("p",
|
|
960
|
-
|
|
961
|
-
])])) : (w(), g("ul",
|
|
966
|
+
v(i) ? (w(), g("p", pn, [...s[0] || (s[0] = [
|
|
967
|
+
y("em", null, " Graffiti discover loading... ", -1)
|
|
968
|
+
])])) : (w(), g("ul", hn, [
|
|
962
969
|
(w(!0), g(be, null, ge(v(t), (u) => (w(), g("li", {
|
|
963
970
|
key: u.url
|
|
964
971
|
}, [
|
|
965
|
-
|
|
972
|
+
V(fe, { object: u }, null, 8, ["object"])
|
|
966
973
|
]))), 128))
|
|
967
974
|
]))
|
|
968
975
|
]);
|
|
969
976
|
}
|
|
970
977
|
});
|
|
971
|
-
function
|
|
978
|
+
function mn(e, n, t) {
|
|
972
979
|
const r = le(), i = x(void 0);
|
|
973
980
|
let o = async () => {
|
|
974
981
|
};
|
|
@@ -978,7 +985,7 @@ function fn(e, n, t) {
|
|
|
978
985
|
u?.return(null);
|
|
979
986
|
});
|
|
980
987
|
const c = () => [j(e), j(n), j(t)];
|
|
981
|
-
return
|
|
988
|
+
return W(
|
|
982
989
|
() => JSON.stringify(c()),
|
|
983
990
|
(a, f, d) => {
|
|
984
991
|
const l = c();
|
|
@@ -994,16 +1001,16 @@ function fn(e, n, t) {
|
|
|
994
1001
|
b.tombstone ? i.value = null : i.value = b.object;
|
|
995
1002
|
}
|
|
996
1003
|
})();
|
|
997
|
-
let
|
|
1004
|
+
let m = !1;
|
|
998
1005
|
o = async () => {
|
|
999
|
-
if (!(
|
|
1000
|
-
|
|
1006
|
+
if (!(m || !p)) {
|
|
1007
|
+
m = !0;
|
|
1001
1008
|
try {
|
|
1002
1009
|
await r.get(...l);
|
|
1003
1010
|
} catch (b) {
|
|
1004
|
-
b instanceof T || console.error(b);
|
|
1011
|
+
b instanceof T || b instanceof Error && b.name === "GraffitiErrorNotFound" || console.error(b);
|
|
1005
1012
|
}
|
|
1006
|
-
await new Promise((b) => setTimeout(b, 0)),
|
|
1013
|
+
await new Promise((b) => setTimeout(b, 0)), m = !1;
|
|
1007
1014
|
}
|
|
1008
1015
|
}, s();
|
|
1009
1016
|
},
|
|
@@ -1013,7 +1020,7 @@ function fn(e, n, t) {
|
|
|
1013
1020
|
poll: s
|
|
1014
1021
|
};
|
|
1015
1022
|
}
|
|
1016
|
-
const
|
|
1023
|
+
const Xe = /* @__PURE__ */ F({
|
|
1017
1024
|
__name: "Get",
|
|
1018
1025
|
props: {
|
|
1019
1026
|
url: {},
|
|
@@ -1021,20 +1028,20 @@ const We = /* @__PURE__ */ D({
|
|
|
1021
1028
|
session: {}
|
|
1022
1029
|
},
|
|
1023
1030
|
setup(e) {
|
|
1024
|
-
const n = e, { object: t, poll: r } =
|
|
1031
|
+
const n = e, { object: t, poll: r } = mn(
|
|
1025
1032
|
k(n, "url"),
|
|
1026
1033
|
k(n, "schema"),
|
|
1027
1034
|
k(n, "session")
|
|
1028
1035
|
);
|
|
1029
|
-
return (i, o) =>
|
|
1036
|
+
return (i, o) => K(i.$slots, "default", {
|
|
1030
1037
|
object: v(t),
|
|
1031
1038
|
poll: v(r)
|
|
1032
1039
|
}, () => [
|
|
1033
|
-
|
|
1040
|
+
V(fe, { object: v(t) }, null, 8, ["object"])
|
|
1034
1041
|
]);
|
|
1035
1042
|
}
|
|
1036
1043
|
});
|
|
1037
|
-
function
|
|
1044
|
+
function yn(e, n, t) {
|
|
1038
1045
|
const r = le(), i = x(
|
|
1039
1046
|
void 0
|
|
1040
1047
|
), o = x(0);
|
|
@@ -1048,7 +1055,7 @@ function dn(e, n, t) {
|
|
|
1048
1055
|
}), s);
|
|
1049
1056
|
}
|
|
1050
1057
|
const a = () => [j(e), j(n), j(t)];
|
|
1051
|
-
return
|
|
1058
|
+
return W(
|
|
1052
1059
|
() => `${o.value}:${JSON.stringify(a())}`,
|
|
1053
1060
|
async (f, d, l) => {
|
|
1054
1061
|
const h = a();
|
|
@@ -1058,18 +1065,18 @@ function dn(e, n, t) {
|
|
|
1058
1065
|
p = !1;
|
|
1059
1066
|
});
|
|
1060
1067
|
try {
|
|
1061
|
-
const { data:
|
|
1068
|
+
const { data: m, actor: b, allowed: E } = await r.getMedia(...h);
|
|
1062
1069
|
if (!p) return;
|
|
1063
|
-
const
|
|
1070
|
+
const O = URL.createObjectURL(m);
|
|
1064
1071
|
i.value = {
|
|
1065
|
-
data:
|
|
1066
|
-
dataUrl:
|
|
1072
|
+
data: m,
|
|
1073
|
+
dataUrl: O,
|
|
1067
1074
|
actor: b,
|
|
1068
|
-
allowed:
|
|
1075
|
+
allowed: E
|
|
1069
1076
|
};
|
|
1070
|
-
} catch (
|
|
1077
|
+
} catch (m) {
|
|
1071
1078
|
if (!p) return;
|
|
1072
|
-
|
|
1079
|
+
m instanceof T || m instanceof Error && m.name === "GraffitiErrorNotFound" ? i.value = null : console.error(m);
|
|
1073
1080
|
} finally {
|
|
1074
1081
|
u();
|
|
1075
1082
|
}
|
|
@@ -1082,7 +1089,7 @@ function dn(e, n, t) {
|
|
|
1082
1089
|
poll: c
|
|
1083
1090
|
};
|
|
1084
1091
|
}
|
|
1085
|
-
const
|
|
1092
|
+
const vn = ["src", "alt"], bn = ["src", "alt"], gn = ["src", "alt"], wn = ["src", "alt"], _n = ["data", "alt"], zn = { key: 6 }, Pn = { key: 7 }, Ke = /* @__PURE__ */ F({
|
|
1086
1093
|
__name: "GetMedia",
|
|
1087
1094
|
props: {
|
|
1088
1095
|
url: {},
|
|
@@ -1090,7 +1097,7 @@ const hn = ["src", "alt"], pn = ["src", "alt"], mn = ["src", "alt"], yn = ["src"
|
|
|
1090
1097
|
session: {}
|
|
1091
1098
|
},
|
|
1092
1099
|
setup(e) {
|
|
1093
|
-
const n = e, { media: t, poll: r } =
|
|
1100
|
+
const n = e, { media: t, poll: r } = yn(
|
|
1094
1101
|
k(n, "url"),
|
|
1095
1102
|
k(n, "accept"),
|
|
1096
1103
|
k(n, "session")
|
|
@@ -1098,7 +1105,7 @@ const hn = ["src", "alt"], pn = ["src", "alt"], mn = ["src", "alt"], yn = ["src"
|
|
|
1098
1105
|
function i() {
|
|
1099
1106
|
t.value && (window.location.href = t.value.dataUrl);
|
|
1100
1107
|
}
|
|
1101
|
-
return (o, s) =>
|
|
1108
|
+
return (o, s) => K(o.$slots, "default", {
|
|
1102
1109
|
media: v(t),
|
|
1103
1110
|
poll: v(r)
|
|
1104
1111
|
}, () => [
|
|
@@ -1106,53 +1113,53 @@ const hn = ["src", "alt"], pn = ["src", "alt"], mn = ["src", "alt"], yn = ["src"
|
|
|
1106
1113
|
key: 0,
|
|
1107
1114
|
src: v(t).dataUrl,
|
|
1108
1115
|
alt: `An image by ${v(t).actor}`
|
|
1109
|
-
}, null, 8,
|
|
1116
|
+
}, null, 8, vn)) : v(t)?.data.type.startsWith("video/") ? (w(), g("video", {
|
|
1110
1117
|
key: 1,
|
|
1111
1118
|
controls: "",
|
|
1112
1119
|
src: v(t).dataUrl,
|
|
1113
1120
|
alt: `A video by ${v(t).actor}`
|
|
1114
|
-
}, null, 8,
|
|
1121
|
+
}, null, 8, bn)) : v(t)?.data.type.startsWith("audio/") ? (w(), g("audio", {
|
|
1115
1122
|
key: 2,
|
|
1116
1123
|
controls: "",
|
|
1117
1124
|
src: v(t).dataUrl,
|
|
1118
1125
|
alt: `Audio by ${v(t).actor}`
|
|
1119
|
-
}, null, 8,
|
|
1126
|
+
}, null, 8, gn)) : v(t)?.data.type === "text/html" ? (w(), g("iframe", {
|
|
1120
1127
|
key: 3,
|
|
1121
1128
|
src: v(t).dataUrl,
|
|
1122
1129
|
alt: `HTML by ${v(t).actor}`,
|
|
1123
1130
|
sandbox: ""
|
|
1124
|
-
}, null, 8,
|
|
1131
|
+
}, null, 8, wn)) : v(t)?.data.type.startsWith("application/pdf") ? (w(), g("object", {
|
|
1125
1132
|
key: 4,
|
|
1126
1133
|
data: v(t).dataUrl,
|
|
1127
1134
|
type: "application/pdf",
|
|
1128
1135
|
alt: `PDF by ${v(t).actor}`
|
|
1129
|
-
}, null, 8,
|
|
1136
|
+
}, null, 8, _n)) : v(t) ? (w(), g("button", {
|
|
1130
1137
|
key: 5,
|
|
1131
1138
|
onClick: i
|
|
1132
|
-
}, "Download media")) : v(t) === null ? (w(), g("p",
|
|
1133
|
-
|
|
1134
|
-
])])) : (w(), g("p",
|
|
1135
|
-
|
|
1139
|
+
}, "Download media")) : v(t) === null ? (w(), g("p", zn, [...s[0] || (s[0] = [
|
|
1140
|
+
y("em", null, "Media not found", -1)
|
|
1141
|
+
])])) : (w(), g("p", Pn, [...s[1] || (s[1] = [
|
|
1142
|
+
y("em", null, " Media loading... ", -1)
|
|
1136
1143
|
])]))
|
|
1137
1144
|
]);
|
|
1138
1145
|
}
|
|
1139
1146
|
});
|
|
1140
|
-
function
|
|
1141
|
-
const n =
|
|
1147
|
+
function jn(e) {
|
|
1148
|
+
const n = Ee(), { output: t } = Be(
|
|
1142
1149
|
e,
|
|
1143
1150
|
n.handleToActor.bind(n)
|
|
1144
1151
|
);
|
|
1145
1152
|
return { actor: t };
|
|
1146
1153
|
}
|
|
1147
|
-
const
|
|
1154
|
+
const Qe = /* @__PURE__ */ F({
|
|
1148
1155
|
__name: "HandleToActor",
|
|
1149
1156
|
props: {
|
|
1150
1157
|
handle: {}
|
|
1151
1158
|
},
|
|
1152
1159
|
setup(e) {
|
|
1153
|
-
const t = k(e, "handle"), { actor: r } =
|
|
1154
|
-
return (i, o) =>
|
|
1155
|
-
|
|
1160
|
+
const t = k(e, "handle"), { actor: r } = jn(t);
|
|
1161
|
+
return (i, o) => K(i.$slots, "default", { actor: v(r) }, () => [
|
|
1162
|
+
y("span", null, S(v(We)(v(r))), 1)
|
|
1156
1163
|
]);
|
|
1157
1164
|
}
|
|
1158
1165
|
});
|
|
@@ -1163,14 +1170,14 @@ var we = function(e, n) {
|
|
|
1163
1170
|
for (var i in r) r.hasOwnProperty(i) && (t[i] = r[i]);
|
|
1164
1171
|
}, we(e, n);
|
|
1165
1172
|
};
|
|
1166
|
-
function
|
|
1173
|
+
function kn(e, n) {
|
|
1167
1174
|
we(e, n);
|
|
1168
1175
|
function t() {
|
|
1169
1176
|
this.constructor = e;
|
|
1170
1177
|
}
|
|
1171
1178
|
e.prototype = n === null ? Object.create(n) : (t.prototype = n.prototype, new t());
|
|
1172
1179
|
}
|
|
1173
|
-
function
|
|
1180
|
+
function D(e, n, t, r) {
|
|
1174
1181
|
function i(o) {
|
|
1175
1182
|
return o instanceof t ? o : new t(function(s) {
|
|
1176
1183
|
s(o);
|
|
@@ -1257,7 +1264,7 @@ function A(e, n) {
|
|
|
1257
1264
|
return { value: a[0] ? a[1] : void 0, done: !0 };
|
|
1258
1265
|
}
|
|
1259
1266
|
}
|
|
1260
|
-
function
|
|
1267
|
+
function L(e) {
|
|
1261
1268
|
var n = typeof Symbol == "function" && Symbol.iterator, t = n && e[n], r = 0;
|
|
1262
1269
|
if (t) return t.call(e);
|
|
1263
1270
|
if (e && typeof e.length == "number") return {
|
|
@@ -1267,10 +1274,10 @@ function F(e) {
|
|
|
1267
1274
|
};
|
|
1268
1275
|
throw new TypeError(n ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1269
1276
|
}
|
|
1270
|
-
function
|
|
1271
|
-
return this instanceof
|
|
1277
|
+
function X(e) {
|
|
1278
|
+
return this instanceof X ? (this.v = e, this) : new X(e);
|
|
1272
1279
|
}
|
|
1273
|
-
function
|
|
1280
|
+
function En(e, n, t) {
|
|
1274
1281
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1275
1282
|
var r = t.apply(e, n || []), i, o = [];
|
|
1276
1283
|
return i = {}, s("next"), s("throw"), s("return"), i[Symbol.asyncIterator] = function() {
|
|
@@ -1278,8 +1285,8 @@ function zn(e, n, t) {
|
|
|
1278
1285
|
}, i;
|
|
1279
1286
|
function s(l) {
|
|
1280
1287
|
r[l] && (i[l] = function(h) {
|
|
1281
|
-
return new Promise(function(p,
|
|
1282
|
-
o.push([l, h, p,
|
|
1288
|
+
return new Promise(function(p, m) {
|
|
1289
|
+
o.push([l, h, p, m]) > 1 || u(l, h);
|
|
1283
1290
|
});
|
|
1284
1291
|
});
|
|
1285
1292
|
}
|
|
@@ -1291,7 +1298,7 @@ function zn(e, n, t) {
|
|
|
1291
1298
|
}
|
|
1292
1299
|
}
|
|
1293
1300
|
function c(l) {
|
|
1294
|
-
l.value instanceof
|
|
1301
|
+
l.value instanceof X ? Promise.resolve(l.value.v).then(a, f) : d(o[0][2], l);
|
|
1295
1302
|
}
|
|
1296
1303
|
function a(l) {
|
|
1297
1304
|
u("next", l);
|
|
@@ -1303,10 +1310,10 @@ function zn(e, n, t) {
|
|
|
1303
1310
|
l(h), o.shift(), o.length && u(o[0][0], o[0][1]);
|
|
1304
1311
|
}
|
|
1305
1312
|
}
|
|
1306
|
-
var
|
|
1313
|
+
var Ye = (
|
|
1307
1314
|
/** @class */
|
|
1308
1315
|
(function(e) {
|
|
1309
|
-
|
|
1316
|
+
kn(n, e);
|
|
1310
1317
|
function n(t) {
|
|
1311
1318
|
var r = e.call(this, t) || this;
|
|
1312
1319
|
return Object.defineProperty(r, "name", {
|
|
@@ -1402,9 +1409,9 @@ var Ke = (
|
|
|
1402
1409
|
function _e(e) {
|
|
1403
1410
|
e != null && typeof e.then == "function" && e.then(se, se);
|
|
1404
1411
|
}
|
|
1405
|
-
var ve = 0,
|
|
1412
|
+
var ve = 0, Re = 1, M = 2, oe = 3, ze = 4, ie = 1024, se = function() {
|
|
1406
1413
|
};
|
|
1407
|
-
function
|
|
1414
|
+
function I(e) {
|
|
1408
1415
|
var n = e.err, t = Promise.resolve(e.execution).then(function(r) {
|
|
1409
1416
|
if (n != null)
|
|
1410
1417
|
throw n;
|
|
@@ -1416,10 +1423,10 @@ function Z(e) {
|
|
|
1416
1423
|
return t;
|
|
1417
1424
|
});
|
|
1418
1425
|
}
|
|
1419
|
-
function
|
|
1426
|
+
function G(e, n) {
|
|
1420
1427
|
var t = e.state >= oe;
|
|
1421
1428
|
return Promise.resolve(n).then(function(r) {
|
|
1422
|
-
return !t && e.state >= ze ?
|
|
1429
|
+
return !t && e.state >= ze ? I(e).then(function(i) {
|
|
1423
1430
|
return {
|
|
1424
1431
|
value: i,
|
|
1425
1432
|
done: !0
|
|
@@ -1427,14 +1434,14 @@ function N(e, n) {
|
|
|
1427
1434
|
}) : { value: r, done: t };
|
|
1428
1435
|
});
|
|
1429
1436
|
}
|
|
1430
|
-
function
|
|
1437
|
+
function Oe(e, n) {
|
|
1431
1438
|
var t, r;
|
|
1432
|
-
if (!(e.state >=
|
|
1433
|
-
if (e.state =
|
|
1434
|
-
|
|
1439
|
+
if (!(e.state >= M))
|
|
1440
|
+
if (e.state = M, e.onnext(), e.onstop(), e.err == null && (e.err = n), e.pushes.length === 0 && (typeof e.buffer > "u" || e.buffer.empty))
|
|
1441
|
+
B(e);
|
|
1435
1442
|
else
|
|
1436
1443
|
try {
|
|
1437
|
-
for (var i =
|
|
1444
|
+
for (var i = L(e.pushes), o = i.next(); !o.done; o = i.next()) {
|
|
1438
1445
|
var s = o.value;
|
|
1439
1446
|
s.resolve();
|
|
1440
1447
|
}
|
|
@@ -1448,16 +1455,16 @@ function Ee(e, n) {
|
|
|
1448
1455
|
}
|
|
1449
1456
|
}
|
|
1450
1457
|
}
|
|
1451
|
-
function
|
|
1458
|
+
function B(e) {
|
|
1452
1459
|
var n, t;
|
|
1453
1460
|
if (!(e.state >= oe)) {
|
|
1454
|
-
e.state <
|
|
1461
|
+
e.state < M && Oe(e), e.state = oe, e.buffer = void 0;
|
|
1455
1462
|
try {
|
|
1456
|
-
for (var r =
|
|
1457
|
-
var o = i.value, s = e.pending === void 0 ?
|
|
1458
|
-
return
|
|
1463
|
+
for (var r = L(e.nexts), i = r.next(); !i.done; i = r.next()) {
|
|
1464
|
+
var o = i.value, s = e.pending === void 0 ? I(e) : e.pending.then(function() {
|
|
1465
|
+
return I(e);
|
|
1459
1466
|
});
|
|
1460
|
-
o.resolve(
|
|
1467
|
+
o.resolve(G(e, s));
|
|
1461
1468
|
}
|
|
1462
1469
|
} catch (u) {
|
|
1463
1470
|
n = { error: u };
|
|
@@ -1471,24 +1478,24 @@ function H(e) {
|
|
|
1471
1478
|
e.pushes = [], e.nexts = [];
|
|
1472
1479
|
}
|
|
1473
1480
|
}
|
|
1474
|
-
function
|
|
1475
|
-
e.state >= ze || (e.state < oe &&
|
|
1481
|
+
function De(e) {
|
|
1482
|
+
e.state >= ze || (e.state < oe && B(e), e.state = ze);
|
|
1476
1483
|
}
|
|
1477
|
-
function
|
|
1484
|
+
function On(e, n) {
|
|
1478
1485
|
if (_e(n), e.pushes.length >= ie)
|
|
1479
|
-
throw new
|
|
1480
|
-
if (e.state >=
|
|
1486
|
+
throw new Ye("No more than " + ie + " pending calls to push are allowed on a single repeater.");
|
|
1487
|
+
if (e.state >= M)
|
|
1481
1488
|
return Promise.resolve(void 0);
|
|
1482
1489
|
var t = e.pending === void 0 ? Promise.resolve(n) : e.pending.then(function() {
|
|
1483
1490
|
return n;
|
|
1484
1491
|
});
|
|
1485
1492
|
t = t.catch(function(c) {
|
|
1486
|
-
e.state <
|
|
1493
|
+
e.state < M && (e.err = c), De(e);
|
|
1487
1494
|
});
|
|
1488
1495
|
var r;
|
|
1489
1496
|
if (e.nexts.length) {
|
|
1490
1497
|
var i = e.nexts.shift();
|
|
1491
|
-
i.resolve(
|
|
1498
|
+
i.resolve(G(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) {
|
|
1492
1499
|
return e.onnext = c;
|
|
1493
1500
|
});
|
|
1494
1501
|
} else typeof e.buffer < "u" && !e.buffer.full ? (e.buffer.add(t), r = Promise.resolve(void 0)) : r = new Promise(function(c) {
|
|
@@ -1505,27 +1512,27 @@ function Pn(e, n) {
|
|
|
1505
1512
|
}, s.finally = r.finally.bind(r), e.pending = t.then(function() {
|
|
1506
1513
|
return u;
|
|
1507
1514
|
}).catch(function(c) {
|
|
1508
|
-
e.err = c,
|
|
1515
|
+
e.err = c, De(e);
|
|
1509
1516
|
}), s;
|
|
1510
1517
|
}
|
|
1511
|
-
function
|
|
1512
|
-
var n =
|
|
1518
|
+
function Sn(e) {
|
|
1519
|
+
var n = Oe.bind(null, e), t = new Promise(function(r) {
|
|
1513
1520
|
return e.onstop = r;
|
|
1514
1521
|
});
|
|
1515
1522
|
return n.then = t.then.bind(t), n.catch = t.catch.bind(t), n.finally = t.finally.bind(t), n;
|
|
1516
1523
|
}
|
|
1517
|
-
function
|
|
1518
|
-
if (!(e.state >=
|
|
1519
|
-
e.state =
|
|
1520
|
-
var n =
|
|
1524
|
+
function xn(e) {
|
|
1525
|
+
if (!(e.state >= Re)) {
|
|
1526
|
+
e.state = Re;
|
|
1527
|
+
var n = On.bind(null, e), t = Sn(e);
|
|
1521
1528
|
e.execution = new Promise(function(r) {
|
|
1522
1529
|
return r(e.executor(n, t));
|
|
1523
1530
|
}), e.execution.catch(function() {
|
|
1524
|
-
return
|
|
1531
|
+
return Oe(e);
|
|
1525
1532
|
});
|
|
1526
1533
|
}
|
|
1527
1534
|
}
|
|
1528
|
-
var ne = /* @__PURE__ */ new WeakMap(),
|
|
1535
|
+
var ne = /* @__PURE__ */ new WeakMap(), Y = (
|
|
1529
1536
|
/** @class */
|
|
1530
1537
|
(function() {
|
|
1531
1538
|
function e(n, t) {
|
|
@@ -1548,9 +1555,9 @@ var ne = /* @__PURE__ */ new WeakMap(), Q = (
|
|
|
1548
1555
|
if (t === void 0)
|
|
1549
1556
|
throw new Error("WeakMap error");
|
|
1550
1557
|
if (t.nexts.length >= ie)
|
|
1551
|
-
throw new
|
|
1552
|
-
if (t.state <= ve &&
|
|
1553
|
-
var r =
|
|
1558
|
+
throw new Ye("No more than " + ie + " pending calls to next are allowed on a single repeater.");
|
|
1559
|
+
if (t.state <= ve && xn(t), t.onnext(n), typeof t.buffer < "u" && !t.buffer.empty) {
|
|
1560
|
+
var r = G(t, t.buffer.remove());
|
|
1554
1561
|
if (t.pushes.length) {
|
|
1555
1562
|
var i = t.pushes.shift();
|
|
1556
1563
|
t.buffer.add(i.value), t.onnext = i.resolve;
|
|
@@ -1558,9 +1565,9 @@ var ne = /* @__PURE__ */ new WeakMap(), Q = (
|
|
|
1558
1565
|
return r;
|
|
1559
1566
|
} else if (t.pushes.length) {
|
|
1560
1567
|
var o = t.pushes.shift();
|
|
1561
|
-
return t.onnext = o.resolve,
|
|
1562
|
-
} else if (t.state >=
|
|
1563
|
-
return
|
|
1568
|
+
return t.onnext = o.resolve, G(t, o.value);
|
|
1569
|
+
} else if (t.state >= M)
|
|
1570
|
+
return B(t), G(t, I(t));
|
|
1564
1571
|
return new Promise(function(s) {
|
|
1565
1572
|
return t.nexts.push({ resolve: s, value: n });
|
|
1566
1573
|
});
|
|
@@ -1569,33 +1576,33 @@ var ne = /* @__PURE__ */ new WeakMap(), Q = (
|
|
|
1569
1576
|
var t = ne.get(this);
|
|
1570
1577
|
if (t === void 0)
|
|
1571
1578
|
throw new Error("WeakMap error");
|
|
1572
|
-
return
|
|
1579
|
+
return B(t), t.execution = Promise.resolve(t.execution).then(function() {
|
|
1573
1580
|
return n;
|
|
1574
|
-
}),
|
|
1581
|
+
}), G(t, I(t));
|
|
1575
1582
|
}, e.prototype.throw = function(n) {
|
|
1576
1583
|
var t = ne.get(this);
|
|
1577
1584
|
if (t === void 0)
|
|
1578
1585
|
throw new Error("WeakMap error");
|
|
1579
|
-
return t.state <= ve || t.state >=
|
|
1586
|
+
return t.state <= ve || t.state >= M || typeof t.buffer < "u" && !t.buffer.empty ? (B(t), t.err == null && (t.err = n), G(t, I(t))) : this.next(Promise.reject(n));
|
|
1580
1587
|
}, e.prototype[Symbol.asyncIterator] = function() {
|
|
1581
1588
|
return this;
|
|
1582
|
-
}, e.race =
|
|
1589
|
+
}, e.race = $n, e.merge = An, e.zip = Nn, e.latest = Gn, e;
|
|
1583
1590
|
})()
|
|
1584
1591
|
);
|
|
1585
1592
|
function de(e, n) {
|
|
1586
1593
|
var t, r, i = [], o = function(a) {
|
|
1587
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() {
|
|
1588
|
-
return
|
|
1595
|
+
return En(this, arguments, function() {
|
|
1589
1596
|
return A(this, function(l) {
|
|
1590
1597
|
switch (l.label) {
|
|
1591
1598
|
case 0:
|
|
1592
|
-
return n.yieldValues ? [4,
|
|
1599
|
+
return n.yieldValues ? [4, X(a)] : [3, 3];
|
|
1593
1600
|
case 1:
|
|
1594
1601
|
return [4, l.sent()];
|
|
1595
1602
|
case 2:
|
|
1596
1603
|
l.sent(), l.label = 3;
|
|
1597
1604
|
case 3:
|
|
1598
|
-
return n.returnValues ? [4,
|
|
1605
|
+
return n.returnValues ? [4, X(a)] : [3, 5];
|
|
1599
1606
|
case 4:
|
|
1600
1607
|
return [2, l.sent()];
|
|
1601
1608
|
case 5:
|
|
@@ -1609,7 +1616,7 @@ function de(e, n) {
|
|
|
1609
1616
|
})());
|
|
1610
1617
|
};
|
|
1611
1618
|
try {
|
|
1612
|
-
for (var s =
|
|
1619
|
+
for (var s = L(e), u = s.next(); !u.done; u = s.next()) {
|
|
1613
1620
|
var c = u.value;
|
|
1614
1621
|
o(c);
|
|
1615
1622
|
}
|
|
@@ -1624,10 +1631,10 @@ function de(e, n) {
|
|
|
1624
1631
|
}
|
|
1625
1632
|
return i;
|
|
1626
1633
|
}
|
|
1627
|
-
function
|
|
1634
|
+
function $n(e) {
|
|
1628
1635
|
var n = this, t = de(e, { returnValues: !0 });
|
|
1629
|
-
return new
|
|
1630
|
-
return
|
|
1636
|
+
return new Y(function(r, i) {
|
|
1637
|
+
return D(n, void 0, void 0, function() {
|
|
1631
1638
|
var o, s, u, c, a, f;
|
|
1632
1639
|
return A(this, function(d) {
|
|
1633
1640
|
switch (d.label) {
|
|
@@ -1642,14 +1649,14 @@ function On(e) {
|
|
|
1642
1649
|
}), d.label = 1;
|
|
1643
1650
|
case 1:
|
|
1644
1651
|
d.trys.push([1, , 5, 7]), c = void 0, a = 0, f = function() {
|
|
1645
|
-
var l, h, p,
|
|
1646
|
-
return A(this, function(
|
|
1647
|
-
switch (
|
|
1652
|
+
var l, h, p, m, b, E;
|
|
1653
|
+
return A(this, function(O) {
|
|
1654
|
+
switch (O.label) {
|
|
1648
1655
|
case 0:
|
|
1649
1656
|
l = a;
|
|
1650
1657
|
try {
|
|
1651
|
-
for (h = (b = void 0,
|
|
1652
|
-
|
|
1658
|
+
for (h = (b = void 0, L(t)), p = h.next(); !p.done; p = h.next())
|
|
1659
|
+
m = p.value, Promise.resolve(m.next()).then(function(P) {
|
|
1653
1660
|
P.done ? (i(), u === void 0 && (u = P)) : a === l && (a++, o(P));
|
|
1654
1661
|
}, function(P) {
|
|
1655
1662
|
return i(P);
|
|
@@ -1658,7 +1665,7 @@ function On(e) {
|
|
|
1658
1665
|
b = { error: P };
|
|
1659
1666
|
} finally {
|
|
1660
1667
|
try {
|
|
1661
|
-
p && !p.done && (
|
|
1668
|
+
p && !p.done && (E = h.return) && E.call(h);
|
|
1662
1669
|
} finally {
|
|
1663
1670
|
if (b) throw b.error;
|
|
1664
1671
|
}
|
|
@@ -1667,9 +1674,9 @@ function On(e) {
|
|
|
1667
1674
|
return o = P;
|
|
1668
1675
|
})];
|
|
1669
1676
|
case 1:
|
|
1670
|
-
return c =
|
|
1677
|
+
return c = O.sent(), c === void 0 ? [3, 3] : [4, r(c.value)];
|
|
1671
1678
|
case 2:
|
|
1672
|
-
|
|
1679
|
+
O.sent(), O.label = 3;
|
|
1673
1680
|
case 3:
|
|
1674
1681
|
return [
|
|
1675
1682
|
2
|
|
@@ -1703,10 +1710,10 @@ function On(e) {
|
|
|
1703
1710
|
});
|
|
1704
1711
|
});
|
|
1705
1712
|
}
|
|
1706
|
-
function
|
|
1713
|
+
function An(e) {
|
|
1707
1714
|
var n = this, t = de(e, { yieldValues: !0 });
|
|
1708
|
-
return new
|
|
1709
|
-
return
|
|
1715
|
+
return new Y(function(r, i) {
|
|
1716
|
+
return D(n, void 0, void 0, function() {
|
|
1710
1717
|
var o, s, u, c = this;
|
|
1711
1718
|
return A(this, function(a) {
|
|
1712
1719
|
switch (a.label) {
|
|
@@ -1720,12 +1727,12 @@ function En(e) {
|
|
|
1720
1727
|
var f, d;
|
|
1721
1728
|
s = !0;
|
|
1722
1729
|
try {
|
|
1723
|
-
for (var l =
|
|
1730
|
+
for (var l = L(o), h = l.next(); !h.done; h = l.next()) {
|
|
1724
1731
|
var p = h.value;
|
|
1725
1732
|
p();
|
|
1726
1733
|
}
|
|
1727
|
-
} catch (
|
|
1728
|
-
f = { error:
|
|
1734
|
+
} catch (m) {
|
|
1735
|
+
f = { error: m };
|
|
1729
1736
|
} finally {
|
|
1730
1737
|
try {
|
|
1731
1738
|
h && !h.done && (d = l.return) && d.call(l);
|
|
@@ -1736,19 +1743,19 @@ function En(e) {
|
|
|
1736
1743
|
}), a.label = 1;
|
|
1737
1744
|
case 1:
|
|
1738
1745
|
return a.trys.push([1, , 3, 4]), [4, Promise.all(t.map(function(f, d) {
|
|
1739
|
-
return
|
|
1746
|
+
return D(c, void 0, void 0, function() {
|
|
1740
1747
|
var l, h;
|
|
1741
1748
|
return A(this, function(p) {
|
|
1742
1749
|
switch (p.label) {
|
|
1743
1750
|
case 0:
|
|
1744
1751
|
p.trys.push([0, , 6, 9]), p.label = 1;
|
|
1745
1752
|
case 1:
|
|
1746
|
-
return s ? [3, 5] : (Promise.resolve(f.next()).then(function(
|
|
1747
|
-
return o[d](
|
|
1748
|
-
}, function(
|
|
1749
|
-
return i(
|
|
1750
|
-
}), [4, new Promise(function(
|
|
1751
|
-
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;
|
|
1752
1759
|
})]);
|
|
1753
1760
|
case 2:
|
|
1754
1761
|
return l = p.sent(), l === void 0 ? [3, 4] : l.done ? (u = l, [
|
|
@@ -1796,10 +1803,10 @@ function En(e) {
|
|
|
1796
1803
|
});
|
|
1797
1804
|
});
|
|
1798
1805
|
}
|
|
1799
|
-
function
|
|
1806
|
+
function Nn(e) {
|
|
1800
1807
|
var n = this, t = de(e, { returnValues: !0 });
|
|
1801
|
-
return new
|
|
1802
|
-
return
|
|
1808
|
+
return new Y(function(r, i) {
|
|
1809
|
+
return D(n, void 0, void 0, function() {
|
|
1803
1810
|
var o, s, u, c;
|
|
1804
1811
|
return A(this, function(a) {
|
|
1805
1812
|
switch (a.label) {
|
|
@@ -1853,13 +1860,13 @@ function Sn(e) {
|
|
|
1853
1860
|
});
|
|
1854
1861
|
});
|
|
1855
1862
|
}
|
|
1856
|
-
function
|
|
1863
|
+
function Gn(e) {
|
|
1857
1864
|
var n = this, t = de(e, {
|
|
1858
1865
|
yieldValues: !0,
|
|
1859
1866
|
returnValues: !0
|
|
1860
1867
|
});
|
|
1861
|
-
return new
|
|
1862
|
-
return
|
|
1868
|
+
return new Y(function(r, i) {
|
|
1869
|
+
return D(n, void 0, void 0, function() {
|
|
1863
1870
|
var o, s, u, c, a, f = this;
|
|
1864
1871
|
return A(this, function(d) {
|
|
1865
1872
|
switch (d.label) {
|
|
@@ -1870,15 +1877,15 @@ function xn(e) {
|
|
|
1870
1877
|
var l, h;
|
|
1871
1878
|
o();
|
|
1872
1879
|
try {
|
|
1873
|
-
for (var p =
|
|
1874
|
-
var b =
|
|
1880
|
+
for (var p = L(s), m = p.next(); !m.done; m = p.next()) {
|
|
1881
|
+
var b = m.value;
|
|
1875
1882
|
b();
|
|
1876
1883
|
}
|
|
1877
|
-
} catch (
|
|
1878
|
-
l = { error:
|
|
1884
|
+
} catch (E) {
|
|
1885
|
+
l = { error: E };
|
|
1879
1886
|
} finally {
|
|
1880
1887
|
try {
|
|
1881
|
-
|
|
1888
|
+
m && !m.done && (h = p.return) && h.call(p);
|
|
1882
1889
|
} finally {
|
|
1883
1890
|
if (l) throw l.error;
|
|
1884
1891
|
}
|
|
@@ -1906,14 +1913,14 @@ function xn(e) {
|
|
|
1906
1913
|
}) ? [2, a] : [4, r(a.slice())]);
|
|
1907
1914
|
case 3:
|
|
1908
1915
|
return d.sent(), [4, Promise.all(t.map(function(l, h) {
|
|
1909
|
-
return
|
|
1916
|
+
return D(f, void 0, void 0, function() {
|
|
1910
1917
|
var p;
|
|
1911
|
-
return A(this, function(
|
|
1912
|
-
switch (
|
|
1918
|
+
return A(this, function(m) {
|
|
1919
|
+
switch (m.label) {
|
|
1913
1920
|
case 0:
|
|
1914
1921
|
if (c[h].done)
|
|
1915
1922
|
return [2, c[h].value];
|
|
1916
|
-
|
|
1923
|
+
m.label = 1;
|
|
1917
1924
|
case 1:
|
|
1918
1925
|
return u ? [3, 4] : (Promise.resolve(l.next()).then(function(b) {
|
|
1919
1926
|
return s[h](b);
|
|
@@ -1923,9 +1930,9 @@ function xn(e) {
|
|
|
1923
1930
|
return s[h] = b;
|
|
1924
1931
|
})]);
|
|
1925
1932
|
case 2:
|
|
1926
|
-
return p =
|
|
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())]);
|
|
1927
1934
|
case 3:
|
|
1928
|
-
return
|
|
1935
|
+
return m.sent(), [3, 1];
|
|
1929
1936
|
case 4:
|
|
1930
1937
|
return [
|
|
1931
1938
|
2
|
|
@@ -1956,7 +1963,7 @@ function xn(e) {
|
|
|
1956
1963
|
});
|
|
1957
1964
|
});
|
|
1958
1965
|
}
|
|
1959
|
-
class
|
|
1966
|
+
class Tn {
|
|
1960
1967
|
graffiti;
|
|
1961
1968
|
callbacks = /* @__PURE__ */ new Set();
|
|
1962
1969
|
options;
|
|
@@ -1977,16 +1984,16 @@ class $n {
|
|
|
1977
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);
|
|
1978
1985
|
}
|
|
1979
1986
|
synchronize(n, t, r, i, o = /* @__PURE__ */ new Set()) {
|
|
1980
|
-
const s = new
|
|
1987
|
+
const s = new Y(
|
|
1981
1988
|
async (u, c) => {
|
|
1982
|
-
const a = await
|
|
1989
|
+
const a = await ot(r), f = (d) => {
|
|
1983
1990
|
if (d?.tombstone)
|
|
1984
1991
|
o.has(d.object.url) && u(d);
|
|
1985
|
-
else if (d && n(d.object) && (this.options.omniscient ||
|
|
1992
|
+
else if (d && n(d.object) && (this.options.omniscient || nt(d.object, i))) {
|
|
1986
1993
|
let l = JSON.parse(
|
|
1987
1994
|
JSON.stringify(d.object)
|
|
1988
1995
|
);
|
|
1989
|
-
this.options.omniscient || (l =
|
|
1996
|
+
this.options.omniscient || (l = rt(l, t, i?.actor)), a(l) && (u({ object: l }), o.add(l.url));
|
|
1990
1997
|
}
|
|
1991
1998
|
};
|
|
1992
1999
|
this.callbacks.add(f), await c, this.callbacks.delete(f);
|
|
@@ -2065,7 +2072,7 @@ class $n {
|
|
|
2065
2072
|
const t = await this.graffiti.get(...n);
|
|
2066
2073
|
return this.synchronizeDispatch({ object: t }), t;
|
|
2067
2074
|
} catch (t) {
|
|
2068
|
-
throw t instanceof T && this.synchronizeDispatch({
|
|
2075
|
+
throw (t instanceof T || t instanceof Error && t.name === "GraffitiErrorNotFound") && this.synchronizeDispatch({
|
|
2069
2076
|
tombstone: !0,
|
|
2070
2077
|
object: { url: me(n[0]) }
|
|
2071
2078
|
}), t;
|
|
@@ -2085,20 +2092,24 @@ class $n {
|
|
|
2085
2092
|
const r = await this.graffiti.delete(...n);
|
|
2086
2093
|
return await this.synchronizeDispatch(t, !0), r;
|
|
2087
2094
|
} catch (r) {
|
|
2088
|
-
throw r instanceof T && await this.synchronizeDispatch(t, !0), r;
|
|
2095
|
+
throw (r instanceof T || r instanceof Error && r.name === "GraffitiErrorNotFound") && await this.synchronizeDispatch(t, !0), r;
|
|
2089
2096
|
}
|
|
2090
2097
|
};
|
|
2091
2098
|
objectStream(n) {
|
|
2092
2099
|
const t = this;
|
|
2093
2100
|
return (async function* () {
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2101
|
+
try {
|
|
2102
|
+
for (; ; ) {
|
|
2103
|
+
const r = await n.next();
|
|
2104
|
+
if (r.done) return r.value;
|
|
2105
|
+
if (!r.value.error) {
|
|
2106
|
+
const i = r.value;
|
|
2107
|
+
t.synchronizeDispatch(i);
|
|
2108
|
+
}
|
|
2109
|
+
yield r.value;
|
|
2100
2110
|
}
|
|
2101
|
-
|
|
2111
|
+
} finally {
|
|
2112
|
+
await n.return({ cursor: "" });
|
|
2102
2113
|
}
|
|
2103
2114
|
})();
|
|
2104
2115
|
}
|
|
@@ -2112,9 +2123,9 @@ class $n {
|
|
|
2112
2123
|
return this.objectStream(t);
|
|
2113
2124
|
};
|
|
2114
2125
|
}
|
|
2115
|
-
const
|
|
2126
|
+
const In = {
|
|
2116
2127
|
install(e, n) {
|
|
2117
|
-
const t = n.graffiti, r = new
|
|
2128
|
+
const t = n.graffiti, r = new Tn(t), i = x(void 0);
|
|
2118
2129
|
r.sessionEvents.addEventListener("initialized", async (o) => {
|
|
2119
2130
|
const s = o.detail;
|
|
2120
2131
|
s && s.error && console.error(s.error), i.value || (i.value = null);
|
|
@@ -2128,24 +2139,24 @@ const Tn = {
|
|
|
2128
2139
|
}), r.sessionEvents.addEventListener("logout", (o) => {
|
|
2129
2140
|
const s = o.detail;
|
|
2130
2141
|
s.error ? (console.error("Error logging out:"), console.error(s.error)) : i.value = null;
|
|
2131
|
-
}),
|
|
2142
|
+
}), tn(r), en(i), e.component("GraffitiDiscover", Je), e.component("GraffitiGet", Xe), e.component("GraffitiGetMedia", Ke), e.component("GraffitiActorToHandle", H), e.component("GraffitiHandleToActor", Qe), e.component("GraffitiObjectInfo", fe), e.config.globalProperties.$graffiti = r, e.config.globalProperties.$graffitiSession = i;
|
|
2132
2143
|
}
|
|
2133
|
-
},
|
|
2144
|
+
}, Rn = Je, Dn = Xe, Fn = Ke, Cn = H, Ln = Qe, Un = fe;
|
|
2134
2145
|
export {
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2146
|
+
Cn as GraffitiActorToHandle,
|
|
2147
|
+
Rn as GraffitiDiscover,
|
|
2148
|
+
Dn as GraffitiGet,
|
|
2149
|
+
Fn as GraffitiGetMedia,
|
|
2150
|
+
Ln as GraffitiHandleToActor,
|
|
2151
|
+
Un as GraffitiObjectInfo,
|
|
2152
|
+
In as GraffitiPlugin,
|
|
2153
|
+
Ee as useGraffiti,
|
|
2154
|
+
rn as useGraffitiActorToHandle,
|
|
2155
|
+
nn as useGraffitiDiscover,
|
|
2156
|
+
mn as useGraffitiGet,
|
|
2157
|
+
yn as useGraffitiGetMedia,
|
|
2158
|
+
jn as useGraffitiHandleToActor,
|
|
2159
|
+
Zn as useGraffitiSession,
|
|
2149
2160
|
le as useGraffitiSynchronize
|
|
2150
2161
|
};
|
|
2151
2162
|
//# sourceMappingURL=plugin.mjs.map
|