@metapages/metapage 1.4.3 → 1.4.5

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/index.js CHANGED
@@ -1,21 +1,21 @@
1
- const Et = ["0.3", "0.4", "0.5", "0.6", "1"], Mt = ["0.2", "0.3", "1"], pt = "1", Je = "1", _i = "metaframe.json", gi = "metapage/definition", bi = "metapage/state", Gt = Mt[Mt.length - 1], On = Et[Et.length - 1], An = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, It = (e) => {
1
+ const Et = ["0.3", "0.4", "0.5", "0.6", "1"], Mt = ["0.2", "0.3", "1"], pt = "1", Je = "1", gi = "metaframe.json", bi = "metapage/definition", vi = "metapage/state", Gt = Mt[Mt.length - 1], An = Et[Et.length - 1], Sn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, It = (e) => {
2
2
  if (typeof e != "string")
3
3
  throw new TypeError("Invalid argument expected string");
4
- const t = e.match(An);
4
+ const t = e.match(Sn);
5
5
  if (!t)
6
6
  throw new Error(`Invalid argument not valid semver ('${e}' received)`);
7
7
  return t.shift(), t;
8
8
  }, Ct = (e) => e === "*" || e === "x" || e === "X", $t = (e) => {
9
9
  const t = parseInt(e, 10);
10
10
  return isNaN(t) ? e : t;
11
- }, Sn = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t], En = (e, t) => {
11
+ }, En = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t], Mn = (e, t) => {
12
12
  if (Ct(e) || Ct(t))
13
13
  return 0;
14
- const [n, s] = Sn($t(e), $t(t));
14
+ const [n, s] = En($t(e), $t(t));
15
15
  return n > s ? 1 : n < s ? -1 : 0;
16
16
  }, xt = (e, t) => {
17
17
  for (let n = 0; n < Math.max(e.length, t.length); n++) {
18
- const s = En(e[n] || "0", t[n] || "0");
18
+ const s = Mn(e[n] || "0", t[n] || "0");
19
19
  if (s !== 0)
20
20
  return s;
21
21
  }
@@ -24,7 +24,7 @@ const Et = ["0.3", "0.4", "0.5", "0.6", "1"], Mt = ["0.2", "0.3", "1"], pt = "1"
24
24
  const n = It(e), s = It(t), i = n.pop(), o = s.pop(), r = xt(n, s);
25
25
  return r !== 0 ? r : i && o ? xt(i.split("."), o.split(".")) : i || o ? i ? -1 : 1 : 0;
26
26
  };
27
- var Mn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
27
+ var In = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
28
28
  function ht(e) {
29
29
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
30
30
  }
