@graffiti-garden/wrapper-vue 1.0.3 → 1.0.4
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 +83 -79
- package/dist/browser/plugin.mjs.map +1 -1
- package/dist/node/components/GetMedia.vue.d.ts +2 -2
- package/dist/node/components/GetMedia.vue.d.ts.map +1 -1
- package/dist/node/composables/get-media.d.ts +2 -2
- package/dist/node/composables/get-media.d.ts.map +1 -1
- package/dist/node/plugin.d.ts +3 -3
- package/dist/node/plugin.js +1 -1
- package/dist/node/plugin.js.map +1 -1
- package/dist/node/plugin.mjs +87 -87
- package/dist/node/plugin.mjs.map +1 -1
- package/package.json +9 -9
- package/src/components/GetMedia.vue +3 -3
- package/src/composables/get-media.ts +3 -3
package/dist/browser/plugin.mjs
CHANGED
|
@@ -12,20 +12,15 @@ function te(e) {
|
|
|
12
12
|
return typeof e == "string" ? e : e.url;
|
|
13
13
|
}
|
|
14
14
|
function Ge(e, n) {
|
|
15
|
-
try {
|
|
16
|
-
return e.compile(n);
|
|
17
|
-
} catch (t) {
|
|
18
|
-
throw new Se(t instanceof Error ? t.message : void 0);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function ke(e, n) {
|
|
22
15
|
return !Array.isArray(e.allowed) || typeof n?.actor == "string" && (e.actor === n.actor || e.allowed.includes(n.actor));
|
|
23
16
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
17
|
+
function ke(e, n, t) {
|
|
18
|
+
if (t === e.actor) return e;
|
|
19
|
+
let o = e.allowed && t ? [t] : void 0, i = e.channels.filter((r) => n.includes(r));
|
|
20
|
+
return { ...e, allowed: o, channels: i };
|
|
26
21
|
}
|
|
27
22
|
const I = {};
|
|
28
|
-
function
|
|
23
|
+
function Ee(e) {
|
|
29
24
|
if (!I.graffitiSession)
|
|
30
25
|
I.graffitiSession = e;
|
|
31
26
|
else
|
|
@@ -33,7 +28,7 @@ function Oe(e) {
|
|
|
33
28
|
"Graffiti session already set - plugin installed multiple times?"
|
|
34
29
|
);
|
|
35
30
|
}
|
|
36
|
-
function
|
|
31
|
+
function Oe(e) {
|
|
37
32
|
if (!I.graffitiSynchronize)
|
|
38
33
|
I.graffitiSynchronize = e;
|
|
39
34
|
else
|
|
@@ -60,7 +55,7 @@ function ct() {
|
|
|
60
55
|
);
|
|
61
56
|
return e;
|
|
62
57
|
}
|
|
63
|
-
function
|
|
58
|
+
function Ae(e, n, t, o = !1) {
|
|
64
59
|
const i = X(), r = /* @__PURE__ */ new Map(), s = k([]);
|
|
65
60
|
let a = async () => {
|
|
66
61
|
};
|
|
@@ -94,13 +89,13 @@ function Te(e, n, t, o = !1) {
|
|
|
94
89
|
cursor: ""
|
|
95
90
|
});
|
|
96
91
|
});
|
|
97
|
-
let
|
|
92
|
+
let L;
|
|
98
93
|
(async () => {
|
|
99
94
|
for await (const x of E) {
|
|
100
95
|
if (!g) break;
|
|
101
|
-
x.tombstone ? r.delete(x.object.url) : r.set(x.object.url, x.object),
|
|
96
|
+
x.tombstone ? r.delete(x.object.url) : r.set(x.object.url, x.object), L || (L = new Promise((ee) => {
|
|
102
97
|
setTimeout(() => {
|
|
103
|
-
g && (s.value = Array.from(r.values())),
|
|
98
|
+
g && (s.value = Array.from(r.values())), L = void 0, ee();
|
|
104
99
|
}, 50);
|
|
105
100
|
}));
|
|
106
101
|
}
|
|
@@ -128,7 +123,7 @@ function Te(e, n, t, o = !1) {
|
|
|
128
123
|
break;
|
|
129
124
|
} else x.value.error && console.error(x.value.error);
|
|
130
125
|
}
|
|
131
|
-
await new Promise((x) => setTimeout(x, 0)),
|
|
126
|
+
await new Promise((x) => setTimeout(x, 0)), L && await L, g && (Z = !1, u.value = !1, P(o) && c());
|
|
132
127
|
}
|
|
133
128
|
}
|
|
134
129
|
}, c();
|
|
@@ -168,7 +163,7 @@ function me(e, n) {
|
|
|
168
163
|
function be(e) {
|
|
169
164
|
return e === void 0 ? "Loading..." : e === null ? "Not found" : e;
|
|
170
165
|
}
|
|
171
|
-
function
|
|
166
|
+
function Te(e) {
|
|
172
167
|
const n = ae(), { output: t } = me(
|
|
173
168
|
e,
|
|
174
169
|
n.actorToHandle.bind(n)
|
|
@@ -181,12 +176,12 @@ const W = /* @__PURE__ */ _({
|
|
|
181
176
|
actor: {}
|
|
182
177
|
},
|
|
183
178
|
setup(e) {
|
|
184
|
-
const t = S(e, "actor"), { handle: o } =
|
|
179
|
+
const t = S(e, "actor"), { handle: o } = Te(t);
|
|
185
180
|
return (i, r) => N(i.$slots, "default", { handle: v(o) }, () => [
|
|
186
181
|
p("span", null, O(v(be)(v(o))), 1)
|
|
187
182
|
]);
|
|
188
183
|
}
|
|
189
|
-
}),
|
|
184
|
+
}), $e = ["data-url"], ze = { key: 0 }, De = { key: 1 }, Ie = { key: 0 }, Me = { key: 1 }, _e = { key: 0 }, Re = ["disabled"], Le = { key: 1 }, qe = { key: 2 }, K = /* @__PURE__ */ _({
|
|
190
185
|
__name: "ObjectInfo",
|
|
191
186
|
props: {
|
|
192
187
|
object: {}
|
|
@@ -227,9 +222,9 @@ const W = /* @__PURE__ */ _({
|
|
|
227
222
|
]),
|
|
228
223
|
p("section", null, [
|
|
229
224
|
r[10] || (r[10] = p("h3", null, "Allowed Actors", -1)),
|
|
230
|
-
Array.isArray(e.object.allowed) ? e.object.allowed.length === 0 ? (w(), b("p",
|
|
225
|
+
Array.isArray(e.object.allowed) ? e.object.allowed.length === 0 ? (w(), b("p", De, [...r[7] || (r[7] = [
|
|
231
226
|
p("em", null, "Noone", -1)
|
|
232
|
-
])])) : de("", !0) : (w(), b("p",
|
|
227
|
+
])])) : de("", !0) : (w(), b("p", ze, [...r[6] || (r[6] = [
|
|
233
228
|
p("em", null, "Public", -1)
|
|
234
229
|
])])),
|
|
235
230
|
p("ul", null, [
|
|
@@ -249,34 +244,34 @@ const W = /* @__PURE__ */ _({
|
|
|
249
244
|
]),
|
|
250
245
|
p("section", null, [
|
|
251
246
|
r[12] || (r[12] = p("h3", null, "Channels", -1)),
|
|
252
|
-
e.object.channels?.length ? (w(), b("ul",
|
|
247
|
+
e.object.channels?.length ? (w(), b("ul", Ie, [
|
|
253
248
|
(w(!0), b(re, null, oe(e.object.channels, (s) => (w(), b("li", { key: s }, [
|
|
254
249
|
p("code", null, O(s), 1)
|
|
255
250
|
]))), 128))
|
|
256
|
-
])) : (w(), b("p",
|
|
251
|
+
])) : (w(), b("p", Me, [...r[11] || (r[11] = [
|
|
257
252
|
p("em", null, "No channels", -1)
|
|
258
253
|
])]))
|
|
259
254
|
]),
|
|
260
255
|
p("footer", null, [
|
|
261
256
|
p("nav", null, [
|
|
262
257
|
p("ul", null, [
|
|
263
|
-
i.$graffitiSession.value?.actor === e.object.actor ? (w(), b("li",
|
|
258
|
+
i.$graffitiSession.value?.actor === e.object.actor ? (w(), b("li", _e, [
|
|
264
259
|
p("button", {
|
|
265
260
|
disabled: t.value,
|
|
266
261
|
onClick: r[0] || (r[0] = (s) => o(e.object, i.$graffitiSession.value))
|
|
267
|
-
}, O(t.value ? "Deleting..." : "Delete"), 9,
|
|
262
|
+
}, O(t.value ? "Deleting..." : "Delete"), 9, Re)
|
|
268
263
|
])) : de("", !0)
|
|
269
264
|
])
|
|
270
265
|
])
|
|
271
266
|
])
|
|
272
|
-
], 8,
|
|
267
|
+
], 8, $e)) : e.object === null ? (w(), b("article", Le, [...r[13] || (r[13] = [
|
|
273
268
|
p("header", null, [
|
|
274
269
|
p("h2", null, "Graffiti Object")
|
|
275
270
|
], -1),
|
|
276
271
|
p("p", null, [
|
|
277
272
|
p("em", null, "Object not found")
|
|
278
273
|
], -1)
|
|
279
|
-
])])) : (w(), b("article",
|
|
274
|
+
])])) : (w(), b("article", qe, [...r[14] || (r[14] = [
|
|
280
275
|
p("header", null, [
|
|
281
276
|
p("h2", null, "Graffiti Object")
|
|
282
277
|
], -1),
|
|
@@ -285,7 +280,7 @@ const W = /* @__PURE__ */ _({
|
|
|
285
280
|
], -1)
|
|
286
281
|
])]));
|
|
287
282
|
}
|
|
288
|
-
}),
|
|
283
|
+
}), He = { key: 0 }, Ce = { key: 1 }, we = /* @__PURE__ */ _({
|
|
289
284
|
__name: "Discover",
|
|
290
285
|
props: {
|
|
291
286
|
channels: {},
|
|
@@ -294,7 +289,7 @@ const W = /* @__PURE__ */ _({
|
|
|
294
289
|
autopoll: { type: Boolean }
|
|
295
290
|
},
|
|
296
291
|
setup(e) {
|
|
297
|
-
const n = e, { objects: t, poll: o, isFirstPoll: i } =
|
|
292
|
+
const n = e, { objects: t, poll: o, isFirstPoll: i } = Ae(
|
|
298
293
|
S(n, "channels"),
|
|
299
294
|
S(n, "schema"),
|
|
300
295
|
S(n, "session"),
|
|
@@ -305,9 +300,9 @@ const W = /* @__PURE__ */ _({
|
|
|
305
300
|
poll: v(o),
|
|
306
301
|
isFirstPoll: v(i)
|
|
307
302
|
}, () => [
|
|
308
|
-
v(i) ? (w(), b("p",
|
|
303
|
+
v(i) ? (w(), b("p", Ce, [...s[0] || (s[0] = [
|
|
309
304
|
p("em", null, " Loading... ", -1)
|
|
310
|
-
])])) : (w(), b("ul",
|
|
305
|
+
])])) : (w(), b("ul", He, [
|
|
311
306
|
(w(!0), b(re, null, oe(v(t), (a) => (w(), b("li", {
|
|
312
307
|
key: a.url
|
|
313
308
|
}, [
|
|
@@ -317,7 +312,7 @@ const W = /* @__PURE__ */ _({
|
|
|
317
312
|
]);
|
|
318
313
|
}
|
|
319
314
|
});
|
|
320
|
-
function
|
|
315
|
+
function Ne(e, n, t) {
|
|
321
316
|
const o = X(), i = k(void 0);
|
|
322
317
|
let r = async () => {
|
|
323
318
|
};
|
|
@@ -367,7 +362,7 @@ const ge = /* @__PURE__ */ _({
|
|
|
367
362
|
session: {}
|
|
368
363
|
},
|
|
369
364
|
setup(e) {
|
|
370
|
-
const n = e, { object: t, poll: o } =
|
|
365
|
+
const n = e, { object: t, poll: o } = Ne(
|
|
371
366
|
S(n, "url"),
|
|
372
367
|
S(n, "schema"),
|
|
373
368
|
S(n, "session")
|
|
@@ -380,7 +375,7 @@ const ge = /* @__PURE__ */ _({
|
|
|
380
375
|
]);
|
|
381
376
|
}
|
|
382
377
|
});
|
|
383
|
-
function
|
|
378
|
+
function Ue(e, n, t) {
|
|
384
379
|
const o = X(), i = k(
|
|
385
380
|
void 0
|
|
386
381
|
), r = k(0);
|
|
@@ -429,17 +424,17 @@ function Be(e, n, t) {
|
|
|
429
424
|
poll: c
|
|
430
425
|
};
|
|
431
426
|
}
|
|
432
|
-
const
|
|
427
|
+
const Be = ["src", "alt"], Ve = ["src", "alt"], We = ["src", "alt"], Fe = ["src", "alt"], Je = ["data", "alt"], Qe = { key: 6 }, Xe = { key: 7 }, je = /* @__PURE__ */ _({
|
|
433
428
|
__name: "GetMedia",
|
|
434
429
|
props: {
|
|
435
430
|
url: {},
|
|
436
|
-
|
|
431
|
+
accept: {},
|
|
437
432
|
session: {}
|
|
438
433
|
},
|
|
439
434
|
setup(e) {
|
|
440
|
-
const n = e, { media: t, poll: o } =
|
|
435
|
+
const n = e, { media: t, poll: o } = Ue(
|
|
441
436
|
S(n, "url"),
|
|
442
|
-
S(n, "
|
|
437
|
+
S(n, "accept"),
|
|
443
438
|
S(n, "session")
|
|
444
439
|
);
|
|
445
440
|
function i() {
|
|
@@ -453,38 +448,38 @@ const Ve = ["src", "alt"], We = ["src", "alt"], Fe = ["src", "alt"], Je = ["src"
|
|
|
453
448
|
key: 0,
|
|
454
449
|
src: v(t).dataUrl,
|
|
455
450
|
alt: `An image by ${v(t).actor}`
|
|
456
|
-
}, null, 8,
|
|
451
|
+
}, null, 8, Be)) : v(t)?.data.type.startsWith("video/") ? (w(), b("video", {
|
|
457
452
|
key: 1,
|
|
458
453
|
controls: "",
|
|
459
454
|
src: v(t).dataUrl,
|
|
460
455
|
alt: `A video by ${v(t).actor}`
|
|
461
|
-
}, null, 8,
|
|
456
|
+
}, null, 8, Ve)) : v(t)?.data.type.startsWith("audio/") ? (w(), b("audio", {
|
|
462
457
|
key: 2,
|
|
463
458
|
controls: "",
|
|
464
459
|
src: v(t).dataUrl,
|
|
465
460
|
alt: `Audio by ${v(t).actor}`
|
|
466
|
-
}, null, 8,
|
|
461
|
+
}, null, 8, We)) : v(t)?.data.type === "text/html" ? (w(), b("iframe", {
|
|
467
462
|
key: 3,
|
|
468
463
|
src: v(t).dataUrl,
|
|
469
464
|
alt: `HTML by ${v(t).actor}`,
|
|
470
465
|
sandbox: ""
|
|
471
|
-
}, null, 8,
|
|
466
|
+
}, null, 8, Fe)) : v(t)?.data.type.startsWith("application/pdf") ? (w(), b("object", {
|
|
472
467
|
key: 4,
|
|
473
468
|
data: v(t).dataUrl,
|
|
474
469
|
type: "application/pdf",
|
|
475
470
|
alt: `PDF by ${v(t).actor}`
|
|
476
|
-
}, null, 8,
|
|
471
|
+
}, null, 8, Je)) : v(t) ? (w(), b("button", {
|
|
477
472
|
key: 5,
|
|
478
473
|
onClick: i
|
|
479
|
-
}, "Download")) : v(t) === null ? (w(), b("p",
|
|
474
|
+
}, "Download")) : v(t) === null ? (w(), b("p", Qe, [...s[0] || (s[0] = [
|
|
480
475
|
p("em", null, "Media not found", -1)
|
|
481
|
-
])])) : (w(), b("p",
|
|
476
|
+
])])) : (w(), b("p", Xe, [...s[1] || (s[1] = [
|
|
482
477
|
p("em", null, " Loading... ", -1)
|
|
483
478
|
])]))
|
|
484
479
|
]);
|
|
485
480
|
}
|
|
486
481
|
});
|
|
487
|
-
function
|
|
482
|
+
function Ke(e) {
|
|
488
483
|
const n = ae(), { output: t } = me(
|
|
489
484
|
e,
|
|
490
485
|
n.handleToActor.bind(n)
|
|
@@ -497,7 +492,7 @@ const xe = /* @__PURE__ */ _({
|
|
|
497
492
|
handle: {}
|
|
498
493
|
},
|
|
499
494
|
setup(e) {
|
|
500
|
-
const t = S(e, "handle"), { actor: o } =
|
|
495
|
+
const t = S(e, "handle"), { actor: o } = Ke(t);
|
|
501
496
|
return (i, r) => N(i.$slots, "default", { actor: v(o) }, () => [
|
|
502
497
|
p("span", null, O(v(be)(v(o))), 1)
|
|
503
498
|
]);
|
|
@@ -510,7 +505,7 @@ var ie = function(e, n) {
|
|
|
510
505
|
for (var i in o) o.hasOwnProperty(i) && (t[i] = o[i]);
|
|
511
506
|
}, ie(e, n);
|
|
512
507
|
};
|
|
513
|
-
function
|
|
508
|
+
function Ye(e, n) {
|
|
514
509
|
ie(e, n);
|
|
515
510
|
function t() {
|
|
516
511
|
this.constructor = e;
|
|
@@ -617,7 +612,7 @@ function R(e) {
|
|
|
617
612
|
function C(e) {
|
|
618
613
|
return this instanceof C ? (this.v = e, this) : new C(e);
|
|
619
614
|
}
|
|
620
|
-
function
|
|
615
|
+
function Ze(e, n, t) {
|
|
621
616
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
622
617
|
var o = t.apply(e, n || []), i, r = [];
|
|
623
618
|
return i = {}, s("next"), s("throw"), s("return"), i[Symbol.asyncIterator] = function() {
|
|
@@ -653,7 +648,7 @@ function et(e, n, t) {
|
|
|
653
648
|
var Pe = (
|
|
654
649
|
/** @class */
|
|
655
650
|
(function(e) {
|
|
656
|
-
|
|
651
|
+
Ye(n, e);
|
|
657
652
|
function n(t) {
|
|
658
653
|
var o = e.call(this, t) || this;
|
|
659
654
|
return Object.defineProperty(o, "name", {
|
|
@@ -778,7 +773,7 @@ function ce(e, n) {
|
|
|
778
773
|
var t, o;
|
|
779
774
|
if (!(e.state >= $))
|
|
780
775
|
if (e.state = $, e.onnext(), e.onstop(), e.err == null && (e.err = n), e.pushes.length === 0 && (typeof e.buffer > "u" || e.buffer.empty))
|
|
781
|
-
|
|
776
|
+
q(e);
|
|
782
777
|
else
|
|
783
778
|
try {
|
|
784
779
|
for (var i = R(e.pushes), r = i.next(); !r.done; r = i.next()) {
|
|
@@ -795,7 +790,7 @@ function ce(e, n) {
|
|
|
795
790
|
}
|
|
796
791
|
}
|
|
797
792
|
}
|
|
798
|
-
function
|
|
793
|
+
function q(e) {
|
|
799
794
|
var n, t;
|
|
800
795
|
if (!(e.state >= F)) {
|
|
801
796
|
e.state < $ && ce(e), e.state = F, e.buffer = void 0;
|
|
@@ -819,9 +814,9 @@ function L(e) {
|
|
|
819
814
|
}
|
|
820
815
|
}
|
|
821
816
|
function ye(e) {
|
|
822
|
-
e.state >= ue || (e.state < F &&
|
|
817
|
+
e.state >= ue || (e.state < F && q(e), e.state = ue);
|
|
823
818
|
}
|
|
824
|
-
function
|
|
819
|
+
function et(e, n) {
|
|
825
820
|
if (se(n), e.pushes.length >= J)
|
|
826
821
|
throw new Pe("No more than " + J + " pending calls to push are allowed on a single repeater.");
|
|
827
822
|
if (e.state >= $)
|
|
@@ -855,16 +850,16 @@ function tt(e, n) {
|
|
|
855
850
|
e.err = c, ye(e);
|
|
856
851
|
}), s;
|
|
857
852
|
}
|
|
858
|
-
function
|
|
853
|
+
function tt(e) {
|
|
859
854
|
var n = ce.bind(null, e), t = new Promise(function(o) {
|
|
860
855
|
return e.onstop = o;
|
|
861
856
|
});
|
|
862
857
|
return n.then = t.then.bind(t), n.catch = t.catch.bind(t), n.finally = t.finally.bind(t), n;
|
|
863
858
|
}
|
|
864
|
-
function
|
|
859
|
+
function nt(e) {
|
|
865
860
|
if (!(e.state >= he)) {
|
|
866
861
|
e.state = he;
|
|
867
|
-
var n =
|
|
862
|
+
var n = et.bind(null, e), t = tt(e);
|
|
868
863
|
e.execution = new Promise(function(o) {
|
|
869
864
|
return o(e.executor(n, t));
|
|
870
865
|
}), e.execution.catch(function() {
|
|
@@ -896,7 +891,7 @@ var B = /* @__PURE__ */ new WeakMap(), U = (
|
|
|
896
891
|
throw new Error("WeakMap error");
|
|
897
892
|
if (t.nexts.length >= J)
|
|
898
893
|
throw new Pe("No more than " + J + " pending calls to next are allowed on a single repeater.");
|
|
899
|
-
if (t.state <= ne &&
|
|
894
|
+
if (t.state <= ne && nt(t), t.onnext(n), typeof t.buffer < "u" && !t.buffer.empty) {
|
|
900
895
|
var o = T(t, t.buffer.remove());
|
|
901
896
|
if (t.pushes.length) {
|
|
902
897
|
var i = t.pushes.shift();
|
|
@@ -907,7 +902,7 @@ var B = /* @__PURE__ */ new WeakMap(), U = (
|
|
|
907
902
|
var r = t.pushes.shift();
|
|
908
903
|
return t.onnext = r.resolve, T(t, r.value);
|
|
909
904
|
} else if (t.state >= $)
|
|
910
|
-
return
|
|
905
|
+
return q(t), T(t, z(t));
|
|
911
906
|
return new Promise(function(s) {
|
|
912
907
|
return t.nexts.push({ resolve: s, value: n });
|
|
913
908
|
});
|
|
@@ -916,23 +911,23 @@ var B = /* @__PURE__ */ new WeakMap(), U = (
|
|
|
916
911
|
var t = B.get(this);
|
|
917
912
|
if (t === void 0)
|
|
918
913
|
throw new Error("WeakMap error");
|
|
919
|
-
return
|
|
914
|
+
return q(t), t.execution = Promise.resolve(t.execution).then(function() {
|
|
920
915
|
return n;
|
|
921
916
|
}), T(t, z(t));
|
|
922
917
|
}, e.prototype.throw = function(n) {
|
|
923
918
|
var t = B.get(this);
|
|
924
919
|
if (t === void 0)
|
|
925
920
|
throw new Error("WeakMap error");
|
|
926
|
-
return t.state <= ne || t.state >= $ || typeof t.buffer < "u" && !t.buffer.empty ? (
|
|
921
|
+
return t.state <= ne || t.state >= $ || typeof t.buffer < "u" && !t.buffer.empty ? (q(t), t.err == null && (t.err = n), T(t, z(t))) : this.next(Promise.reject(n));
|
|
927
922
|
}, e.prototype[Symbol.asyncIterator] = function() {
|
|
928
923
|
return this;
|
|
929
|
-
}, e.race =
|
|
924
|
+
}, e.race = rt, e.merge = ot, e.zip = it, e.latest = st, e;
|
|
930
925
|
})()
|
|
931
926
|
);
|
|
932
927
|
function Y(e, n) {
|
|
933
928
|
var t, o, i = [], r = function(u) {
|
|
934
929
|
u != null && typeof u[Symbol.asyncIterator] == "function" ? i.push(u[Symbol.asyncIterator]()) : u != null && typeof u[Symbol.iterator] == "function" ? i.push(u[Symbol.iterator]()) : i.push((function() {
|
|
935
|
-
return
|
|
930
|
+
return Ze(this, arguments, function() {
|
|
936
931
|
return A(this, function(l) {
|
|
937
932
|
switch (l.label) {
|
|
938
933
|
case 0:
|
|
@@ -971,7 +966,7 @@ function Y(e, n) {
|
|
|
971
966
|
}
|
|
972
967
|
return i;
|
|
973
968
|
}
|
|
974
|
-
function
|
|
969
|
+
function rt(e) {
|
|
975
970
|
var n = this, t = Y(e, { returnValues: !0 });
|
|
976
971
|
return new U(function(o, i) {
|
|
977
972
|
return M(n, void 0, void 0, function() {
|
|
@@ -1050,7 +1045,7 @@ function ot(e) {
|
|
|
1050
1045
|
});
|
|
1051
1046
|
});
|
|
1052
1047
|
}
|
|
1053
|
-
function
|
|
1048
|
+
function ot(e) {
|
|
1054
1049
|
var n = this, t = Y(e, { yieldValues: !0 });
|
|
1055
1050
|
return new U(function(o, i) {
|
|
1056
1051
|
return M(n, void 0, void 0, function() {
|
|
@@ -1143,7 +1138,7 @@ function it(e) {
|
|
|
1143
1138
|
});
|
|
1144
1139
|
});
|
|
1145
1140
|
}
|
|
1146
|
-
function
|
|
1141
|
+
function it(e) {
|
|
1147
1142
|
var n = this, t = Y(e, { returnValues: !0 });
|
|
1148
1143
|
return new U(function(o, i) {
|
|
1149
1144
|
return M(n, void 0, void 0, function() {
|
|
@@ -1200,7 +1195,7 @@ function st(e) {
|
|
|
1200
1195
|
});
|
|
1201
1196
|
});
|
|
1202
1197
|
}
|
|
1203
|
-
function
|
|
1198
|
+
function st(e) {
|
|
1204
1199
|
var n = this, t = Y(e, {
|
|
1205
1200
|
yieldValues: !0,
|
|
1206
1201
|
returnValues: !0
|
|
@@ -1303,7 +1298,7 @@ function ut(e) {
|
|
|
1303
1298
|
});
|
|
1304
1299
|
});
|
|
1305
1300
|
}
|
|
1306
|
-
class
|
|
1301
|
+
class ut {
|
|
1307
1302
|
ajv_;
|
|
1308
1303
|
graffiti;
|
|
1309
1304
|
callbacks = /* @__PURE__ */ new Set();
|
|
@@ -1333,14 +1328,14 @@ class lt {
|
|
|
1333
1328
|
synchronize(n, t, o, i, r = /* @__PURE__ */ new Set()) {
|
|
1334
1329
|
const s = new U(
|
|
1335
1330
|
async (a, c) => {
|
|
1336
|
-
const u =
|
|
1331
|
+
const u = lt(await this.ajv, o), f = (h) => {
|
|
1337
1332
|
if (h?.tombstone)
|
|
1338
1333
|
r.has(h.object.url) && a(h);
|
|
1339
|
-
else if (h && n(h.object) && (this.options.omniscient ||
|
|
1340
|
-
|
|
1334
|
+
else if (h && n(h.object) && (this.options.omniscient || Ge(h.object, i))) {
|
|
1335
|
+
let l = JSON.parse(
|
|
1341
1336
|
JSON.stringify(h.object)
|
|
1342
1337
|
);
|
|
1343
|
-
this.options.omniscient ||
|
|
1338
|
+
this.options.omniscient || (l = ke(l, t, i?.actor)), u(l) && (a({ object: l }), r.add(l.url));
|
|
1344
1339
|
}
|
|
1345
1340
|
};
|
|
1346
1341
|
this.callbacks.add(f), await c, this.callbacks.delete(f);
|
|
@@ -1476,9 +1471,18 @@ class lt {
|
|
|
1476
1471
|
return this.objectStreamContinue(t);
|
|
1477
1472
|
};
|
|
1478
1473
|
}
|
|
1474
|
+
function lt(e, n) {
|
|
1475
|
+
try {
|
|
1476
|
+
return e.compile(n);
|
|
1477
|
+
} catch (t) {
|
|
1478
|
+
throw new Se(
|
|
1479
|
+
t instanceof Error ? t.message : String(t)
|
|
1480
|
+
);
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1479
1483
|
const ft = {
|
|
1480
1484
|
install(e, n) {
|
|
1481
|
-
const t = n.graffiti, o = new
|
|
1485
|
+
const t = n.graffiti, o = new ut(t), i = k(void 0);
|
|
1482
1486
|
o.sessionEvents.addEventListener("initialized", async (r) => {
|
|
1483
1487
|
const s = r.detail;
|
|
1484
1488
|
if (s && s.error && console.error(s.error), s && s.href) {
|
|
@@ -1499,7 +1503,7 @@ const ft = {
|
|
|
1499
1503
|
}), o.sessionEvents.addEventListener("logout", (r) => {
|
|
1500
1504
|
const s = r.detail;
|
|
1501
1505
|
s.error ? (console.error("Error logging out:"), console.error(s.error)) : i.value = null;
|
|
1502
|
-
}),
|
|
1506
|
+
}), Oe(o), Ee(i), e.component("GraffitiDiscover", we), e.component("GraffitiGet", ge), e.component("GraffitiGetMedia", je), e.component("GraffitiActorToHandle", W), e.component("GraffitiHandleToActor", xe), e.component("GraffitiObjectInfo", K), e.config.globalProperties.$graffiti = o, e.config.globalProperties.$graffitiSession = i;
|
|
1503
1507
|
}
|
|
1504
1508
|
}, dt = we, ht = ge, yt = je, pt = W, vt = xe, mt = K;
|
|
1505
1509
|
export {
|
|
@@ -1511,11 +1515,11 @@ export {
|
|
|
1511
1515
|
mt as GraffitiObjectInfo,
|
|
1512
1516
|
ft as GraffitiPlugin,
|
|
1513
1517
|
ae as useGraffiti,
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1518
|
+
Te as useGraffitiActorToHandle,
|
|
1519
|
+
Ae as useGraffitiDiscover,
|
|
1520
|
+
Ne as useGraffitiGet,
|
|
1521
|
+
Ue as useGraffitiGetMedia,
|
|
1522
|
+
Ke as useGraffitiHandleToActor,
|
|
1519
1523
|
ct as useGraffitiSession,
|
|
1520
1524
|
X as useGraffitiSynchronize
|
|
1521
1525
|
};
|