@graffiti-garden/wrapper-vue 1.2.0 → 1.2.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.
@@ -1,4 +1,4 @@
1
- import { ref as x, onScopeDispose as Pe, watch as B, toValue as j, defineComponent as D, toRef as k, renderSlot as X, unref as v, createElementVNode as m, 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";
1
+ import { ref as x, onScopeDispose as Pe, watch as W, toValue as j, defineComponent as D, toRef as k, renderSlot as K, unref as v, createElementVNode as m, 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 Qe(e, n) {
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 Ye(e, n, t) {
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 et(e) {
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 V extends Error {
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 tt = {};
91
+ const it = {};
92
92
  function ue(e) {
93
- return tt;
93
+ return it;
94
94
  }
95
- function nt(e, n) {
95
+ function st(e, n) {
96
96
  return typeof n == "bigint" ? n.toString() : n;
97
97
  }
98
- function rt(e) {
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 ot(e) {
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 Ae = /* @__PURE__ */ Symbol("evaluating");
113
- function W(e, n, t) {
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 !== Ae)
118
- return r === void 0 && (r = Ae, r = t()), 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 Re = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
129
+ const Ce = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
130
130
  };
131
- function it(e) {
131
+ function ct(e) {
132
132
  return typeof e == "object" && e !== null && !Array.isArray(e);
133
133
  }
134
- function st(e, n, t) {
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 K(e) {
138
+ function Q(e) {
139
139
  return {};
140
140
  }
141
- function ut(e) {
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 at = {
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 De(e, n) {
159
+ function Fe(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 Ce = (e, n) => {
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, nt, 2), Object.defineProperty(e, "toString", {
183
+ }), e.message = JSON.stringify(n, st, 2), Object.defineProperty(e, "toString", {
184
184
  value: () => e.message,
185
185
  enumerable: !1
186
186
  });
187
- }, ct = _("$ZodError", Ce), ce = _("$ZodError", Ce, { Parent: Error }), lt = (e) => (n, t, r, i) => {
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 V();
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 Re(u, i?.callee), u;
193
+ throw Ce(u, i?.callee), u;
194
194
  }
195
195
  return s.value;
196
- }, ft = /* @__PURE__ */ lt(ce), dt = (e) => async (n, t, r, i) => {
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 Re(u, i?.callee), u;
201
+ throw Ce(u, i?.callee), u;
202
202
  }
203
203
  return s.value;
204
- }, ht = /* @__PURE__ */ dt(ce), pt = (e) => (n, t, r) => {
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 V();
207
+ throw new q();
208
208
  return o.issues.length ? {
209
209
  success: !1,
210
- error: new (e ?? ct)(o.issues.map((s) => ae(s, i, ue())))
210
+ error: new (e ?? ht)(o.issues.map((s) => ae(s, i, ue())))
211
211
  } : { success: !0, data: o.value };
212
- }, Fe = /* @__PURE__ */ pt(ce), mt = (e) => async (n, t, r) => {
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
- }, Ue = /* @__PURE__ */ mt(ce), yt = (e) => {
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
- }, vt = /^-?\d+$/, bt = /^-?\d+(?:\.\d+)?$/, Le = /* @__PURE__ */ _("$ZodCheck", (e, n) => {
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
- }), gt = {
225
+ }), Pt = {
226
226
  number: "number",
227
227
  bigint: "bigint",
228
228
  object: "date"
229
- }, wt = /* @__PURE__ */ _("$ZodCheckGreaterThan", (e, n) => {
230
- Le.init(e, n);
231
- const t = gt[typeof n.value];
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
- }), _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];
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 = vt);
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
- }), zt = {
307
+ }), Ot = {
308
308
  major: 4,
309
309
  minor: 3,
310
310
  patch: 6
311
- }, M = /* @__PURE__ */ _("$ZodType", (e, n) => {
311
+ }, G = /* @__PURE__ */ _("$ZodType", (e, n) => {
312
312
  var t;
313
- e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = zt;
313
+ e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = Ot;
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 V();
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 V();
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 V();
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
- W(e, "~standard", () => ({
373
+ J(e, "~standard", () => ({
374
374
  validate: (i) => {
375
375
  try {
376
- const o = Fe(e, i);
376
+ const o = Ue(e, i);
377
377
  return o.success ? { value: o.data } : { issues: o.error?.issues };
378
378
  } catch {
379
- return Ue(e, i).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
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
- }), 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) => {
385
+ }), Et = /* @__PURE__ */ _("$ZodString", (e, n) => {
386
+ G.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
- }), Ve = /* @__PURE__ */ _("$ZodNumber", (e, n) => {
400
- M.init(e, n), e._zod.pattern = e._zod.bag.pattern ?? bt, e._zod.parse = (t, r) => {
399
+ }), He = /* @__PURE__ */ _("$ZodNumber", (e, n) => {
400
+ G.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
- }), jt = /* @__PURE__ */ _("$ZodNumberFormat", (e, n) => {
419
- _t.init(e, n), Ve.init(e, n);
420
- }), kt = /* @__PURE__ */ _("$ZodUnknown", (e, n) => {
421
- M.init(e, n), e._zod.parse = (t) => t;
418
+ }), St = /* @__PURE__ */ _("$ZodNumberFormat", (e, n) => {
419
+ kt.init(e, n), He.init(e, n);
420
+ }), xt = /* @__PURE__ */ _("$ZodUnknown", (e, n) => {
421
+ G.init(e, n), e._zod.parse = (t) => t;
422
422
  });
423
- function Ne(e, n, t) {
424
- e.issues.length && n.issues.push(...De(t, e.issues)), n.value[t] = e.value;
423
+ function Te(e, n, t) {
424
+ e.issues.length && n.issues.push(...Fe(t, e.issues)), n.value[t] = e.value;
425
425
  }
426
- const Ot = /* @__PURE__ */ _("$ZodArray", (e, n) => {
427
- M.init(e, n), e._zod.parse = (t, r) => {
426
+ const $t = /* @__PURE__ */ _("$ZodArray", (e, n) => {
427
+ G.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) => Ne(a, t, s))) : Ne(c, t, s);
443
+ c instanceof Promise ? o.push(c.then((a) => Te(a, t, s))) : Te(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(...De(t, e.issues));
452
+ n.issues.push(...Fe(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 Et(e) {
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 = ut(e.shape);
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 St(e, n, t, r, i, o) {
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 xt = /* @__PURE__ */ _("$ZodObject", (e, n) => {
490
- if (M.init(e, n), !Object.getOwnPropertyDescriptor(n, "shape")?.get) {
489
+ const Tt = /* @__PURE__ */ _("$ZodObject", (e, n) => {
490
+ if (G.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 = rt(() => Et(n));
502
- W(e._zod, "propValues", () => {
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 = it, o = n.catchall;
514
+ const i = ct, o = n.catchall;
515
515
  let s;
516
516
  e._zod.parse = (u, c) => {
517
517
  s ?? (s = r.value);
@@ -529,26 +529,26 @@ const xt = /* @__PURE__ */ _("$ZodObject", (e, n) => {
529
529
  const h = d[l], p = h._zod.optout === "optional", y = h._zod.run({ value: a[l], issues: [] }, c);
530
530
  y instanceof Promise ? f.push(y.then((b) => re(b, u, l, a, p))) : re(y, u, l, a, p);
531
531
  }
532
- return o ? St(f, a, u, c, r.value, e) : f.length ? Promise.all(f).then(() => u) : u;
532
+ return o ? Nt(f, a, u, c, r.value, e) : f.length ? Promise.all(f).then(() => u) : u;
533
533
  };
534
534
  });
535
- function Te(e, n) {
535
+ function Me(e, n) {
536
536
  return e.issues.length && n === void 0 ? { issues: [], value: void 0 } : e;
537
537
  }
538
- const $t = /* @__PURE__ */ _("$ZodOptional", (e, n) => {
539
- M.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", W(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), W(e._zod, "pattern", () => {
538
+ const Mt = /* @__PURE__ */ _("$ZodOptional", (e, n) => {
539
+ G.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(`^(${ot(t.source)})?$`) : void 0;
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);
545
- return i instanceof Promise ? i.then((o) => Te(o, t.value)) : Te(i, t.value);
545
+ return i instanceof Promise ? i.then((o) => Me(o, t.value)) : Me(i, t.value);
546
546
  }
547
547
  return t.value === void 0 ? t : n.innerType._zod.run(t, r);
548
548
  };
549
549
  });
550
550
  var Ge;
551
- class At {
551
+ class Gt {
552
552
  constructor() {
553
553
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
554
554
  }
@@ -577,115 +577,115 @@ class At {
577
577
  return this._map.has(n);
578
578
  }
579
579
  }
580
- function Nt() {
581
- return new At();
580
+ function Zt() {
581
+ return new Gt();
582
582
  }
583
- (Ge = globalThis).__zod_globalRegistry ?? (Ge.__zod_globalRegistry = Nt());
583
+ (Ge = globalThis).__zod_globalRegistry ?? (Ge.__zod_globalRegistry = Zt());
584
584
  // @__NO_SIDE_EFFECTS__
585
- function Tt(e, n) {
585
+ function It(e, n) {
586
586
  return new e({
587
587
  type: "string",
588
- ...K()
588
+ ...Q()
589
589
  });
590
590
  }
591
591
  // @__NO_SIDE_EFFECTS__
592
- function Gt(e, n) {
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
- ...K()
598
+ ...Q()
599
599
  });
600
600
  }
601
601
  // @__NO_SIDE_EFFECTS__
602
- function Mt(e) {
602
+ function Dt(e) {
603
603
  return new e({
604
604
  type: "unknown"
605
605
  });
606
606
  }
607
607
  // @__NO_SIDE_EFFECTS__
608
- function Zt(e, n) {
609
- return new wt({
608
+ function Ct(e, n) {
609
+ return new jt({
610
610
  check: "greater_than",
611
- ...K(),
611
+ ...Q(),
612
612
  value: e,
613
613
  inclusive: !0
614
614
  });
615
615
  }
616
616
  // @__NO_SIDE_EFFECTS__
617
- function It(e) {
618
- return /* @__PURE__ */ Zt(0);
617
+ function Ft(e) {
618
+ return /* @__PURE__ */ Ct(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
- 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) => Fe(e, t, r), e.parseAsync = async (t, r) => ht(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => Ue(e, t, r), e.check = (...t) => e.clone({
623
+ G.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) => 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), C.init(e, n);
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
+ Et.init(e, n), C.init(e, n);
632
632
  });
633
633
  // @__NO_SIDE_EFFECTS__
634
- function Dt(e) {
635
- return /* @__PURE__ */ Tt(Rt);
634
+ function Ut(e) {
635
+ return /* @__PURE__ */ It(Lt);
636
636
  }
637
- const Ct = /* @__PURE__ */ _("ZodMiniNumber", (e, n) => {
638
- Ve.init(e, n), C.init(e, n);
639
- }), Ft = /* @__PURE__ */ _("ZodMiniNumberFormat", (e, n) => {
640
- jt.init(e, n), Ct.init(e, n);
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 Ut(e) {
644
- return /* @__PURE__ */ Gt(Ft);
643
+ function Ht(e) {
644
+ return /* @__PURE__ */ Rt(qt);
645
645
  }
646
- const Lt = /* @__PURE__ */ _("ZodMiniUnknown", (e, n) => {
647
- kt.init(e, n), C.init(e, n);
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 Vt() {
651
- return /* @__PURE__ */ Mt(Lt);
650
+ function Wt() {
651
+ return /* @__PURE__ */ Dt(Bt);
652
652
  }
653
- const qt = /* @__PURE__ */ _("ZodMiniArray", (e, n) => {
654
- Ot.init(e, n), C.init(e, n);
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 Ht(e, n) {
658
- return new qt({
657
+ function Xt(e, n) {
658
+ return new Jt({
659
659
  type: "array",
660
660
  element: e,
661
- ...K()
661
+ ...Q()
662
662
  });
663
663
  }
664
- const Bt = /* @__PURE__ */ _("ZodMiniObject", (e, n) => {
665
- xt.init(e, n), C.init(e, n), W(e, "shape", () => n.shape);
664
+ const Kt = /* @__PURE__ */ _("ZodMiniObject", (e, n) => {
665
+ Tt.init(e, n), C.init(e, n), J(e, "shape", () => n.shape);
666
666
  });
667
667
  // @__NO_SIDE_EFFECTS__
668
- function Wt(e, n) {
669
- return new Bt({
668
+ function Qt(e, n) {
669
+ return new Kt({
670
670
  type: "object",
671
671
  shape: e,
672
- catchall: /* @__PURE__ */ Vt(),
673
- ...K()
672
+ catchall: /* @__PURE__ */ Wt(),
673
+ ...Q()
674
674
  });
675
675
  }
676
- const Jt = /* @__PURE__ */ _("ZodMiniOptional", (e, n) => {
677
- $t.init(e, n), C.init(e, n);
676
+ const Yt = /* @__PURE__ */ _("ZodMiniOptional", (e, n) => {
677
+ Mt.init(e, n), C.init(e, n);
678
678
  });
679
679
  // @__NO_SIDE_EFFECTS__
680
- function Me(e) {
681
- return new Jt({
680
+ function Ze(e) {
681
+ return new Yt({
682
682
  type: "optional",
683
683
  innerType: e
684
684
  });
685
685
  }
686
- (/* @__PURE__ */ Ut()).check(/* @__PURE__ */ It());
686
+ (/* @__PURE__ */ Ht()).check(/* @__PURE__ */ Ft());
687
687
  const I = {};
688
- function Xt(e) {
688
+ function en(e) {
689
689
  if (!I.graffitiSession)
690
690
  I.graffitiSession = e;
691
691
  else
@@ -693,7 +693,7 @@ function Xt(e) {
693
693
  "Graffiti session already set - plugin installed multiple times?"
694
694
  );
695
695
  }
696
- function Kt(e) {
696
+ function tn(e) {
697
697
  if (!I.graffitiSynchronize)
698
698
  I.graffitiSynchronize = e;
699
699
  else
@@ -712,7 +712,7 @@ function le() {
712
712
  function Oe() {
713
713
  return le();
714
714
  }
715
- function Nn() {
715
+ function Zn() {
716
716
  const e = I.graffitiSession;
717
717
  if (!e)
718
718
  throw new Error(
@@ -720,7 +720,8 @@ function Nn() {
720
720
  );
721
721
  return e;
722
722
  }
723
- function Qt(e, n, t, r = !1) {
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
  };
@@ -730,7 +731,7 @@ function Qt(e, n, t, r = !1) {
730
731
  f?.return(null), d?.return({ cursor: "" });
731
732
  });
732
733
  const l = x(0), h = () => [j(e), j(n), j(t)];
733
- return B(
734
+ return W(
734
735
  () => `${l.value}:${JSON.stringify(h())}`,
735
736
  (p, y, b) => {
736
737
  const O = h();
@@ -746,23 +747,29 @@ function Qt(e, n, t, r = !1) {
746
747
  $ && l.value++;
747
748
  }, z);
748
749
  }
749
- let U;
750
+ let L, Se = 0;
750
751
  (async () => {
751
752
  for await (const z of E) {
752
753
  if (!$) break;
753
- z.tombstone ? o.delete(z.object.url) : o.set(z.object.url, z.object), U || (U = new Promise((Y) => {
754
- setTimeout(() => {
755
- $ && (s.value = Array.from(o.values())), U = void 0, Y();
756
- }, 0);
757
- }));
754
+ z.tombstone ? o.delete(z.object.url) : o.set(z.object.url, z.object);
755
+ const U = Date.now();
756
+ if (!L) {
757
+ const et = U - Se < Ie ? Ie : 0;
758
+ L = new Promise((tt) => {
759
+ setTimeout(() => {
760
+ $ && (s.value = Array.from(o.values())), L = void 0, tt();
761
+ }, et);
762
+ });
763
+ }
764
+ Se = U;
758
765
  }
759
766
  })();
760
- let pe = !1, Se = () => i.discover(...O);
767
+ let pe = !1, xe = () => i.discover(...O);
761
768
  u = async () => {
762
769
  if (!(pe || !$)) {
763
770
  pe = !0;
764
771
  try {
765
- P = Se();
772
+ P = xe();
766
773
  } catch (z) {
767
774
  return console.error("Fatal error in discover"), console.error(z), he(5e3);
768
775
  }
@@ -771,22 +778,22 @@ function Qt(e, n, t, r = !1) {
771
778
  let z;
772
779
  try {
773
780
  z = await P.next();
774
- } catch (Y) {
775
- return Y instanceof ke ? he() : (console.error("Fatal error in discover"), console.error(Y), he(5e3));
781
+ } catch (U) {
782
+ return U instanceof ke ? he() : (console.error("Fatal error in discover"), console.error(U), he(5e3));
776
783
  }
777
784
  if (!$) return;
778
785
  if (z.done) {
779
- Se = () => i.continueDiscover(z.value.cursor, O[2]);
786
+ xe = () => i.continueDiscover(z.value.cursor, O[2]);
780
787
  break;
781
788
  } else z.value.error && console.error(z.value.error);
782
789
  }
783
- await new Promise((z) => setTimeout(z, 0)), U && await U, $ && (pe = !1, a.value = !1, j(r) && c());
790
+ await new Promise((z) => setTimeout(z, 0)), L && await L, $ && (pe = !1, a.value = !1, j(r) && c());
784
791
  }
785
792
  }
786
793
  }, c();
787
794
  },
788
795
  { immediate: !0 }
789
- ), B(
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 qe(e, n) {
805
+ function Be(e, n) {
799
806
  const t = x(void 0);
800
- return B(
807
+ return W(
801
808
  () => j(e),
802
809
  async (r, i, o) => {
803
810
  let s = !0;
@@ -821,28 +828,28 @@ function qe(e, n) {
821
828
  output: t
822
829
  };
823
830
  }
824
- function He(e) {
831
+ function We(e) {
825
832
  return e === void 0 ? "Loading..." : e === null ? "Not found" : e;
826
833
  }
827
- function Yt(e) {
828
- const n = Oe(), { output: t } = qe(
834
+ function rn(e) {
835
+ const n = Oe(), { output: t } = Be(
829
836
  e,
830
837
  n.actorToHandle.bind(n)
831
838
  );
832
839
  return { handle: t };
833
840
  }
834
- const q = /* @__PURE__ */ D({
841
+ const H = /* @__PURE__ */ D({
835
842
  __name: "ActorToHandle",
836
843
  props: {
837
844
  actor: {}
838
845
  },
839
846
  setup(e) {
840
- const t = k(e, "actor"), { handle: r } = Yt(t);
841
- return (i, o) => X(i.$slots, "default", { handle: v(r) }, () => [
842
- m("span", null, S(v(He)(v(r))), 1)
847
+ const t = k(e, "actor"), { handle: r } = rn(t);
848
+ return (i, o) => K(i.$slots, "default", { handle: v(r) }, () => [
849
+ m("span", null, S(v(We)(v(r))), 1)
843
850
  ]);
844
851
  }
845
- }), en = ["data-url"], tn = { key: 0 }, nn = { key: 1 }, rn = { key: 0 }, on = { key: 1 }, sn = ["disabled"], un = { key: 1 }, an = { key: 2 }, fe = /* @__PURE__ */ D({
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__ */ D({
846
853
  __name: "ObjectInfo",
847
854
  props: {
848
855
  object: {}
@@ -859,11 +866,11 @@ const q = /* @__PURE__ */ D({
859
866
  "data-url": e.object.url
860
867
  }, [
861
868
  m("p", null, [
862
- o[1] || (o[1] = $e("@", -1)),
863
- L(q, {
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] = $e(" posted:", -1))
873
+ o[2] || (o[2] = Ae(" posted:", -1))
867
874
  ]),
868
875
  m("pre", null, S(e.object.value), 1),
869
876
  m("details", null, [
@@ -879,7 +886,7 @@ const q = /* @__PURE__ */ D({
879
886
  ]),
880
887
  o[10] || (o[10] = m("dt", null, "Handle", -1)),
881
888
  m("dd", null, [
882
- L(q, {
889
+ V(H, {
883
890
  actor: e.object.actor
884
891
  }, null, 8, ["actor"])
885
892
  ]),
@@ -889,9 +896,9 @@ const q = /* @__PURE__ */ D({
889
896
  ]),
890
897
  o[12] || (o[12] = m("dt", null, "Allowed actors", -1)),
891
898
  m("dd", null, [
892
- Array.isArray(e.object.allowed) ? e.object.allowed.length === 0 ? (w(), g("p", nn, [...o[4] || (o[4] = [
899
+ Array.isArray(e.object.allowed) ? e.object.allowed.length === 0 ? (w(), g("p", un, [...o[4] || (o[4] = [
893
900
  m("em", null, "No one is allowed (except you)", -1)
894
- ])])) : xe("", !0) : (w(), g("p", tn, [...o[3] || (o[3] = [
901
+ ])])) : $e("", !0) : (w(), g("p", sn, [...o[3] || (o[3] = [
895
902
  m("em", null, "Public", -1)
896
903
  ])])),
897
904
  m("ul", null, [
@@ -903,7 +910,7 @@ const q = /* @__PURE__ */ D({
903
910
  ]),
904
911
  o[6] || (o[6] = m("dt", null, "Handle", -1)),
905
912
  m("dd", null, [
906
- L(q, { actor: s }, null, 8, ["actor"])
913
+ V(H, { actor: s }, null, 8, ["actor"])
907
914
  ])
908
915
  ])
909
916
  ]))), 128))
@@ -911,11 +918,11 @@ const q = /* @__PURE__ */ D({
911
918
  ]),
912
919
  o[13] || (o[13] = m("dt", null, "Channels", -1)),
913
920
  m("dd", null, [
914
- e.object.channels?.length ? (w(), g("ul", rn, [
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
  m("code", null, S(s), 1)
917
924
  ]))), 128))
918
- ])) : (w(), g("p", on, [...o[7] || (o[7] = [
925
+ ])) : (w(), g("p", cn, [...o[7] || (o[7] = [
919
926
  m("em", null, "No channels", -1)
920
927
  ])]))
921
928
  ])
@@ -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, sn)) : xe("", !0)
929
- ], 8, en)) : e.object === null ? (w(), g("article", un, [...o[15] || (o[15] = [
935
+ }, S(t.value ? "Deleting..." : "Delete"), 9, ln)) : $e("", !0)
936
+ ], 8, on)) : e.object === null ? (w(), g("article", fn, [...o[15] || (o[15] = [
930
937
  m("p", null, [
931
938
  m("em", null, "Graffiti object not found")
932
939
  ], -1)
933
- ])])) : (w(), g("article", an, [...o[16] || (o[16] = [
940
+ ])])) : (w(), g("article", dn, [...o[16] || (o[16] = [
934
941
  m("p", null, [
935
942
  m("em", null, "Graffiti object loading...")
936
943
  ], -1)
937
944
  ])]));
938
945
  }
939
- }), cn = { key: 0 }, ln = { key: 1 }, Be = /* @__PURE__ */ D({
946
+ }), hn = { key: 0 }, pn = { key: 1 }, Je = /* @__PURE__ */ D({
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 } = Qt(
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) => X(o.$slots, "default", {
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", ln, [...s[0] || (s[0] = [
966
+ v(i) ? (w(), g("p", pn, [...s[0] || (s[0] = [
960
967
  m("em", null, " Graffiti discover loading... ", -1)
961
- ])])) : (w(), g("ul", cn, [
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
- L(fe, { object: u }, null, 8, ["object"])
972
+ V(fe, { object: u }, null, 8, ["object"])
966
973
  ]))), 128))
967
974
  ]))
968
975
  ]);
969
976
  }
970
977
  });
971
- function fn(e, n, t) {
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 B(
988
+ return W(
982
989
  () => JSON.stringify(c()),
983
990
  (a, f, d) => {
984
991
  const l = c();
@@ -1013,7 +1020,7 @@ function fn(e, n, t) {
1013
1020
  poll: s
1014
1021
  };
1015
1022
  }
1016
- const We = /* @__PURE__ */ D({
1023
+ const Xe = /* @__PURE__ */ D({
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 } = fn(
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) => X(i.$slots, "default", {
1036
+ return (i, o) => K(i.$slots, "default", {
1030
1037
  object: v(t),
1031
1038
  poll: v(r)
1032
1039
  }, () => [
1033
- L(fe, { object: v(t) }, null, 8, ["object"])
1040
+ V(fe, { object: v(t) }, null, 8, ["object"])
1034
1041
  ]);
1035
1042
  }
1036
1043
  });
1037
- function dn(e, n, t) {
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 B(
1058
+ return W(
1052
1059
  () => `${o.value}:${JSON.stringify(a())}`,
1053
1060
  async (f, d, l) => {
1054
1061
  const h = a();
@@ -1082,7 +1089,7 @@ function dn(e, n, t) {
1082
1089
  poll: c
1083
1090
  };
1084
1091
  }
1085
- const hn = ["src", "alt"], pn = ["src", "alt"], mn = ["src", "alt"], yn = ["src", "alt"], vn = ["data", "alt"], bn = { key: 6 }, gn = { key: 7 }, Je = /* @__PURE__ */ D({
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__ */ D({
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 } = dn(
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) => X(o.$slots, "default", {
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, hn)) : v(t)?.data.type.startsWith("video/") ? (w(), g("video", {
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, pn)) : v(t)?.data.type.startsWith("audio/") ? (w(), g("audio", {
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, mn)) : v(t)?.data.type === "text/html" ? (w(), g("iframe", {
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, yn)) : v(t)?.data.type.startsWith("application/pdf") ? (w(), g("object", {
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, vn)) : v(t) ? (w(), g("button", {
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", bn, [...s[0] || (s[0] = [
1139
+ }, "Download media")) : v(t) === null ? (w(), g("p", zn, [...s[0] || (s[0] = [
1133
1140
  m("em", null, "Media not found", -1)
1134
- ])])) : (w(), g("p", gn, [...s[1] || (s[1] = [
1141
+ ])])) : (w(), g("p", Pn, [...s[1] || (s[1] = [
1135
1142
  m("em", null, " Media loading... ", -1)
1136
1143
  ])]))
1137
1144
  ]);
1138
1145
  }
1139
1146
  });
1140
- function wn(e) {
1141
- const n = Oe(), { output: t } = qe(
1147
+ function jn(e) {
1148
+ const n = Oe(), { output: t } = Be(
1142
1149
  e,
1143
1150
  n.handleToActor.bind(n)
1144
1151
  );
1145
1152
  return { actor: t };
1146
1153
  }
1147
- const Xe = /* @__PURE__ */ D({
1154
+ const Qe = /* @__PURE__ */ D({
1148
1155
  __name: "HandleToActor",
1149
1156
  props: {
1150
1157
  handle: {}
1151
1158
  },
1152
1159
  setup(e) {
1153
- const t = k(e, "handle"), { actor: r } = wn(t);
1154
- return (i, o) => X(i.$slots, "default", { actor: v(r) }, () => [
1155
- m("span", null, S(v(He)(v(r))), 1)
1160
+ const t = k(e, "handle"), { actor: r } = jn(t);
1161
+ return (i, o) => K(i.$slots, "default", { actor: v(r) }, () => [
1162
+ m("span", null, S(v(We)(v(r))), 1)
1156
1163
  ]);
1157
1164
  }
1158
1165
  });
@@ -1163,7 +1170,7 @@ 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 _n(e, n) {
1173
+ function kn(e, n) {
1167
1174
  we(e, n);
1168
1175
  function t() {
1169
1176
  this.constructor = e;
@@ -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 J(e) {
1271
- return this instanceof J ? (this.v = e, this) : new J(e);
1277
+ function X(e) {
1278
+ return this instanceof X ? (this.v = e, this) : new X(e);
1272
1279
  }
1273
- function zn(e, n, t) {
1280
+ function On(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() {
@@ -1291,7 +1298,7 @@ function zn(e, n, t) {
1291
1298
  }
1292
1299
  }
1293
1300
  function c(l) {
1294
- l.value instanceof J ? Promise.resolve(l.value.v).then(a, f) : d(o[0][2], l);
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 Ke = (
1313
+ var Ye = (
1307
1314
  /** @class */
1308
1315
  (function(e) {
1309
- _n(n, e);
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,7 +1409,7 @@ 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, Ze = 1, G = 2, oe = 3, ze = 4, ie = 1024, se = function() {
1412
+ var ve = 0, Re = 1, M = 2, oe = 3, ze = 4, ie = 1024, se = function() {
1406
1413
  };
1407
1414
  function Z(e) {
1408
1415
  var n = e.err, t = Promise.resolve(e.execution).then(function(r) {
@@ -1429,9 +1436,9 @@ function N(e, n) {
1429
1436
  }
1430
1437
  function Ee(e, n) {
1431
1438
  var t, r;
1432
- if (!(e.state >= G))
1433
- 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))
1434
- H(e);
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
1444
  for (var i = F(e.pushes), o = i.next(); !o.done; o = i.next()) {
@@ -1448,10 +1455,10 @@ function Ee(e, n) {
1448
1455
  }
1449
1456
  }
1450
1457
  }
1451
- function H(e) {
1458
+ function B(e) {
1452
1459
  var n, t;
1453
1460
  if (!(e.state >= oe)) {
1454
- e.state < G && Ee(e), e.state = oe, e.buffer = void 0;
1461
+ e.state < M && Ee(e), e.state = oe, e.buffer = void 0;
1455
1462
  try {
1456
1463
  for (var r = F(e.nexts), i = r.next(); !i.done; i = r.next()) {
1457
1464
  var o = i.value, s = e.pending === void 0 ? Z(e) : e.pending.then(function() {
@@ -1471,19 +1478,19 @@ function H(e) {
1471
1478
  e.pushes = [], e.nexts = [];
1472
1479
  }
1473
1480
  }
1474
- function Ie(e) {
1475
- e.state >= ze || (e.state < oe && H(e), e.state = ze);
1481
+ function De(e) {
1482
+ e.state >= ze || (e.state < oe && B(e), e.state = ze);
1476
1483
  }
1477
- function Pn(e, n) {
1484
+ function En(e, n) {
1478
1485
  if (_e(n), e.pushes.length >= ie)
1479
- throw new Ke("No more than " + ie + " pending calls to push are allowed on a single repeater.");
1480
- if (e.state >= G)
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 < G && (e.err = c), Ie(e);
1493
+ e.state < M && (e.err = c), De(e);
1487
1494
  });
1488
1495
  var r;
1489
1496
  if (e.nexts.length) {
@@ -1505,19 +1512,19 @@ 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, Ie(e);
1515
+ e.err = c, De(e);
1509
1516
  }), s;
1510
1517
  }
1511
- function jn(e) {
1518
+ function Sn(e) {
1512
1519
  var n = Ee.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 kn(e) {
1518
- if (!(e.state >= Ze)) {
1519
- e.state = Ze;
1520
- var n = Pn.bind(null, e), t = jn(e);
1524
+ function xn(e) {
1525
+ if (!(e.state >= Re)) {
1526
+ e.state = Re;
1527
+ var n = En.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() {
@@ -1525,7 +1532,7 @@ function kn(e) {
1525
1532
  });
1526
1533
  }
1527
1534
  }
1528
- var ne = /* @__PURE__ */ new WeakMap(), Q = (
1535
+ var ne = /* @__PURE__ */ new WeakMap(), Y = (
1529
1536
  /** @class */
1530
1537
  (function() {
1531
1538
  function e(n, t) {
@@ -1548,8 +1555,8 @@ 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 Ke("No more than " + ie + " pending calls to next are allowed on a single repeater.");
1552
- if (t.state <= ve && kn(t), t.onnext(n), typeof t.buffer < "u" && !t.buffer.empty) {
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) {
1553
1560
  var r = N(t, t.buffer.remove());
1554
1561
  if (t.pushes.length) {
1555
1562
  var i = t.pushes.shift();
@@ -1559,8 +1566,8 @@ var ne = /* @__PURE__ */ new WeakMap(), Q = (
1559
1566
  } else if (t.pushes.length) {
1560
1567
  var o = t.pushes.shift();
1561
1568
  return t.onnext = o.resolve, N(t, o.value);
1562
- } else if (t.state >= G)
1563
- return H(t), N(t, Z(t));
1569
+ } else if (t.state >= M)
1570
+ return B(t), N(t, Z(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 H(t), t.execution = Promise.resolve(t.execution).then(function() {
1579
+ return B(t), t.execution = Promise.resolve(t.execution).then(function() {
1573
1580
  return n;
1574
1581
  }), N(t, Z(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 >= 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));
1586
+ return t.state <= ve || t.state >= M || typeof t.buffer < "u" && !t.buffer.empty ? (B(t), t.err == null && (t.err = n), N(t, Z(t))) : this.next(Promise.reject(n));
1580
1587
  }, e.prototype[Symbol.asyncIterator] = function() {
1581
1588
  return this;
1582
- }, e.race = On, e.merge = En, e.zip = Sn, e.latest = xn, e;
1589
+ }, e.race = $n, e.merge = An, e.zip = Nn, e.latest = Tn, 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 zn(this, arguments, function() {
1595
+ return On(this, arguments, function() {
1589
1596
  return A(this, function(l) {
1590
1597
  switch (l.label) {
1591
1598
  case 0:
1592
- return n.yieldValues ? [4, J(a)] : [3, 3];
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, J(a)] : [3, 5];
1605
+ return n.returnValues ? [4, X(a)] : [3, 5];
1599
1606
  case 4:
1600
1607
  return [2, l.sent()];
1601
1608
  case 5:
@@ -1624,9 +1631,9 @@ function de(e, n) {
1624
1631
  }
1625
1632
  return i;
1626
1633
  }
1627
- function On(e) {
1634
+ function $n(e) {
1628
1635
  var n = this, t = de(e, { returnValues: !0 });
1629
- return new Q(function(r, i) {
1636
+ return new Y(function(r, i) {
1630
1637
  return R(n, void 0, void 0, function() {
1631
1638
  var o, s, u, c, a, f;
1632
1639
  return A(this, function(d) {
@@ -1703,9 +1710,9 @@ function On(e) {
1703
1710
  });
1704
1711
  });
1705
1712
  }
1706
- function En(e) {
1713
+ function An(e) {
1707
1714
  var n = this, t = de(e, { yieldValues: !0 });
1708
- return new Q(function(r, i) {
1715
+ return new Y(function(r, i) {
1709
1716
  return R(n, void 0, void 0, function() {
1710
1717
  var o, s, u, c = this;
1711
1718
  return A(this, function(a) {
@@ -1796,9 +1803,9 @@ function En(e) {
1796
1803
  });
1797
1804
  });
1798
1805
  }
1799
- function Sn(e) {
1806
+ function Nn(e) {
1800
1807
  var n = this, t = de(e, { returnValues: !0 });
1801
- return new Q(function(r, i) {
1808
+ return new Y(function(r, i) {
1802
1809
  return R(n, void 0, void 0, function() {
1803
1810
  var o, s, u, c;
1804
1811
  return A(this, function(a) {
@@ -1853,12 +1860,12 @@ function Sn(e) {
1853
1860
  });
1854
1861
  });
1855
1862
  }
1856
- function xn(e) {
1863
+ function Tn(e) {
1857
1864
  var n = this, t = de(e, {
1858
1865
  yieldValues: !0,
1859
1866
  returnValues: !0
1860
1867
  });
1861
- return new Q(function(r, i) {
1868
+ return new Y(function(r, i) {
1862
1869
  return R(n, void 0, void 0, function() {
1863
1870
  var o, s, u, c, a, f = this;
1864
1871
  return A(this, function(d) {
@@ -1956,7 +1963,7 @@ function xn(e) {
1956
1963
  });
1957
1964
  });
1958
1965
  }
1959
- class $n {
1966
+ class Mn {
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 Q(
1987
+ const s = new Y(
1981
1988
  async (u, c) => {
1982
- const a = await et(r), f = (d) => {
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 || Qe(d.object, i))) {
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 = Ye(l, t, i?.actor)), a(l) && (u({ object: l }), o.add(l.url));
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);
@@ -2112,9 +2119,9 @@ class $n {
2112
2119
  return this.objectStream(t);
2113
2120
  };
2114
2121
  }
2115
- const Tn = {
2122
+ const In = {
2116
2123
  install(e, n) {
2117
- const t = n.graffiti, r = new $n(t), i = x(void 0);
2124
+ const t = n.graffiti, r = new Mn(t), i = x(void 0);
2118
2125
  r.sessionEvents.addEventListener("initialized", async (o) => {
2119
2126
  const s = o.detail;
2120
2127
  s && s.error && console.error(s.error), i.value || (i.value = null);
@@ -2128,24 +2135,24 @@ const Tn = {
2128
2135
  }), r.sessionEvents.addEventListener("logout", (o) => {
2129
2136
  const s = o.detail;
2130
2137
  s.error ? (console.error("Error logging out:"), console.error(s.error)) : i.value = null;
2131
- }), Kt(r), Xt(i), e.component("GraffitiDiscover", Be), e.component("GraffitiGet", We), e.component("GraffitiGetMedia", Je), e.component("GraffitiActorToHandle", q), e.component("GraffitiHandleToActor", Xe), e.component("GraffitiObjectInfo", fe), e.config.globalProperties.$graffiti = r, e.config.globalProperties.$graffitiSession = i;
2138
+ }), 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
2139
  }
2133
- }, Gn = Be, Mn = We, Zn = Je, In = q, Rn = Xe, Dn = fe;
2140
+ }, Rn = Je, Dn = Xe, Cn = Ke, Fn = H, Ln = Qe, Un = fe;
2134
2141
  export {
2135
- In as GraffitiActorToHandle,
2136
- Gn as GraffitiDiscover,
2137
- Mn as GraffitiGet,
2138
- Zn as GraffitiGetMedia,
2139
- Rn as GraffitiHandleToActor,
2140
- Dn as GraffitiObjectInfo,
2141
- Tn as GraffitiPlugin,
2142
+ Fn as GraffitiActorToHandle,
2143
+ Rn as GraffitiDiscover,
2144
+ Dn as GraffitiGet,
2145
+ Cn as GraffitiGetMedia,
2146
+ Ln as GraffitiHandleToActor,
2147
+ Un as GraffitiObjectInfo,
2148
+ In as GraffitiPlugin,
2142
2149
  Oe as useGraffiti,
2143
- Yt as useGraffitiActorToHandle,
2144
- Qt as useGraffitiDiscover,
2145
- fn as useGraffitiGet,
2146
- dn as useGraffitiGetMedia,
2147
- wn as useGraffitiHandleToActor,
2148
- Nn as useGraffitiSession,
2150
+ rn as useGraffitiActorToHandle,
2151
+ nn as useGraffitiDiscover,
2152
+ mn as useGraffitiGet,
2153
+ yn as useGraffitiGetMedia,
2154
+ jn as useGraffitiHandleToActor,
2155
+ Zn as useGraffitiSession,
2149
2156
  le as useGraffitiSynchronize
2150
2157
  };
2151
2158
  //# sourceMappingURL=plugin.mjs.map