@@ -32,7 +32,7 @@ var Vt = { exports: {} };
32
32
  (function(e, t) {
33
33
  (function(n, s) {
34
34
  e.exports = s();
35
- })(Mn, function() {
35
+ })(In, function() {
36
36
  var n = function(o, r) {
37
37
  if (r = r || {}, typeof o != "function")
38
38
  throw new i("fetch must be a function");
@@ -49,7 +49,7 @@ var Vt = { exports: {} };
49
49
  retryDelay: 1e3,
50
50
  retryOn: []
51
51
  };
52
- return r = Object.assign(a, r), function(l, c) {
52
+ return r = Object.assign(a, r), function(f, c) {
53
53
  var d = r.retries, y = r.retryDelay, w = r.retryOn;
54
54
  if (c && c.retries !== void 0)
55
55
  if (s(c.retries))
@@ -68,7 +68,7 @@ var Vt = { exports: {} };
68
68
  throw new i("retryOn property expects an array or function");
69
69
  return new Promise(function(_, S) {
70
70
  var v = function(b) {
71
- var A = typeof Request < "u" && l instanceof Request ? l.clone() : l;
71
+ var A = typeof Request < "u" && f instanceof Request ? f.clone() : f;
72
72
  o(A, c).then(function(I) {
73
73
  if (Array.isArray(w) && w.indexOf(I.status) === -1)
74
74
  _(I);
@@ -116,12 +116,12 @@ var Vt = { exports: {} };
116
116
  return n;
117
117
  });
118
118
  })(Vt);
119
- var In = Vt.exports;
120
- const dt = /* @__PURE__ */ ht(In), B = {
119
+ var Cn = Vt.exports;
120
+ const dt = /* @__PURE__ */ ht(Cn), B = {
121
121
  Remove: "remove",
122
122
  Replace: "replace",
123
123
  Add: "add"
124
- }, Jt = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), Cn = Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"), Ue = Symbol.iterator, Y = {
124
+ }, Jt = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), $n = Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"), Ue = Symbol.iterator, Y = {
125
125
  mutable: "mutable",
126
126
  immutable: "immutable"
127
127
  }, mt = {};
@@ -174,7 +174,7 @@ function Wt(e, t = []) {
174
174
  return Wt(e.parent, t);
175
175
  t.reverse();
176
176
  try {
177
- $n(e.copy, t);
177
+ xn(e.copy, t);
178
178
  } catch {
179
179
  return null;
180
180
  }
@@ -193,7 +193,7 @@ function Ye(e, t) {
193
193
  const n = $(e);
194
194
  return (n ? Q(n) : e)[t];
195
195
  }
196
- function fe(e, t) {
196
+ function le(e, t) {
197
197
  return e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;
198
198
  }
199
199
  function it(e) {
@@ -207,7 +207,7 @@ function _e(e, t) {
207
207
  return s.indexOf("/") === -1 && s.indexOf("~") === -1 ? s : s.replace(/~/g, "~0").replace(/\//g, "~1");
208
208
  }).join("/");
209
209
  }
210
- function $n(e, t) {
210
+ function xn(e, t) {
211
211
  for (let n = 0; n < t.length - 1; n += 1) {
212
212
  const s = t[n];
213
213
  if (e = pe(be(e) === 3 ? Array.from(e) : e, s), typeof e != "object")
@@ -215,7 +215,7 @@ function $n(e, t) {
215
215
  }
216
216
  return e;
217
217
  }
218
- function xn(e) {
218
+ function Ln(e) {
219
219
  const t = Object.create(Object.getPrototypeOf(e));
220
220
  return Reflect.ownKeys(e).forEach((n) => {
221
221
  let s = Reflect.getOwnPropertyDescriptor(e, n);
@@ -231,7 +231,7 @@ function xn(e) {
231
231
  }), Reflect.defineProperty(t, n, s);
232
232
  }), t;
233
233
  }
234
- const Ln = Object.prototype.propertyIsEnumerable;
234
+ const Pn = Object.prototype.propertyIsEnumerable;
235
235
  function Kt(e, t) {
236
236
  let n;
237
237
  if (Array.isArray(e))
@@ -242,7 +242,7 @@ function Kt(e, t) {
242
242
  return new Map(e);
243
243
  if (t != null && t.mark && (n = t.mark(e, Y), n !== void 0) && n !== Y.mutable) {
244
244
  if (n === Y.immutable)
245
- return xn(e);
245
+ return Ln(e);
246
246
  if (typeof n == "function") {
247
247
  if (t.enablePatches || t.enableAutoFreeze)
248
248
  throw new Error("You can't use mark and patches or auto freeze together.");
@@ -254,7 +254,7 @@ function Kt(e, t) {
254
254
  return Object.keys(e).forEach((i) => {
255
255
  s[i] = e[i];
256
256
  }), Object.getOwnPropertySymbols(e).forEach((i) => {
257
- Ln.call(e, i) && (s[i] = e[i]);
257
+ Pn.call(e, i) && (s[i] = e[i]);
258
258
  }), s;
259
259
  } else
260
260
  throw new Error("Please check mark() to ensure that it is a stable marker draftable function.");
@@ -293,10 +293,10 @@ function we(e, t, n, s, i) {
293
293
  if (s.length > 0) {
294
294
  const a = s.indexOf(r);
295
295
  if (r && typeof r == "object" && a !== -1)
296
- throw s[0] === r ? new Error("Forbids circular reference") : new Error(`Forbids circular reference: ~/${i.slice(0, a).map((u, l) => {
296
+ throw s[0] === r ? new Error("Forbids circular reference") : new Error(`Forbids circular reference: ~/${i.slice(0, a).map((u, f) => {
297
297
  if (typeof u == "symbol")
298
298
  return `[${u.toString()}]`;
299
- const c = s[l];
299
+ const c = s[f];
300
300
  return typeof u == "object" && (c instanceof Map || c instanceof Set) ? Array.from(c.keys()).indexOf(u) : u;
301
301
  }).join("/")}`);
302
302
  s.push(r), i.push(t);
@@ -354,8 +354,8 @@ function Xt(e, t, n) {
354
354
  if (ge(r)) {
355
355
  const u = $(r);
356
356
  K(u);
357
- const l = !((a = u.assignedMap) === null || a === void 0) && a.size || u.operated ? u.copy : u.original;
358
- Le(s ? i : e, o, l);
357
+ const f = !((a = u.assignedMap) === null || a === void 0) && a.size || u.operated ? u.copy : u.original;
358
+ Le(s ? i : e, o, f);
359
359
  } else
360
360
  Xt(r, t, n);
361
361
  }), i) {
@@ -365,7 +365,7 @@ function Xt(e, t, n) {
365
365
  });
366
366
  }
367
367
  }
368
- function Pn(e, t) {
368
+ function Tn(e, t) {
369
369
  const n = e.type === 3 ? e.setMap : e.copy;
370
370
  e.finalities.revoke.length > 1 && e.assignedMap.get(t) && n && Xt(pe(n, t), e.finalities.handledSet, e.options);
371
371
  }
@@ -388,45 +388,45 @@ function gt(e, t, n, s) {
388
388
  i && (i.callbacks || (i.callbacks = []), i.callbacks.push((o, r) => {
389
389
  var a;
390
390
  const u = e.type === 3 ? e.setMap : e.copy;
391
- if (fe(pe(u, t), n)) {
392
- let l = i.original;
393
- i.copy && (l = i.copy), rt(e), ot(e, s, o, r), e.options.enableAutoFreeze && (e.options.updatedValues = (a = e.options.updatedValues) !== null && a !== void 0 ? a : /* @__PURE__ */ new WeakMap(), e.options.updatedValues.set(l, i.original)), Le(u, t, l);
391
+ if (le(pe(u, t), n)) {
392
+ let f = i.original;
393
+ i.copy && (f = i.copy), rt(e), ot(e, s, o, r), e.options.enableAutoFreeze && (e.options.updatedValues = (a = e.options.updatedValues) !== null && a !== void 0 ? a : /* @__PURE__ */ new WeakMap(), e.options.updatedValues.set(f, i.original)), Le(u, t, f);
394
394
  }
395
395
  }), e.options.enableAutoFreeze && i.finalities !== e.finalities && (e.options.enableAutoFreeze = !1)), ee(n, e.options) && e.finalities.draft.push(() => {
396
396
  const o = e.type === 3 ? e.setMap : e.copy;
397
- fe(pe(o, t), n) && Pn(e, t);
397
+ le(pe(o, t), n) && Tn(e, t);
398
398
  });
399
399
  }
400
- function Tn(e, t, n, s, i) {
400
+ function Dn(e, t, n, s, i) {
401
401
  let { original: o, assignedMap: r, options: a } = e, u = e.copy;
402
402
  u.length < o.length && ([o, u] = [u, o], [n, s] = [s, n]);
403
- for (let l = 0; l < o.length; l += 1)
404
- if (r.get(l.toString()) && u[l] !== o[l]) {
405
- const c = t.concat([l]), d = _e(c, i);
403
+ for (let f = 0; f < o.length; f += 1)
404
+ if (r.get(f.toString()) && u[f] !== o[f]) {
405
+ const c = t.concat([f]), d = _e(c, i);
406
406
  n.push({
407
407
  op: B.Replace,
408
408
  path: d,
409
409
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
410
- value: Be(u[l])
410
+ value: Be(u[f])
411
411
  }), s.push({
412
412
  op: B.Replace,
413
413
  path: d,
414
414
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
415
- value: Be(o[l])
415
+ value: Be(o[f])
416
416
  });
417
417
  }
418
- for (let l = o.length; l < u.length; l += 1) {
419
- const c = t.concat([l]), d = _e(c, i);
418
+ for (let f = o.length; f < u.length; f += 1) {
419
+ const c = t.concat([f]), d = _e(c, i);
420
420
  n.push({
421
421
  op: B.Add,
422
422
  path: d,
423
423
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
424
- value: Be(u[l])
424
+ value: Be(u[f])
425
425
  });
426
426
  }
427
427
  if (o.length < u.length) {
428
- const { arrayLengthAssignment: l = !0 } = a.enablePatches;
429
- if (l) {
428
+ const { arrayLengthAssignment: f = !0 } = a.enablePatches;
429
+ if (f) {
430
430
  const c = t.concat(["length"]), d = _e(c, i);
431
431
  s.push({
432
432
  op: B.Replace,
@@ -443,41 +443,41 @@ function Tn(e, t, n, s, i) {
443
443
  }
444
444
  }
445
445
  }
446
- function Dn({ original: e, copy: t, assignedMap: n }, s, i, o, r) {
446
+ function Hn({ original: e, copy: t, assignedMap: n }, s, i, o, r) {
447
447
  n.forEach((a, u) => {
448
- const l = pe(e, u), c = Be(pe(t, u)), d = a ? Ie(e, u) ? B.Replace : B.Add : B.Remove;
449
- if (fe(l, c) && d === B.Replace)
448
+ const f = pe(e, u), c = Be(pe(t, u)), d = a ? Ie(e, u) ? B.Replace : B.Add : B.Remove;
449
+ if (le(f, c) && d === B.Replace)
450
450
  return;
451
451
  const y = s.concat(u), w = _e(y, r);
452
- i.push(d === B.Remove ? { op: d, path: w } : { op: d, path: w, value: c }), o.push(d === B.Add ? { op: B.Remove, path: w } : d === B.Remove ? { op: B.Add, path: w, value: l } : { op: B.Replace, path: w, value: l });
452
+ i.push(d === B.Remove ? { op: d, path: w } : { op: d, path: w, value: c }), o.push(d === B.Add ? { op: B.Remove, path: w } : d === B.Remove ? { op: B.Add, path: w, value: f } : { op: B.Replace, path: w, value: f });
453
453
  });
454
454
  }
455
- function Hn({ original: e, copy: t }, n, s, i, o) {
455
+ function kn({ original: e, copy: t }, n, s, i, o) {
456
456
  let r = 0;
457
457
  e.forEach((a) => {
458
458
  if (!t.has(a)) {
459
- const u = n.concat([r]), l = _e(u, o);
459
+ const u = n.concat([r]), f = _e(u, o);
460
460
  s.push({
461
461
  op: B.Remove,
462
- path: l,
462
+ path: f,
463
463
  value: a
464
464
  }), i.unshift({
465
465
  op: B.Add,
466
- path: l,
466
+ path: f,
467
467
  value: a
468
468
  });
469
469
  }
470
470
  r += 1;
471
471
  }), r = 0, t.forEach((a) => {
472
472
  if (!e.has(a)) {
473
- const u = n.concat([r]), l = _e(u, o);
473
+ const u = n.concat([r]), f = _e(u, o);
474
474
  s.push({
475
475
  op: B.Add,
476
- path: l,
476
+ path: f,
477
477
  value: a
478
478
  }), i.unshift({
479
479
  op: B.Remove,
480
- path: l,
480
+ path: f,
481
481
  value: a
482
482
  });
483
483
  }
@@ -489,16 +489,16 @@ function $e(e, t, n, s) {
489
489
  switch (e.type) {
490
490
  case 0:
491
491
  case 2:
492
- return Dn(e, t, n, s, i);
492
+ return Hn(e, t, n, s, i);
493
493
  case 1:
494
- return Tn(e, t, n, s, i);
494
+ return Dn(e, t, n, s, i);
495
495
  case 3:
496
- return Hn(e, t, n, s, i);
496
+ return kn(e, t, n, s, i);
497
497
  }
498
498
  }
499
- let kn = !1;
499
+ let Nn = !1;
500
500
  const Fe = (e, t, n = !1) => {
501
- if (typeof e == "object" && e !== null && (!ee(e, t) || n) && !kn)
501
+ if (typeof e == "object" && e !== null && (!ee(e, t) || n) && !Nn)
502
502
  throw new Error("Strict mode: Mutable data cannot be accessed directly, please use 'unsafe(callback)' wrap.");
503
503
  }, at = {
504
504
  get size() {
@@ -509,7 +509,7 @@ const Fe = (e, t, n = !1) => {
509
509
  },
510
510
  set(e, t) {
511
511
  const n = $(this), s = Q(n);
512
- return (!s.has(e) || !fe(s.get(e), t)) && (K(n), oe(n), n.assignedMap.set(e, !0), n.copy.set(e, t), gt(n, e, t, $e)), this;
512
+ return (!s.has(e) || !le(s.get(e), t)) && (K(n), oe(n), n.assignedMap.set(e, !0), n.copy.set(e, t), gt(n, e, t, $e)), this;
513
513
  },
514
514
  delete(e) {
515
515
  if (!this.has(e))
@@ -581,15 +581,15 @@ const Fe = (e, t, n = !1) => {
581
581
  [Ue]() {
582
582
  return this.entries();
583
583
  }
584
- }, Nn = Reflect.ownKeys(at), Tt = (e, t, { isValuesIterator: n }) => () => {
584
+ }, jn = Reflect.ownKeys(at), Tt = (e, t, { isValuesIterator: n }) => () => {
585
585
  var s, i;
586
586
  const o = t.next();
587
587
  if (o.done)
588
588
  return o;
589
589
  const r = o.value;
590
590
  let a = e.setMap.get(r);
591
- const u = $(a), l = ((i = (s = e.options).mark) === null || i === void 0 ? void 0 : i.call(s, a, Y)) === Y.mutable;
592
- if (e.options.strict && Fe(r, e.options, l), !l && !u && ee(r, e.options) && !e.finalized && e.original.has(r)) {
591
+ const u = $(a), f = ((i = (s = e.options).mark) === null || i === void 0 ? void 0 : i.call(s, a, Y)) === Y.mutable;
592
+ if (e.options.strict && Fe(r, e.options, f), !f && !u && ee(r, e.options) && !e.finalized && e.original.has(r)) {
593
593
  const c = mt.createDraft({
594
594
  original: r,
595
595
  parentDraft: e,
@@ -669,7 +669,7 @@ const Fe = (e, t, n = !1) => {
669
669
  for (; !s.done; )
670
670
  e.call(t, s.value, s.value, this), s = n.next();
671
671
  }
672
- }, jn = Reflect.ownKeys(ut), qt = /* @__PURE__ */ new WeakSet(), Qt = {
672
+ }, Un = Reflect.ownKeys(ut), qt = /* @__PURE__ */ new WeakSet(), Qt = {
673
673
  get(e, t, n) {
674
674
  var s, i;
675
675
  const o = (s = e.copy) === null || s === void 0 ? void 0 : s[t];
@@ -679,30 +679,30 @@ const Fe = (e, t, n = !1) => {
679
679
  return e;
680
680
  let r;
681
681
  if (e.options.mark) {
682
- const l = t === "size" && (e.original instanceof Map || e.original instanceof Set) ? Reflect.get(e.original, t) : Reflect.get(e.original, t, n);
683
- if (r = e.options.mark(l, Y), r === Y.mutable)
684
- return e.options.strict && Fe(l, e.options, !0), l;
682
+ const f = t === "size" && (e.original instanceof Map || e.original instanceof Set) ? Reflect.get(e.original, t) : Reflect.get(e.original, t, n);
683
+ if (r = e.options.mark(f, Y), r === Y.mutable)
684
+ return e.options.strict && Fe(f, e.options, !0), f;
685
685
  }
686
686
  const a = Q(e);
687
- if (a instanceof Map && Nn.includes(t)) {
687
+ if (a instanceof Map && jn.includes(t)) {
688
688
  if (t === "size")
689
689
  return Object.getOwnPropertyDescriptor(at, "size").get.call(e.proxy);
690
- const l = at[t];
691
- if (l)
692
- return l.bind(e.proxy);
690
+ const f = at[t];
691
+ if (f)
692
+ return f.bind(e.proxy);
693
693
  }
694
- if (a instanceof Set && jn.includes(t)) {
694
+ if (a instanceof Set && Un.includes(t)) {
695
695
  if (t === "size")
696
696
  return Object.getOwnPropertyDescriptor(ut, "size").get.call(e.proxy);
697
- const l = ut[t];
698
- if (l)
699
- return l.bind(e.proxy);
697
+ const f = ut[t];
698
+ if (f)
699
+ return f.bind(e.proxy);
700
700
  }
701
701
  if (!Ie(a, t)) {
702
- const l = Lt(a, t);
703
- return l ? "value" in l ? l.value : (
702
+ const f = Lt(a, t);
703
+ return f ? "value" in f ? f.value : (
704
704
  // !case: support for getter
705
- (i = l.get) === null || i === void 0 ? void 0 : i.call(e.proxy)
705
+ (i = f.get) === null || i === void 0 ? void 0 : i.call(e.proxy)
706
706
  ) : void 0;
707
707
  }
708
708
  const u = a[t];
@@ -716,8 +716,8 @@ const Fe = (e, t, n = !1) => {
716
716
  finalities: e.finalities,
717
717
  options: e.options
718
718
  }), typeof r == "function") {
719
- const l = $(e.copy[t]);
720
- return K(l), oe(l), l.copy;
719
+ const f = $(e.copy[t]);
720
+ return K(f), oe(f), f.copy;
721
721
  }
722
722
  return e.copy[t];
723
723
  }
@@ -734,7 +734,7 @@ const Fe = (e, t, n = !1) => {
734
734
  if (o != null && o.set)
735
735
  return o.set.call(e.proxy, n), !0;
736
736
  const r = Ye(Q(e), t), a = $(r);
737
- return a && fe(a.original, n) ? (e.copy[t] = n, e.assignedMap = (s = e.assignedMap) !== null && s !== void 0 ? s : /* @__PURE__ */ new Map(), e.assignedMap.set(t, !1), !0) : (fe(n, r) && (n !== void 0 || Ie(e.original, t)) || (K(e), oe(e), Ie(e.original, t) && fe(n, e.original[t]) ? e.assignedMap.delete(t) : e.assignedMap.set(t, !0), e.copy[t] = n, gt(e, t, n, $e)), !0);
737
+ return a && le(a.original, n) ? (e.copy[t] = n, e.assignedMap = (s = e.assignedMap) !== null && s !== void 0 ? s : /* @__PURE__ */ new Map(), e.assignedMap.set(t, !1), !0) : (le(n, r) && (n !== void 0 || Ie(e.original, t)) || (K(e), oe(e), Ie(e.original, t) && le(n, e.original[t]) ? e.assignedMap.delete(t) : e.assignedMap.set(t, !0), e.copy[t] = n, gt(e, t, n, $e)), !0);
738
738
  },
739
739
  has(e, t) {
740
740
  return t in Q(e);
@@ -779,8 +779,8 @@ function bt(e) {
779
779
  setMap: r === 3 ? new Map(t.entries()) : void 0
780
780
  };
781
781
  (s || "key" in e) && (a.key = s);
782
- const { proxy: u, revoke: l } = Proxy.revocable(r === 1 ? Object.assign([], a) : a, Qt);
783
- if (i.revoke.push(l), qt.add(u), a.proxy = u, n) {
782
+ const { proxy: u, revoke: f } = Proxy.revocable(r === 1 ? Object.assign([], a) : a, Qt);
783
+ if (i.revoke.push(f), qt.add(u), a.proxy = u, n) {
784
784
  const c = n;
785
785
  c.finalities.draft.push((d, y) => {
786
786
  var w, _;
@@ -804,20 +804,20 @@ function bt(e) {
804
804
  return u;
805
805
  }
806
806
  mt.createDraft = bt;
807
- function Un(e, t, n, s, i) {
807
+ function Bn(e, t, n, s, i) {
808
808
  var o;
809
809
  const r = $(e), a = (o = r == null ? void 0 : r.original) !== null && o !== void 0 ? o : e, u = !!t.length;
810
810
  if (r != null && r.operated)
811
811
  for (; r.finalities.draft.length > 0; )
812
812
  r.finalities.draft.pop()(n, s);
813
- const l = u ? t[0] : r ? r.operated ? r.copy : r.original : e;
814
- return r && it(r), i && we(l, l, r == null ? void 0 : r.options.updatedValues), [
815
- l,
813
+ const f = u ? t[0] : r ? r.operated ? r.copy : r.original : e;
814
+ return r && it(r), i && we(f, f, r == null ? void 0 : r.options.updatedValues), [
815
+ f,
816
816
  n && u ? [{ op: B.Replace, path: [], value: t[0] }] : n,
817
817
  s && u ? [{ op: B.Replace, path: [], value: a }] : s
818
818
  ];
819
819
  }
820
- function Bn(e, t) {
820
+ function Fn(e, t) {
821
821
  var n;
822
822
  const s = {
823
823
  draft: [],
@@ -835,8 +835,8 @@ function Bn(e, t) {
835
835
  return [
836
836
  a,
837
837
  (u = []) => {
838
- const [l, c, d] = Un(a, u, i, o, t.enableAutoFreeze);
839
- return t.enablePatches ? [l, c, d] : l;
838
+ const [f, c, d] = Bn(a, u, i, o, t.enableAutoFreeze);
839
+ return t.enablePatches ? [f, c, d] : f;
840
840
  }
841
841
  ];
842
842
  }
@@ -846,12 +846,12 @@ function ct(e) {
846
846
  const u = $(r);
847
847
  if (u && t && u.finalities === t.finalities) {
848
848
  e.isContainDraft = !0;
849
- const l = u.original;
849
+ const f = u.original;
850
850
  if (a instanceof Set) {
851
851
  const c = Array.from(a);
852
- a.clear(), c.forEach((d) => a.add(o === d ? l : d));
852
+ a.clear(), c.forEach((d) => a.add(o === d ? f : d));
853
853
  } else
854
- Le(a, o, l);
854
+ Le(a, o, f);
855
855
  } else
856
856
  typeof r == "object" && r !== null && (e.value = r, e.isRoot = !1, ct(e));
857
857
  }), i && (e.isContainDraft || console.warn("The return value does not contain any draft, please use 'rawReturn()' to wrap the return value to improve performance."), s && console.warn("The return value contains drafts, please don't use 'rawReturn()' to wrap the return value."));
@@ -877,7 +877,7 @@ function Yt(e) {
877
877
  } else
878
878
  s = e;
879
879
  return _t(s, (o, r) => {
880
- if (t && fe(pe(t.original, o), r))
880
+ if (t && le(pe(t.original, o), r))
881
881
  return;
882
882
  const a = Yt(r);
883
883
  a !== r && (s === e && i(), Le(s, o, a));
@@ -888,7 +888,7 @@ function Dt(e) {
888
888
  throw new Error(`current() is only used for Draft, parameter: ${e}`);
889
889
  return Yt(e);
890
890
  }
891
- const Fn = (e) => {
891
+ const zn = (e) => {
892
892
  if (e !== void 0 && Object.prototype.toString.call(e) !== "[object Object]")
893
893
  throw new Error(`Invalid options: ${String(e)}, 'options' should be an object.`);
894
894
  return function t(n, s, i) {
@@ -897,7 +897,7 @@ const Fn = (e) => {
897
897
  return function(R, ...D) {
898
898
  return t(R, (O) => n.call(this, O, ...D), s);
899
899
  };
900
- const u = n, l = s;
900
+ const u = n, f = s;
901
901
  let c = i;
902
902
  if (typeof s != "function" && (c = s), c !== void 0 && Object.prototype.toString.call(c) !== "[object Object]")
903
903
  throw new Error(`Invalid options: ${c}, 'options' should be an object.`);
@@ -918,7 +918,7 @@ const Fn = (e) => {
918
918
  };
919
919
  if (!ee(d, v) && typeof d == "object" && d !== null)
920
920
  throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");
921
- const [x, b] = Bn(d, v);
921
+ const [x, b] = Fn(d, v);
922
922
  if (typeof s != "function") {
923
923
  if (!ee(d, v))
924
924
  throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");
@@ -926,16 +926,16 @@ const Fn = (e) => {
926
926
  }
927
927
  let A;
928
928
  try {
929
- A = l(x);
929
+ A = f(x);
930
930
  } catch (R) {
931
931
  throw it($(x)), R;
932
932
  }
933
933
  const I = (R) => {
934
934
  const D = $(x);
935
935
  if (!ge(R)) {
936
- if (R !== void 0 && !fe(R, x) && (D != null && D.operated))
936
+ if (R !== void 0 && !le(R, x) && (D != null && D.operated))
937
937
  throw new Error("Either the value is returned as a new non-draft value, or only the draft is modified without returning any value.");
938
- const L = R == null ? void 0 : R[Cn];
938
+ const L = R == null ? void 0 : R[$n];
939
939
  if (L) {
940
940
  const z = L[0];
941
941
  return v.strict && typeof R == "object" && R !== null && ct({
@@ -961,9 +961,9 @@ const Fn = (e) => {
961
961
  throw it($(x)), R;
962
962
  }) : I(A);
963
963
  };
964
- }, M = Fn();
964
+ }, M = zn();
965
965
  Object.prototype.constructor.toString();
966
- const zn = dt(fetch), Zt = async (e, t) => {
966
+ const Gn = dt(fetch), Zt = async (e, t) => {
967
967
  if (!e)
968
968
  throw "Metapage definition null";
969
969
  if (e.version || (e = M(e, (s) => {
@@ -972,7 +972,7 @@ const zn = dt(fetch), Zt = async (e, t) => {
972
972
  throw 'Missing "version" argument';
973
973
  if (V(t, Je) > 0)
974
974
  try {
975
- return await (await zn(`https://module.metapage.io/conversion/metapage/${t}`, {
975
+ return await (await Gn(`https://module.metapage.io/conversion/metapage/${t}`, {
976
976
  redirect: "follow",
977
977
  retries: 3,
978
978
  retryDelay: 1e3,
@@ -985,8 +985,8 @@ const zn = dt(fetch), Zt = async (e, t) => {
985
985
  } catch (s) {
986
986
  throw `Error converting metapage definition to version ${t}: ${s}`;
987
987
  }
988
- return Vn(e, t);
989
- }, Gn = async (e) => Zt(e, Je), Vn = (e, t) => {
988
+ return Jn(e, t);
989
+ }, Vn = async (e) => Zt(e, Je), Jn = (e, t) => {
990
990
  if (!e)
991
991
  throw "Metapage definition null";
992
992
  if (!e.version)
@@ -999,33 +999,33 @@ const zn = dt(fetch), Zt = async (e, t) => {
999
999
  switch (n) {
1000
1000
  case "0.2": {
1001
1001
  if (V(t, n) > 0)
1002
- s = Jn(s), n = Re(s.version);
1002
+ s = Wn(s), n = Re(s.version);
1003
1003
  else
1004
1004
  throw `Cannot convert from version ${n} to ${t}`;
1005
1005
  break;
1006
1006
  }
1007
1007
  case "0.3": {
1008
- V(t, n) > 0 ? (s = Kn(s), n = Re(s.version)) : (s = Wn(s), n = Re(s.version));
1008
+ V(t, n) > 0 ? (s = Xn(s), n = Re(s.version)) : (s = Kn(s), n = Re(s.version));
1009
1009
  break;
1010
1010
  }
1011
1011
  case "1": {
1012
1012
  if (V(t, n) > 0)
1013
1013
  throw `Cannot convert from version ${n} to ${t}, 1 is the latest version`;
1014
- s = Xn(s), n = Re(s.version);
1014
+ s = qn(s), n = Re(s.version);
1015
1015
  break;
1016
1016
  }
1017
1017
  default:
1018
1018
  throw `Unknow version ${n} to ${t}`;
1019
1019
  }
1020
1020
  return s;
1021
- }, Jn = (e) => M(e, (t) => {
1021
+ }, Wn = (e) => M(e, (t) => {
1022
1022
  t.version = "0.3";
1023
- }), Wn = (e) => M(e, (t) => {
1024
- t.version = "0.2";
1025
1023
  }), Kn = (e) => M(e, (t) => {
1024
+ t.version = "0.2";
1025
+ }), Xn = (e) => M(e, (t) => {
1026
1026
  const n = t;
1027
1027
  delete n.plugins, n.version = "1";
1028
- }), Xn = (e) => M(e, (t) => (t.version = "0.3", t)), Re = (e) => {
1028
+ }), qn = (e) => M(e, (t) => (t.version = "0.3", t)), Re = (e) => {
1029
1029
  if (e === "latest")
1030
1030
  return Je;
1031
1031
  if (V(e, "0.2") < 0)
@@ -1037,7 +1037,7 @@ const zn = dt(fetch), Zt = async (e, t) => {
1037
1037
  if (e === "1")
1038
1038
  return "1";
1039
1039
  throw `Unknown version: ${e}`;
1040
- }, qn = dt(fetch), en = async (e, t) => {
1040
+ }, Qn = dt(fetch), en = async (e, t) => {
1041
1041
  if (!e)
1042
1042
  throw "Metapage definition null";
1043
1043
  if (!e.version)
@@ -1046,7 +1046,7 @@ const zn = dt(fetch), Zt = async (e, t) => {
1046
1046
  throw 'Missing "version" argument';
1047
1047
  if (V(t, pt) > 0)
1048
1048
  try {
1049
- return await (await qn(`https://module.metapage.io/conversion/metaframe/${t}`, {
1049
+ return await (await Qn(`https://module.metapage.io/conversion/metaframe/${t}`, {
1050
1050
  redirect: "follow",
1051
1051
  retries: 3,
1052
1052
  retryDelay: 1e3,
@@ -1059,8 +1059,8 @@ const zn = dt(fetch), Zt = async (e, t) => {
1059
1059
  } catch (s) {
1060
1060
  throw `Error converting metapage definition to version ${t}: ${s}`;
1061
1061
  }
1062
- return Yn(e, t);
1063
- }, Qn = async (e) => en(e, pt), Yn = (e, t) => {
1062
+ return Zn(e, t);
1063
+ }, Yn = async (e) => en(e, pt), Zn = (e, t) => {
1064
1064
  if (!e)
1065
1065
  throw "Metaframe definition null";
1066
1066
  e.version || (e = M(e, (i) => {
@@ -1074,41 +1074,41 @@ const zn = dt(fetch), Zt = async (e, t) => {
1074
1074
  switch (n) {
1075
1075
  case "0.3": {
1076
1076
  if (V(t, n) > 0)
1077
- s = ts(s), n = ue(s.version);
1077
+ s = ns(s), n = ue(s.version);
1078
1078
  else
1079
1079
  throw `Cannot convert from version ${n} to ${t}`;
1080
1080
  break;
1081
1081
  }
1082
1082
  case "0.4": {
1083
- V(t, n) > 0 ? (s = ns(s), n = ue(s.version)) : (s = es(s), n = ue(s.version));
1083
+ V(t, n) > 0 ? (s = ss(s), n = ue(s.version)) : (s = ts(s), n = ue(s.version));
1084
1084
  break;
1085
1085
  }
1086
1086
  case "0.5": {
1087
- V(t, n) > 0 ? (s = os(s), n = ue(s.version)) : (s = ss(s), n = ue(s.version));
1087
+ V(t, n) > 0 ? (s = as(s), n = ue(s.version)) : (s = is(s), n = ue(s.version));
1088
1088
  break;
1089
1089
  }
1090
1090
  case "0.6": {
1091
- V(t, n) > 0 ? (s = is(s), n = ue(s.version)) : (s = as(s), n = ue(s.version));
1091
+ V(t, n) > 0 ? (s = rs(s), n = ue(s.version)) : (s = us(s), n = ue(s.version));
1092
1092
  break;
1093
1093
  }
1094
1094
  case "1": {
1095
1095
  if (V(t, n) > 0)
1096
1096
  throw `Cannot convert from version ${n} to ${t}, 1 is the latest version`;
1097
- s = rs(s), n = ue(s.version);
1097
+ s = os(s), n = ue(s.version);
1098
1098
  break;
1099
1099
  }
1100
1100
  default:
1101
1101
  throw `Unknow version ${n} to ${t}`;
1102
1102
  }
1103
1103
  return s;
1104
- }, Zn = async (e, t) => {
1104
+ }, es = async (e, t) => {
1105
1105
  if (e)
1106
- return Qn(e);
1107
- }, es = (e) => M(e, (t) => {
1106
+ return Yn(e);
1107
+ }, ts = (e) => M(e, (t) => {
1108
1108
  t.version = "0.3", delete t.allow;
1109
- }), ts = (e) => M(e, (t) => {
1110
- t.version = "0.4";
1111
1109
  }), ns = (e) => M(e, (t) => {
1110
+ t.version = "0.4";
1111
+ }), ss = (e) => M(e, (t) => {
1112
1112
  if (t.version = "0.5", !(t != null && t.metadata))
1113
1113
  return;
1114
1114
  const n = t.metadata.title;
@@ -1117,7 +1117,7 @@ const zn = dt(fetch), Zt = async (e, t) => {
1117
1117
  delete t.metadata.descriptionUrl, t.metadata.description = s;
1118
1118
  const i = t.metadata.keywords;
1119
1119
  delete t.metadata.keywords, t.metadata.tags = i;
1120
- }), ss = (e) => M(e, (t) => {
1120
+ }), is = (e) => M(e, (t) => {
1121
1121
  if (t.version = "0.4", !(t != null && t.metadata))
1122
1122
  return;
1123
1123
  const n = t.metadata.name;
@@ -1126,16 +1126,16 @@ const zn = dt(fetch), Zt = async (e, t) => {
1126
1126
  delete t.metadata.description, t.metadata.descriptionUrl = s;
1127
1127
  const i = t.metadata.tags;
1128
1128
  delete t.metadata.tags, t.metadata.keywords = i;
1129
- }), is = (e) => M(e, (t) => {
1130
- var n;
1131
- t.version = "1", (n = t == null ? void 0 : t.metadata) != null && n.operations && delete t.metadata.operations;
1132
1129
  }), rs = (e) => M(e, (t) => {
1133
1130
  var n;
1134
- t.version = "0.6", (n = t == null ? void 0 : t.metadata) != null && n.operations && delete t.metadata.operations;
1131
+ t.version = "1", (n = t == null ? void 0 : t.metadata) != null && n.operations && delete t.metadata.operations;
1135
1132
  }), os = (e) => M(e, (t) => {
1136
1133
  var n;
1137
1134
  t.version = "0.6", (n = t == null ? void 0 : t.metadata) != null && n.operations && delete t.metadata.operations;
1138
1135
  }), as = (e) => M(e, (t) => {
1136
+ var n;
1137
+ t.version = "0.6", (n = t == null ? void 0 : t.metadata) != null && n.operations && delete t.metadata.operations;
1138
+ }), us = (e) => M(e, (t) => {
1139
1139
  var n;
1140
1140
  t.version = "0.5", (n = t == null ? void 0 : t.metadata) != null && n.operations && delete t.metadata.operations;
1141
1141
  }), ue = (e) => {
@@ -1166,14 +1166,14 @@ var je = function(e) {
1166
1166
  }, de = function(e) {
1167
1167
  var t = e.length * 0.75, n = e.length, s, i = 0, o, r, a, u;
1168
1168
  e[e.length - 1] === "=" && (t--, e[e.length - 2] === "=" && t--);
1169
- var l = new ArrayBuffer(t), c = new Uint8Array(l);
1169
+ var f = new ArrayBuffer(t), c = new Uint8Array(f);
1170
1170
  for (s = 0; s < n; s += 4)
1171
1171
  o = Ee[e.charCodeAt(s)], r = Ee[e.charCodeAt(s + 1)], a = Ee[e.charCodeAt(s + 2)], u = Ee[e.charCodeAt(s + 3)], c[i++] = o << 2 | r >> 4, c[i++] = (r & 15) << 4 | a >> 2, c[i++] = (a & 3) << 6 | u & 63;
1172
- return l;
1172
+ return f;
1173
1173
  };
1174
1174
  const We = async (e) => M(e, async (t) => {
1175
1175
  for (const n of Object.keys(e)) {
1176
- const s = await us(e[n]);
1176
+ const s = await cs(e[n]);
1177
1177
  return t[n] = s, t;
1178
1178
  }
1179
1179
  }), Ce = async (e) => M(e, async (t) => {
@@ -1181,7 +1181,7 @@ const We = async (e) => M(e, async (t) => {
1181
1181
  const s = await tn(e[n]);
1182
1182
  return t[n] = s, t;
1183
1183
  }
1184
- }), vi = async (e, t, n) => {
1184
+ }), wi = async (e, t, n) => {
1185
1185
  if (e = tn(e), n = n || {}, n.type || (n.type = "application/octet-stream"), e instanceof ArrayBuffer)
1186
1186
  return new File([e], t, n);
1187
1187
  if (e instanceof File || e instanceof Blob) {
@@ -1204,7 +1204,7 @@ const We = async (e) => M(e, async (t) => {
1204
1204
  }
1205
1205
  var s = new Blob([e], { type: "text/plain" });
1206
1206
  return n.type = "text/plain", new File([s], t, n);
1207
- }, us = async (e) => {
1207
+ }, cs = async (e) => {
1208
1208
  if (e instanceof Int8Array || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int16Array || e instanceof Uint16Array || e instanceof Int32Array || e instanceof Uint32Array || e instanceof Float32Array || e instanceof Float64Array) {
1209
1209
  const t = e, n = {
1210
1210
  _s: !0,
@@ -1268,7 +1268,7 @@ const We = async (e) => M(e, async (t) => {
1268
1268
  } catch {
1269
1269
  }
1270
1270
  return e;
1271
- }, wi = (e) => {
1271
+ }, Ri = (e) => {
1272
1272
  if (!(e && typeof e == "object" && e._s === !0))
1273
1273
  return;
1274
1274
  const t = e, n = t._c;
@@ -1302,18 +1302,18 @@ const We = async (e) => M(e, async (t) => {
1302
1302
  };
1303
1303
  var E;
1304
1304
  (function(e) {
1305
- e.Inputs = "inputs", e.Outputs = "outputs", e.State = "state", e.Definition = "definition", e.Error = "error", e.UrlHashUpdate = "urlhashupdate", e.Message = "Message";
1305
+ e.Inputs = "inputs", e.Outputs = "outputs", e.State = "state", e.Definition = "definition", e.Error = "error", e.Warning = "warning", e.UrlHashUpdate = "urlhashupdate", e.Message = "Message";
1306
1306
  })(E || (E = {}));
1307
1307
  var X;
1308
1308
  (function(e) {
1309
1309
  e.InputsUpdate = "InputsUpdate", e.OutputsUpdate = "OutputsUpdate", e.SetupIframeClientRequest = "SetupIframeClientRequest", e.SetupIframeServerResponseAck = "SetupIframeServerResponseAck", e.HashParamsUpdate = "HashParamsUpdate";
1310
1310
  })(X || (X = {}));
1311
- var le;
1311
+ var fe;
1312
1312
  (function(e) {
1313
1313
  e.InputsUpdate = "InputsUpdate", e.MessageAck = "MessageAck", e.SetupIframeServerResponse = "SetupIframeServerResponse";
1314
- })(le || (le = {}));
1315
- const Ri = -32700, Oi = -32600, Ai = -32601, Si = -32602, Ei = -32603;
1316
- function Mi(e) {
1314
+ })(fe || (fe = {}));
1315
+ const Oi = -32700, Ai = -32600, Si = -32601, Ei = -32602, Mi = -32603;
1316
+ function Ii(e) {
1317
1317
  switch (typeof e) {
1318
1318
  case "string":
1319
1319
  return !0;
@@ -1331,30 +1331,30 @@ var nn = { exports: {} };
1331
1331
  function s() {
1332
1332
  }
1333
1333
  Object.create && (s.prototype = /* @__PURE__ */ Object.create(null), new s().__proto__ || (n = !1));
1334
- function i(u, l, c) {
1335
- this.fn = u, this.context = l, this.once = c || !1;
1334
+ function i(u, f, c) {
1335
+ this.fn = u, this.context = f, this.once = c || !1;
1336
1336
  }
1337
- function o(u, l, c, d, y) {
1337
+ function o(u, f, c, d, y) {
1338
1338
  if (typeof c != "function")
1339
1339
  throw new TypeError("The listener must be a function");
1340
- var w = new i(c, d || u, y), _ = n ? n + l : l;
1340
+ var w = new i(c, d || u, y), _ = n ? n + f : f;
1341
1341
  return u._events[_] ? u._events[_].fn ? u._events[_] = [u._events[_], w] : u._events[_].push(w) : (u._events[_] = w, u._eventsCount++), u;
1342
1342
  }
1343
- function r(u, l) {
1344
- --u._eventsCount === 0 ? u._events = new s() : delete u._events[l];
1343
+ function r(u, f) {
1344
+ --u._eventsCount === 0 ? u._events = new s() : delete u._events[f];
1345
1345
  }
1346
1346
  function a() {
1347
1347
  this._events = new s(), this._eventsCount = 0;
1348
1348
  }
1349
1349
  a.prototype.eventNames = function() {
1350
- var l = [], c, d;
1350
+ var f = [], c, d;
1351
1351
  if (this._eventsCount === 0)
1352
- return l;
1352
+ return f;
1353
1353
  for (d in c = this._events)
1354
- t.call(c, d) && l.push(n ? d.slice(1) : d);
1355
- return Object.getOwnPropertySymbols ? l.concat(Object.getOwnPropertySymbols(c)) : l;
1356
- }, a.prototype.listeners = function(l) {
1357
- var c = n ? n + l : l, d = this._events[c];
1354
+ t.call(c, d) && f.push(n ? d.slice(1) : d);
1355
+ return Object.getOwnPropertySymbols ? f.concat(Object.getOwnPropertySymbols(c)) : f;
1356
+ }, a.prototype.listeners = function(f) {
1357
+ var c = n ? n + f : f, d = this._events[c];
1358
1358
  if (!d)
1359
1359
  return [];
1360
1360
  if (d.fn)
@@ -1362,16 +1362,16 @@ var nn = { exports: {} };
1362
1362
  for (var y = 0, w = d.length, _ = new Array(w); y < w; y++)
1363
1363
  _[y] = d[y].fn;
1364
1364
  return _;
1365
- }, a.prototype.listenerCount = function(l) {
1366
- var c = n ? n + l : l, d = this._events[c];
1365
+ }, a.prototype.listenerCount = function(f) {
1366
+ var c = n ? n + f : f, d = this._events[c];
1367
1367
  return d ? d.fn ? 1 : d.length : 0;
1368
- }, a.prototype.emit = function(l, c, d, y, w, _) {
1369
- var S = n ? n + l : l;
1368
+ }, a.prototype.emit = function(f, c, d, y, w, _) {
1369
+ var S = n ? n + f : f;
1370
1370
  if (!this._events[S])
1371
1371
  return !1;
1372
1372
  var v = this._events[S], x = arguments.length, b, A;
1373
1373
  if (v.fn) {
1374
- switch (v.once && this.removeListener(l, v.fn, void 0, !0), x) {
1374
+ switch (v.once && this.removeListener(f, v.fn, void 0, !0), x) {
1375
1375
  case 1:
1376
1376
  return v.fn.call(v.context), !0;
1377
1377
  case 2:
@@ -1391,7 +1391,7 @@ var nn = { exports: {} };
1391
1391
  } else {
1392
1392
  var I = v.length, R;
1393
1393
  for (A = 0; A < I; A++)
1394
- switch (v[A].once && this.removeListener(l, v[A].fn, void 0, !0), x) {
1394
+ switch (v[A].once && this.removeListener(f, v[A].fn, void 0, !0), x) {
1395
1395
  case 1:
1396
1396
  v[A].fn.call(v[A].context);
1397
1397
  break;
@@ -1412,12 +1412,12 @@ var nn = { exports: {} };
1412
1412
  }
1413
1413
  }
1414
1414
  return !0;
1415
- }, a.prototype.on = function(l, c, d) {
1416
- return o(this, l, c, d, !1);
1417
- }, a.prototype.once = function(l, c, d) {
1418
- return o(this, l, c, d, !0);
1419
- }, a.prototype.removeListener = function(l, c, d, y) {
1420
- var w = n ? n + l : l;
1415
+ }, a.prototype.on = function(f, c, d) {
1416
+ return o(this, f, c, d, !1);
1417
+ }, a.prototype.once = function(f, c, d) {
1418
+ return o(this, f, c, d, !0);
1419
+ }, a.prototype.removeListener = function(f, c, d, y) {
1420
+ var w = n ? n + f : f;
1421
1421
  if (!this._events[w])
1422
1422
  return this;
1423
1423
  if (!c)
@@ -1431,13 +1431,13 @@ var nn = { exports: {} };
1431
1431
  v.length ? this._events[w] = v.length === 1 ? v[0] : v : r(this, w);
1432
1432
  }
1433
1433
  return this;
1434
- }, a.prototype.removeAllListeners = function(l) {
1434
+ }, a.prototype.removeAllListeners = function(f) {
1435
1435
  var c;
1436
- return l ? (c = n ? n + l : l, this._events[c] && r(this, c)) : (this._events = new s(), this._eventsCount = 0), this;
1436
+ return f ? (c = n ? n + f : f, this._events[c] && r(this, c)) : (this._events = new s(), this._eventsCount = 0), this;
1437
1437
  }, a.prototype.off = a.prototype.removeListener, a.prototype.addListener = a.prototype.on, a.prefixed = n, a.EventEmitter = a, e.exports = a;
1438
1438
  })(nn);
1439
1439
  var vt = nn.exports;
1440
- function cs(e) {
1440
+ function fs(e) {
1441
1441
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1442
1442
  }
1443
1443
  var ls = function(e, t) {
@@ -1445,8 +1445,8 @@ var ls = function(e, t) {
1445
1445
  var n = typeof t.cycles == "boolean" ? t.cycles : !1, s = t.cmp && /* @__PURE__ */ function(o) {
1446
1446
  return function(r) {
1447
1447
  return function(a, u) {
1448
- var l = { key: a, value: r[a] }, c = { key: u, value: r[u] };
1449
- return o(l, c);
1448
+ var f = { key: a, value: r[a] }, c = { key: u, value: r[u] };
1449
+ return o(f, c);
1450
1450
  };
1451
1451
  };
1452
1452
  }(t.cmp), i = [];
@@ -1469,16 +1469,16 @@ var ls = function(e, t) {
1469
1469
  return JSON.stringify("__cycle__");
1470
1470
  throw new TypeError("Converting circular structure to JSON");
1471
1471
  }
1472
- var l = i.push(r) - 1, c = Object.keys(r).sort(s && s(r));
1472
+ var f = i.push(r) - 1, c = Object.keys(r).sort(s && s(r));
1473
1473
  for (u = "", a = 0; a < c.length; a++) {
1474
1474
  var d = c[a], y = o(r[d]);
1475
1475
  y && (u && (u += ","), u += JSON.stringify(d) + ":" + y);
1476
1476
  }
1477
- return i.splice(l, 1), "{" + u + "}";
1477
+ return i.splice(f, 1), "{" + u + "}";
1478
1478
  }
1479
1479
  }(e);
1480
1480
  };
1481
- const fs = /* @__PURE__ */ cs(ls), ps = (e) => sn(fs(e)), hs = (e) => {
1481
+ const ps = /* @__PURE__ */ fs(ls), hs = (e) => sn(ps(e)), ds = (e) => {
1482
1482
  if (e && e.length > 0)
1483
1483
  return JSON.parse(rn(e));
1484
1484
  }, sn = (e) => btoa(encodeURIComponent(e)), rn = (e) => decodeURIComponent(atob(e)), on = (e) => {
@@ -1512,35 +1512,35 @@ const fs = /* @__PURE__ */ cs(ls), ps = (e) => sn(fs(e)), hs = (e) => {
1512
1512
  }, Pe = (e, t) => {
1513
1513
  const [n, s] = on(e);
1514
1514
  return s[t];
1515
- }, ds = (e) => ms()[1][e], ms = () => on(window.location.href), Ae = (e, t, n) => {
1516
- const s = window.location.hash.startsWith("#") ? window.location.hash.substring(1) : window.location.hash, i = ys(s, e, t);
1515
+ }, ms = (e) => ys()[1][e], ys = () => on(window.location.href), Ae = (e, t, n) => {
1516
+ const s = window.location.hash.startsWith("#") ? window.location.hash.substring(1) : window.location.hash, i = _s(s, e, t);
1517
1517
  i !== s && (n != null && n.modifyHistory ? window.location.hash = i : (window.history.replaceState(null, document.title, `${window.location.pathname}${window.location.search}${i.startsWith("#") ? "" : "#"}${i}`), window.dispatchEvent(new HashChangeEvent("hashchange"))));
1518
- }, ys = (e, t, n) => {
1518
+ }, _s = (e, t, n) => {
1519
1519
  const [s, i] = an(e);
1520
1520
  let o = !1;
1521
1521
  if (i.hasOwnProperty(t) && n === null || n === void 0 ? (delete i[t], o = !0) : i[t] !== n && (i[t] = n, o = !0), !o)
1522
1522
  return e;
1523
1523
  const r = Object.keys(i);
1524
1524
  r.sort();
1525
- const a = r.map((u, l) => `${u}=${encodeURI(i[u])}`).join("&");
1525
+ const a = r.map((u, f) => `${u}=${encodeURI(i[u])}`).join("&");
1526
1526
  return `${s}?${a}`;
1527
- }, _s = (e, t) => {
1527
+ }, un = (e, t) => {
1528
1528
  const n = Pe(e, t);
1529
1529
  if (n && n !== "")
1530
- return hs(n);
1530
+ return ds(n);
1531
1531
  }, gs = (e, t, n) => {
1532
- const s = t ? ps(t) : void 0;
1532
+ const s = t ? hs(t) : void 0;
1533
1533
  Ae(e, s, n);
1534
- }, bs = (e) => _s(window.location.href, e), vs = (e, t) => {
1534
+ }, bs = (e) => un(window.location.href, e), vs = (e, t) => {
1535
1535
  const n = Pe(e, t);
1536
1536
  return n ? parseFloat(n) : void 0;
1537
- }, un = (e, t, n) => {
1537
+ }, cn = (e, t, n) => {
1538
1538
  Ae(e, t != null ? t.toString() : void 0, n);
1539
1539
  }, ws = (e) => vs(window.location.href, e), Rs = (e, t) => {
1540
1540
  const n = Pe(e, t);
1541
1541
  return n ? parseInt(n) : void 0;
1542
1542
  }, Os = (e, t, n) => {
1543
- un(e, t, n);
1543
+ cn(e, t, n);
1544
1544
  }, As = (e) => Rs(window.location.href, e), Ss = (e, t) => Pe(e, t) === "true", Es = (e, t, n) => {
1545
1545
  Ae(e, t ? "true" : void 0, n);
1546
1546
  }, Ms = (e) => Ss(window.location.href, e), Is = (e, t) => {
@@ -1555,8 +1555,8 @@ var xs = function(e, t) {
1555
1555
  var n = typeof t.cycles == "boolean" ? t.cycles : !1, s = t.cmp && function(o) {
1556
1556
  return function(r) {
1557
1557
  return function(a, u) {
1558
- var l = { key: a, value: r[a] }, c = { key: u, value: r[u] };
1559
- return o(l, c);
1558
+ var f = { key: a, value: r[a] }, c = { key: u, value: r[u] };
1559
+ return o(f, c);
1560
1560
  };
1561
1561
  };
1562
1562
  }(t.cmp), i = [];
@@ -1579,16 +1579,16 @@ var xs = function(e, t) {
1579
1579
  return JSON.stringify("__cycle__");
1580
1580
  throw new TypeError("Converting circular structure to JSON");
1581
1581
  }
1582
- var l = i.push(r) - 1, c = Object.keys(r).sort(s && s(r));
1582
+ var f = i.push(r) - 1, c = Object.keys(r).sort(s && s(r));
1583
1583
  for (u = "", a = 0; a < c.length; a++) {
1584
1584
  var d = c[a], y = o(r[d]);
1585
1585
  y && (u && (u += ","), u += JSON.stringify(d) + ":" + y);
1586
1586
  }
1587
- return i.splice(l, 1), "{" + u + "}";
1587
+ return i.splice(f, 1), "{" + u + "}";
1588
1588
  }
1589
1589
  }(e);
1590
1590
  };
1591
- const cn = /* @__PURE__ */ ht(xs);
1591
+ const fn = /* @__PURE__ */ ht(xs);
1592
1592
  var xe;
1593
1593
  (function(e) {
1594
1594
  e.mp_debug = "mp_debug";
@@ -1618,10 +1618,10 @@ const ze = (e, t) => t ? M(e, (n) => {
1618
1618
  Object.keys(t).forEach((s) => {
1619
1619
  t[s] === void 0 ? delete n[s] : n[s] = t[s];
1620
1620
  });
1621
- }) : e, Ii = (e) => window.location.search ? new URLSearchParams(window.location.search).get(e) : null, Ci = () => new URLSearchParams(window.location.search).has(xe.mp_debug), lt = () => {
1621
+ }) : e, Ci = (e) => window.location.search ? new URLSearchParams(window.location.search).get(e) : null, $i = () => new URLSearchParams(window.location.search).has(xe.mp_debug), ft = () => {
1622
1622
  const e = new URLSearchParams(window.location.search).get(xe.mp_debug);
1623
1623
  return e === "true" || e === "1";
1624
- }, $i = (e = 8) => wt(e), Ts = (e = 8) => wt(e), xi = (e = 8) => wt(e), Ht = "abcdefghijklmnopqrstuvwxyz0123456789", wt = (e = 8) => {
1624
+ }, xi = (e = 8) => wt(e), Ts = (e = 8) => wt(e), Li = (e = 8) => wt(e), Ht = "abcdefghijklmnopqrstuvwxyz0123456789", wt = (e = 8) => {
1625
1625
  for (var t = "", n = Ht.length, s = 0; s < e; s++)
1626
1626
  t += Ht.charAt(Math.floor(Math.random() * n));
1627
1627
  return t;
@@ -1633,7 +1633,7 @@ const ze = (e, t) => t ? M(e, (n) => {
1633
1633
  n && (i = `${i}; background: #${n}`), s = `%c${s}`, window.console.log(s, i);
1634
1634
  } else
1635
1635
  window.console.log(s);
1636
- }, fn = (e) => Hs(Ds(e)), Ds = (e) => {
1636
+ }, pn = (e) => Hs(Ds(e)), Ds = (e) => {
1637
1637
  var t = 0;
1638
1638
  for (let n = 0; n < e.length; n++)
1639
1639
  t = e.charCodeAt(n) + ((t << 5) - t);
@@ -1652,17 +1652,17 @@ const ze = (e, t) => t ? M(e, (n) => {
1652
1652
  }), setTimeout(() => {
1653
1653
  !t && Ze() && (t = !0, e());
1654
1654
  }, 200);
1655
- }), Li = async (e) => {
1656
- const t = cn(e);
1657
- return await pn(t);
1658
- }, Pi = async (e) => {
1659
- const t = cn({
1655
+ }), Pi = async (e) => {
1656
+ const t = fn(e);
1657
+ return await hn(t);
1658
+ }, Ti = async (e) => {
1659
+ const t = fn({
1660
1660
  version: e.version,
1661
1661
  metaframes: e.metaframes
1662
1662
  });
1663
- return await pn(t);
1663
+ return await hn(t);
1664
1664
  };
1665
- async function pn(e) {
1665
+ async function hn(e) {
1666
1666
  const n = new TextEncoder().encode(e), s = await crypto.subtle.digest("SHA-256", n);
1667
1667
  return btoa(String.fromCharCode(...new Uint8Array(s)));
1668
1668
  }
@@ -1676,7 +1676,7 @@ var U;
1676
1676
  })(U || (U = {}));
1677
1677
  class te extends vt.EventEmitter {
1678
1678
  constructor(t) {
1679
- if (super(), this._inputPipeValues = {}, this._outputPipeValues = {}, this._state = re.WaitingForPageLoad, this._messageSendCount = 0, this.debug = lt(), this.isInputOutputBlobSerialization = !0, this.id = window.name, this.debug = lt(), this._isIframe = Ls(), this.addListener = this.addListener.bind(this), this.dispose = this.dispose.bind(this), this.error = this.error.bind(this), this.getInput = this.getInput.bind(this), this.getInputs = this.getInputs.bind(this), this.log = this.log.bind(this), this.logInternal = this.logInternal.bind(this), this.onInput = this.onInput.bind(this), this.onInputs = this.onInputs.bind(this), this.onMessage = this.onMessage.bind(this), this.sendRpc = this.sendRpc.bind(this), this.setInput = this.setInput.bind(this), this.setInputs = this.setInputs.bind(this), this.setInternalInputsAndNotify = this.setInternalInputsAndNotify.bind(this), this.setOutput = this.setOutput.bind(this), this.setOutputs = this.setOutputs.bind(this), this.warn = this.warn.bind(this), this._resolveSetupIframeServerResponse = this._resolveSetupIframeServerResponse.bind(this), this.addListenerReturnDisposer = this.addListenerReturnDisposer.bind(this), this.connected = this.connected.bind(this), this.isConnected = this.isConnected.bind(this), this.disableNotifyOnHashUrlChange = this.disableNotifyOnHashUrlChange.bind(this), this._onHashUrlChange = this._onHashUrlChange.bind(this), this.setParameter = this.setParameter.bind(this), this.setParameterBoolean = this.setParameterBoolean.bind(this), this.setParameterJson = this.setParameterJson.bind(this), this.setParameterBase64 = this.setParameterBase64.bind(this), this.setParameterFloat = this.setParameterFloat.bind(this), this.setParameterInt = this.setParameterInt.bind(this), this.getParameter = this.getParameter.bind(this), this.getParameterBoolean = this.getParameterBoolean.bind(this), this.getParameterJson = this.getParameterJson.bind(this), this.getParameterBase64 = this.getParameterBase64.bind(this), this.getParameterFloat = this.getParameterFloat.bind(this), this.getParameterInt = this.getParameterInt.bind(this), this.deleteParameter = this.deleteParameter.bind(this), !this._isIframe) {
1679
+ if (super(), this._inputPipeValues = {}, this._outputPipeValues = {}, this._state = re.WaitingForPageLoad, this._messageSendCount = 0, this.debug = ft(), this.isInputOutputBlobSerialization = !0, this.id = window.name, this.debug = ft(), this._isIframe = Ls(), this.addListener = this.addListener.bind(this), this.dispose = this.dispose.bind(this), this.error = this.error.bind(this), this.getInput = this.getInput.bind(this), this.getInputs = this.getInputs.bind(this), this.log = this.log.bind(this), this.logInternal = this.logInternal.bind(this), this.onInput = this.onInput.bind(this), this.onInputs = this.onInputs.bind(this), this.onMessage = this.onMessage.bind(this), this.sendRpc = this.sendRpc.bind(this), this.setInput = this.setInput.bind(this), this.setInputs = this.setInputs.bind(this), this.setInternalInputsAndNotify = this.setInternalInputsAndNotify.bind(this), this.setOutput = this.setOutput.bind(this), this.setOutputs = this.setOutputs.bind(this), this.warn = this.warn.bind(this), this._resolveSetupIframeServerResponse = this._resolveSetupIframeServerResponse.bind(this), this.addListenerReturnDisposer = this.addListenerReturnDisposer.bind(this), this.connected = this.connected.bind(this), this.isConnected = this.isConnected.bind(this), this.disableNotifyOnHashUrlChange = this.disableNotifyOnHashUrlChange.bind(this), this._onHashUrlChange = this._onHashUrlChange.bind(this), this.setParameter = this.setParameter.bind(this), this.setParameterBoolean = this.setParameterBoolean.bind(this), this.setParameterJson = this.setParameterJson.bind(this), this.setParameterBase64 = this.setParameterBase64.bind(this), this.setParameterFloat = this.setParameterFloat.bind(this), this.setParameterInt = this.setParameterInt.bind(this), this.getParameter = this.getParameter.bind(this), this.getParameterBoolean = this.getParameterBoolean.bind(this), this.getParameterJson = this.getParameterJson.bind(this), this.getParameterBase64 = this.getParameterBase64.bind(this), this.getParameterFloat = this.getParameterFloat.bind(this), this.getParameterInt = this.getParameterInt.bind(this), this.deleteParameter = this.deleteParameter.bind(this), !this._isIframe) {
1680
1680
  this.log("Not an iframe, metaframe code disabled");
1681
1681
  return;
1682
1682
  }
@@ -1690,7 +1690,7 @@ class te extends vt.EventEmitter {
1690
1690
  _resolveSetupIframeServerResponse(t) {
1691
1691
  if (this._state === re.WaitingForPageLoad)
1692
1692
  throw "Got message but page has not finished loading, we should never get in this state";
1693
- (async () => this._parentId ? this.log("Got JsonRpcMethods.SetupIframeServerResponse but already resolved") : (this._parentVersion = t.version, this.color = fn(this.id), this._parentId = t.parentId, this.log(`metapage[${this._parentId}](v${this._parentVersion ? this._parentVersion : "unknown"}) registered`), t.state && t.state.inputs && (this.isInputOutputBlobSerialization ? this._inputPipeValues = await Ce(t.state.inputs) : this._inputPipeValues = t.state.inputs), this._state = re.Ready, this.sendRpc(X.SetupIframeServerResponseAck, {
1693
+ (async () => this._parentId ? this.log("Got JsonRpcMethods.SetupIframeServerResponse but already resolved") : (this._parentVersion = t.version, this.color = pn(this.id), this._parentId = t.parentId, this.log(`metapage[${this._parentId}](v${this._parentVersion ? this._parentVersion : "unknown"}) registered`), t.state && t.state.inputs && (this.isInputOutputBlobSerialization ? this._inputPipeValues = await Ce(t.state.inputs) : this._inputPipeValues = t.state.inputs), this._state = re.Ready, this.sendRpc(X.SetupIframeServerResponseAck, {
1694
1694
  version: te.version
1695
1695
  }), this._inputPipeValues && Object.keys(this._inputPipeValues).length > 0 && (this.emit(U.Inputs, this._inputPipeValues), this.listenerCount(U.Input) > 0 && Object.keys(this._inputPipeValues).forEach((n) => this.emit(U.Input, n, this._inputPipeValues[n]))), this.emit(U.Connected), this.sendRpc(X.OutputsUpdate, this._outputPipeValues)))();
1696
1696
  }
@@ -1813,20 +1813,20 @@ class te extends vt.EventEmitter {
1813
1813
  let s = t.data;
1814
1814
  if (s.jsonrpc === "2.0") {
1815
1815
  var n = s.method;
1816
- if (!(n == le.SetupIframeServerResponse || s.parentId == this._parentId && s.iframeId == this.id)) {
1816
+ if (!(n == fe.SetupIframeServerResponse || s.parentId == this._parentId && s.iframeId == this.id)) {
1817
1817
  this.log(`window.message: received message but jsonrpc.parentId=${s.parentId} _parentId=${this._parentId} jsonrpc.iframeId=${s.iframeId} id=${this.id}`);
1818
1818
  return;
1819
1819
  }
1820
1820
  switch (n) {
1821
- case le.SetupIframeServerResponse:
1821
+ case fe.SetupIframeServerResponse:
1822
1822
  this._resolveSetupIframeServerResponse(s.params);
1823
1823
  break;
1824
- case le.InputsUpdate:
1824
+ case fe.InputsUpdate:
1825
1825
  if (this._state !== re.Ready)
1826
1826
  throw "Got InputsUpdate but metaframe is not MetaframeLoadingState.Ready";
1827
1827
  this.setInternalInputsAndNotify(s.params.inputs);
1828
1828
  break;
1829
- case le.MessageAck:
1829
+ case fe.MessageAck:
1830
1830
  this.debug && this.log(`ACK: ${JSON.stringify(s)}`);
1831
1831
  break;
1832
1832
  default:
@@ -1841,7 +1841,7 @@ class te extends vt.EventEmitter {
1841
1841
  Ae(t, n);
1842
1842
  }
1843
1843
  getParameter(t) {
1844
- return ds(t);
1844
+ return ms(t);
1845
1845
  }
1846
1846
  setParameterBoolean(t, n) {
1847
1847
  Es(t, n);
@@ -1862,7 +1862,7 @@ class te extends vt.EventEmitter {
1862
1862
  return $s(t);
1863
1863
  }
1864
1864
  setParameterFloat(t, n) {
1865
- un(t, n);
1865
+ cn(t, n);
1866
1866
  }
1867
1867
  getParameterFloat(t) {
1868
1868
  return ws(t);
@@ -1877,7 +1877,7 @@ class te extends vt.EventEmitter {
1877
1877
  Ae(t, void 0);
1878
1878
  }
1879
1879
  }
1880
- te.version = On;
1880
+ te.version = An;
1881
1881
  te.ERROR = U.Error;
1882
1882
  te.CONNECTED = U.Connected;
1883
1883
  te.INPUT = U.Input;
@@ -1886,13 +1886,13 @@ te.MESSAGE = U.Message;
1886
1886
  te.deserializeInputs = Ce;
1887
1887
  te.serializeInputs = We;
1888
1888
  var Ke = {};
1889
- const ie = "\\\\/", kt = `[^${ie}]`, ce = "\\.", ks = "\\+", Ns = "\\?", Xe = "\\/", js = "(?=.)", hn = "[^/]", At = `(?:${Xe}|$)`, dn = `(?:^|${Xe})`, St = `${ce}{1,2}${At}`, Us = `(?!${ce})`, Bs = `(?!${dn}${St})`, Fs = `(?!${ce}{0,1}${At})`, zs = `(?!${St})`, Gs = `[^.${Xe}]`, Vs = `${hn}*?`, Js = "/", mn = {
1889
+ const ie = "\\\\/", kt = `[^${ie}]`, ce = "\\.", ks = "\\+", Ns = "\\?", Xe = "\\/", js = "(?=.)", dn = "[^/]", At = `(?:${Xe}|$)`, mn = `(?:^|${Xe})`, St = `${ce}{1,2}${At}`, Us = `(?!${ce})`, Bs = `(?!${mn}${St})`, Fs = `(?!${ce}{0,1}${At})`, zs = `(?!${St})`, Gs = `[^.${Xe}]`, Vs = `${dn}*?`, Js = "/", yn = {
1890
1890
  DOT_LITERAL: ce,
1891
1891
  PLUS_LITERAL: ks,
1892
1892
  QMARK_LITERAL: Ns,
1893
1893
  SLASH_LITERAL: Xe,
1894
1894
  ONE_CHAR: js,
1895
- QMARK: hn,
1895
+ QMARK: dn,
1896
1896
  END_ANCHOR: At,
1897
1897
  DOTS_SLASH: St,
1898
1898
  NO_DOT: Us,
@@ -1901,10 +1901,10 @@ const ie = "\\\\/", kt = `[^${ie}]`, ce = "\\.", ks = "\\+", Ns = "\\?", Xe = "\
1901
1901
  NO_DOTS_SLASH: zs,
1902
1902
  QMARK_NO_DOT: Gs,
1903
1903
  STAR: Vs,
1904
- START_ANCHOR: dn,
1904
+ START_ANCHOR: mn,
1905
1905
  SEP: Js
1906
1906
  }, Ws = {
1907
- ...mn,
1907
+ ...yn,
1908
1908
  SLASH_LITERAL: `[${ie}]`,
1909
1909
  QMARK: kt,
1910
1910
  STAR: `${kt}*?`,
@@ -2054,7 +2054,7 @@ var qe = {
2054
2054
  * Create GLOB_CHARS
2055
2055
  */
2056
2056
  globChars(e) {
2057
- return e === !0 ? Ws : mn;
2057
+ return e === !0 ? Ws : yn;
2058
2058
  }
2059
2059
  };
2060
2060
  (function(e) {
@@ -2074,8 +2074,8 @@ var qe = {
2074
2074
  let a = o;
2075
2075
  return a.startsWith("./") && (a = a.slice(2), r.prefix = "./"), a;
2076
2076
  }, e.wrapOutput = (o, r = {}, a = {}) => {
2077
- const u = a.contains ? "" : "^", l = a.contains ? "" : "$";
2078
- let c = `${u}(?:${o})${l}`;
2077
+ const u = a.contains ? "" : "^", f = a.contains ? "" : "$";
2078
+ let c = `${u}(?:${o})${f}`;
2079
2079
  return r.negated === !0 && (c = `(?:^(?!${c}).*$)`), c;
2080
2080
  }, e.basename = (o, { windows: r } = {}) => r ? o.replace(/[\\/]$/, "").replace(/.*[\\/]/, "") : o.replace(/\/$/, "").replace(/.*\//, "");
2081
2081
  })(Ke);
@@ -2092,7 +2092,7 @@ const Nt = Ke, {
2092
2092
  /* . */
2093
2093
  CHAR_EXCLAMATION_MARK: jt,
2094
2094
  /* ! */
2095
- CHAR_FORWARD_SLASH: yn,
2095
+ CHAR_FORWARD_SLASH: _n,
2096
2096
  /* / */
2097
2097
  CHAR_LEFT_CURLY_BRACE: nt,
2098
2098
  /* { */
@@ -2110,13 +2110,13 @@ const Nt = Ke, {
2110
2110
  /* ) */
2111
2111
  CHAR_RIGHT_SQUARE_BRACKET: ei
2112
2112
  /* ] */
2113
- } = qe, Ft = (e) => e === yn || e === Me, zt = (e) => {
2113
+ } = qe, Ft = (e) => e === _n || e === Me, zt = (e) => {
2114
2114
  e.isPrefix !== !0 && (e.depth = e.isGlobstar ? 1 / 0 : 1);
2115
2115
  }, ti = (e, t) => {
2116
2116
  const n = t || {}, s = e.length - 1, i = n.parts === !0 || n.scanToEnd === !0, o = [], r = [], a = [];
2117
- let u = e, l = -1, c = 0, d = 0, y = !1, w = !1, _ = !1, S = !1, v = !1, x = !1, b = !1, A = !1, I = !1, R = 0, D, O, L = { value: "", depth: 0, isGlob: !1 };
2118
- const z = () => l >= s, h = () => u.charCodeAt(l + 1), k = () => (D = O, u.charCodeAt(++l));
2119
- for (; l < s; ) {
2117
+ let u = e, f = -1, c = 0, d = 0, y = !1, w = !1, _ = !1, S = !1, v = !1, x = !1, b = !1, A = !1, I = !1, R = 0, D, O, L = { value: "", depth: 0, isGlob: !1 };
2118
+ const z = () => f >= s, h = () => u.charCodeAt(f + 1), k = () => (D = O, u.charCodeAt(++f));
2119
+ for (; f < s; ) {
2120
2120
  O = k();
2121
2121
  let J;
2122
2122
  if (O === Me) {
@@ -2152,14 +2152,14 @@ const Nt = Ke, {
2152
2152
  continue;
2153
2153
  break;
2154
2154
  }
2155
- if (O === yn) {
2156
- if (o.push(l), r.push(L), L = { value: "", depth: 0, isGlob: !1 }, I === !0)
2155
+ if (O === _n) {
2156
+ if (o.push(f), r.push(L), L = { value: "", depth: 0, isGlob: !1 }, I === !0)
2157
2157
  continue;
2158
- if (D === tt && l === c + 1) {
2158
+ if (D === tt && f === c + 1) {
2159
2159
  c += 2;
2160
2160
  continue;
2161
2161
  }
2162
- d = l + 1;
2162
+ d = f + 1;
2163
2163
  continue;
2164
2164
  }
2165
2165
  if (n.noext !== !0 && (O === Ys || O === Xs || O === et || O === Ut || O === jt) === !0 && h() === st) {
@@ -2200,7 +2200,7 @@ const Nt = Ke, {
2200
2200
  break;
2201
2201
  }
2202
2202
  }
2203
- if (n.nonegate !== !0 && O === jt && l === c) {
2203
+ if (n.nonegate !== !0 && O === jt && f === c) {
2204
2204
  A = L.negated = !0, c++;
2205
2205
  continue;
2206
2206
  }
@@ -2227,14 +2227,14 @@ const Nt = Ke, {
2227
2227
  }
2228
2228
  }
2229
2229
  n.noext === !0 && (S = !1, _ = !1);
2230
- let H = u, he = "", f = "";
2231
- c > 0 && (he = u.slice(0, c), u = u.slice(c), d -= c), H && _ === !0 && d > 0 ? (H = u.slice(0, d), f = u.slice(d)) : _ === !0 ? (H = "", f = u) : H = u, H && H !== "" && H !== "/" && H !== u && Ft(H.charCodeAt(H.length - 1)) && (H = H.slice(0, -1)), n.unescape === !0 && (f && (f = Nt.removeBackslashes(f)), H && b === !0 && (H = Nt.removeBackslashes(H)));
2230
+ let H = u, he = "", l = "";
2231
+ c > 0 && (he = u.slice(0, c), u = u.slice(c), d -= c), H && _ === !0 && d > 0 ? (H = u.slice(0, d), l = u.slice(d)) : _ === !0 ? (H = "", l = u) : H = u, H && H !== "" && H !== "/" && H !== u && Ft(H.charCodeAt(H.length - 1)) && (H = H.slice(0, -1)), n.unescape === !0 && (l && (l = Nt.removeBackslashes(l)), H && b === !0 && (H = Nt.removeBackslashes(H)));
2232
2232
  const p = {
2233
2233
  prefix: he,
2234
2234
  input: e,
2235
2235
  start: c,
2236
2236
  base: H,
2237
- glob: f,
2237
+ glob: l,
2238
2238
  isBrace: y,
2239
2239
  isBracket: w,
2240
2240
  isGlob: _,
@@ -2262,7 +2262,7 @@ const Ge = qe, Z = Ke, {
2262
2262
  POSIX_REGEX_SOURCE: si,
2263
2263
  REGEX_NON_SPECIAL_CHARS: ii,
2264
2264
  REGEX_SPECIAL_CHARS_BACKREF: ri,
2265
- REPLACEMENTS: _n
2265
+ REPLACEMENTS: gn
2266
2266
  } = Ge, oi = (e, t) => {
2267
2267
  if (typeof t.expandRange == "function")
2268
2268
  return t.expandRange(...e, t);
@@ -2274,15 +2274,15 @@ const Ge = qe, Z = Ke, {
2274
2274
  return e.map((i) => Z.escapeRegex(i)).join("..");
2275
2275
  }
2276
2276
  return n;
2277
- }, ve = (e, t) => `Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`, gn = (e, t) => {
2277
+ }, ve = (e, t) => `Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`, bn = (e, t) => {
2278
2278
  if (typeof e != "string")
2279
2279
  throw new TypeError("Expected a string");
2280
- e = _n[e] || e;
2280
+ e = gn[e] || e;
2281
2281
  const n = { ...t }, s = typeof n.maxLength == "number" ? Math.min(Ve, n.maxLength) : Ve;
2282
2282
  let i = e.length;
2283
2283
  if (i > s)
2284
2284
  throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);
2285
- const o = { type: "bos", value: "", output: n.prepend || "" }, r = [o], a = n.capture ? "" : "?:", u = Ge.globChars(n.windows), l = Ge.extglobChars(u), {
2285
+ const o = { type: "bos", value: "", output: n.prepend || "" }, r = [o], a = n.capture ? "" : "?:", u = Ge.globChars(n.windows), f = Ge.extglobChars(u), {
2286
2286
  DOT_LITERAL: c,
2287
2287
  PLUS_LITERAL: d,
2288
2288
  SLASH_LITERAL: y,
@@ -2317,12 +2317,12 @@ const Ge = qe, Z = Ke, {
2317
2317
  };
2318
2318
  e = Z.removePrefix(e, h), i = e.length;
2319
2319
  const k = [], H = [], he = [];
2320
- let f = o, p;
2320
+ let l = o, p;
2321
2321
  const J = () => h.index === i - 1, T = h.peek = (g = 1) => e[h.index + g], se = h.advance = () => e[++h.index], ae = () => e.slice(h.index + 1), q = (g = "", N = 0) => {
2322
2322
  h.consumed += g, h.index += N;
2323
2323
  }, Te = (g) => {
2324
2324
  h.output += g.output != null ? g.output : g.value, q(g.value);
2325
- }, wn = () => {
2325
+ }, Rn = () => {
2326
2326
  let g = 1;
2327
2327
  for (; T() === "!" && (T(2) !== "(" || T(3) === "?"); )
2328
2328
  se(), h.start++, g++;
@@ -2332,21 +2332,21 @@ const Ge = qe, Z = Ke, {
2332
2332
  }, me = (g) => {
2333
2333
  h[g]--, he.pop();
2334
2334
  }, C = (g) => {
2335
- if (f.type === "globstar") {
2335
+ if (l.type === "globstar") {
2336
2336
  const N = h.braces > 0 && (g.type === "comma" || g.type === "brace"), m = g.extglob === !0 || k.length && (g.type === "pipe" || g.type === "paren");
2337
- g.type !== "slash" && g.type !== "paren" && !N && !m && (h.output = h.output.slice(0, -f.output.length), f.type = "star", f.value = "*", f.output = z, h.output += f.output);
2337
+ g.type !== "slash" && g.type !== "paren" && !N && !m && (h.output = h.output.slice(0, -l.output.length), l.type = "star", l.value = "*", l.output = z, h.output += l.output);
2338
2338
  }
2339
- if (k.length && g.type !== "paren" && !l[g.value] && (k[k.length - 1].inner += g.value), (g.value || g.output) && Te(g), f && f.type === "text" && g.type === "text") {
2340
- f.value += g.value, f.output = (f.output || "") + g.value;
2339
+ if (k.length && g.type !== "paren" && !f[g.value] && (k[k.length - 1].inner += g.value), (g.value || g.output) && Te(g), l && l.type === "text" && g.type === "text") {
2340
+ l.value += g.value, l.output = (l.output || "") + g.value;
2341
2341
  return;
2342
2342
  }
2343
- g.prev = f, r.push(g), f = g;
2343
+ g.prev = l, r.push(g), l = g;
2344
2344
  }, He = (g, N) => {
2345
- const m = { ...l[N], conditions: 1, inner: "" };
2346
- m.prev = f, m.parens = h.parens, m.output = h.output;
2345
+ const m = { ...f[N], conditions: 1, inner: "" };
2346
+ m.prev = l, m.parens = h.parens, m.output = h.output;
2347
2347
  const P = (n.capture ? "(" : "") + m.open;
2348
2348
  De("parens"), C({ type: g, value: N, output: h.output ? "" : w }), C({ type: "paren", extglob: !0, value: se(), output: P }), k.push(m);
2349
- }, Rn = (g) => {
2349
+ }, On = (g) => {
2350
2350
  let N = g.close + (n.capture ? ")" : "");
2351
2351
  if (g.type === "negate") {
2352
2352
  let m = z;
@@ -2376,22 +2376,22 @@ const Ge = qe, Z = Ke, {
2376
2376
  continue;
2377
2377
  }
2378
2378
  }
2379
- if (h.brackets > 0 && (p !== "]" || f.value === "[" || f.value === "[^")) {
2379
+ if (h.brackets > 0 && (p !== "]" || l.value === "[" || l.value === "[^")) {
2380
2380
  if (n.posix !== !1 && p === ":") {
2381
- const m = f.value.slice(1);
2382
- if (m.includes("[") && (f.posix = !0, m.includes(":"))) {
2383
- const P = f.value.lastIndexOf("["), j = f.value.slice(0, P), W = f.value.slice(P + 2), G = si[W];
2381
+ const m = l.value.slice(1);
2382
+ if (m.includes("[") && (l.posix = !0, m.includes(":"))) {
2383
+ const P = l.value.lastIndexOf("["), j = l.value.slice(0, P), W = l.value.slice(P + 2), G = si[W];
2384
2384
  if (G) {
2385
- f.value = j + G, h.backtrack = !0, se(), !o.output && r.indexOf(f) === 1 && (o.output = w);
2385
+ l.value = j + G, h.backtrack = !0, se(), !o.output && r.indexOf(l) === 1 && (o.output = w);
2386
2386
  continue;
2387
2387
  }
2388
2388
  }
2389
2389
  }
2390
- (p === "[" && T() !== ":" || p === "-" && T() === "]") && (p = `\\${p}`), p === "]" && (f.value === "[" || f.value === "[^") && (p = `\\${p}`), n.posix === !0 && p === "!" && f.value === "[" && (p = "^"), f.value += p, Te({ value: p });
2390
+ (p === "[" && T() !== ":" || p === "-" && T() === "]") && (p = `\\${p}`), p === "]" && (l.value === "[" || l.value === "[^") && (p = `\\${p}`), n.posix === !0 && p === "!" && l.value === "[" && (p = "^"), l.value += p, Te({ value: p });
2391
2391
  continue;
2392
2392
  }
2393
2393
  if (h.quotes === 1 && p !== '"') {
2394
- p = Z.escapeRegex(p), f.value += p, Te({ value: p });
2394
+ p = Z.escapeRegex(p), l.value += p, Te({ value: p });
2395
2395
  continue;
2396
2396
  }
2397
2397
  if (p === '"') {
@@ -2407,7 +2407,7 @@ const Ge = qe, Z = Ke, {
2407
2407
  throw new SyntaxError(ve("opening", "("));
2408
2408
  const m = k[k.length - 1];
2409
2409
  if (m && h.parens === m.parens + 1) {
2410
- Rn(k.pop());
2410
+ On(k.pop());
2411
2411
  continue;
2412
2412
  }
2413
2413
  C({ type: "paren", value: p, output: h.parens ? ")" : "\\)" }), me("parens");
@@ -2424,7 +2424,7 @@ const Ge = qe, Z = Ke, {
2424
2424
  continue;
2425
2425
  }
2426
2426
  if (p === "]") {
2427
- if (n.nobracket === !0 || f && f.type === "bracket" && f.value.length === 1) {
2427
+ if (n.nobracket === !0 || l && l.type === "bracket" && l.value.length === 1) {
2428
2428
  C({ type: "text", value: p, output: `\\${p}` });
2429
2429
  continue;
2430
2430
  }
@@ -2435,15 +2435,15 @@ const Ge = qe, Z = Ke, {
2435
2435
  continue;
2436
2436
  }
2437
2437
  me("brackets");
2438
- const m = f.value.slice(1);
2439
- if (f.posix !== !0 && m[0] === "^" && !m.includes("/") && (p = `/${p}`), f.value += p, Te({ value: p }), n.literalBrackets === !1 || Z.hasRegexChars(m))
2438
+ const m = l.value.slice(1);
2439
+ if (l.posix !== !0 && m[0] === "^" && !m.includes("/") && (p = `/${p}`), l.value += p, Te({ value: p }), n.literalBrackets === !1 || Z.hasRegexChars(m))
2440
2440
  continue;
2441
- const P = Z.escapeRegex(f.value);
2442
- if (h.output = h.output.slice(0, -f.value.length), n.literalBrackets === !0) {
2443
- h.output += P, f.value = P;
2441
+ const P = Z.escapeRegex(l.value);
2442
+ if (h.output = h.output.slice(0, -l.value.length), n.literalBrackets === !0) {
2443
+ h.output += P, l.value = P;
2444
2444
  continue;
2445
2445
  }
2446
- f.value = `(${a}${P}|${f.value})`, h.output += f.value;
2446
+ l.value = `(${a}${P}|${l.value})`, h.output += l.value;
2447
2447
  continue;
2448
2448
  }
2449
2449
  if (p === "{" && n.nobrace !== !0) {
@@ -2491,21 +2491,21 @@ const Ge = qe, Z = Ke, {
2491
2491
  continue;
2492
2492
  }
2493
2493
  if (p === "/") {
2494
- if (f.type === "dot" && h.index === h.start + 1) {
2495
- h.start = h.index + 1, h.consumed = "", h.output = "", r.pop(), f = o;
2494
+ if (l.type === "dot" && h.index === h.start + 1) {
2495
+ h.start = h.index + 1, h.consumed = "", h.output = "", r.pop(), l = o;
2496
2496
  continue;
2497
2497
  }
2498
2498
  C({ type: "slash", value: p, output: y });
2499
2499
  continue;
2500
2500
  }
2501
2501
  if (p === ".") {
2502
- if (h.braces > 0 && f.type === "dot") {
2503
- f.value === "." && (f.output = c);
2502
+ if (h.braces > 0 && l.type === "dot") {
2503
+ l.value === "." && (l.output = c);
2504
2504
  const m = H[H.length - 1];
2505
- f.type = "dots", f.output += p, f.value += p, m.dots = !0;
2505
+ l.type = "dots", l.output += p, l.value += p, m.dots = !0;
2506
2506
  continue;
2507
2507
  }
2508
- if (h.braces + h.parens === 0 && f.type !== "bos" && f.type !== "slash") {
2508
+ if (h.braces + h.parens === 0 && l.type !== "bos" && l.type !== "slash") {
2509
2509
  C({ type: "text", value: p, output: c });
2510
2510
  continue;
2511
2511
  }
@@ -2513,19 +2513,19 @@ const Ge = qe, Z = Ke, {
2513
2513
  continue;
2514
2514
  }
2515
2515
  if (p === "?") {
2516
- if (!(f && f.value === "(") && n.noextglob !== !0 && T() === "(" && T(2) !== "?") {
2516
+ if (!(l && l.value === "(") && n.noextglob !== !0 && T() === "(" && T(2) !== "?") {
2517
2517
  He("qmark", p);
2518
2518
  continue;
2519
2519
  }
2520
- if (f && f.type === "paren") {
2520
+ if (l && l.type === "paren") {
2521
2521
  const P = T();
2522
2522
  let j = p;
2523
2523
  if (P === "<" && !Z.supportsLookbehinds())
2524
2524
  throw new Error("Node.js v10 or higher is required for regex lookbehinds");
2525
- (f.value === "(" && !/[!=<:]/.test(P) || P === "<" && !/<([!=]|\w+>)/.test(ae())) && (j = `\\${p}`), C({ type: "text", value: p, output: j });
2525
+ (l.value === "(" && !/[!=<:]/.test(P) || P === "<" && !/<([!=]|\w+>)/.test(ae())) && (j = `\\${p}`), C({ type: "text", value: p, output: j });
2526
2526
  continue;
2527
2527
  }
2528
- if (n.dot !== !0 && (f.type === "slash" || f.type === "bos")) {
2528
+ if (n.dot !== !0 && (l.type === "slash" || l.type === "bos")) {
2529
2529
  C({ type: "qmark", value: p, output: A });
2530
2530
  continue;
2531
2531
  }
@@ -2538,7 +2538,7 @@ const Ge = qe, Z = Ke, {
2538
2538
  continue;
2539
2539
  }
2540
2540
  if (n.nonegate !== !0 && h.index === 0) {
2541
- wn();
2541
+ Rn();
2542
2542
  continue;
2543
2543
  }
2544
2544
  }
@@ -2547,11 +2547,11 @@ const Ge = qe, Z = Ke, {
2547
2547
  He("plus", p);
2548
2548
  continue;
2549
2549
  }
2550
- if (f && f.value === "(" || n.regex === !1) {
2550
+ if (l && l.value === "(" || n.regex === !1) {
2551
2551
  C({ type: "plus", value: p, output: d });
2552
2552
  continue;
2553
2553
  }
2554
- if (f && (f.type === "bracket" || f.type === "paren" || f.type === "brace") || h.parens > 0) {
2554
+ if (l && (l.type === "bracket" || l.type === "paren" || l.type === "brace") || h.parens > 0) {
2555
2555
  C({ type: "plus", value: p });
2556
2556
  continue;
2557
2557
  }
@@ -2572,8 +2572,8 @@ const Ge = qe, Z = Ke, {
2572
2572
  m && (p += m[0], h.index += m[0].length), C({ type: "text", value: p });
2573
2573
  continue;
2574
2574
  }
2575
- if (f && (f.type === "globstar" || f.star === !0)) {
2576
- f.type = "star", f.star = !0, f.value += p, f.output = z, h.backtrack = !0, h.globstar = !0, q(p);
2575
+ if (l && (l.type === "globstar" || l.star === !0)) {
2576
+ l.type = "star", l.star = !0, l.value += p, l.output = z, h.backtrack = !0, h.globstar = !0, q(p);
2577
2577
  continue;
2578
2578
  }
2579
2579
  let g = ae();
@@ -2581,12 +2581,12 @@ const Ge = qe, Z = Ke, {
2581
2581
  He("star", p);
2582
2582
  continue;
2583
2583
  }
2584
- if (f.type === "star") {
2584
+ if (l.type === "star") {
2585
2585
  if (n.noglobstar === !0) {
2586
2586
  q(p);
2587
2587
  continue;
2588
2588
  }
2589
- const m = f.prev, P = m.prev, j = m.type === "slash" || m.type === "bos", W = P && (P.type === "star" || P.type === "globstar");
2589
+ const m = l.prev, P = m.prev, j = m.type === "slash" || m.type === "bos", W = P && (P.type === "star" || P.type === "globstar");
2590
2590
  if (n.bash === !0 && (!j || g[0] && g[0] !== "/")) {
2591
2591
  C({ type: "star", value: p, output: "" });
2592
2592
  continue;
@@ -2603,35 +2603,35 @@ const Ge = qe, Z = Ke, {
2603
2603
  g = g.slice(3), q("/**", 3);
2604
2604
  }
2605
2605
  if (m.type === "bos" && J()) {
2606
- f.type = "globstar", f.value += p, f.output = D(n), h.output = f.output, h.globstar = !0, q(p);
2606
+ l.type = "globstar", l.value += p, l.output = D(n), h.output = l.output, h.globstar = !0, q(p);
2607
2607
  continue;
2608
2608
  }
2609
2609
  if (m.type === "slash" && m.prev.type !== "bos" && !W && J()) {
2610
- h.output = h.output.slice(0, -(m.output + f.output).length), m.output = `(?:${m.output}`, f.type = "globstar", f.output = D(n) + (n.strictSlashes ? ")" : "|$)"), f.value += p, h.globstar = !0, h.output += m.output + f.output, q(p);
2610
+ h.output = h.output.slice(0, -(m.output + l.output).length), m.output = `(?:${m.output}`, l.type = "globstar", l.output = D(n) + (n.strictSlashes ? ")" : "|$)"), l.value += p, h.globstar = !0, h.output += m.output + l.output, q(p);
2611
2611
  continue;
2612
2612
  }
2613
2613
  if (m.type === "slash" && m.prev.type !== "bos" && g[0] === "/") {
2614
2614
  const ke = g[1] !== void 0 ? "|$" : "";
2615
- h.output = h.output.slice(0, -(m.output + f.output).length), m.output = `(?:${m.output}`, f.type = "globstar", f.output = `${D(n)}${y}|${y}${ke})`, f.value += p, h.output += m.output + f.output, h.globstar = !0, q(p + se()), C({ type: "slash", value: "/", output: "" });
2615
+ h.output = h.output.slice(0, -(m.output + l.output).length), m.output = `(?:${m.output}`, l.type = "globstar", l.output = `${D(n)}${y}|${y}${ke})`, l.value += p, h.output += m.output + l.output, h.globstar = !0, q(p + se()), C({ type: "slash", value: "/", output: "" });
2616
2616
  continue;
2617
2617
  }
2618
2618
  if (m.type === "bos" && g[0] === "/") {
2619
- f.type = "globstar", f.value += p, f.output = `(?:^|${y}|${D(n)}${y})`, h.output = f.output, h.globstar = !0, q(p + se()), C({ type: "slash", value: "/", output: "" });
2619
+ l.type = "globstar", l.value += p, l.output = `(?:^|${y}|${D(n)}${y})`, h.output = l.output, h.globstar = !0, q(p + se()), C({ type: "slash", value: "/", output: "" });
2620
2620
  continue;
2621
2621
  }
2622
- h.output = h.output.slice(0, -f.output.length), f.type = "globstar", f.output = D(n), f.value += p, h.output += f.output, h.globstar = !0, q(p);
2622
+ h.output = h.output.slice(0, -l.output.length), l.type = "globstar", l.output = D(n), l.value += p, h.output += l.output, h.globstar = !0, q(p);
2623
2623
  continue;
2624
2624
  }
2625
2625
  const N = { type: "star", value: p, output: z };
2626
2626
  if (n.bash === !0) {
2627
- N.output = ".*?", (f.type === "bos" || f.type === "slash") && (N.output = O + N.output), C(N);
2627
+ N.output = ".*?", (l.type === "bos" || l.type === "slash") && (N.output = O + N.output), C(N);
2628
2628
  continue;
2629
2629
  }
2630
- if (f && (f.type === "bracket" || f.type === "paren") && n.regex === !0) {
2630
+ if (l && (l.type === "bracket" || l.type === "paren") && n.regex === !0) {
2631
2631
  N.output = p, C(N);
2632
2632
  continue;
2633
2633
  }
2634
- (h.index === h.start || f.type === "slash" || f.type === "dot") && (f.type === "dot" ? (h.output += v, f.output += v) : n.dot === !0 ? (h.output += x, f.output += x) : (h.output += O, f.output += O), T() !== "*" && (h.output += w, f.output += w)), C(N);
2634
+ (h.index === h.start || l.type === "slash" || l.type === "dot") && (l.type === "dot" ? (h.output += v, l.output += v) : n.dot === !0 ? (h.output += x, l.output += x) : (h.output += O, l.output += O), T() !== "*" && (h.output += w, l.output += w)), C(N);
2635
2635
  }
2636
2636
  for (; h.brackets > 0; ) {
2637
2637
  if (n.strictBrackets === !0)
@@ -2648,29 +2648,29 @@ const Ge = qe, Z = Ke, {
2648
2648
  throw new SyntaxError(ve("closing", "}"));
2649
2649
  h.output = Z.escapeLast(h.output, "{"), me("braces");
2650
2650
  }
2651
- if (n.strictSlashes !== !0 && (f.type === "star" || f.type === "bracket") && C({ type: "maybe_slash", value: "", output: `${y}?` }), h.backtrack === !0) {
2651
+ if (n.strictSlashes !== !0 && (l.type === "star" || l.type === "bracket") && C({ type: "maybe_slash", value: "", output: `${y}?` }), h.backtrack === !0) {
2652
2652
  h.output = "";
2653
2653
  for (const g of h.tokens)
2654
2654
  h.output += g.output != null ? g.output : g.value, g.suffix && (h.output += g.suffix);
2655
2655
  }
2656
2656
  return h;
2657
2657
  };
2658
- gn.fastpaths = (e, t) => {
2658
+ bn.fastpaths = (e, t) => {
2659
2659
  const n = { ...t }, s = typeof n.maxLength == "number" ? Math.min(Ve, n.maxLength) : Ve, i = e.length;
2660
2660
  if (i > s)
2661
2661
  throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);
2662
- e = _n[e] || e;
2662
+ e = gn[e] || e;
2663
2663
  const {
2664
2664
  DOT_LITERAL: o,
2665
2665
  SLASH_LITERAL: r,
2666
2666
  ONE_CHAR: a,
2667
2667
  DOTS_SLASH: u,
2668
- NO_DOT: l,
2668
+ NO_DOT: f,
2669
2669
  NO_DOTS: c,
2670
2670
  NO_DOTS_SLASH: d,
2671
2671
  STAR: y,
2672
2672
  START_ANCHOR: w
2673
- } = Ge.globChars(n.windows), _ = n.dot ? c : l, S = n.dot ? d : l, v = n.capture ? "" : "?:", x = { negated: !1, prefix: "" };
2673
+ } = Ge.globChars(n.windows), _ = n.dot ? c : f, S = n.dot ? d : f, v = n.capture ? "" : "?:", x = { negated: !1, prefix: "" };
2674
2674
  let b = n.bash === !0 ? ".*?" : y;
2675
2675
  n.capture && (b = `(${b})`);
2676
2676
  const A = (O) => O.noglobstar === !0 ? b : `(${v}(?:(?!${w}${O.dot ? u : o}).)*?)`, I = (O) => {
@@ -2703,8 +2703,8 @@ gn.fastpaths = (e, t) => {
2703
2703
  let D = I(R);
2704
2704
  return D && n.strictSlashes !== !0 && (D += `${r}?`), D;
2705
2705
  };
2706
- var ai = gn;
2707
- const ui = ni, ft = ai, bn = Ke, ci = qe, li = (e) => e && typeof e == "object" && !Array.isArray(e), F = (e, t, n = !1) => {
2706
+ var ai = bn;
2707
+ const ui = ni, lt = ai, vn = Ke, ci = qe, fi = (e) => e && typeof e == "object" && !Array.isArray(e), F = (e, t, n = !1) => {
2708
2708
  if (Array.isArray(e)) {
2709
2709
  const c = e.map((y) => F(y, t, n));
2710
2710
  return (y) => {
@@ -2716,7 +2716,7 @@ const ui = ni, ft = ai, bn = Ke, ci = qe, li = (e) => e && typeof e == "object"
2716
2716
  return !1;
2717
2717
  };
2718
2718
  }
2719
- const s = li(e) && e.tokens && e.input;
2719
+ const s = fi(e) && e.tokens && e.input;
2720
2720
  if (e === "" || typeof e != "string" && !s)
2721
2721
  throw new TypeError("Expected pattern to be a non-empty string");
2722
2722
  const i = t || {}, o = i.windows, r = s ? F.compileRe(e, t) : F.makeRe(e, t, !1, !0), a = r.state;
@@ -2726,24 +2726,24 @@ const ui = ni, ft = ai, bn = Ke, ci = qe, li = (e) => e && typeof e == "object"
2726
2726
  const c = { ...t, ignore: null, onMatch: null, onResult: null };
2727
2727
  u = F(i.ignore, c, n);
2728
2728
  }
2729
- const l = (c, d = !1) => {
2729
+ const f = (c, d = !1) => {
2730
2730
  const { isMatch: y, match: w, output: _ } = F.test(c, r, t, { glob: e, posix: o }), S = { glob: e, state: a, regex: r, posix: o, input: c, output: _, match: w, isMatch: y };
2731
2731
  return typeof i.onResult == "function" && i.onResult(S), y === !1 ? (S.isMatch = !1, d ? S : !1) : u(c) ? (typeof i.onIgnore == "function" && i.onIgnore(S), S.isMatch = !1, d ? S : !1) : (typeof i.onMatch == "function" && i.onMatch(S), d ? S : !0);
2732
2732
  };
2733
- return n && (l.state = a), l;
2733
+ return n && (f.state = a), f;
2734
2734
  };
2735
2735
  F.test = (e, t, n, { glob: s, posix: i } = {}) => {
2736
2736
  if (typeof e != "string")
2737
2737
  throw new TypeError("Expected input to be a string");
2738
2738
  if (e === "")
2739
2739
  return { isMatch: !1, output: "" };
2740
- const o = n || {}, r = o.format || (i ? bn.toPosixSlashes : null);
2740
+ const o = n || {}, r = o.format || (i ? vn.toPosixSlashes : null);
2741
2741
  let a = e === s, u = a && r ? r(e) : e;
2742
2742
  return a === !1 && (u = r ? r(e) : e, a = u === s), (a === !1 || o.capture === !0) && (o.matchBase === !0 || o.basename === !0 ? a = F.matchBase(e, t, n, i) : a = t.exec(u)), { isMatch: !!a, match: a, output: u };
2743
2743
  };
2744
- F.matchBase = (e, t, n) => (t instanceof RegExp ? t : F.makeRe(t, n)).test(bn.basename(e));
2744
+ F.matchBase = (e, t, n) => (t instanceof RegExp ? t : F.makeRe(t, n)).test(vn.basename(e));
2745
2745
  F.isMatch = (e, t, n) => F(t, n)(e);
2746
- F.parse = (e, t) => Array.isArray(e) ? e.map((n) => F.parse(n, t)) : ft(e, { ...t, fastpaths: !1 });
2746
+ F.parse = (e, t) => Array.isArray(e) ? e.map((n) => F.parse(n, t)) : lt(e, { ...t, fastpaths: !1 });
2747
2747
  F.scan = (e, t) => ui(e, t);
2748
2748
  F.compileRe = (e, t, n = !1, s = !1) => {
2749
2749
  if (n === !0)
@@ -2759,7 +2759,7 @@ F.makeRe = (e, t, n = !1, s = !1) => {
2759
2759
  throw new TypeError("Expected a non-empty string");
2760
2760
  const i = t || {};
2761
2761
  let o = { negated: !1, fastpaths: !0 }, r = "", a;
2762
- return e.startsWith("./") && (e = e.slice(2), r = o.prefix = "./"), i.fastpaths !== !1 && (e[0] === "." || e[0] === "*") && (a = ft.fastpaths(e, t)), a === void 0 ? (o = ft(e, t), o.prefix = r + (o.prefix || "")) : o.output = a, F.compileRe(o, t, n, s);
2762
+ return e.startsWith("./") && (e = e.slice(2), r = o.prefix = "./"), i.fastpaths !== !1 && (e[0] === "." || e[0] === "*") && (a = lt.fastpaths(e, t)), a === void 0 ? (o = lt(e, t), o.prefix = r + (o.prefix || "")) : o.output = a, F.compileRe(o, t, n, s);
2763
2763
  };
2764
2764
  F.toRegex = (e, t) => {
2765
2765
  try {
@@ -2772,9 +2772,27 @@ F.toRegex = (e, t) => {
2772
2772
  }
2773
2773
  };
2774
2774
  F.constants = ci;
2775
- var fi = F, pi = fi;
2776
- const hi = /* @__PURE__ */ ht(pi);
2777
- class di extends vt.EventEmitter {
2775
+ var li = F, pi = li;
2776
+ const hi = /* @__PURE__ */ ht(pi), wn = dt(fetch), Di = async (e, t) => {
2777
+ const n = new URL(e);
2778
+ n.pathname = n.pathname + (n.pathname.endsWith("/") ? "metapage.json" : "/metapage.json");
2779
+ const i = await (await wn(n.href, {
2780
+ redirect: "follow",
2781
+ retries: 3,
2782
+ retryDelay: 1e3
2783
+ })).json();
2784
+ return await Zt(i, t || "1");
2785
+ }, di = async (e, t) => {
2786
+ const n = new URL(e);
2787
+ n.pathname = n.pathname + (n.pathname.endsWith("/") ? "metaframe.json" : "/metaframe.json");
2788
+ const i = await (await wn(n.href, {
2789
+ redirect: "follow",
2790
+ retries: 3,
2791
+ retryDelay: 1e3
2792
+ })).json();
2793
+ return await en(i, t || "1");
2794
+ }, Hi = (e) => e ? !(e != null && e.inputs && Object.keys(e.inputs).length > 0 || e != null && e.outputs && Object.keys(e.outputs).length > 0 || e != null && e.allow || e != null && e.metadata && Object.keys(e.metadata).length > 0) : !0;
2795
+ class mi extends vt.EventEmitter {
2778
2796
  constructor(t, n, s, i, o, r = !1) {
2779
2797
  if (super(), this.inputs = {}, this.outputs = {}, this._disposables = [], this._rpcListeners = [], this._loaded = !1, this._onLoaded = [], this._sendInputsAfterRegistration = !1, this._cachedEventInputsUpdate = {
2780
2798
  iframeId: void 0,
@@ -2791,9 +2809,9 @@ class di extends vt.EventEmitter {
2791
2809
  var a = new URL(this.url);
2792
2810
  a.searchParams.set(xe.mp_debug, "true"), this.url = a.href;
2793
2811
  }
2794
- this.id = s, this._parentId = i, this._color = fn(this.id), this._consoleBackgroundColor = o, this._iframe = document.createElement("iframe"), this._iframe.name = this.id;
2812
+ this.id = s, this._parentId = i, this._color = pn(this.id), this._consoleBackgroundColor = o, this._iframe = document.createElement("iframe"), this._iframe.name = this.id;
2795
2813
  const u = this;
2796
- this.iframe = new Promise((l) => {
2814
+ this.iframe = new Promise((f) => {
2797
2815
  Ot().then(async () => {
2798
2816
  var c, d, y, w;
2799
2817
  if (u._iframe) {
@@ -2805,7 +2823,7 @@ class di extends vt.EventEmitter {
2805
2823
  return;
2806
2824
  _ && _.allow && (u._iframe.allow = _.allow);
2807
2825
  }
2808
- u._iframe.src = this.url, l(u._iframe);
2826
+ u._iframe.src = this.url, f(u._iframe);
2809
2827
  }
2810
2828
  });
2811
2829
  }), this.ack = this.ack.bind(this), this.dispose = this.dispose.bind(this), this.getDefinition = this.getDefinition.bind(this), this.getDefinitionUrl = this.getDefinitionUrl.bind(this), this.log = this.log.bind(this), this.logInternal = this.logInternal.bind(this), this.onInput = this.onInput.bind(this), this.onInputs = this.onInputs.bind(this), this.onOutput = this.onOutput.bind(this), this.onOutputs = this.onOutputs.bind(this), this.register = this.register.bind(this), this.registered = this.registered.bind(this), this.sendInputs = this.sendInputs.bind(this), this.sendOrBufferPostMessage = this.sendOrBufferPostMessage.bind(this), this.sendRpc = this.sendRpc.bind(this), this.sendRpcInternal = this.sendRpcInternal.bind(this), this.setInput = this.setInput.bind(this), this.setInputs = this.setInputs.bind(this), this.setMetapage = this.setMetapage.bind(this), this.setOutput = this.setOutput.bind(this), this.setOutputs = this.setOutputs.bind(this), this.addListenerReturnDisposer = this.addListenerReturnDisposer.bind(this), this.isDisposed = this.isDisposed.bind(this);
@@ -2825,21 +2843,24 @@ class di extends vt.EventEmitter {
2825
2843
  async getDefinition() {
2826
2844
  if (this._definition)
2827
2845
  return this._definition;
2846
+ try {
2847
+ const n = un(this.url, "definition");
2848
+ if (n) {
2849
+ const s = await es(n);
2850
+ return this._definition = s, this._definition;
2851
+ }
2852
+ } catch (n) {
2853
+ this.emit(E.Warning, `Failed to convert metaframe definition from hash params. Error: ${n != null && n.message ? n == null ? void 0 : n.message : "unknown error"}`);
2854
+ return;
2855
+ }
2828
2856
  var t = this.getDefinitionUrl();
2829
2857
  try {
2830
- const n = await window.fetch(t, {
2831
- signal: AbortSignal.timeout(6e3)
2832
- });
2833
- if (n.ok) {
2834
- const s = await n.json(), i = await Zn(s);
2835
- return this._definition = i, this._definition;
2836
- } else
2837
- this.emit(E.Error, `Failed to fetch: ${t}
2838
- Status: ${n.status}
2839
- Status text: ${n.statusText}`);
2858
+ const n = await di(this.url);
2859
+ if (n)
2860
+ return this._definition = n, this._definition;
2840
2861
  } catch (n) {
2841
- this.emit(E.Error, `Failed to fetch or convert: ${t}
2842
- Error: ${n}`);
2862
+ this.emit(E.Warning, `Failed to fetch or convert: ${t}
2863
+ Error: ${n != null && n.message ? n == null ? void 0 : n.message : n == null ? void 0 : n.toString()}`);
2843
2864
  }
2844
2865
  }
2845
2866
  setInput(t, n) {
@@ -2909,7 +2930,7 @@ Error: ${n}`);
2909
2930
  },
2910
2931
  version: Gt
2911
2932
  };
2912
- this.sendRpcInternal(le.SetupIframeServerResponse, t);
2933
+ this.sendRpcInternal(fe.SetupIframeServerResponse, t);
2913
2934
  }
2914
2935
  registered(t) {
2915
2936
  if (this.log({ m: "MetapageIFrameRpcClient.registered", inputs: this.inputs }), !this._loaded) {
@@ -2921,7 +2942,7 @@ Error: ${n}`);
2921
2942
  }
2922
2943
  }
2923
2944
  async sendInputs(t) {
2924
- t && (t = await We(t), !this.isDisposed() && this.sendRpc(le.InputsUpdate, {
2945
+ t && (t = await We(t), !this.isDisposed() && this.sendRpc(fe.InputsUpdate, {
2925
2946
  inputs: t,
2926
2947
  parentId: this._parentId
2927
2948
  }));
@@ -2944,7 +2965,7 @@ Error: ${n}`);
2944
2965
  var n = {
2945
2966
  message: t
2946
2967
  };
2947
- this.sendRpc(le.MessageAck, n);
2968
+ this.sendRpc(fe.MessageAck, n);
2948
2969
  }
2949
2970
  }
2950
2971
  log(t) {
@@ -2984,7 +3005,7 @@ const ye = M({
2984
3005
  inputs: {},
2985
3006
  outputs: {}
2986
3007
  }
2987
- }, (e) => e), Ti = (e) => Re(e), mi = (e, t) => !!(!t || t === "**" || e === t || hi.isMatch(e, t)), yi = "bcbcbc";
3008
+ }, (e) => e), ki = (e) => Re(e), yi = (e, t) => !!(!t || t === "**" || e === t || hi.isMatch(e, t)), _i = "bcbcbc";
2988
3009
  class ne extends Ps {
2989
3010
  static async from(t, n) {
2990
3011
  if (t == null)
@@ -2999,7 +3020,7 @@ class ne extends Ps {
2999
3020
  return s.setDefinition(t);
3000
3021
  }
3001
3022
  constructor(t) {
3002
- super(), this._state = ye, this._metaframes = M({}, (n) => n), this.debug = lt(), this._internalReceivedMessageCounter = 0, this._cachedInputLookupMap = M({}, (n) => n), this._inputMap = {}, this._id = t && t.id ? t.id : Ts(), this._consoleBackgroundColor = t && t.color ? t.color : yi, this.addPipe = this.addPipe.bind(this), this.dispose = this.dispose.bind(this), this.addMetaframe = this.addMetaframe.bind(this), this.getInputsFromOutput = this.getInputsFromOutput.bind(this), this.getMetaframe = this.getMetaframe.bind(this), this.getMetaframeIds = this.getMetaframeIds.bind(this), this.getMetaframe = this.getMetaframe.bind(this), this.getMetaframes = this.getMetaframes.bind(this), this.getState = this.getState.bind(this), this.getStateMetaframes = this.getStateMetaframes.bind(this), this.isValidJSONRpcMessage = this.isValidJSONRpcMessage.bind(this), this.log = this.log.bind(this), this.logInternal = this.logInternal.bind(this), this.metaframeIds = this.metaframeIds.bind(this), this.metaframes = this.metaframes.bind(this), this.onMessage = this.onMessage.bind(this), this.removeAll = this.removeAll.bind(this), this.removeMetaframe = this.removeMetaframe.bind(this), this.setDebugFromUrlParams = this.setDebugFromUrlParams.bind(this), this.setDefinition = this.setDefinition.bind(this), this.setInput = this.setInput.bind(this), this.setInputs = this.setInputs.bind(this), this.setInputStateOnlyMetaframeInputValue = this.setInputStateOnlyMetaframeInputValue.bind(this), this.setInputStateOnlyMetaframeInputMap = this.setInputStateOnlyMetaframeInputMap.bind(this), this.setInputStateOnlyMetapageInstanceInputs = this.setInputStateOnlyMetapageInstanceInputs.bind(this), this.setOutputStateOnlyMetaframeInputValue = this.setOutputStateOnlyMetaframeInputValue.bind(this), this.setOutputStateOnlyMetaframeInputMap = this.setOutputStateOnlyMetaframeInputMap.bind(this), this.setOutputStateOnlyMetapageInstanceInputs = this.setOutputStateOnlyMetapageInstanceInputs.bind(this), this.setMetaframeClientInputAndSentClientEvent = this.setMetaframeClientInputAndSentClientEvent.bind(this), this.setState = this.setState.bind(this), this.isDisposed = this.isDisposed.bind(this), this._emitDefinitionEvent = this._emitDefinitionEvent.bind(this), Ot().then(() => {
3023
+ super(), this._state = ye, this._metaframes = M({}, (n) => n), this.debug = ft(), this._internalReceivedMessageCounter = 0, this._cachedInputLookupMap = M({}, (n) => n), this._inputMap = {}, this._id = t && t.id ? t.id : Ts(), this._consoleBackgroundColor = t && t.color ? t.color : _i, this.addPipe = this.addPipe.bind(this), this.dispose = this.dispose.bind(this), this.addMetaframe = this.addMetaframe.bind(this), this.getInputsFromOutput = this.getInputsFromOutput.bind(this), this.getMetaframe = this.getMetaframe.bind(this), this.getMetaframeIds = this.getMetaframeIds.bind(this), this.getMetaframe = this.getMetaframe.bind(this), this.getMetaframes = this.getMetaframes.bind(this), this.getState = this.getState.bind(this), this.getStateMetaframes = this.getStateMetaframes.bind(this), this.isValidJSONRpcMessage = this.isValidJSONRpcMessage.bind(this), this.log = this.log.bind(this), this.logInternal = this.logInternal.bind(this), this.metaframeIds = this.metaframeIds.bind(this), this.metaframes = this.metaframes.bind(this), this.onMessage = this.onMessage.bind(this), this.removeAll = this.removeAll.bind(this), this.removeMetaframe = this.removeMetaframe.bind(this), this.setDebugFromUrlParams = this.setDebugFromUrlParams.bind(this), this.setDefinition = this.setDefinition.bind(this), this.setInput = this.setInput.bind(this), this.setInputs = this.setInputs.bind(this), this.setInputStateOnlyMetaframeInputValue = this.setInputStateOnlyMetaframeInputValue.bind(this), this.setInputStateOnlyMetaframeInputMap = this.setInputStateOnlyMetaframeInputMap.bind(this), this.setInputStateOnlyMetapageInstanceInputs = this.setInputStateOnlyMetapageInstanceInputs.bind(this), this.setOutputStateOnlyMetaframeInputValue = this.setOutputStateOnlyMetaframeInputValue.bind(this), this.setOutputStateOnlyMetaframeInputMap = this.setOutputStateOnlyMetaframeInputMap.bind(this), this.setOutputStateOnlyMetapageInstanceInputs = this.setOutputStateOnlyMetapageInstanceInputs.bind(this), this.setMetaframeClientInputAndSentClientEvent = this.setMetaframeClientInputAndSentClientEvent.bind(this), this.setState = this.setState.bind(this), this.isDisposed = this.isDisposed.bind(this), this._emitDefinitionEvent = this._emitDefinitionEvent.bind(this), Ot().then(() => {
3003
3024
  this.isDisposed() || (window.addEventListener("message", this.onMessage), this.log("Initialized"));
3004
3025
  });
3005
3026
  }
@@ -3032,7 +3053,7 @@ class ne extends Ps {
3032
3053
  async setDefinition(t, n) {
3033
3054
  if (!t.version)
3034
3055
  throw "Metapage definition must have a version";
3035
- const s = await Gn(t);
3056
+ const s = await Vn(t);
3036
3057
  if (this.isDisposed())
3037
3058
  return this;
3038
3059
  s.metaframes && Object.keys(s.metaframes).forEach((o) => {
@@ -3109,7 +3130,7 @@ class ne extends Ps {
3109
3130
  throw this.emitErrorMessage(`Existing metaframe for id=${t}`), `Existing metaframe for id=${t}`;
3110
3131
  if (!n.url)
3111
3132
  throw this.emitErrorMessage(`Metaframe definition missing url id=${t}`), `Metaframe definition missing url id=${t}`;
3112
- var s = new di(this, n.url, t, this._id, this._consoleBackgroundColor, this.debug).setMetapage(this);
3133
+ var s = new mi(this, n.url, t, this._id, this._consoleBackgroundColor, this.debug).setMetapage(this);
3113
3134
  return this._metaframes = M(this._metaframes, (i) => {
3114
3135
  i[t] = s;
3115
3136
  }), s.addListener(E.Error, (i) => {
@@ -3139,7 +3160,7 @@ class ne extends Ps {
3139
3160
  var i = [];
3140
3161
  s[t][n] = i, Object.keys(this._inputMap).forEach((o) => {
3141
3162
  o !== t && this._inputMap[o].forEach((r) => {
3142
- if (r.metaframe === t && mi(n, r.source)) {
3163
+ if (r.metaframe === t && yi(n, r.source)) {
3143
3164
  var a = r.target || "";
3144
3165
  !r.target || r.target.startsWith("*") || r.target === "" ? a = n : a && a.endsWith("/") && (a = a + n), i.push({ metaframe: o, pipe: a });
3145
3166
  }
@@ -3265,18 +3286,18 @@ class ne extends Ps {
3265
3286
  }
3266
3287
  break;
3267
3288
  case X.OutputsUpdate:
3268
- const l = r.params;
3269
- if (!l || Object.keys(l).length === 0)
3289
+ const f = r.params;
3290
+ if (!f || Object.keys(f).length === 0)
3270
3291
  break;
3271
3292
  if (this._metaframes[a]) {
3272
3293
  var s = this._metaframes[a];
3273
- this.setOutputStateOnlyMetaframeInputMap(a, l), s.setOutputs(l);
3294
+ this.setOutputStateOnlyMetaframeInputMap(a, f), s.setOutputs(f);
3274
3295
  var i = !1;
3275
- const c = Object.keys(l), d = {};
3296
+ const c = Object.keys(f), d = {};
3276
3297
  c.forEach((y, w) => {
3277
3298
  const _ = this.getInputsFromOutput(a, y);
3278
3299
  _.length > 0 && _.forEach((S) => {
3279
- d[S.metaframe] || (d[S.metaframe] = {}), d[S.metaframe][S.pipe] = l[y], i = !0;
3300
+ d[S.metaframe] || (d[S.metaframe] = {}), d[S.metaframe][S.pipe] = f[y], i = !0;
3280
3301
  });
3281
3302
  }), i && (this.setInputStateOnlyMetapageInstanceInputs(d), Object.keys(d).forEach((y) => {
3282
3303
  this._metaframes[y].setInputs(d[y]);
@@ -3320,36 +3341,17 @@ ne.OUTPUTS = E.Outputs;
3320
3341
  ne.STATE = E.State;
3321
3342
  ne.deserializeInputs = Ce;
3322
3343
  ne.serializeInputs = We;
3323
- const vn = dt(fetch), Di = async (e, t) => {
3324
- const n = new URL(e);
3325
- n.pathname = n.pathname + (n.pathname.endsWith("/") ? "metapage.json" : "/metapage.json");
3326
- const i = await (await vn(n.href, {
3327
- redirect: "follow",
3328
- retries: 3,
3329
- retryDelay: 1e3
3330
- })).json();
3331
- return await Zt(i, t || "1");
3332
- }, Hi = async (e, t) => {
3333
- const n = new URL(e);
3334
- n.pathname = n.pathname + (n.pathname.endsWith("/") ? "metaframe.json" : "/metaframe.json");
3335
- const i = await (await vn(n.href, {
3336
- redirect: "follow",
3337
- retries: 3,
3338
- retryDelay: 1e3
3339
- })).json();
3340
- return await en(i, t || "1");
3341
- }, ki = (e) => e ? !(e != null && e.inputs && Object.keys(e.inputs).length > 0 || e != null && e.outputs && Object.keys(e.outputs).length > 0 || e != null && e.allow || e != null && e.metadata && Object.keys(e.metadata).length > 0) : !0;
3342
3344
  export {
3343
3345
  ln as INITIAL_NULL_METAPAGE_DEFINITION,
3344
- Ei as INTERNAL_ERROR,
3345
- Si as INVALID_PARAMS,
3346
- Oi as INVALID_REQUEST,
3346
+ Mi as INTERNAL_ERROR,
3347
+ Ei as INVALID_PARAMS,
3348
+ Ai as INVALID_REQUEST,
3347
3349
  X as JsonRpcMethodsFromChild,
3348
- le as JsonRpcMethodsFromParent,
3349
- _i as METAFRAME_JSON_FILE,
3350
- gi as METAPAGE_KEY_DEFINITION,
3351
- bi as METAPAGE_KEY_STATE,
3352
- Ai as METHOD_NOT_FOUND,
3350
+ fe as JsonRpcMethodsFromParent,
3351
+ gi as METAFRAME_JSON_FILE,
3352
+ bi as METAPAGE_KEY_DEFINITION,
3353
+ vi as METAPAGE_KEY_STATE,
3354
+ Si as METHOD_NOT_FOUND,
3353
3355
  te as Metaframe,
3354
3356
  U as MetaframeEvents,
3355
3357
  re as MetaframeLoadingState,
@@ -3358,48 +3360,48 @@ export {
3358
3360
  ne as Metapage,
3359
3361
  E as MetapageEvents,
3360
3362
  xe as MetapageHashParams,
3361
- di as MetapageIFrameRpcClient,
3363
+ mi as MetapageIFrameRpcClient,
3362
3364
  Ps as MetapageShared,
3363
3365
  Je as MetapageVersionCurrent,
3364
3366
  Mt as MetapageVersionsAll,
3365
- Ri as PARSE_ERROR,
3366
- On as VERSION_METAFRAME,
3367
+ Oi as PARSE_ERROR,
3368
+ An as VERSION_METAFRAME,
3367
3369
  Gt as VERSION_METAPAGE,
3368
- Qn as convertMetaframeDefinitionToCurrentVersion,
3370
+ Yn as convertMetaframeDefinitionToCurrentVersion,
3369
3371
  en as convertMetaframeDefinitionToVersion,
3370
- Zn as convertMetaframeJsonToCurrentVersion,
3371
- Gn as convertMetapageDefinitionToCurrentVersion,
3372
+ es as convertMetaframeJsonToCurrentVersion,
3373
+ Vn as convertMetapageDefinitionToCurrentVersion,
3372
3374
  Zt as convertMetapageDefinitionToVersion,
3373
3375
  Ce as deserializeInputs,
3374
3376
  wt as generateId,
3375
- $i as generateMetaframeId,
3377
+ xi as generateMetaframeId,
3376
3378
  Ts as generateMetapageId,
3377
- xi as generateNonce,
3378
- Ti as getLibraryVersionMatching,
3379
+ Li as generateNonce,
3380
+ ki as getLibraryVersionMatching,
3379
3381
  ue as getMatchingMetaframeVersion,
3380
3382
  Re as getMatchingMetapageVersion,
3381
- Hi as getMetaframeDefinitionFromUrl,
3383
+ di as getMetaframeDefinitionFromUrl,
3382
3384
  Di as getMetapageDefinitionFromUrl,
3383
- Ii as getUrlParam,
3384
- Ci as getUrlParamDebug,
3385
+ Ci as getUrlParam,
3386
+ $i as getUrlParamDebug,
3385
3387
  Ds as hashCode,
3386
3388
  Hs as intToRGB,
3387
- lt as isDebugFromUrlsParams,
3388
- ki as isEmptyMetaframeDefinition,
3389
+ ft as isDebugFromUrlsParams,
3390
+ Hi as isEmptyMetaframeDefinition,
3389
3391
  Ls as isIframe,
3390
- Mi as isJsonRpcId,
3392
+ Ii as isJsonRpcId,
3391
3393
  Ze as isPageLoaded,
3392
3394
  Rt as log,
3393
- mi as matchPipe,
3395
+ yi as matchPipe,
3394
3396
  ze as merge,
3395
- Li as metapageAllSha256Hash,
3396
- Pi as metapageOnlyEssentailSha256Hash,
3397
+ Pi as metapageAllSha256Hash,
3398
+ Ti as metapageOnlyEssentailSha256Hash,
3397
3399
  Ot as pageLoaded,
3398
- wi as possiblyDeserializeDatarefToFile,
3400
+ Ri as possiblyDeserializeDatarefToFile,
3399
3401
  tn as possiblyDeserializeDatarefToValue,
3400
- us as possiblySerializeValueToDataref,
3402
+ cs as possiblySerializeValueToDataref,
3401
3403
  We as serializeInputs,
3402
- fn as stringToRgb,
3403
- vi as valueToFile
3404
+ pn as stringToRgb,
3405
+ wi as valueToFile
3404
3406
  };
3405
3407
  //# sourceMappingURL=index.js.map