@metapages/metapage 1.8.26 → 1.8.27

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,26 +1,26 @@
1
- const $t = [
1
+ const Ct = [
2
2
  "0.3",
3
3
  "0.4",
4
4
  "0.5",
5
5
  "0.6",
6
6
  "1",
7
7
  "2"
8
- ], xt = ["0.2", "0.3", "1", "2"], We = "2", Le = "2", Ii = "metaframe.json", Ci = "metapage/definition", $i = "metapage/state", Kt = xt[xt.length - 1], As = $t[$t.length - 1], Es = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Lt = (t) => {
8
+ ], $t = ["0.2", "0.3", "1", "2"], We = "2", Le = "2", Ii = "metaframe.json", Ci = "metapage/definition", $i = "metapage/state", Wt = $t[$t.length - 1], As = Ct[Ct.length - 1], Es = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, xt = (t) => {
9
9
  if (typeof t != "string")
10
10
  throw new TypeError("Invalid argument expected string");
11
11
  const e = t.match(Es);
12
12
  if (!e)
13
13
  throw new Error(`Invalid argument not valid semver ('${t}' received)`);
14
14
  return e.shift(), e;
15
- }, Pt = (t) => t === "*" || t === "x" || t === "X", Tt = (t) => {
15
+ }, Lt = (t) => t === "*" || t === "x" || t === "X", Pt = (t) => {
16
16
  const e = parseInt(t, 10);
17
17
  return isNaN(e) ? t : e;
18
18
  }, Ms = (t, e) => typeof t != typeof e ? [String(t), String(e)] : [t, e], Is = (t, e) => {
19
- if (Pt(t) || Pt(e))
19
+ if (Lt(t) || Lt(e))
20
20
  return 0;
21
- const [s, n] = Ms(Tt(t), Tt(e));
21
+ const [s, n] = Ms(Pt(t), Pt(e));
22
22
  return s > n ? 1 : s < n ? -1 : 0;
23
- }, Dt = (t, e) => {
23
+ }, Tt = (t, e) => {
24
24
  for (let s = 0; s < Math.max(t.length, e.length); s++) {
25
25
  const n = Is(t[s] || "0", e[s] || "0");
26
26
  if (n !== 0)
@@ -28,14 +28,14 @@ const $t = [
28
28
  }
29
29
  return 0;
30
30
  }, U = (t, e) => {
31
- const s = Lt(t), n = Lt(e), i = s.pop(), o = n.pop(), r = Dt(s, n);
32
- return r !== 0 ? r : i && o ? Dt(i.split("."), o.split(".")) : i || o ? i ? -1 : 1 : 0;
31
+ const s = xt(t), n = xt(e), i = s.pop(), o = n.pop(), r = Tt(s, n);
32
+ return r !== 0 ? r : i && o ? Tt(i.split("."), o.split(".")) : i || o ? i ? -1 : 1 : 0;
33
33
  };
34
34
  var Cs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
35
- function yt(t) {
35
+ function mt(t) {
36
36
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
37
37
  }
38
- var Xt = { exports: {} };
38
+ var Kt = { exports: {} };
39
39
  (function(t, e) {
40
40
  (function(s, n) {
41
41
  t.exports = n();
@@ -74,26 +74,26 @@ var Xt = { exports: {} };
74
74
  else
75
75
  throw new i("retryOn property expects an array or function");
76
76
  return new Promise(function(y, O) {
77
- var R = function(v) {
77
+ var R = function(w) {
78
78
  var A = typeof Request < "u" && l instanceof Request ? l.clone() : l;
79
79
  o(A, c).then(function(C) {
80
80
  if (Array.isArray(_) && _.indexOf(C.status) === -1)
81
81
  y(C);
82
82
  else if (typeof _ == "function")
83
83
  try {
84
- return Promise.resolve(_(v, null, C)).then(function(S) {
85
- S ? $(v, null, C) : y(C);
84
+ return Promise.resolve(_(w, null, C)).then(function(S) {
85
+ S ? $(w, null, C) : y(C);
86
86
  }).catch(O);
87
87
  } catch (S) {
88
88
  O(S);
89
89
  }
90
90
  else
91
- v < p ? $(v, null, C) : y(C);
91
+ w < p ? $(w, null, C) : y(C);
92
92
  }).catch(function(C) {
93
93
  if (typeof _ == "function")
94
94
  try {
95
- Promise.resolve(_(v, C, null)).then(function(S) {
96
- S ? $(v, C, null) : O(C);
95
+ Promise.resolve(_(w, C, null)).then(function(S) {
96
+ S ? $(w, C, null) : O(C);
97
97
  }).catch(function(S) {
98
98
  O(S);
99
99
  });
@@ -101,13 +101,13 @@ var Xt = { exports: {} };
101
101
  O(S);
102
102
  }
103
103
  else
104
- v < p ? $(v, C, null) : O(C);
104
+ w < p ? $(w, C, null) : O(C);
105
105
  });
106
106
  };
107
- function $(v, A, C) {
108
- var S = typeof m == "function" ? m(v, A, C) : m;
107
+ function $(w, A, C) {
108
+ var S = typeof m == "function" ? m(w, A, C) : m;
109
109
  setTimeout(function() {
110
- R(++v);
110
+ R(++w);
111
111
  }, S);
112
112
  }
113
113
  R(0);
@@ -122,20 +122,20 @@ var Xt = { exports: {} };
122
122
  }
123
123
  return s;
124
124
  });
125
- })(Xt);
126
- var $s = Xt.exports;
127
- const gt = /* @__PURE__ */ yt($s), z = {
125
+ })(Kt);
126
+ var $s = Kt.exports;
127
+ const yt = /* @__PURE__ */ mt($s), z = {
128
128
  Remove: "remove",
129
129
  Replace: "replace",
130
130
  Add: "add"
131
- }, qt = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), xs = Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"), Be = Symbol.iterator, Y = {
131
+ }, Xt = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), xs = Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"), Be = Symbol.iterator, Y = {
132
132
  mutable: "mutable",
133
133
  immutable: "immutable"
134
- }, _t = {};
134
+ }, gt = {};
135
135
  function Ie(t, e) {
136
136
  return t instanceof Map ? t.has(e) : Object.prototype.hasOwnProperty.call(t, e);
137
137
  }
138
- function kt(t, e) {
138
+ function Dt(t, e) {
139
139
  if (e in t) {
140
140
  let s = Reflect.getPrototypeOf(t);
141
141
  for (; s; ) {
@@ -154,9 +154,9 @@ function be(t) {
154
154
  return !!P(t);
155
155
  }
156
156
  function P(t) {
157
- return typeof t != "object" ? null : t == null ? void 0 : t[qt];
157
+ return typeof t != "object" ? null : t == null ? void 0 : t[Xt];
158
158
  }
159
- function bt(t) {
159
+ function _t(t) {
160
160
  var e;
161
161
  const s = P(t);
162
162
  return s ? (e = s.copy) !== null && e !== void 0 ? e : s.original : t;
@@ -167,7 +167,7 @@ function ne(t, e) {
167
167
  let s;
168
168
  return Object.getPrototypeOf(t) === Object.prototype || Array.isArray(t) || t instanceof Map || t instanceof Set || !!(e != null && e.mark) && ((s = e.mark(t, Y)) === Y.immutable || typeof s == "function");
169
169
  }
170
- function Qt(t, e = []) {
170
+ function qt(t, e = []) {
171
171
  if (Object.hasOwnProperty.call(t, "key")) {
172
172
  const s = t.parent.copy, n = P(pe(s, t.key));
173
173
  if (n !== null && (n == null ? void 0 : n.original) !== t.original)
@@ -178,7 +178,7 @@ function Qt(t, e = []) {
178
178
  e.push(o);
179
179
  }
180
180
  if (t.parent)
181
- return Qt(t.parent, e);
181
+ return qt(t.parent, e);
182
182
  e.reverse();
183
183
  try {
184
184
  Ls(t.copy, e);
@@ -187,14 +187,14 @@ function Qt(t, e = []) {
187
187
  }
188
188
  return e;
189
189
  }
190
- function we(t) {
190
+ function ve(t) {
191
191
  return Array.isArray(t) ? 1 : t instanceof Map ? 2 : t instanceof Set ? 3 : 0;
192
192
  }
193
193
  function pe(t, e) {
194
- return we(t) === 2 ? t.get(e) : t[e];
194
+ return ve(t) === 2 ? t.get(e) : t[e];
195
195
  }
196
196
  function Pe(t, e, s) {
197
- we(t) === 2 ? t.set(e, s) : t[e] = s;
197
+ ve(t) === 2 ? t.set(e, s) : t[e] = s;
198
198
  }
199
199
  function et(t, e) {
200
200
  const s = P(t);
@@ -217,7 +217,7 @@ function _e(t, e) {
217
217
  function Ls(t, e) {
218
218
  for (let s = 0; s < e.length - 1; s += 1) {
219
219
  const n = e[s];
220
- if (t = pe(we(t) === 3 ? Array.from(t) : t, n), typeof t != "object")
220
+ if (t = pe(ve(t) === 3 ? Array.from(t) : t, n), typeof t != "object")
221
221
  throw new Error(`Cannot resolve patch at '${e.join("/")}'.`);
222
222
  }
223
223
  return t;
@@ -239,7 +239,7 @@ function Ps(t) {
239
239
  }), e;
240
240
  }
241
241
  const Ts = Object.prototype.propertyIsEnumerable;
242
- function Yt(t, e) {
242
+ function Qt(t, e) {
243
243
  let s;
244
244
  if (Array.isArray(t))
245
245
  return Array.prototype.concat.call(t);
@@ -267,11 +267,11 @@ function Yt(t, e) {
267
267
  throw new Error("Please check mark() to ensure that it is a stable marker draftable function.");
268
268
  }
269
269
  function X(t) {
270
- t.copy || (t.copy = Yt(t.original, t.options));
270
+ t.copy || (t.copy = Qt(t.original, t.options));
271
271
  }
272
272
  function Ae(t) {
273
273
  if (!ne(t))
274
- return bt(t);
274
+ return _t(t);
275
275
  if (Array.isArray(t))
276
276
  return t.map(Ae);
277
277
  if (t instanceof Map)
@@ -314,7 +314,7 @@ function Oe(t, e, s, n, i) {
314
314
  n.pop(), i.pop();
315
315
  return;
316
316
  }
317
- switch (we(t)) {
317
+ switch (ve(t)) {
318
318
  case 2:
319
319
  for (const [a, u] of t)
320
320
  Oe(a, a, s, n, i), Oe(u, a, s, n, i);
@@ -339,8 +339,8 @@ function Oe(t, e, s, n, i) {
339
339
  }
340
340
  n.pop(), i.pop();
341
341
  }
342
- function wt(t, e) {
343
- const s = we(t);
342
+ function bt(t, e) {
343
+ const s = ve(t);
344
344
  if (s === 0)
345
345
  Reflect.ownKeys(t).forEach((n) => {
346
346
  e(n, t[n], t);
@@ -352,11 +352,11 @@ function wt(t, e) {
352
352
  } else
353
353
  t.forEach((n, i) => e(i, n, t));
354
354
  }
355
- function Zt(t, e, s) {
355
+ function Yt(t, e, s) {
356
356
  if (be(t) || !ne(t, s) || e.has(t) || Object.isFrozen(t))
357
357
  return;
358
358
  const n = t instanceof Set, i = n ? /* @__PURE__ */ new Map() : void 0;
359
- if (e.add(t), wt(t, (o, r) => {
359
+ if (e.add(t), bt(t, (o, r) => {
360
360
  var a;
361
361
  if (be(r)) {
362
362
  const u = P(r);
@@ -364,7 +364,7 @@ function Zt(t, e, s) {
364
364
  const l = !((a = u.assignedMap) === null || a === void 0) && a.size || u.operated ? u.copy : u.original;
365
365
  Pe(n ? i : t, o, l);
366
366
  } else
367
- Zt(r, e, s);
367
+ Yt(r, e, s);
368
368
  }), i) {
369
369
  const o = t, r = Array.from(o);
370
370
  o.clear(), r.forEach((a) => {
@@ -374,17 +374,17 @@ function Zt(t, e, s) {
374
374
  }
375
375
  function Ds(t, e) {
376
376
  const s = t.type === 3 ? t.setMap : t.copy;
377
- t.finalities.revoke.length > 1 && t.assignedMap.get(e) && s && Zt(pe(s, e), t.finalities.handledSet, t.options);
377
+ t.finalities.revoke.length > 1 && t.assignedMap.get(e) && s && Yt(pe(s, e), t.finalities.handledSet, t.options);
378
378
  }
379
379
  function at(t) {
380
380
  t.type === 3 && t.copy && (t.copy.clear(), t.setMap.forEach((e) => {
381
- t.copy.add(bt(e));
381
+ t.copy.add(_t(e));
382
382
  }));
383
383
  }
384
384
  function ut(t, e, s, n) {
385
385
  if (t.operated && t.assignedMap && t.assignedMap.size > 0 && !t.finalized) {
386
386
  if (s && n) {
387
- const o = Qt(t);
387
+ const o = qt(t);
388
388
  o && e(t, o, s, n);
389
389
  }
390
390
  t.finalized = !0;
@@ -404,7 +404,7 @@ function vt(t, e, s, n) {
404
404
  fe(pe(o, e), s) && Ds(t, e);
405
405
  });
406
406
  }
407
- function ks(t, e, s, n, i) {
407
+ function Ns(t, e, s, n, i) {
408
408
  let { original: o, assignedMap: r, options: a } = t, u = t.copy;
409
409
  u.length < o.length && ([o, u] = [u, o], [s, n] = [n, s]);
410
410
  for (let l = 0; l < o.length; l += 1)
@@ -450,7 +450,7 @@ function ks(t, e, s, n, i) {
450
450
  }
451
451
  }
452
452
  }
453
- function Ns({ original: t, copy: e, assignedMap: s }, n, i, o, r) {
453
+ function ks({ original: t, copy: e, assignedMap: s }, n, i, o, r) {
454
454
  s.forEach((a, u) => {
455
455
  const l = pe(t, u), c = Fe(pe(e, u)), p = a ? Ie(t, u) ? z.Replace : z.Add : z.Remove;
456
456
  if (fe(l, c) && p === z.Replace)
@@ -496,9 +496,9 @@ function $e(t, e, s, n) {
496
496
  switch (t.type) {
497
497
  case 0:
498
498
  case 2:
499
- return Ns(t, e, s, n, i);
500
- case 1:
501
499
  return ks(t, e, s, n, i);
500
+ case 1:
501
+ return Ns(t, e, s, n, i);
502
502
  case 3:
503
503
  return Hs(t, e, s, n, i);
504
504
  }
@@ -544,7 +544,7 @@ const ze = (t, e, s = !1) => {
544
544
  const n = P(this), i = Q(n).get(t), o = ((s = (e = n.options).mark) === null || s === void 0 ? void 0 : s.call(e, i, Y)) === Y.mutable;
545
545
  if (n.options.strict && ze(i, n.options, o), o || n.finalized || !ne(i, n.options) || i !== n.original.get(t))
546
546
  return i;
547
- const r = _t.createDraft({
547
+ const r = gt.createDraft({
548
548
  original: i,
549
549
  parentDraft: n,
550
550
  key: t,
@@ -588,7 +588,7 @@ const ze = (t, e, s = !1) => {
588
588
  [Be]() {
589
589
  return this.entries();
590
590
  }
591
- }, Us = Reflect.ownKeys(ct), Ht = (t, e, { isValuesIterator: s }) => () => {
591
+ }, Us = Reflect.ownKeys(ct), kt = (t, e, { isValuesIterator: s }) => () => {
592
592
  var n, i;
593
593
  const o = e.next();
594
594
  if (o.done)
@@ -597,7 +597,7 @@ const ze = (t, e, s = !1) => {
597
597
  let a = t.setMap.get(r);
598
598
  const u = P(a), l = ((i = (n = t.options).mark) === null || i === void 0 ? void 0 : i.call(n, a, Y)) === Y.mutable;
599
599
  if (t.options.strict && ze(r, t.options, l), !l && !u && ne(r, t.options) && !t.finalized && t.original.has(r)) {
600
- const c = _t.createDraft({
600
+ const c = gt.createDraft({
601
601
  original: r,
602
602
  parentDraft: t,
603
603
  key: r,
@@ -650,7 +650,7 @@ const ze = (t, e, s = !1) => {
650
650
  const e = t.setMap.keys();
651
651
  return {
652
652
  [Symbol.iterator]: () => this.values(),
653
- next: Ht(t, e, { isValuesIterator: !0 })
653
+ next: kt(t, e, { isValuesIterator: !0 })
654
654
  };
655
655
  },
656
656
  entries() {
@@ -659,7 +659,7 @@ const ze = (t, e, s = !1) => {
659
659
  const e = t.setMap.keys();
660
660
  return {
661
661
  [Symbol.iterator]: () => this.entries(),
662
- next: Ht(t, e, {
662
+ next: kt(t, e, {
663
663
  isValuesIterator: !1
664
664
  })
665
665
  };
@@ -676,13 +676,13 @@ const ze = (t, e, s = !1) => {
676
676
  for (; !n.done; )
677
677
  t.call(e, n.value, n.value, this), n = s.next();
678
678
  }
679
- }, Bs = Reflect.ownKeys(lt), es = /* @__PURE__ */ new WeakSet(), ts = {
679
+ }, Bs = Reflect.ownKeys(lt), Zt = /* @__PURE__ */ new WeakSet(), es = {
680
680
  get(t, e, s) {
681
681
  var n, i;
682
682
  const o = (n = t.copy) === null || n === void 0 ? void 0 : n[e];
683
- if (o && es.has(o))
683
+ if (o && Zt.has(o))
684
684
  return o;
685
- if (e === qt)
685
+ if (e === Xt)
686
686
  return t;
687
687
  let r;
688
688
  if (t.options.mark) {
@@ -706,7 +706,7 @@ const ze = (t, e, s = !1) => {
706
706
  return l.bind(t.proxy);
707
707
  }
708
708
  if (!Ie(a, e)) {
709
- const l = kt(a, e);
709
+ const l = Dt(a, e);
710
710
  return l ? "value" in l ? l.value : (
711
711
  // !case: support for getter
712
712
  (i = l.get) === null || i === void 0 ? void 0 : i.call(t.proxy)
@@ -716,7 +716,7 @@ const ze = (t, e, s = !1) => {
716
716
  if (t.options.strict && ze(u, t.options), t.finalized || !ne(u, t.options))
717
717
  return u;
718
718
  if (u === et(t.original, e)) {
719
- if (X(t), t.copy[e] = Ot({
719
+ if (X(t), t.copy[e] = wt({
720
720
  original: t.original[e],
721
721
  parentDraft: t,
722
722
  key: t.type === 1 ? Number(e) : e,
@@ -737,7 +737,7 @@ const ze = (t, e, s = !1) => {
737
737
  let i;
738
738
  if (t.type === 1 && e !== "length" && !(Number.isInteger(i = Number(e)) && i >= 0 && (e === 0 || i === 0 || String(i) === String(e))))
739
739
  throw new Error("Only supports setting array indices and the 'length' property.");
740
- const o = kt(Q(t), e);
740
+ const o = Dt(Q(t), e);
741
741
  if (o != null && o.set)
742
742
  return o.set.call(t.proxy, s), !0;
743
743
  const r = et(Q(t), e), a = P(r);
@@ -769,11 +769,11 @@ const ze = (t, e, s = !1) => {
769
769
  },
770
770
  deleteProperty(t, e) {
771
771
  var s;
772
- return t.type === 1 ? ts.set.call(this, t, e, void 0, t.proxy) : (et(t.original, e) !== void 0 || e in t.original ? (X(t), ue(t), t.assignedMap.set(e, !1)) : (t.assignedMap = (s = t.assignedMap) !== null && s !== void 0 ? s : /* @__PURE__ */ new Map(), t.assignedMap.delete(e)), t.copy && delete t.copy[e], !0);
772
+ return t.type === 1 ? es.set.call(this, t, e, void 0, t.proxy) : (et(t.original, e) !== void 0 || e in t.original ? (X(t), ue(t), t.assignedMap.set(e, !1)) : (t.assignedMap = (s = t.assignedMap) !== null && s !== void 0 ? s : /* @__PURE__ */ new Map(), t.assignedMap.delete(e)), t.copy && delete t.copy[e], !0);
773
773
  }
774
774
  };
775
- function Ot(t) {
776
- const { original: e, parentDraft: s, key: n, finalities: i, options: o } = t, r = we(e), a = {
775
+ function wt(t) {
776
+ const { original: e, parentDraft: s, key: n, finalities: i, options: o } = t, r = ve(e), a = {
777
777
  type: r,
778
778
  finalized: !1,
779
779
  parent: s,
@@ -786,17 +786,17 @@ function Ot(t) {
786
786
  setMap: r === 3 ? new Map(e.entries()) : void 0
787
787
  };
788
788
  (n || "key" in t) && (a.key = n);
789
- const { proxy: u, revoke: l } = Proxy.revocable(r === 1 ? Object.assign([], a) : a, ts);
790
- if (i.revoke.push(l), es.add(u), a.proxy = u, s) {
789
+ const { proxy: u, revoke: l } = Proxy.revocable(r === 1 ? Object.assign([], a) : a, es);
790
+ if (i.revoke.push(l), Zt.add(u), a.proxy = u, s) {
791
791
  const c = s;
792
792
  c.finalities.draft.push((p, m) => {
793
793
  var _, y;
794
794
  const O = P(u);
795
795
  let R = c.type === 3 ? c.setMap : c.copy;
796
- const $ = pe(R, n), v = P($);
797
- if (v) {
798
- let A = v.original;
799
- v.operated && (A = bt($)), at(v), ut(v, $e, p, m), c.options.enableAutoFreeze && (c.options.updatedValues = (_ = c.options.updatedValues) !== null && _ !== void 0 ? _ : /* @__PURE__ */ new WeakMap(), c.options.updatedValues.set(A, v.original)), Pe(R, n, A);
796
+ const $ = pe(R, n), w = P($);
797
+ if (w) {
798
+ let A = w.original;
799
+ w.operated && (A = _t($)), at(w), ut(w, $e, p, m), c.options.enableAutoFreeze && (c.options.updatedValues = (_ = c.options.updatedValues) !== null && _ !== void 0 ? _ : /* @__PURE__ */ new WeakMap(), c.options.updatedValues.set(A, w.original)), Pe(R, n, A);
800
800
  }
801
801
  (y = O.callbacks) === null || y === void 0 || y.forEach((A) => {
802
802
  A(p, m);
@@ -810,7 +810,7 @@ function Ot(t) {
810
810
  }
811
811
  return u;
812
812
  }
813
- _t.createDraft = Ot;
813
+ gt.createDraft = wt;
814
814
  function Fs(t, e, s, n, i) {
815
815
  var o;
816
816
  const r = P(t), a = (o = r == null ? void 0 : r.original) !== null && o !== void 0 ? o : t, u = !!e.length;
@@ -833,7 +833,7 @@ function zs(t, e) {
833
833
  };
834
834
  let i, o;
835
835
  e.enablePatches && (i = [], o = []);
836
- const a = ((s = e.mark) === null || s === void 0 ? void 0 : s.call(e, t, Y)) === Y.mutable || !ne(t, e) ? t : Ot({
836
+ const a = ((s = e.mark) === null || s === void 0 ? void 0 : s.call(e, t, Y)) === Y.mutable || !ne(t, e) ? t : wt({
837
837
  original: t,
838
838
  parentDraft: null,
839
839
  finalities: n,
@@ -849,7 +849,7 @@ function zs(t, e) {
849
849
  }
850
850
  function ft(t) {
851
851
  const { rootDraft: e, value: s, useRawReturn: n = !1, isRoot: i = !0 } = t;
852
- wt(s, (o, r, a) => {
852
+ bt(s, (o, r, a) => {
853
853
  const u = P(r);
854
854
  if (u && e && u.finalities === e.finalities) {
855
855
  t.isContainDraft = !0;
@@ -863,16 +863,16 @@ function ft(t) {
863
863
  typeof r == "object" && r !== null && (t.value = r, t.isRoot = !1, ft(t));
864
864
  }), i && (t.isContainDraft || console.warn("The return value does not contain any draft, please use 'rawReturn()' to wrap the return value to improve performance."), n && console.warn("The return value contains drafts, please don't use 'rawReturn()' to wrap the return value."));
865
865
  }
866
- function ss(t) {
866
+ function ts(t) {
867
867
  const e = P(t);
868
868
  if (!ne(t, e == null ? void 0 : e.options))
869
869
  return t;
870
- const s = we(t);
870
+ const s = ve(t);
871
871
  if (e && !e.operated)
872
872
  return e.original;
873
873
  let n;
874
874
  function i() {
875
- n = s === 2 ? new Map(t) : s === 3 ? Array.from(e.setMap.values()) : Yt(t, e == null ? void 0 : e.options);
875
+ n = s === 2 ? new Map(t) : s === 3 ? Array.from(e.setMap.values()) : Qt(t, e == null ? void 0 : e.options);
876
876
  }
877
877
  if (e) {
878
878
  e.finalized = !0;
@@ -883,17 +883,17 @@ function ss(t) {
883
883
  }
884
884
  } else
885
885
  n = t;
886
- return wt(n, (o, r) => {
886
+ return bt(n, (o, r) => {
887
887
  if (e && fe(pe(e.original, o), r))
888
888
  return;
889
- const a = ss(r);
889
+ const a = ts(r);
890
890
  a !== r && (n === t && i(), Pe(n, o, a));
891
891
  }), s === 3 ? new Set(n) : n;
892
892
  }
893
- function jt(t) {
893
+ function Ht(t) {
894
894
  if (!be(t))
895
895
  throw new Error(`current() is only used for Draft, parameter: ${t}`);
896
- return ss(t);
896
+ return ts(t);
897
897
  }
898
898
  const Gs = (t) => {
899
899
  if (t !== void 0 && Object.prototype.toString.call(t) !== "[object Object]")
@@ -901,21 +901,21 @@ const Gs = (t) => {
901
901
  return function e(s, n, i) {
902
902
  var o, r, a;
903
903
  if (typeof s == "function" && typeof n != "function")
904
- return function(S, ...N) {
905
- return e(S, (E) => s.call(this, E, ...N), n);
904
+ return function(S, ...k) {
905
+ return e(S, (E) => s.call(this, E, ...k), n);
906
906
  };
907
907
  const u = s, l = n;
908
908
  let c = i;
909
909
  if (typeof n != "function" && (c = n), c !== void 0 && Object.prototype.toString.call(c) !== "[object Object]")
910
910
  throw new Error(`Invalid options: ${c}, 'options' should be an object.`);
911
911
  c = Object.assign(Object.assign({}, t), c);
912
- const p = be(u) ? jt(u) : u, m = Array.isArray(c.mark) ? (S, N) => {
912
+ const p = be(u) ? Ht(u) : u, m = Array.isArray(c.mark) ? (S, k) => {
913
913
  for (const E of c.mark) {
914
914
  if (typeof E != "function")
915
915
  throw new Error(`Invalid mark: ${E}, 'mark' should be a function.`);
916
- const w = E(S, N);
917
- if (w)
918
- return w;
916
+ const v = E(S, k);
917
+ if (v)
918
+ return v;
919
919
  }
920
920
  } : c.mark, _ = (o = c.enablePatches) !== null && o !== void 0 ? o : !1, y = (r = c.strict) !== null && r !== void 0 ? r : !1, R = {
921
921
  enableAutoFreeze: (a = c.enableAutoFreeze) !== null && a !== void 0 ? a : !1,
@@ -925,11 +925,11 @@ const Gs = (t) => {
925
925
  };
926
926
  if (!ne(p, R) && typeof p == "object" && p !== null)
927
927
  throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");
928
- const [$, v] = zs(p, R);
928
+ const [$, w] = zs(p, R);
929
929
  if (typeof n != "function") {
930
930
  if (!ne(p, R))
931
931
  throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");
932
- return [$, v];
932
+ return [$, w];
933
933
  }
934
934
  let A;
935
935
  try {
@@ -938,31 +938,31 @@ const Gs = (t) => {
938
938
  throw ot(P($)), S;
939
939
  }
940
940
  const C = (S) => {
941
- const N = P($);
941
+ const k = P($);
942
942
  if (!be(S)) {
943
- if (S !== void 0 && !fe(S, $) && (N != null && N.operated))
943
+ if (S !== void 0 && !fe(S, $) && (k != null && k.operated))
944
944
  throw new Error("Either the value is returned as a new non-draft value, or only the draft is modified without returning any value.");
945
- const w = S == null ? void 0 : S[xs];
946
- if (w) {
947
- const x = w[0];
945
+ const v = S == null ? void 0 : S[xs];
946
+ if (v) {
947
+ const x = v[0];
948
948
  return R.strict && typeof S == "object" && S !== null && ft({
949
- rootDraft: N,
949
+ rootDraft: k,
950
950
  value: S,
951
951
  useRawReturn: !0
952
- }), v([x]);
952
+ }), w([x]);
953
953
  }
954
954
  if (S !== void 0)
955
- return typeof S == "object" && S !== null && ft({ rootDraft: N, value: S }), v([S]);
955
+ return typeof S == "object" && S !== null && ft({ rootDraft: k, value: S }), w([S]);
956
956
  }
957
957
  if (S === $ || S === void 0)
958
- return v([]);
958
+ return w([]);
959
959
  const E = P(S);
960
960
  if (R === E.options) {
961
961
  if (E.operated)
962
962
  throw new Error("Cannot return a modified child draft.");
963
- return v([jt(S)]);
963
+ return w([Ht(S)]);
964
964
  }
965
- return v([S]);
965
+ return w([S]);
966
966
  };
967
967
  return A instanceof Promise ? A.then(C, (S) => {
968
968
  throw ot(P($)), S;
@@ -970,7 +970,7 @@ const Gs = (t) => {
970
970
  };
971
971
  }, M = Gs();
972
972
  Object.prototype.constructor.toString();
973
- const Js = gt(fetch), ns = async (t, e) => {
973
+ const Js = yt(fetch), ss = async (t, e) => {
974
974
  if (!t)
975
975
  throw "Metapage definition null";
976
976
  if (t.version || (t = M(t, (n) => {
@@ -993,7 +993,7 @@ const Js = gt(fetch), ns = async (t, e) => {
993
993
  throw `Error converting metapage definition to version ${e}: ${n}`;
994
994
  }
995
995
  return Ws(t, e);
996
- }, Vs = async (t) => ns(t, Le), Ws = (t, e) => {
996
+ }, Vs = async (t) => ss(t, Le), Ws = (t, e) => {
997
997
  if (!t)
998
998
  throw "Metapage definition null";
999
999
  if (!t.version)
@@ -1056,7 +1056,7 @@ const Js = gt(fetch), ns = async (t, e) => {
1056
1056
  if (t === "2")
1057
1057
  return "2";
1058
1058
  throw `Unknown version: ${t}`;
1059
- }, en = gt(fetch), is = async (t, e) => {
1059
+ }, en = yt(fetch), ns = async (t, e) => {
1060
1060
  if (!t)
1061
1061
  throw "Metaframe definition null";
1062
1062
  if (!t.version)
@@ -1079,7 +1079,7 @@ const Js = gt(fetch), ns = async (t, e) => {
1079
1079
  throw `Error converting metapage definition to version ${e}: ${n}`;
1080
1080
  }
1081
1081
  return sn(t, e);
1082
- }, tn = async (t) => is(t, We), sn = (t, e) => {
1082
+ }, tn = async (t) => ns(t, We), sn = (t, e) => {
1083
1083
  if (!t)
1084
1084
  throw "Metaframe definition null";
1085
1085
  t.version || (t = M(t, (i) => {
@@ -1211,11 +1211,11 @@ const Ke = async (t) => M(t, async (e) => {
1211
1211
  }
1212
1212
  }), Ce = async (t) => M(t, async (e) => {
1213
1213
  for (const s of Object.keys(t)) {
1214
- const n = await rs(t[s]);
1214
+ const n = await is(t[s]);
1215
1215
  return e[s] = n, e;
1216
1216
  }
1217
1217
  }), xi = async (t, e, s) => {
1218
- if (t = rs(t), s = s || {}, s.type || (s.type = "application/octet-stream"), t instanceof ArrayBuffer)
1218
+ if (t = is(t), s = s || {}, s.type || (s.type = "application/octet-stream"), t instanceof ArrayBuffer)
1219
1219
  return new File([t], e, s);
1220
1220
  if (t instanceof File || t instanceof Blob) {
1221
1221
  const i = await t.arrayBuffer();
@@ -1278,7 +1278,7 @@ const Ke = async (t) => M(t, async (e) => {
1278
1278
  return Promise.resolve(s);
1279
1279
  }
1280
1280
  return Promise.resolve(t);
1281
- }, rs = (t) => {
1281
+ }, is = (t) => {
1282
1282
  if (!(t && typeof t == "object" && t._s === !0))
1283
1283
  return t;
1284
1284
  const e = t, s = e._c;
@@ -1345,7 +1345,7 @@ var me;
1345
1345
  (function(t) {
1346
1346
  t.InputsUpdate = "InputsUpdate", t.MessageAck = "MessageAck", t.SetupIframeServerResponse = "SetupIframeServerResponse";
1347
1347
  })(me || (me = {}));
1348
- const Pi = -32700, Ti = -32600, Di = -32601, ki = -32602, Ni = -32603;
1348
+ const Pi = -32700, Ti = -32600, Di = -32601, Ni = -32602, ki = -32603;
1349
1349
  function Hi(t) {
1350
1350
  switch (typeof t) {
1351
1351
  case "string":
@@ -1358,7 +1358,7 @@ function Hi(t) {
1358
1358
  return !1;
1359
1359
  }
1360
1360
  }
1361
- var os = { exports: {} };
1361
+ var rs = { exports: {} };
1362
1362
  (function(t) {
1363
1363
  var e = Object.prototype.hasOwnProperty, s = "~";
1364
1364
  function n() {
@@ -1402,7 +1402,7 @@ var os = { exports: {} };
1402
1402
  var O = s ? s + l : l;
1403
1403
  if (!this._events[O])
1404
1404
  return !1;
1405
- var R = this._events[O], $ = arguments.length, v, A;
1405
+ var R = this._events[O], $ = arguments.length, w, A;
1406
1406
  if (R.fn) {
1407
1407
  switch (R.once && this.removeListener(l, R.fn, void 0, !0), $) {
1408
1408
  case 1:
@@ -1418,9 +1418,9 @@ var os = { exports: {} };
1418
1418
  case 6:
1419
1419
  return R.fn.call(R.context, c, p, m, _, y), !0;
1420
1420
  }
1421
- for (A = 1, v = new Array($ - 1); A < $; A++)
1422
- v[A - 1] = arguments[A];
1423
- R.fn.apply(R.context, v);
1421
+ for (A = 1, w = new Array($ - 1); A < $; A++)
1422
+ w[A - 1] = arguments[A];
1423
+ R.fn.apply(R.context, w);
1424
1424
  } else {
1425
1425
  var C = R.length, S;
1426
1426
  for (A = 0; A < C; A++)
@@ -1438,10 +1438,10 @@ var os = { exports: {} };
1438
1438
  R[A].fn.call(R[A].context, c, p, m);
1439
1439
  break;
1440
1440
  default:
1441
- if (!v)
1442
- for (S = 1, v = new Array($ - 1); S < $; S++)
1443
- v[S - 1] = arguments[S];
1444
- R[A].fn.apply(R[A].context, v);
1441
+ if (!w)
1442
+ for (S = 1, w = new Array($ - 1); S < $; S++)
1443
+ w[S - 1] = arguments[S];
1444
+ R[A].fn.apply(R[A].context, w);
1445
1445
  }
1446
1446
  }
1447
1447
  return !0;
@@ -1468,8 +1468,8 @@ var os = { exports: {} };
1468
1468
  var c;
1469
1469
  return l ? (c = s ? s + l : l, this._events[c] && r(this, c)) : (this._events = new n(), this._eventsCount = 0), this;
1470
1470
  }, a.prototype.off = a.prototype.removeListener, a.prototype.addListener = a.prototype.on, a.prefixed = s, a.EventEmitter = a, t.exports = a;
1471
- })(os);
1472
- var Rt = os.exports;
1471
+ })(rs);
1472
+ var Ot = rs.exports;
1473
1473
  function mn(t) {
1474
1474
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1475
1475
  }
@@ -1511,25 +1511,15 @@ var yn = function(t, e) {
1511
1511
  }
1512
1512
  }(t);
1513
1513
  };
1514
- const gn = /* @__PURE__ */ mn(yn), _n = (t) => as(gn(t)), bn = (t) => {
1514
+ const gn = /* @__PURE__ */ mn(yn), _n = (t) => os(gn(t)), bn = (t) => {
1515
1515
  if (t && t.length > 0)
1516
- try {
1517
- return JSON.parse(ht(t));
1518
- } catch (e) {
1519
- try {
1520
- return JSON.parse(decodeURIComponent(ht(t)));
1521
- } catch {
1522
- throw e;
1523
- }
1524
- }
1525
- }, as = (t) => btoa(t), ht = (t) => {
1526
- try {
1527
- return atob(t);
1528
- } catch {
1529
- return atob(decodeURIComponent(t));
1530
- }
1516
+ return JSON.parse(as(t));
1517
+ }, os = (t) => btoa(encodeURIComponent(t)), as = (t) => {
1518
+ for (; t.endsWith("%3D"); )
1519
+ t = t.slice(0, -3);
1520
+ return decodeURIComponent(atob(t));
1531
1521
  }, us = (t) => {
1532
- const e = t instanceof URL ? t : new URL(t);
1522
+ const e = new URL(t);
1533
1523
  return cs(e.hash);
1534
1524
  }, cs = (t) => {
1535
1525
  let e = t;
@@ -1550,12 +1540,16 @@ const gn = /* @__PURE__ */ mn(yn), _n = (t) => as(gn(t)), bn = (t) => {
1550
1540
  }).forEach(([o, r]) => {
1551
1541
  i[o] = r;
1552
1542
  }), Object.keys(i).forEach((o) => {
1553
- i[o] = i[o];
1543
+ try {
1544
+ i[o] = decodeURIComponent(i[o]);
1545
+ } catch {
1546
+ i[o] = i[o];
1547
+ }
1554
1548
  }), [n, i];
1555
1549
  }, Te = (t, e) => {
1556
1550
  const [s, n] = us(t);
1557
1551
  return n[e];
1558
- }, wn = (t) => vn()[1][t], vn = () => us(window.location.href), Se = (t, e, s) => {
1552
+ }, vn = (t) => wn()[1][t], wn = () => us(window.location.href), Se = (t, e, s) => {
1559
1553
  const n = window.location.hash.startsWith("#") ? window.location.hash.substring(1) : window.location.hash, i = On(n, t, e);
1560
1554
  i !== n && (s != null && s.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"))));
1561
1555
  }, On = (t, e, s) => {
@@ -1565,19 +1559,16 @@ const gn = /* @__PURE__ */ mn(yn), _n = (t) => as(gn(t)), bn = (t) => {
1565
1559
  return t;
1566
1560
  const r = Object.keys(i);
1567
1561
  r.sort();
1568
- const a = r.map((u, l) => {
1569
- const c = i[u];
1570
- return /^[A-Za-z0-9+/]+={0,2}$/.test(c) && c.length % 4, `${u}=${c}`;
1571
- }).join("&");
1572
- return !n && !a ? "" : `${n || ""}${a ? "?" + a : ""}`;
1573
- }, St = (t, e) => {
1562
+ const a = r.map((u, l) => `${u}=${encodeURIComponent(i[u])}`).join("&");
1563
+ return `${n}?${a}`;
1564
+ }, Rt = (t, e) => {
1574
1565
  const s = Te(t, e);
1575
1566
  if (s && s !== "")
1576
1567
  return bn(s);
1577
1568
  }, Rn = (t, e, s) => {
1578
1569
  const n = e ? _n(e) : void 0;
1579
1570
  Se(t, n, s);
1580
- }, Sn = (t) => St(window.location.href, t), An = (t, e) => {
1571
+ }, Sn = (t) => Rt(window.location.href, t), An = (t, e) => {
1581
1572
  const s = Te(t, e);
1582
1573
  return s ? parseFloat(s) : void 0;
1583
1574
  }, ls = (t, e, s) => {
@@ -1591,12 +1582,12 @@ const gn = /* @__PURE__ */ mn(yn), _n = (t) => as(gn(t)), bn = (t) => {
1591
1582
  Se(t, e ? "true" : void 0, s);
1592
1583
  }, Ln = (t) => $n(window.location.href, t), Pn = (t, e) => {
1593
1584
  const s = Te(t, e);
1594
- return s && s !== "" ? ht(s) : void 0;
1585
+ return s && s !== "" ? as(s) : void 0;
1595
1586
  }, Tn = (t, e, s) => {
1596
- const n = e == null ? void 0 : as(e);
1587
+ const n = e == null ? void 0 : os(e);
1597
1588
  Se(t, n, s);
1598
1589
  }, Dn = (t) => Pn(window.location.href, t);
1599
- var kn = function(t, e) {
1590
+ var Nn = function(t, e) {
1600
1591
  e || (e = {}), typeof e == "function" && (e = { cmp: e });
1601
1592
  var s = typeof e.cycles == "boolean" ? e.cycles : !1, n = e.cmp && function(o) {
1602
1593
  return function(r) {
@@ -1634,12 +1625,12 @@ var kn = function(t, e) {
1634
1625
  }
1635
1626
  }(t);
1636
1627
  };
1637
- const fs = /* @__PURE__ */ yt(kn);
1628
+ const fs = /* @__PURE__ */ mt(Nn);
1638
1629
  var xe;
1639
1630
  (function(t) {
1640
1631
  t.mp_debug = "mp_debug";
1641
1632
  })(xe || (xe = {}));
1642
- const Nn = () => {
1633
+ const kn = () => {
1643
1634
  try {
1644
1635
  return window !== window.top;
1645
1636
  } catch {
@@ -1649,7 +1640,7 @@ const Nn = () => {
1649
1640
  version: Le,
1650
1641
  metaframes: {}
1651
1642
  };
1652
- class Hn extends Rt.EventEmitter {
1643
+ class Hn extends Ot.EventEmitter {
1653
1644
  constructor() {
1654
1645
  super(), this._definition = ps, this.getDefinition = this.getDefinition.bind(this);
1655
1646
  }
@@ -1664,14 +1655,14 @@ const Ge = (t, e) => e ? M(t, (s) => {
1664
1655
  Object.keys(e).forEach((n) => {
1665
1656
  e[n] === void 0 ? delete s[n] : s[n] = e[n];
1666
1657
  });
1667
- }) : t, ji = (t) => window.location.search ? new URLSearchParams(window.location.search).get(t) : null, Ui = () => new URLSearchParams(window.location.search).has(xe.mp_debug), dt = () => {
1658
+ }) : t, ji = (t) => window.location.search ? new URLSearchParams(window.location.search).get(t) : null, Ui = () => new URLSearchParams(window.location.search).has(xe.mp_debug), ht = () => {
1668
1659
  const t = new URLSearchParams(window.location.search).get(xe.mp_debug);
1669
1660
  return t === "true" || t === "1";
1670
- }, Bi = (t = 8) => At(t), jn = (t = 8) => At(t), Fi = (t = 8) => At(t), Ut = "abcdefghijklmnopqrstuvwxyz0123456789", At = (t = 8) => {
1671
- for (var e = "", s = Ut.length, n = 0; n < t; n++)
1672
- e += Ut.charAt(Math.floor(Math.random() * s));
1661
+ }, Bi = (t = 8) => St(t), jn = (t = 8) => St(t), Fi = (t = 8) => St(t), jt = "abcdefghijklmnopqrstuvwxyz0123456789", St = (t = 8) => {
1662
+ for (var e = "", s = jt.length, n = 0; n < t; n++)
1663
+ e += jt.charAt(Math.floor(Math.random() * s));
1673
1664
  return e;
1674
- }, Et = (t, e, s) => {
1665
+ }, At = (t, e, s) => {
1675
1666
  e = e || "000", e && e.trim() == "" && (e = void 0);
1676
1667
  let n;
1677
1668
  if (typeof t == "string" ? n = t : typeof t == "number" ? n = t + "" : n = JSON.stringify(t, null, " "), e && e.trim() != "") {
@@ -1720,9 +1711,9 @@ var F;
1720
1711
  (function(t) {
1721
1712
  t.Connected = "connected", t.Error = "error", t.Input = "input", t.Inputs = "inputs", t.Message = "message";
1722
1713
  })(F || (F = {}));
1723
- class ie extends Rt.EventEmitter {
1714
+ class ie extends Ot.EventEmitter {
1724
1715
  constructor(e) {
1725
- if (super(), this._inputPipeValues = {}, this._outputPipeValues = {}, this._state = ae.WaitingForPageLoad, this._messageSendCount = 0, this.debug = dt(), this.isInputOutputBlobSerialization = !0, this.id = window.name, this.debug = dt(), this._isIframe = Nn(), 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) {
1716
+ if (super(), this._inputPipeValues = {}, this._outputPipeValues = {}, this._state = ae.WaitingForPageLoad, this._messageSendCount = 0, this.debug = ht(), this.isInputOutputBlobSerialization = !0, this.id = window.name, this.debug = ht(), this._isIframe = kn(), 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) {
1726
1717
  this.log("Not an iframe, metaframe code disabled");
1727
1718
  return;
1728
1719
  }
@@ -1771,7 +1762,7 @@ class ie extends Rt.EventEmitter {
1771
1762
  }
1772
1763
  logInternal(e, s, n) {
1773
1764
  let i;
1774
- typeof e == "string" ? i = e : typeof e == "number" ? i = e + "" : i = JSON.stringify(e), s = s && s + "", i = (this.id ? `Metaframe[${this.id}] ` : "") + `${i}`, Et(i, s, n);
1765
+ typeof e == "string" ? i = e : typeof e == "number" ? i = e + "" : i = JSON.stringify(e), s = s && s + "", i = (this.id ? `Metaframe[${this.id}] ` : "") + `${i}`, At(i, s, n);
1775
1766
  }
1776
1767
  dispose() {
1777
1768
  super.removeAllListeners(), window.removeEventListener("message", this.onMessage), this.disableNotifyOnHashUrlChange(), this._inputPipeValues = void 0, this._outputPipeValues = void 0;
@@ -1887,7 +1878,7 @@ class ie extends Rt.EventEmitter {
1887
1878
  Se(e, s);
1888
1879
  }
1889
1880
  getParameter(e) {
1890
- return wn(e);
1881
+ return vn(e);
1891
1882
  }
1892
1883
  setParameterBoolean(e, s) {
1893
1884
  xn(e, s);
@@ -1932,15 +1923,15 @@ ie.MESSAGE = F.Message;
1932
1923
  ie.deserializeInputs = Ce;
1933
1924
  ie.serializeInputs = Ke;
1934
1925
  var qe = {};
1935
- const oe = "\\\\/", Bt = `[^${oe}]`, le = "\\.", Fn = "\\+", zn = "\\?", Qe = "\\/", Gn = "(?=.)", ms = "[^/]", Mt = `(?:${Qe}|$)`, ys = `(?:^|${Qe})`, It = `${le}{1,2}${Mt}`, Jn = `(?!${le})`, Vn = `(?!${ys}${It})`, Wn = `(?!${le}{0,1}${Mt})`, Kn = `(?!${It})`, Xn = `[^.${Qe}]`, qn = `${ms}*?`, Qn = "/", gs = {
1926
+ const oe = "\\\\/", Ut = `[^${oe}]`, le = "\\.", Fn = "\\+", zn = "\\?", Qe = "\\/", Gn = "(?=.)", ms = "[^/]", Et = `(?:${Qe}|$)`, ys = `(?:^|${Qe})`, Mt = `${le}{1,2}${Et}`, Jn = `(?!${le})`, Vn = `(?!${ys}${Mt})`, Wn = `(?!${le}{0,1}${Et})`, Kn = `(?!${Mt})`, Xn = `[^.${Qe}]`, qn = `${ms}*?`, Qn = "/", gs = {
1936
1927
  DOT_LITERAL: le,
1937
1928
  PLUS_LITERAL: Fn,
1938
1929
  QMARK_LITERAL: zn,
1939
1930
  SLASH_LITERAL: Qe,
1940
1931
  ONE_CHAR: Gn,
1941
1932
  QMARK: ms,
1942
- END_ANCHOR: Mt,
1943
- DOTS_SLASH: It,
1933
+ END_ANCHOR: Et,
1934
+ DOTS_SLASH: Mt,
1944
1935
  NO_DOT: Jn,
1945
1936
  NO_DOTS: Vn,
1946
1937
  NO_DOT_SLASH: Wn,
@@ -1952,8 +1943,8 @@ const oe = "\\\\/", Bt = `[^${oe}]`, le = "\\.", Fn = "\\+", zn = "\\?", Qe = "\
1952
1943
  }, Yn = {
1953
1944
  ...gs,
1954
1945
  SLASH_LITERAL: `[${oe}]`,
1955
- QMARK: Bt,
1956
- STAR: `${Bt}*?`,
1946
+ QMARK: Ut,
1947
+ STAR: `${Ut}*?`,
1957
1948
  DOTS_SLASH: `${le}{1,2}(?:[${oe}]|$)`,
1958
1949
  NO_DOT: `(?!${le})`,
1959
1950
  NO_DOTS: `(?!(?:^|[${oe}])${le}{1,2}(?:[${oe}]|$))`,
@@ -2125,7 +2116,7 @@ var Ye = {
2125
2116
  return r.negated === !0 && (c = `(?:^(?!${c}).*$)`), c;
2126
2117
  }, t.basename = (o, { windows: r } = {}) => r ? o.replace(/[\\/]$/, "").replace(/.*[\\/]/, "") : o.replace(/\/$/, "").replace(/.*\//, "");
2127
2118
  })(qe);
2128
- const Ft = qe, {
2119
+ const Bt = qe, {
2129
2120
  CHAR_ASTERISK: st,
2130
2121
  /* * */
2131
2122
  CHAR_AT: ei,
@@ -2136,7 +2127,7 @@ const Ft = qe, {
2136
2127
  /* , */
2137
2128
  CHAR_DOT: nt,
2138
2129
  /* . */
2139
- CHAR_EXCLAMATION_MARK: zt,
2130
+ CHAR_EXCLAMATION_MARK: Ft,
2140
2131
  /* ! */
2141
2132
  CHAR_FORWARD_SLASH: _s,
2142
2133
  /* / */
@@ -2148,31 +2139,31 @@ const Ft = qe, {
2148
2139
  /* [ */
2149
2140
  CHAR_PLUS: ni,
2150
2141
  /* + */
2151
- CHAR_QUESTION_MARK: Gt,
2142
+ CHAR_QUESTION_MARK: zt,
2152
2143
  /* ? */
2153
2144
  CHAR_RIGHT_CURLY_BRACE: ii,
2154
2145
  /* } */
2155
- CHAR_RIGHT_PARENTHESES: Jt,
2146
+ CHAR_RIGHT_PARENTHESES: Gt,
2156
2147
  /* ) */
2157
2148
  CHAR_RIGHT_SQUARE_BRACKET: ri
2158
2149
  /* ] */
2159
- } = Ye, Vt = (t) => t === _s || t === Me, Wt = (t) => {
2150
+ } = Ye, Jt = (t) => t === _s || t === Me, Vt = (t) => {
2160
2151
  t.isPrefix !== !0 && (t.depth = t.isGlobstar ? 1 / 0 : 1);
2161
2152
  }, oi = (t, e) => {
2162
2153
  const s = e || {}, n = t.length - 1, i = s.parts === !0 || s.scanToEnd === !0, o = [], r = [], a = [];
2163
- let u = t, l = -1, c = 0, p = 0, m = !1, _ = !1, y = !1, O = !1, R = !1, $ = !1, v = !1, A = !1, C = !1, S = 0, N, E, w = { value: "", depth: 0, isGlob: !1 };
2164
- const x = () => l >= n, d = () => u.charCodeAt(l + 1), T = () => (N = E, u.charCodeAt(++l));
2154
+ let u = t, l = -1, c = 0, p = 0, m = !1, _ = !1, y = !1, O = !1, R = !1, $ = !1, w = !1, A = !1, C = !1, S = 0, k, E, v = { value: "", depth: 0, isGlob: !1 };
2155
+ const x = () => l >= n, d = () => u.charCodeAt(l + 1), T = () => (k = E, u.charCodeAt(++l));
2165
2156
  for (; l < n; ) {
2166
2157
  E = T();
2167
2158
  let V;
2168
2159
  if (E === Me) {
2169
- v = w.backslashes = !0, E = T(), E === it && ($ = !0);
2160
+ w = v.backslashes = !0, E = T(), E === it && ($ = !0);
2170
2161
  continue;
2171
2162
  }
2172
2163
  if ($ === !0 || E === it) {
2173
2164
  for (S++; x() !== !0 && (E = T()); ) {
2174
2165
  if (E === Me) {
2175
- v = w.backslashes = !0, T();
2166
+ w = v.backslashes = !0, T();
2176
2167
  continue;
2177
2168
  }
2178
2169
  if (E === it) {
@@ -2180,17 +2171,17 @@ const Ft = qe, {
2180
2171
  continue;
2181
2172
  }
2182
2173
  if ($ !== !0 && E === nt && (E = T()) === nt) {
2183
- if (m = w.isBrace = !0, y = w.isGlob = !0, C = !0, i === !0)
2174
+ if (m = v.isBrace = !0, y = v.isGlob = !0, C = !0, i === !0)
2184
2175
  continue;
2185
2176
  break;
2186
2177
  }
2187
2178
  if ($ !== !0 && E === ti) {
2188
- if (m = w.isBrace = !0, y = w.isGlob = !0, C = !0, i === !0)
2179
+ if (m = v.isBrace = !0, y = v.isGlob = !0, C = !0, i === !0)
2189
2180
  continue;
2190
2181
  break;
2191
2182
  }
2192
2183
  if (E === ii && (S--, S === 0)) {
2193
- $ = !1, m = w.isBrace = !0, C = !0;
2184
+ $ = !1, m = v.isBrace = !0, C = !0;
2194
2185
  break;
2195
2186
  }
2196
2187
  }
@@ -2199,24 +2190,24 @@ const Ft = qe, {
2199
2190
  break;
2200
2191
  }
2201
2192
  if (E === _s) {
2202
- if (o.push(l), r.push(w), w = { value: "", depth: 0, isGlob: !1 }, C === !0)
2193
+ if (o.push(l), r.push(v), v = { value: "", depth: 0, isGlob: !1 }, C === !0)
2203
2194
  continue;
2204
- if (N === nt && l === c + 1) {
2195
+ if (k === nt && l === c + 1) {
2205
2196
  c += 2;
2206
2197
  continue;
2207
2198
  }
2208
2199
  p = l + 1;
2209
2200
  continue;
2210
2201
  }
2211
- if (s.noext !== !0 && (E === ni || E === ei || E === st || E === Gt || E === zt) === !0 && d() === rt) {
2212
- if (y = w.isGlob = !0, O = w.isExtglob = !0, C = !0, i === !0) {
2202
+ if (s.noext !== !0 && (E === ni || E === ei || E === st || E === zt || E === Ft) === !0 && d() === rt) {
2203
+ if (y = v.isGlob = !0, O = v.isExtglob = !0, C = !0, i === !0) {
2213
2204
  for (; x() !== !0 && (E = T()); ) {
2214
2205
  if (E === Me) {
2215
- v = w.backslashes = !0, E = T();
2206
+ w = v.backslashes = !0, E = T();
2216
2207
  continue;
2217
2208
  }
2218
- if (E === Jt) {
2219
- y = w.isGlob = !0, C = !0;
2209
+ if (E === Gt) {
2210
+ y = v.isGlob = !0, C = !0;
2220
2211
  break;
2221
2212
  }
2222
2213
  }
@@ -2225,39 +2216,39 @@ const Ft = qe, {
2225
2216
  break;
2226
2217
  }
2227
2218
  if (E === st) {
2228
- if (N === st && (R = w.isGlobstar = !0), y = w.isGlob = !0, C = !0, i === !0)
2219
+ if (k === st && (R = v.isGlobstar = !0), y = v.isGlob = !0, C = !0, i === !0)
2229
2220
  continue;
2230
2221
  break;
2231
2222
  }
2232
- if (E === Gt) {
2233
- if (y = w.isGlob = !0, C = !0, i === !0)
2223
+ if (E === zt) {
2224
+ if (y = v.isGlob = !0, C = !0, i === !0)
2234
2225
  continue;
2235
2226
  break;
2236
2227
  }
2237
2228
  if (E === si)
2238
2229
  for (; x() !== !0 && (V = T()); ) {
2239
2230
  if (V === Me) {
2240
- v = w.backslashes = !0, T();
2231
+ w = v.backslashes = !0, T();
2241
2232
  continue;
2242
2233
  }
2243
2234
  if (V === ri) {
2244
- if (_ = w.isBracket = !0, y = w.isGlob = !0, C = !0, i === !0)
2235
+ if (_ = v.isBracket = !0, y = v.isGlob = !0, C = !0, i === !0)
2245
2236
  continue;
2246
2237
  break;
2247
2238
  }
2248
2239
  }
2249
- if (s.nonegate !== !0 && E === zt && l === c) {
2250
- A = w.negated = !0, c++;
2240
+ if (s.nonegate !== !0 && E === Ft && l === c) {
2241
+ A = v.negated = !0, c++;
2251
2242
  continue;
2252
2243
  }
2253
2244
  if (s.noparen !== !0 && E === rt) {
2254
- if (y = w.isGlob = !0, i === !0) {
2245
+ if (y = v.isGlob = !0, i === !0) {
2255
2246
  for (; x() !== !0 && (E = T()); ) {
2256
2247
  if (E === rt) {
2257
- v = w.backslashes = !0, E = T();
2248
+ w = v.backslashes = !0, E = T();
2258
2249
  continue;
2259
2250
  }
2260
- if (E === Jt) {
2251
+ if (E === Gt) {
2261
2252
  C = !0;
2262
2253
  break;
2263
2254
  }
@@ -2274,7 +2265,7 @@ const Ft = qe, {
2274
2265
  }
2275
2266
  s.noext === !0 && (O = !1, y = !1);
2276
2267
  let H = u, Z = "", f = "";
2277
- c > 0 && (Z = u.slice(0, c), u = u.slice(c), p -= c), H && y === !0 && p > 0 ? (H = u.slice(0, p), f = u.slice(p)) : y === !0 ? (H = "", f = u) : H = u, H && H !== "" && H !== "/" && H !== u && Vt(H.charCodeAt(H.length - 1)) && (H = H.slice(0, -1)), s.unescape === !0 && (f && (f = Ft.removeBackslashes(f)), H && v === !0 && (H = Ft.removeBackslashes(H)));
2268
+ c > 0 && (Z = u.slice(0, c), u = u.slice(c), p -= c), H && y === !0 && p > 0 ? (H = u.slice(0, p), f = u.slice(p)) : y === !0 ? (H = "", f = u) : H = u, H && H !== "" && H !== "/" && H !== u && Jt(H.charCodeAt(H.length - 1)) && (H = H.slice(0, -1)), s.unescape === !0 && (f && (f = Bt.removeBackslashes(f)), H && w === !0 && (H = Bt.removeBackslashes(H)));
2278
2269
  const h = {
2279
2270
  prefix: Z,
2280
2271
  input: t,
@@ -2288,15 +2279,15 @@ const Ft = qe, {
2288
2279
  isGlobstar: R,
2289
2280
  negated: A
2290
2281
  };
2291
- if (s.tokens === !0 && (h.maxDepth = 0, Vt(E) || r.push(w), h.tokens = r), s.parts === !0 || s.tokens === !0) {
2282
+ if (s.tokens === !0 && (h.maxDepth = 0, Jt(E) || r.push(v), h.tokens = r), s.parts === !0 || s.tokens === !0) {
2292
2283
  let V;
2293
- for (let k = 0; k < o.length; k++) {
2294
- const re = V ? V + 1 : c, ce = o[k], q = t.slice(re, ce);
2295
- s.tokens && (k === 0 && c !== 0 ? (r[k].isPrefix = !0, r[k].value = Z) : r[k].value = q, Wt(r[k]), h.maxDepth += r[k].depth), (k !== 0 || q !== "") && a.push(q), V = ce;
2284
+ for (let N = 0; N < o.length; N++) {
2285
+ const re = V ? V + 1 : c, ce = o[N], q = t.slice(re, ce);
2286
+ s.tokens && (N === 0 && c !== 0 ? (r[N].isPrefix = !0, r[N].value = Z) : r[N].value = q, Vt(r[N]), h.maxDepth += r[N].depth), (N !== 0 || q !== "") && a.push(q), V = ce;
2296
2287
  }
2297
2288
  if (V && V + 1 < t.length) {
2298
- const k = t.slice(V + 1);
2299
- a.push(k), s.tokens && (r[r.length - 1].value = k, Wt(r[r.length - 1]), h.maxDepth += r[r.length - 1].depth);
2289
+ const N = t.slice(V + 1);
2290
+ a.push(N), s.tokens && (r[r.length - 1].value = N, Vt(r[r.length - 1]), h.maxDepth += r[r.length - 1].depth);
2300
2291
  }
2301
2292
  h.slashes = o, h.parts = a;
2302
2293
  }
@@ -2320,7 +2311,7 @@ const Je = Ye, se = qe, {
2320
2311
  return t.map((i) => se.escapeRegex(i)).join("..");
2321
2312
  }
2322
2313
  return s;
2323
- }, ve = (t, e) => `Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`, ws = (t, e) => {
2314
+ }, we = (t, e) => `Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`, vs = (t, e) => {
2324
2315
  if (typeof t != "string")
2325
2316
  throw new TypeError("Expected a string");
2326
2317
  t = bs[t] || t;
@@ -2337,12 +2328,12 @@ const Je = Ye, se = qe, {
2337
2328
  NO_DOT: O,
2338
2329
  NO_DOT_SLASH: R,
2339
2330
  NO_DOTS_SLASH: $,
2340
- QMARK: v,
2331
+ QMARK: w,
2341
2332
  QMARK_NO_DOT: A,
2342
2333
  STAR: C,
2343
2334
  START_ANCHOR: S
2344
- } = u, N = (b) => `(${a}(?:(?!${S}${b.dot ? y : c}).)*?)`, E = s.dot ? "" : O, w = s.dot ? v : A;
2345
- let x = s.bash === !0 ? N(s) : C;
2335
+ } = u, k = (b) => `(${a}(?:(?!${S}${b.dot ? y : c}).)*?)`, E = s.dot ? "" : O, v = s.dot ? w : A;
2336
+ let x = s.bash === !0 ? k(s) : C;
2346
2337
  s.capture && (x = `(${x})`), typeof s.noext == "boolean" && (s.noextglob = s.noext);
2347
2338
  const d = {
2348
2339
  input: t,
@@ -2364,16 +2355,16 @@ const Je = Ye, se = qe, {
2364
2355
  t = se.removePrefix(t, d), i = t.length;
2365
2356
  const T = [], H = [], Z = [];
2366
2357
  let f = o, h;
2367
- const V = () => d.index === i - 1, k = d.peek = (b = 1) => t[d.index + b], re = d.advance = () => t[++d.index], ce = () => t.slice(d.index + 1), q = (b = "", j = 0) => {
2358
+ const V = () => d.index === i - 1, N = d.peek = (b = 1) => t[d.index + b], re = d.advance = () => t[++d.index], ce = () => t.slice(d.index + 1), q = (b = "", j = 0) => {
2368
2359
  d.consumed += b, d.index += j;
2369
2360
  }, De = (b) => {
2370
2361
  d.output += b.output != null ? b.output : b.value, q(b.value);
2371
2362
  }, Rs = () => {
2372
2363
  let b = 1;
2373
- for (; k() === "!" && (k(2) !== "(" || k(3) === "?"); )
2364
+ for (; N() === "!" && (N(2) !== "(" || N(3) === "?"); )
2374
2365
  re(), d.start++, b++;
2375
2366
  return b % 2 === 0 ? !1 : (d.negated = !0, d.start++, !0);
2376
- }, ke = (b) => {
2367
+ }, Ne = (b) => {
2377
2368
  d[b]++, Z.push(b);
2378
2369
  }, ye = (b) => {
2379
2370
  d[b]--, Z.pop();
@@ -2387,28 +2378,28 @@ const Je = Ye, se = qe, {
2387
2378
  return;
2388
2379
  }
2389
2380
  b.prev = f, r.push(b), f = b;
2390
- }, Ne = (b, j) => {
2381
+ }, ke = (b, j) => {
2391
2382
  const g = { ...l[j], conditions: 1, inner: "" };
2392
2383
  g.prev = f, g.parens = d.parens, g.output = d.output;
2393
2384
  const D = (s.capture ? "(" : "") + g.open;
2394
- ke("parens"), L({ type: b, value: j, output: d.output ? "" : _ }), L({ type: "paren", extglob: !0, value: re(), output: D }), T.push(g);
2385
+ Ne("parens"), L({ type: b, value: j, output: d.output ? "" : _ }), L({ type: "paren", extglob: !0, value: re(), output: D }), T.push(g);
2395
2386
  }, Ss = (b) => {
2396
2387
  let j = b.close + (s.capture ? ")" : "");
2397
2388
  if (b.type === "negate") {
2398
2389
  let g = x;
2399
- b.inner && b.inner.length > 1 && b.inner.includes("/") && (g = N(s)), (g !== x || V() || /^\)+$/.test(ce())) && (j = b.close = `)$))${g}`), b.prev.type === "bos" && V() && (d.negatedExtglob = !0);
2390
+ b.inner && b.inner.length > 1 && b.inner.includes("/") && (g = k(s)), (g !== x || V() || /^\)+$/.test(ce())) && (j = b.close = `)$))${g}`), b.prev.type === "bos" && V() && (d.negatedExtglob = !0);
2400
2391
  }
2401
2392
  L({ type: "paren", extglob: !0, value: h, output: j }), ye("parens");
2402
2393
  };
2403
2394
  if (s.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(t)) {
2404
- let b = !1, j = t.replace(li, (g, D, B, W, J, Ze) => W === "\\" ? (b = !0, g) : W === "?" ? D ? D + W + (J ? v.repeat(J.length) : "") : Ze === 0 ? w + (J ? v.repeat(J.length) : "") : v.repeat(B.length) : W === "." ? c.repeat(B.length) : W === "*" ? D ? D + W + (J ? x : "") : x : D ? g : `\\${g}`);
2395
+ let b = !1, j = t.replace(li, (g, D, B, W, J, Ze) => W === "\\" ? (b = !0, g) : W === "?" ? D ? D + W + (J ? w.repeat(J.length) : "") : Ze === 0 ? v + (J ? w.repeat(J.length) : "") : w.repeat(B.length) : W === "." ? c.repeat(B.length) : W === "*" ? D ? D + W + (J ? x : "") : x : D ? g : `\\${g}`);
2405
2396
  return b === !0 && (s.unescape === !0 ? j = j.replace(/\\/g, "") : j = j.replace(/\\+/g, (g) => g.length % 2 === 0 ? "\\\\" : g ? "\\" : "")), j === t && s.contains === !0 ? (d.output = t, d) : (d.output = se.wrapOutput(j, d, e), d);
2406
2397
  }
2407
2398
  for (; !V(); ) {
2408
2399
  if (h = re(), h === "\0")
2409
2400
  continue;
2410
2401
  if (h === "\\") {
2411
- const g = k();
2402
+ const g = N();
2412
2403
  if (g === "/" && s.bash !== !0 || g === "." || g === ";")
2413
2404
  continue;
2414
2405
  if (!g) {
@@ -2433,7 +2424,7 @@ const Je = Ye, se = qe, {
2433
2424
  }
2434
2425
  }
2435
2426
  }
2436
- (h === "[" && k() !== ":" || h === "-" && k() === "]") && (h = `\\${h}`), h === "]" && (f.value === "[" || f.value === "[^") && (h = `\\${h}`), s.posix === !0 && h === "!" && f.value === "[" && (h = "^"), f.value += h, De({ value: h });
2427
+ (h === "[" && N() !== ":" || h === "-" && N() === "]") && (h = `\\${h}`), h === "]" && (f.value === "[" || f.value === "[^") && (h = `\\${h}`), s.posix === !0 && h === "!" && f.value === "[" && (h = "^"), f.value += h, De({ value: h });
2437
2428
  continue;
2438
2429
  }
2439
2430
  if (d.quotes === 1 && h !== '"') {
@@ -2445,12 +2436,12 @@ const Je = Ye, se = qe, {
2445
2436
  continue;
2446
2437
  }
2447
2438
  if (h === "(") {
2448
- ke("parens"), L({ type: "paren", value: h });
2439
+ Ne("parens"), L({ type: "paren", value: h });
2449
2440
  continue;
2450
2441
  }
2451
2442
  if (h === ")") {
2452
2443
  if (d.parens === 0 && s.strictBrackets === !0)
2453
- throw new SyntaxError(ve("opening", "("));
2444
+ throw new SyntaxError(we("opening", "("));
2454
2445
  const g = T[T.length - 1];
2455
2446
  if (g && d.parens === g.parens + 1) {
2456
2447
  Ss(T.pop());
@@ -2462,10 +2453,10 @@ const Je = Ye, se = qe, {
2462
2453
  if (h === "[") {
2463
2454
  if (s.nobracket === !0 || !ce().includes("]")) {
2464
2455
  if (s.nobracket !== !0 && s.strictBrackets === !0)
2465
- throw new SyntaxError(ve("closing", "]"));
2456
+ throw new SyntaxError(we("closing", "]"));
2466
2457
  h = `\\${h}`;
2467
2458
  } else
2468
- ke("brackets");
2459
+ Ne("brackets");
2469
2460
  L({ type: "bracket", value: h });
2470
2461
  continue;
2471
2462
  }
@@ -2476,7 +2467,7 @@ const Je = Ye, se = qe, {
2476
2467
  }
2477
2468
  if (d.brackets === 0) {
2478
2469
  if (s.strictBrackets === !0)
2479
- throw new SyntaxError(ve("opening", "["));
2470
+ throw new SyntaxError(we("opening", "["));
2480
2471
  L({ type: "text", value: h, output: `\\${h}` });
2481
2472
  continue;
2482
2473
  }
@@ -2493,7 +2484,7 @@ const Je = Ye, se = qe, {
2493
2484
  continue;
2494
2485
  }
2495
2486
  if (h === "{" && s.nobrace !== !0) {
2496
- ke("braces");
2487
+ Ne("braces");
2497
2488
  const g = {
2498
2489
  type: "brace",
2499
2490
  value: h,
@@ -2559,12 +2550,12 @@ const Je = Ye, se = qe, {
2559
2550
  continue;
2560
2551
  }
2561
2552
  if (h === "?") {
2562
- if (!(f && f.value === "(") && s.noextglob !== !0 && k() === "(" && k(2) !== "?") {
2563
- Ne("qmark", h);
2553
+ if (!(f && f.value === "(") && s.noextglob !== !0 && N() === "(" && N(2) !== "?") {
2554
+ ke("qmark", h);
2564
2555
  continue;
2565
2556
  }
2566
2557
  if (f && f.type === "paren") {
2567
- const D = k();
2558
+ const D = N();
2568
2559
  let B = h;
2569
2560
  if (D === "<" && !se.supportsLookbehinds())
2570
2561
  throw new Error("Node.js v10 or higher is required for regex lookbehinds");
@@ -2575,12 +2566,12 @@ const Je = Ye, se = qe, {
2575
2566
  L({ type: "qmark", value: h, output: A });
2576
2567
  continue;
2577
2568
  }
2578
- L({ type: "qmark", value: h, output: v });
2569
+ L({ type: "qmark", value: h, output: w });
2579
2570
  continue;
2580
2571
  }
2581
2572
  if (h === "!") {
2582
- if (s.noextglob !== !0 && k() === "(" && (k(2) !== "?" || !/[!=<:]/.test(k(3)))) {
2583
- Ne("negate", h);
2573
+ if (s.noextglob !== !0 && N() === "(" && (N(2) !== "?" || !/[!=<:]/.test(N(3)))) {
2574
+ ke("negate", h);
2584
2575
  continue;
2585
2576
  }
2586
2577
  if (s.nonegate !== !0 && d.index === 0) {
@@ -2589,8 +2580,8 @@ const Je = Ye, se = qe, {
2589
2580
  }
2590
2581
  }
2591
2582
  if (h === "+") {
2592
- if (s.noextglob !== !0 && k() === "(" && k(2) !== "?") {
2593
- Ne("plus", h);
2583
+ if (s.noextglob !== !0 && N() === "(" && N(2) !== "?") {
2584
+ ke("plus", h);
2594
2585
  continue;
2595
2586
  }
2596
2587
  if (f && f.value === "(" || s.regex === !1) {
@@ -2605,7 +2596,7 @@ const Je = Ye, se = qe, {
2605
2596
  continue;
2606
2597
  }
2607
2598
  if (h === "@") {
2608
- if (s.noextglob !== !0 && k() === "(" && k(2) !== "?") {
2599
+ if (s.noextglob !== !0 && N() === "(" && N(2) !== "?") {
2609
2600
  L({ type: "at", extglob: !0, value: h, output: "" });
2610
2601
  continue;
2611
2602
  }
@@ -2624,7 +2615,7 @@ const Je = Ye, se = qe, {
2624
2615
  }
2625
2616
  let b = ce();
2626
2617
  if (s.noextglob !== !0 && /^\([^?]/.test(b)) {
2627
- Ne("star", h);
2618
+ ke("star", h);
2628
2619
  continue;
2629
2620
  }
2630
2621
  if (f.type === "star") {
@@ -2649,23 +2640,23 @@ const Je = Ye, se = qe, {
2649
2640
  b = b.slice(3), q("/**", 3);
2650
2641
  }
2651
2642
  if (g.type === "bos" && V()) {
2652
- f.type = "globstar", f.value += h, f.output = N(s), d.output = f.output, d.globstar = !0, q(h);
2643
+ f.type = "globstar", f.value += h, f.output = k(s), d.output = f.output, d.globstar = !0, q(h);
2653
2644
  continue;
2654
2645
  }
2655
2646
  if (g.type === "slash" && g.prev.type !== "bos" && !W && V()) {
2656
- d.output = d.output.slice(0, -(g.output + f.output).length), g.output = `(?:${g.output}`, f.type = "globstar", f.output = N(s) + (s.strictSlashes ? ")" : "|$)"), f.value += h, d.globstar = !0, d.output += g.output + f.output, q(h);
2647
+ d.output = d.output.slice(0, -(g.output + f.output).length), g.output = `(?:${g.output}`, f.type = "globstar", f.output = k(s) + (s.strictSlashes ? ")" : "|$)"), f.value += h, d.globstar = !0, d.output += g.output + f.output, q(h);
2657
2648
  continue;
2658
2649
  }
2659
2650
  if (g.type === "slash" && g.prev.type !== "bos" && b[0] === "/") {
2660
2651
  const He = b[1] !== void 0 ? "|$" : "";
2661
- d.output = d.output.slice(0, -(g.output + f.output).length), g.output = `(?:${g.output}`, f.type = "globstar", f.output = `${N(s)}${m}|${m}${He})`, f.value += h, d.output += g.output + f.output, d.globstar = !0, q(h + re()), L({ type: "slash", value: "/", output: "" });
2652
+ d.output = d.output.slice(0, -(g.output + f.output).length), g.output = `(?:${g.output}`, f.type = "globstar", f.output = `${k(s)}${m}|${m}${He})`, f.value += h, d.output += g.output + f.output, d.globstar = !0, q(h + re()), L({ type: "slash", value: "/", output: "" });
2662
2653
  continue;
2663
2654
  }
2664
2655
  if (g.type === "bos" && b[0] === "/") {
2665
- f.type = "globstar", f.value += h, f.output = `(?:^|${m}|${N(s)}${m})`, d.output = f.output, d.globstar = !0, q(h + re()), L({ type: "slash", value: "/", output: "" });
2656
+ f.type = "globstar", f.value += h, f.output = `(?:^|${m}|${k(s)}${m})`, d.output = f.output, d.globstar = !0, q(h + re()), L({ type: "slash", value: "/", output: "" });
2666
2657
  continue;
2667
2658
  }
2668
- d.output = d.output.slice(0, -f.output.length), f.type = "globstar", f.output = N(s), f.value += h, d.output += f.output, d.globstar = !0, q(h);
2659
+ d.output = d.output.slice(0, -f.output.length), f.type = "globstar", f.output = k(s), f.value += h, d.output += f.output, d.globstar = !0, q(h);
2669
2660
  continue;
2670
2661
  }
2671
2662
  const j = { type: "star", value: h, output: x };
@@ -2677,21 +2668,21 @@ const Je = Ye, se = qe, {
2677
2668
  j.output = h, L(j);
2678
2669
  continue;
2679
2670
  }
2680
- (d.index === d.start || f.type === "slash" || f.type === "dot") && (f.type === "dot" ? (d.output += R, f.output += R) : s.dot === !0 ? (d.output += $, f.output += $) : (d.output += E, f.output += E), k() !== "*" && (d.output += _, f.output += _)), L(j);
2671
+ (d.index === d.start || f.type === "slash" || f.type === "dot") && (f.type === "dot" ? (d.output += R, f.output += R) : s.dot === !0 ? (d.output += $, f.output += $) : (d.output += E, f.output += E), N() !== "*" && (d.output += _, f.output += _)), L(j);
2681
2672
  }
2682
2673
  for (; d.brackets > 0; ) {
2683
2674
  if (s.strictBrackets === !0)
2684
- throw new SyntaxError(ve("closing", "]"));
2675
+ throw new SyntaxError(we("closing", "]"));
2685
2676
  d.output = se.escapeLast(d.output, "["), ye("brackets");
2686
2677
  }
2687
2678
  for (; d.parens > 0; ) {
2688
2679
  if (s.strictBrackets === !0)
2689
- throw new SyntaxError(ve("closing", ")"));
2680
+ throw new SyntaxError(we("closing", ")"));
2690
2681
  d.output = se.escapeLast(d.output, "("), ye("parens");
2691
2682
  }
2692
2683
  for (; d.braces > 0; ) {
2693
2684
  if (s.strictBrackets === !0)
2694
- throw new SyntaxError(ve("closing", "}"));
2685
+ throw new SyntaxError(we("closing", "}"));
2695
2686
  d.output = se.escapeLast(d.output, "{"), ye("braces");
2696
2687
  }
2697
2688
  if (s.strictSlashes !== !0 && (f.type === "star" || f.type === "bracket") && L({ type: "maybe_slash", value: "", output: `${m}?` }), d.backtrack === !0) {
@@ -2701,7 +2692,7 @@ const Je = Ye, se = qe, {
2701
2692
  }
2702
2693
  return d;
2703
2694
  };
2704
- ws.fastpaths = (t, e) => {
2695
+ vs.fastpaths = (t, e) => {
2705
2696
  const s = { ...e }, n = typeof s.maxLength == "number" ? Math.min(Ve, s.maxLength) : Ve, i = t.length;
2706
2697
  if (i > n)
2707
2698
  throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);
@@ -2717,40 +2708,40 @@ ws.fastpaths = (t, e) => {
2717
2708
  STAR: m,
2718
2709
  START_ANCHOR: _
2719
2710
  } = Je.globChars(s.windows), y = s.dot ? c : l, O = s.dot ? p : l, R = s.capture ? "" : "?:", $ = { negated: !1, prefix: "" };
2720
- let v = s.bash === !0 ? ".*?" : m;
2721
- s.capture && (v = `(${v})`);
2722
- const A = (E) => E.noglobstar === !0 ? v : `(${R}(?:(?!${_}${E.dot ? u : o}).)*?)`, C = (E) => {
2711
+ let w = s.bash === !0 ? ".*?" : m;
2712
+ s.capture && (w = `(${w})`);
2713
+ const A = (E) => E.noglobstar === !0 ? w : `(${R}(?:(?!${_}${E.dot ? u : o}).)*?)`, C = (E) => {
2723
2714
  switch (E) {
2724
2715
  case "*":
2725
- return `${y}${a}${v}`;
2716
+ return `${y}${a}${w}`;
2726
2717
  case ".*":
2727
- return `${o}${a}${v}`;
2718
+ return `${o}${a}${w}`;
2728
2719
  case "*.*":
2729
- return `${y}${v}${o}${a}${v}`;
2720
+ return `${y}${w}${o}${a}${w}`;
2730
2721
  case "*/*":
2731
- return `${y}${v}${r}${a}${O}${v}`;
2722
+ return `${y}${w}${r}${a}${O}${w}`;
2732
2723
  case "**":
2733
2724
  return y + A(s);
2734
2725
  case "**/*":
2735
- return `(?:${y}${A(s)}${r})?${O}${a}${v}`;
2726
+ return `(?:${y}${A(s)}${r})?${O}${a}${w}`;
2736
2727
  case "**/*.*":
2737
- return `(?:${y}${A(s)}${r})?${O}${v}${o}${a}${v}`;
2728
+ return `(?:${y}${A(s)}${r})?${O}${w}${o}${a}${w}`;
2738
2729
  case "**/.*":
2739
- return `(?:${y}${A(s)}${r})?${o}${a}${v}`;
2730
+ return `(?:${y}${A(s)}${r})?${o}${a}${w}`;
2740
2731
  default: {
2741
- const w = /^(.*?)\.(\w+)$/.exec(E);
2742
- if (!w)
2732
+ const v = /^(.*?)\.(\w+)$/.exec(E);
2733
+ if (!v)
2743
2734
  return;
2744
- const x = C(w[1]);
2745
- return x ? x + o + w[2] : void 0;
2735
+ const x = C(v[1]);
2736
+ return x ? x + o + v[2] : void 0;
2746
2737
  }
2747
2738
  }
2748
2739
  }, S = se.removePrefix(t, $);
2749
- let N = C(S);
2750
- return N && s.strictSlashes !== !0 && (N += `${r}?`), N;
2740
+ let k = C(S);
2741
+ return k && s.strictSlashes !== !0 && (k += `${r}?`), k;
2751
2742
  };
2752
- var pi = ws;
2753
- const hi = ai, mt = pi, vs = qe, di = Ye, mi = (t) => t && typeof t == "object" && !Array.isArray(t), G = (t, e, s = !1) => {
2743
+ var pi = vs;
2744
+ const hi = ai, dt = pi, ws = qe, di = Ye, mi = (t) => t && typeof t == "object" && !Array.isArray(t), G = (t, e, s = !1) => {
2754
2745
  if (Array.isArray(t)) {
2755
2746
  const c = t.map((m) => G(m, e, s));
2756
2747
  return (m) => {
@@ -2783,13 +2774,13 @@ G.test = (t, e, s, { glob: n, posix: i } = {}) => {
2783
2774
  throw new TypeError("Expected input to be a string");
2784
2775
  if (t === "")
2785
2776
  return { isMatch: !1, output: "" };
2786
- const o = s || {}, r = o.format || (i ? vs.toPosixSlashes : null);
2777
+ const o = s || {}, r = o.format || (i ? ws.toPosixSlashes : null);
2787
2778
  let a = t === n, u = a && r ? r(t) : t;
2788
2779
  return a === !1 && (u = r ? r(t) : t, a = u === n), (a === !1 || o.capture === !0) && (o.matchBase === !0 || o.basename === !0 ? a = G.matchBase(t, e, s, i) : a = e.exec(u)), { isMatch: !!a, match: a, output: u };
2789
2780
  };
2790
- G.matchBase = (t, e, s) => (e instanceof RegExp ? e : G.makeRe(e, s)).test(vs.basename(t));
2781
+ G.matchBase = (t, e, s) => (e instanceof RegExp ? e : G.makeRe(e, s)).test(ws.basename(t));
2791
2782
  G.isMatch = (t, e, s) => G(e, s)(t);
2792
- G.parse = (t, e) => Array.isArray(t) ? t.map((s) => G.parse(s, e)) : mt(t, { ...e, fastpaths: !1 });
2783
+ G.parse = (t, e) => Array.isArray(t) ? t.map((s) => G.parse(s, e)) : dt(t, { ...e, fastpaths: !1 });
2793
2784
  G.scan = (t, e) => hi(t, e);
2794
2785
  G.compileRe = (t, e, s = !1, n = !1) => {
2795
2786
  if (s === !0)
@@ -2805,7 +2796,7 @@ G.makeRe = (t, e, s = !1, n = !1) => {
2805
2796
  throw new TypeError("Expected a non-empty string");
2806
2797
  const i = e || {};
2807
2798
  let o = { negated: !1, fastpaths: !0 }, r = "", a;
2808
- return t.startsWith("./") && (t = t.slice(2), r = o.prefix = "./"), i.fastpaths !== !1 && (t[0] === "." || t[0] === "*") && (a = mt.fastpaths(t, e)), a === void 0 ? (o = mt(t, e), o.prefix = r + (o.prefix || "")) : o.output = a, G.compileRe(o, e, s, n);
2799
+ return t.startsWith("./") && (t = t.slice(2), r = o.prefix = "./"), i.fastpaths !== !1 && (t[0] === "." || t[0] === "*") && (a = dt.fastpaths(t, e)), a === void 0 ? (o = dt(t, e), o.prefix = r + (o.prefix || "")) : o.output = a, G.compileRe(o, e, s, n);
2809
2800
  };
2810
2801
  G.toRegex = (t, e) => {
2811
2802
  try {
@@ -2819,7 +2810,7 @@ G.toRegex = (t, e) => {
2819
2810
  };
2820
2811
  G.constants = di;
2821
2812
  var yi = G, gi = yi;
2822
- const _i = /* @__PURE__ */ yt(gi), Os = gt(fetch), bi = async (t, e) => {
2813
+ const _i = /* @__PURE__ */ mt(gi), Os = yt(fetch), bi = async (t, e) => {
2823
2814
  const s = new URL(t);
2824
2815
  s.pathname = s.pathname + (s.pathname.endsWith("/") ? "metapage.json" : "/metapage.json");
2825
2816
  const i = await (await Os(s.href, {
@@ -2827,14 +2818,14 @@ const _i = /* @__PURE__ */ yt(gi), Os = gt(fetch), bi = async (t, e) => {
2827
2818
  retries: 3,
2828
2819
  retryDelay: 1e3
2829
2820
  })).json();
2830
- return await ns(i, e || Le);
2831
- }, wi = async (t, e) => {
2821
+ return await ss(i, e || Le);
2822
+ }, vi = async (t, e) => {
2832
2823
  if (t.startsWith("data:") || t.startsWith("https://docs.google.com"))
2833
2824
  return;
2834
2825
  const s = new URL(t);
2835
2826
  if (s.origin.endsWith(".notion.site"))
2836
2827
  return;
2837
- let n = St(t, "definition");
2828
+ let n = Rt(t, "definition");
2838
2829
  if (n != null && n.version)
2839
2830
  return pt(n);
2840
2831
  s.pathname.endsWith("metaframe.json") || (s.pathname = s.pathname + (s.pathname.endsWith("/") ? "metaframe.json" : "/metaframe.json"));
@@ -2847,13 +2838,13 @@ const _i = /* @__PURE__ */ yt(gi), Os = gt(fetch), bi = async (t, e) => {
2847
2838
  if (i.status !== 200)
2848
2839
  return;
2849
2840
  const o = await i.json();
2850
- return await is(o, e || We);
2841
+ return await ns(o, e || We);
2851
2842
  } catch (i) {
2852
2843
  console.error(`Error fetching metaframe definition from ${s.href}: ${i}`);
2853
2844
  return;
2854
2845
  }
2855
2846
  }, Ji = (t) => t ? !(t != null && t.inputs && Object.keys(t.inputs).length > 0 || t != null && t.outputs && Object.keys(t.outputs).length > 0 || t != null && t.allow || t != null && t.metadata && Object.keys(t.metadata).length > 0) : !0;
2856
- class vi extends Rt.EventEmitter {
2847
+ class wi extends Ot.EventEmitter {
2857
2848
  constructor(e, s, n, i, o, r = !1) {
2858
2849
  if (super(), this.inputs = {}, this.outputs = {}, this._disposables = [], this._rpcListeners = [], this._loaded = !1, this._onLoaded = [], this._sendInputsAfterRegistration = !1, this._cachedEventInputsUpdate = {
2859
2850
  iframeId: void 0,
@@ -2879,7 +2870,7 @@ class vi extends Rt.EventEmitter {
2879
2870
  if ((_ = (m = (p = (c = this._metapage) == null ? void 0 : c._definition) == null ? void 0 : p.metaframes) == null ? void 0 : m[this.id]) != null && _.allow)
2880
2871
  u._iframe.allow = this._metapage._definition.metaframes[this.id].allow, this._debug && this.log(`mf allow=${u._iframe.allow} from this._metapage?._definition`);
2881
2872
  else {
2882
- let y = St(this.url, "definition");
2873
+ let y = Rt(this.url, "definition");
2883
2874
  if (y = y && (y != null && y.version) ? await pt(y) : void 0, !u._iframe)
2884
2875
  return;
2885
2876
  if (y != null && y.allow)
@@ -2912,7 +2903,7 @@ class vi extends Rt.EventEmitter {
2912
2903
  if (this._definition)
2913
2904
  return this._definition;
2914
2905
  try {
2915
- const s = await wi(this.url);
2906
+ const s = await vi(this.url);
2916
2907
  if (s)
2917
2908
  return this._definition = s, this._definition;
2918
2909
  } catch (s) {
@@ -2986,7 +2977,7 @@ Error: ${s != null && s.message ? s == null ? void 0 : s.message : s == null ? v
2986
2977
  state: {
2987
2978
  inputs: this.inputs
2988
2979
  },
2989
- version: Kt
2980
+ version: Wt
2990
2981
  };
2991
2982
  this.sendRpcInternal(me.SetupIframeServerResponse, e);
2992
2983
  }
@@ -3031,7 +3022,7 @@ Error: ${s != null && s.message ? s == null ? void 0 : s.message : s == null ? v
3031
3022
  }
3032
3023
  logInternal(e) {
3033
3024
  let s;
3034
- typeof e == "string" ? s = e : typeof e == "string" ? s = e + "" : s = JSON.stringify(e), Et(`Metapage[${this._parentId}] Metaframe[${this.id}] ${s}`, this._color, this._consoleBackgroundColor);
3025
+ typeof e == "string" ? s = e : typeof e == "string" ? s = e + "" : s = JSON.stringify(e), At(`Metapage[${this._parentId}] Metaframe[${this.id}] ${s}`, this._color, this._consoleBackgroundColor);
3035
3026
  }
3036
3027
  sendRpcInternal(e, s) {
3037
3028
  const n = {
@@ -3078,7 +3069,7 @@ class ee extends Hn {
3078
3069
  return n.setDefinition(e);
3079
3070
  }
3080
3071
  constructor(e) {
3081
- super(), this._state = ge, this._metaframes = M({}, (s) => s), this.debug = dt(), this._internalReceivedMessageCounter = 0, this._cachedInputLookupMap = M({}, (s) => s), this._inputMap = {}, this._id = e && e.id ? e.id : jn(), this._consoleBackgroundColor = e && e.color ? e.color : Ri, 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.onMessageJsonRpc = this.onMessageJsonRpc.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.setOutputs = this.setOutputs.bind(this), this.onInputs = this.onInputs.bind(this), this.onOutputs = this.onOutputs.bind(this), this.onState = this.onState.bind(this), this.setMetaframeOutputs = this.setMetaframeOutputs.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.setMetadata = this.setMetadata.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), Xe().then(() => {
3072
+ super(), this._state = ge, this._metaframes = M({}, (s) => s), this.debug = ht(), this._internalReceivedMessageCounter = 0, this._cachedInputLookupMap = M({}, (s) => s), this._inputMap = {}, this._id = e && e.id ? e.id : jn(), this._consoleBackgroundColor = e && e.color ? e.color : Ri, 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.onMessageJsonRpc = this.onMessageJsonRpc.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.setOutputs = this.setOutputs.bind(this), this.onInputs = this.onInputs.bind(this), this.onOutputs = this.onOutputs.bind(this), this.onState = this.onState.bind(this), this.setMetaframeOutputs = this.setMetaframeOutputs.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.setMetadata = this.setMetadata.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), Xe().then(() => {
3082
3073
  this.isDisposed() || (window.addEventListener("message", this.onMessage), this.log("Initialized"));
3083
3074
  });
3084
3075
  }
@@ -3204,7 +3195,7 @@ class ee extends Hn {
3204
3195
  throw this.emitErrorMessage(`Existing metaframe for id=${e}`), `Existing metaframe for id=${e}`;
3205
3196
  if (!s.url)
3206
3197
  throw this.emitErrorMessage(`Metaframe definition missing url id=${e}`), `Metaframe definition missing url id=${e}`;
3207
- var n = new vi(this, s.url, e, this._id, this._consoleBackgroundColor, this.debug).setMetapage(this);
3198
+ var n = new wi(this, s.url, e, this._id, this._consoleBackgroundColor, this.debug).setMetapage(this);
3208
3199
  return this._metaframes = M(this._metaframes, (i) => {
3209
3200
  i[e] = n;
3210
3201
  }), n.addListener(I.Error, (i) => {
@@ -3419,10 +3410,10 @@ class ee extends Hn {
3419
3410
  logInternal(e, s, n) {
3420
3411
  n = n || this._consoleBackgroundColor;
3421
3412
  let i;
3422
- typeof e == "string" ? i = e : typeof e == "number" ? i = e + "" : i = JSON.stringify(e), i = this._id ? `Metapage[${this._id}] ${i}` : i, Et(i, s, n);
3413
+ typeof e == "string" ? i = e : typeof e == "number" ? i = e + "" : i = JSON.stringify(e), i = this._id ? `Metapage[${this._id}] ${i}` : i, At(i, s, n);
3423
3414
  }
3424
3415
  }
3425
- ee.version = Kt;
3416
+ ee.version = Wt;
3426
3417
  ee.DEFINITION = I.Definition;
3427
3418
  ee.ERROR = I.Error;
3428
3419
  ee.INPUTS = I.Inputs;
@@ -3431,7 +3422,7 @@ ee.OUTPUTS = I.Outputs;
3431
3422
  ee.STATE = I.State;
3432
3423
  ee.deserializeInputs = Ce;
3433
3424
  ee.serializeInputs = Ke;
3434
- function Ct(t) {
3425
+ function It(t) {
3435
3426
  return t.startsWith("data:") ? t.includes("type=metapage-divider") : !1;
3436
3427
  }
3437
3428
  function Si(t) {
@@ -3456,7 +3447,7 @@ function Si(t) {
3456
3447
  x: 0,
3457
3448
  y: o,
3458
3449
  w: s.props.cols,
3459
- h: Ct(e.metaframes[i].url) ? 1 : 3
3450
+ h: It(e.metaframes[i].url) ? 1 : 3
3460
3451
  });
3461
3452
  }
3462
3453
  });
@@ -3474,7 +3465,7 @@ const Ai = (t) => {
3474
3465
  throw new Error("No valid layout found in metapage definition");
3475
3466
  const n = /* @__PURE__ */ new Set(), i = s.map((m, _) => {
3476
3467
  const y = t.metaframes[m.i];
3477
- return y && Ct(y.url) ? { index: _, y: m.y, id: m.i } : null;
3468
+ return y && It(y.url) ? { index: _, y: m.y, id: m.i } : null;
3478
3469
  }).filter((m) => m !== null);
3479
3470
  if (i.length > 0) {
3480
3471
  const m = i.reduce((y, O) => O.y < y.y ? O : y), _ = ((p = s.find((y) => y.i === m.id)) == null ? void 0 : p.y) ?? 0;
@@ -3494,7 +3485,7 @@ const Ai = (t) => {
3494
3485
  };
3495
3486
  };
3496
3487
  async function Wi(t) {
3497
- var C, S, N, E;
3488
+ var C, S, k, E;
3498
3489
  let { url: e, definition: s, onOutputs: n, rootDiv: i, options: o = {} } = t;
3499
3490
  if (!e && !s)
3500
3491
  throw new Error("Either url or definition must be provided");
@@ -3507,8 +3498,8 @@ async function Wi(t) {
3507
3498
  r.debug = o.debug || !1;
3508
3499
  try {
3509
3500
  await r.setDefinition(JSON.parse(JSON.stringify(s)));
3510
- } catch (w) {
3511
- throw r.dispose(), new Error(`Failed to set metapage definition: ${w}`);
3501
+ } catch (v) {
3502
+ throw r.dispose(), new Error(`Failed to set metapage definition: ${v}`);
3512
3503
  }
3513
3504
  const a = [];
3514
3505
  n && a.push(r.addListenerReturnDisposer(I.Outputs, n));
@@ -3519,22 +3510,22 @@ async function Wi(t) {
3519
3510
  if (c.length === 0)
3520
3511
  return {
3521
3512
  metapage: r,
3522
- setInputs: (w) => {
3523
- r.isDisposed() || r.setInputs(w);
3513
+ setInputs: (v) => {
3514
+ r.isDisposed() || r.setInputs(v);
3524
3515
  },
3525
- setOutputs: (w) => {
3526
- r.isDisposed() || r.setOutputs(w);
3516
+ setOutputs: (v) => {
3517
+ r.isDisposed() || r.setOutputs(v);
3527
3518
  },
3528
3519
  dispose: () => {
3529
- a.forEach((w) => w()), r.dispose();
3520
+ a.forEach((v) => v()), r.dispose();
3530
3521
  }
3531
3522
  };
3532
- c.sort((w, x) => w.y !== x.y ? w.y - x.y : w.x - x.x);
3523
+ c.sort((v, x) => v.y !== x.y ? v.y - x.y : v.x - x.x);
3533
3524
  const _ = {
3534
3525
  display: "grid",
3535
3526
  gridTemplateColumns: "repeat(1, 1fr)",
3536
3527
  gridAutoRows: "1fr",
3537
- gap: `${((N = u.props.margin) == null ? void 0 : N[0]) || 10}px`,
3528
+ gap: `${((k = u.props.margin) == null ? void 0 : k[0]) || 10}px`,
3538
3529
  width: "100%",
3539
3530
  height: "100%",
3540
3531
  maxHeight: "100%",
@@ -3554,11 +3545,11 @@ async function Wi(t) {
3554
3545
  const R = document.createElement("div");
3555
3546
  Object.assign(R.style, _);
3556
3547
  const $ = [];
3557
- for (const w of m) {
3558
- const x = l.find((f) => f.i === w);
3548
+ for (const v of m) {
3549
+ const x = l.find((f) => f.i === v);
3559
3550
  if (!x)
3560
3551
  continue;
3561
- const d = r.getMetaframes()[w], T = await d.iframe;
3552
+ const d = r.getMetaframes()[v], T = await d.iframe;
3562
3553
  if (!d)
3563
3554
  continue;
3564
3555
  $.push(x);
@@ -3575,29 +3566,29 @@ async function Wi(t) {
3575
3566
  }, Z = document.createElement("div");
3576
3567
  Object.assign(Z.style, H), Z.appendChild(T), R.appendChild(Z);
3577
3568
  }
3578
- const v = Math.max(...$.map((w) => w.x + w.w));
3579
- Math.max(...$.map((w) => w.y + w.h)), R.style.gridTemplateColumns = `repeat(${Math.max(1, v)}, 1fr)`;
3569
+ const w = Math.max(...$.map((v) => v.x + v.w));
3570
+ Math.max(...$.map((v) => v.y + v.h)), R.style.gridTemplateColumns = `repeat(${Math.max(1, w)}, 1fr)`;
3580
3571
  const A = document.createElement("div");
3581
3572
  A.style.position = "absolute", A.style.top = "-9999px", A.style.left = "-9999px", A.style.width = "1px", A.style.height = "1px", A.style.overflow = "hidden", A.style.pointerEvents = "none";
3582
- for (const w of Object.keys(r.getMetaframes()).filter((x) => p.has(x))) {
3583
- const x = r.getMetaframes()[w];
3573
+ for (const v of Object.keys(r.getMetaframes()).filter((x) => p.has(x))) {
3574
+ const x = r.getMetaframes()[v];
3584
3575
  if (!x)
3585
3576
  continue;
3586
3577
  const d = document.createElement("div");
3587
- d.setAttribute("data-metaframe-id", w), d.style.width = "100px", d.style.height = "100px";
3578
+ d.setAttribute("data-metaframe-id", v), d.style.width = "100px", d.style.height = "100px";
3588
3579
  let T;
3589
3580
  x.iframe ? T = await x.iframe : (T = document.createElement("iframe"), T.src = x.url, T.style.border = "none", T.style.width = "100%", T.style.height = "100%"), d.appendChild(T), A.appendChild(d);
3590
3581
  }
3591
3582
  return O.appendChild(R), O.appendChild(A), i.appendChild(O), {
3592
3583
  metapage: r,
3593
- setInputs: (w) => {
3594
- r.isDisposed() || r.setInputs(w);
3584
+ setInputs: (v) => {
3585
+ r.isDisposed() || r.setInputs(v);
3595
3586
  },
3596
- setOutputs: (w) => {
3597
- r.isDisposed() || r.setOutputs(w);
3587
+ setOutputs: (v) => {
3588
+ r.isDisposed() || r.setOutputs(v);
3598
3589
  },
3599
3590
  dispose: () => {
3600
- a.forEach((w) => w()), r.dispose(), O.parentNode && O.parentNode.removeChild(O);
3591
+ a.forEach((v) => v()), r.dispose(), O.parentNode && O.parentNode.removeChild(O);
3601
3592
  }
3602
3593
  };
3603
3594
  }
@@ -3609,7 +3600,7 @@ const Ki = (t, e) => {
3609
3600
  const i = /* @__PURE__ */ new Set(), o = n.map((l, c) => {
3610
3601
  var m;
3611
3602
  const p = (m = t == null ? void 0 : t.metaframes) == null ? void 0 : m[l.i];
3612
- return p && Ct(p.url) ? { index: c, y: l.y, id: l.i } : null;
3603
+ return p && It(p.url) ? { index: c, y: l.y, id: l.i } : null;
3613
3604
  }).filter((l) => l !== null);
3614
3605
  if (o.length > 0) {
3615
3606
  const l = o.reduce((p, m) => m.y < p.y ? m : p), c = ((u = n.find((p) => p.i === l.id)) == null ? void 0 : u.y) ?? 0;
@@ -3641,8 +3632,8 @@ const Ki = (t, e) => {
3641
3632
  };
3642
3633
  export {
3643
3634
  ps as INITIAL_NULL_METAPAGE_DEFINITION,
3644
- Ni as INTERNAL_ERROR,
3645
- ki as INVALID_PARAMS,
3635
+ ki as INTERNAL_ERROR,
3636
+ Ni as INVALID_PARAMS,
3646
3637
  Ti as INVALID_REQUEST,
3647
3638
  K as JsonRpcMethodsFromChild,
3648
3639
  me as JsonRpcMethodsFromParent,
@@ -3654,52 +3645,52 @@ export {
3654
3645
  F as MetaframeEvents,
3655
3646
  ae as MetaframeLoadingState,
3656
3647
  We as MetaframeVersionCurrent,
3657
- $t as MetaframeVersionsAll,
3648
+ Ct as MetaframeVersionsAll,
3658
3649
  ee as Metapage,
3659
3650
  I as MetapageEvents,
3660
3651
  xe as MetapageHashParams,
3661
- vi as MetapageIFrameRpcClient,
3652
+ wi as MetapageIFrameRpcClient,
3662
3653
  Hn as MetapageShared,
3663
3654
  Le as MetapageVersionCurrent,
3664
- xt as MetapageVersionsAll,
3655
+ $t as MetapageVersionsAll,
3665
3656
  Pi as PARSE_ERROR,
3666
3657
  As as VERSION_METAFRAME,
3667
- Kt as VERSION_METAPAGE,
3658
+ Wt as VERSION_METAPAGE,
3668
3659
  tn as convertMetaframeDefinitionToCurrentVersion,
3669
- is as convertMetaframeDefinitionToVersion,
3660
+ ns as convertMetaframeDefinitionToVersion,
3670
3661
  pt as convertMetaframeJsonToCurrentVersion,
3671
3662
  Vs as convertMetapageDefinitionToCurrentVersion,
3672
- ns as convertMetapageDefinitionToVersion,
3663
+ ss as convertMetapageDefinitionToVersion,
3673
3664
  Ce as deserializeInputs,
3674
- At as generateId,
3665
+ St as generateId,
3675
3666
  Bi as generateMetaframeId,
3676
3667
  jn as generateMetapageId,
3677
3668
  Fi as generateNonce,
3678
3669
  Vi as getLibraryVersionMatching,
3679
3670
  te as getMatchingMetaframeVersion,
3680
3671
  he as getMatchingMetapageVersion,
3681
- wi as getMetaframeDefinitionFromUrl,
3672
+ vi as getMetaframeDefinitionFromUrl,
3682
3673
  bi as getMetapageDefinitionFromUrl,
3683
3674
  ji as getUrlParam,
3684
3675
  Ui as getUrlParamDebug,
3685
3676
  Ai as getVisibleGridLayoutData,
3686
3677
  Un as hashCode,
3687
3678
  Bn as intToRGB,
3688
- dt as isDebugFromUrlsParams,
3679
+ ht as isDebugFromUrlsParams,
3689
3680
  Ji as isEmptyMetaframeDefinition,
3690
- Nn as isIframe,
3681
+ kn as isIframe,
3691
3682
  Hi as isJsonRpcId,
3692
- Ct as isMetaframeDivider,
3683
+ It as isMetaframeDivider,
3693
3684
  Ki as isMetaframeHidden,
3694
3685
  tt as isPageLoaded,
3695
- Et as log,
3686
+ At as log,
3696
3687
  Oi as matchPipe,
3697
3688
  Ge as merge,
3698
3689
  zi as metapageAllSha256Hash,
3699
3690
  Gi as metapageOnlyEssentailSha256Hash,
3700
3691
  Xe as pageLoaded,
3701
3692
  Li as possiblyDeserializeDatarefToFile,
3702
- rs as possiblyDeserializeDatarefToValue,
3693
+ is as possiblyDeserializeDatarefToValue,
3703
3694
  dn as possiblySerializeValueToDataref,
3704
3695
  Wi as renderMetapage,
3705
3696
  Ke as serializeInputs,