@metapages/metapage 1.10.4 → 1.10.6

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
@@ -5,7 +5,7 @@ const ys = [
5
5
  "0.6",
6
6
  "1",
7
7
  "2"
8
- ], ms = ["0.2", "0.3", "1", "2"], be = "2", Jt = "2", Kr = "metaframe.json", Xr = "metapage/definition", qr = "metapage/state", Ls = ms[ms.length - 1], Sn = ys[ys.length - 1], On = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, gs = (t) => {
8
+ ], ms = ["0.2", "0.3", "1", "2"], ge = "2", be = "2", Kr = "metaframe.json", Xr = "metapage/definition", qr = "metapage/state", Ls = ms[ms.length - 1], Sn = ys[ys.length - 1], On = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, gs = (t) => {
9
9
  if (typeof t != "string")
10
10
  throw new TypeError("Invalid argument expected string");
11
11
  const e = t.match(On);
@@ -128,7 +128,7 @@ const Ge = /* @__PURE__ */ We(An), G = {
128
128
  Remove: "remove",
129
129
  Replace: "replace",
130
130
  Add: "add"
131
- }, Us = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), In = Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"), ne = Symbol.iterator, st = {
131
+ }, Us = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), In = Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"), se = Symbol.iterator, st = {
132
132
  mutable: "mutable",
133
133
  immutable: "immutable"
134
134
  }, Je = {};
@@ -199,7 +199,7 @@ function Pt(t) {
199
199
  function bt(t, e) {
200
200
  return Pt(t) === 2 ? t.get(e) : t[e];
201
201
  }
202
- function Qt(t, e, s) {
202
+ function Jt(t, e, s) {
203
203
  Pt(t) === 2 ? t.set(e, s) : t[e] = s;
204
204
  }
205
205
  function Ee(t, e) {
@@ -312,7 +312,7 @@ function kt(t) {
312
312
  e[s] = kt(t[s]);
313
313
  return e;
314
314
  }
315
- function ie(t) {
315
+ function ne(t) {
316
316
  return Rt(t) ? kt(t) : t;
317
317
  }
318
318
  function ht(t) {
@@ -391,7 +391,7 @@ function Bs(t, e, s) {
391
391
  const u = T(r);
392
392
  Y(u);
393
393
  const c = !((a = u.assignedMap) === null || a === void 0) && a.size || u.operated ? u.copy : u.original;
394
- Qt(n ? i : t, o, c);
394
+ Jt(n ? i : t, o, c);
395
395
  } else
396
396
  Bs(r, e, s);
397
397
  }), i) {
@@ -426,7 +426,7 @@ function Ye(t, e, s, n) {
426
426
  const u = t.type === 3 ? t.setMap : t.copy;
427
427
  if (gt(bt(u, e), s)) {
428
428
  let c = i.original;
429
- i.copy && (c = i.copy), Te(t), De(t, n, o, r), t.options.enableAutoFreeze && (t.options.updatedValues = (a = t.options.updatedValues) !== null && a !== void 0 ? a : /* @__PURE__ */ new WeakMap(), t.options.updatedValues.set(c, i.original)), Qt(u, e, c);
429
+ i.copy && (c = i.copy), Te(t), De(t, n, o, r), t.options.enableAutoFreeze && (t.options.updatedValues = (a = t.options.updatedValues) !== null && a !== void 0 ? a : /* @__PURE__ */ new WeakMap(), t.options.updatedValues.set(c, i.original)), Jt(u, e, c);
430
430
  }
431
431
  }), t.options.enableAutoFreeze && i.finalities !== t.finalities && (t.options.enableAutoFreeze = !1)), ut(s, t.options) && t.finalities.draft.push(() => {
432
432
  const o = t.type === 3 ? t.setMap : t.copy;
@@ -443,12 +443,12 @@ function jn(t, e, s, n, i) {
443
443
  op: G.Replace,
444
444
  path: f,
445
445
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
446
- value: ie(u[c])
446
+ value: ne(u[c])
447
447
  }), n.push({
448
448
  op: G.Replace,
449
449
  path: f,
450
450
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
451
- value: ie(o[c])
451
+ value: ne(o[c])
452
452
  });
453
453
  }
454
454
  for (let c = o.length; c < u.length; c += 1) {
@@ -457,7 +457,7 @@ function jn(t, e, s, n, i) {
457
457
  op: G.Add,
458
458
  path: f,
459
459
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
460
- value: ie(u[c])
460
+ value: ne(u[c])
461
461
  });
462
462
  }
463
463
  if (o.length < u.length) {
@@ -481,7 +481,7 @@ function jn(t, e, s, n, i) {
481
481
  }
482
482
  function Tn({ original: t, copy: e, assignedMap: s }, n, i, o, r) {
483
483
  s.forEach((a, u) => {
484
- const c = bt(t, u), l = ie(bt(e, u)), f = a ? Bt(t, u) ? G.Replace : G.Add : G.Remove;
484
+ const c = bt(t, u), l = ne(bt(e, u)), f = a ? Bt(t, u) ? G.Replace : G.Add : G.Remove;
485
485
  if (gt(c, l) && f === G.Replace)
486
486
  return;
487
487
  const p = n.concat(u), g = It(p, r);
@@ -533,7 +533,7 @@ function Vt(t, e, s, n) {
533
533
  }
534
534
  }
535
535
  let Ln = !1;
536
- const ue = (t, e, s = !1) => {
536
+ const ae = (t, e, s = !1) => {
537
537
  if (typeof t == "object" && t !== null && (!ut(t, e) || s) && !Ln)
538
538
  throw new Error("Strict mode: Mutable data cannot be accessed directly, please use 'unsafe(callback)' wrap.");
539
539
  }, Le = {
@@ -571,7 +571,7 @@ const ue = (t, e, s = !1) => {
571
571
  get(t) {
572
572
  var e, s;
573
573
  const n = T(this), i = tt(n).get(t), o = ((s = (e = n.options).mark) === null || s === void 0 ? void 0 : s.call(e, i, st)) === st.mutable;
574
- if (n.options.strict && ue(i, n.options, o), o || n.finalized || !ut(i, n.options) || i !== n.original.get(t))
574
+ if (n.options.strict && ae(i, n.options, o), o || n.finalized || !ut(i, n.options) || i !== n.original.get(t))
575
575
  return i;
576
576
  const r = Je.createDraft({
577
577
  original: i,
@@ -588,7 +588,7 @@ const ue = (t, e, s = !1) => {
588
588
  values() {
589
589
  const t = this.keys();
590
590
  return {
591
- [ne]: () => this.values(),
591
+ [se]: () => this.values(),
592
592
  next: () => {
593
593
  const e = t.next();
594
594
  return e.done ? e : {
@@ -601,7 +601,7 @@ const ue = (t, e, s = !1) => {
601
601
  entries() {
602
602
  const t = this.keys();
603
603
  return {
604
- [ne]: () => this.entries(),
604
+ [se]: () => this.entries(),
605
605
  next: () => {
606
606
  const e = t.next();
607
607
  if (e.done)
@@ -614,7 +614,7 @@ const ue = (t, e, s = !1) => {
614
614
  }
615
615
  };
616
616
  },
617
- [ne]() {
617
+ [se]() {
618
618
  return this.entries();
619
619
  }
620
620
  }, kn = Reflect.ownKeys(Le), Os = (t, e, { isValuesIterator: s }) => () => {
@@ -625,7 +625,7 @@ const ue = (t, e, s = !1) => {
625
625
  const r = o.value;
626
626
  let a = t.setMap.get(r);
627
627
  const u = T(a), c = ((i = (n = t.options).mark) === null || i === void 0 ? void 0 : i.call(n, a, st)) === st.mutable;
628
- if (t.options.strict && ue(r, t.options, c), !c && !u && ut(r, t.options) && !t.finalized && t.original.has(r)) {
628
+ if (t.options.strict && ae(r, t.options, c), !c && !u && ut(r, t.options) && !t.finalized && t.original.has(r)) {
629
629
  const l = Je.createDraft({
630
630
  original: r,
631
631
  parentDraft: t,
@@ -640,7 +640,7 @@ const ue = (t, e, s = !1) => {
640
640
  done: !1,
641
641
  value: s ? a : [a, a]
642
642
  };
643
- }, ce = {
643
+ }, ue = {
644
644
  get size() {
645
645
  return T(this).setMap.size;
646
646
  },
@@ -696,7 +696,7 @@ const ue = (t, e, s = !1) => {
696
696
  keys() {
697
697
  return this.values();
698
698
  },
699
- [ne]() {
699
+ [se]() {
700
700
  return this.values();
701
701
  },
702
702
  forEach(t, e) {
@@ -706,7 +706,7 @@ const ue = (t, e, s = !1) => {
706
706
  t.call(e, n.value, n.value, this), n = s.next();
707
707
  }
708
708
  };
709
- Set.prototype.difference && Object.assign(ce, {
709
+ Set.prototype.difference && Object.assign(ue, {
710
710
  intersection(t) {
711
711
  return Set.prototype.intersection.call(new Set(this.values()), t);
712
712
  },
@@ -729,7 +729,7 @@ Set.prototype.difference && Object.assign(ce, {
729
729
  return Set.prototype.isDisjointFrom.call(new Set(this.values()), t);
730
730
  }
731
731
  });
732
- const Un = Reflect.ownKeys(ce), zs = {
732
+ const Un = Reflect.ownKeys(ue), zs = {
733
733
  get(t, e, s) {
734
734
  var n, i;
735
735
  const o = (n = t.copy) === null || n === void 0 ? void 0 : n[e];
@@ -741,13 +741,13 @@ const Un = Reflect.ownKeys(ce), zs = {
741
741
  if (t.options.mark) {
742
742
  const c = e === "size" && (t.original instanceof Map || t.original instanceof Set) ? Reflect.get(t.original, e) : Reflect.get(t.original, e, s);
743
743
  if (r = t.options.mark(c, st), r === st.mutable)
744
- return t.options.strict && ue(c, t.options, !0), c;
744
+ return t.options.strict && ae(c, t.options, !0), c;
745
745
  }
746
746
  const a = tt(t);
747
747
  if (a instanceof Map && kn.includes(e))
748
748
  return e === "size" ? Object.getOwnPropertyDescriptor(Le, "size").get.call(t.proxy) : Le[e].bind(t.proxy);
749
749
  if (a instanceof Set && Un.includes(e))
750
- return e === "size" ? Object.getOwnPropertyDescriptor(ce, "size").get.call(t.proxy) : ce[e].bind(t.proxy);
750
+ return e === "size" ? Object.getOwnPropertyDescriptor(ue, "size").get.call(t.proxy) : ue[e].bind(t.proxy);
751
751
  if (!Bt(a, e)) {
752
752
  const c = ws(a, e);
753
753
  return c ? "value" in c ? c.value : (
@@ -756,7 +756,7 @@ const Un = Reflect.ownKeys(ce), zs = {
756
756
  ) : void 0;
757
757
  }
758
758
  const u = a[e];
759
- if (t.options.strict && ue(u, t.options), t.finalized || !ut(u, t.options))
759
+ if (t.options.strict && ae(u, t.options), t.finalized || !ut(u, t.options))
760
760
  return u;
761
761
  if (u === Ee(t.original, e)) {
762
762
  if (Y(t), t.copy[e] = Ze({
@@ -839,7 +839,7 @@ function Ze(t) {
839
839
  const M = bt(v, n), w = T(M);
840
840
  if (w) {
841
841
  let E = w.original;
842
- w.operated && (E = Xe(M)), Te(w), De(w, Vt, f, p), l.options.enableAutoFreeze && (l.options.updatedValues = (g = l.options.updatedValues) !== null && g !== void 0 ? g : /* @__PURE__ */ new WeakMap(), l.options.updatedValues.set(E, w.original)), Qt(v, n, E);
842
+ w.operated && (E = Xe(M)), Te(w), De(w, Vt, f, p), l.options.enableAutoFreeze && (l.options.updatedValues = (g = l.options.updatedValues) !== null && g !== void 0 ? g : /* @__PURE__ */ new WeakMap(), l.options.updatedValues.set(E, w.original)), Jt(v, n, E);
843
843
  }
844
844
  (m = _.callbacks) === null || m === void 0 || m.forEach((E) => {
845
845
  E(f, p);
@@ -902,7 +902,7 @@ function ke(t) {
902
902
  const l = Array.from(a);
903
903
  a.clear(), l.forEach((f) => a.add(o === f ? c : f));
904
904
  } else
905
- Qt(a, o, c);
905
+ Jt(a, o, c);
906
906
  } else
907
907
  typeof r == "object" && r !== null && (t.value = r, t.isRoot = !1, ke(t));
908
908
  }), 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."));
@@ -932,7 +932,7 @@ function Fs(t) {
932
932
  if (s && gt(bt(s.original, r), a))
933
933
  return;
934
934
  const u = Fs(a);
935
- u !== a && (i === t && o(), Qt(i, r, u));
935
+ u !== a && (i === t && o(), Jt(i, r, u));
936
936
  }), n === 3) {
937
937
  const r = (e = s == null ? void 0 : s.original) !== null && e !== void 0 ? e : i;
938
938
  return Qe(r) ? new Set(i) : new (Object.getPrototypeOf(r)).constructor(i);
@@ -1046,7 +1046,7 @@ const Vs = (t) => {
1046
1046
  }
1047
1047
  if (!e)
1048
1048
  throw 'Missing "version" argument';
1049
- if (F(e, Jt) > 0)
1049
+ if (F(e, be) > 0)
1050
1050
  try {
1051
1051
  return await (await zn(`https://module.metapage.io/conversion/metapage/v${e}`, {
1052
1052
  redirect: "follow",
@@ -1062,7 +1062,7 @@ const Vs = (t) => {
1062
1062
  throw `Error converting metapage definition to version ${e}: ${n}`;
1063
1063
  }
1064
1064
  return Vn(t, e);
1065
- }, Fn = async (t) => Gs(t, Jt), Vn = (t, e) => {
1065
+ }, Fn = async (t) => Gs(t, be), Vn = (t, e) => {
1066
1066
  if (!t)
1067
1067
  throw "Metapage definition null";
1068
1068
  if (!t.version) {
@@ -1119,7 +1119,7 @@ const Vs = (t) => {
1119
1119
  if (!t)
1120
1120
  throw "Missing version";
1121
1121
  if (t === "latest")
1122
- return Jt;
1122
+ return be;
1123
1123
  if (F(t, "0.2") < 0)
1124
1124
  throw `Unknown version: ${t}`;
1125
1125
  if (F(t, "0.2") <= 0 && F(t, "0.3") < 0)
@@ -1152,7 +1152,7 @@ const Vs = (t) => {
1152
1152
  }
1153
1153
  if (!e)
1154
1154
  throw 'Missing "version" argument';
1155
- if (F(e, be) > 0)
1155
+ if (F(e, ge) > 0)
1156
1156
  try {
1157
1157
  return await (await qn(`https://module.metapage.io/conversion/metaframe/v${e}`, {
1158
1158
  redirect: "follow",
@@ -1168,7 +1168,7 @@ const Vs = (t) => {
1168
1168
  throw `Error converting metapage definition to version ${e}: ${n}`;
1169
1169
  }
1170
1170
  return ti(t, e);
1171
- }, Zn = async (t) => Js(t, be), ti = (t, e) => {
1171
+ }, Zn = async (t) => Js(t, ge), ti = (t, e) => {
1172
1172
  if (!t)
1173
1173
  throw "Metaframe definition null";
1174
1174
  if (!t.version) {
@@ -1267,7 +1267,7 @@ const Vs = (t) => {
1267
1267
  if (!t)
1268
1268
  throw "Missing version";
1269
1269
  if (t === "latest")
1270
- return be;
1270
+ return ge;
1271
1271
  if (F(t, "0.3") < 0)
1272
1272
  throw `Unknown version: ${t}`;
1273
1273
  if (F(t, "0.3") <= 0)
@@ -1285,8 +1285,8 @@ const Vs = (t) => {
1285
1285
  throw `Unknown version: ${t}`;
1286
1286
  };
1287
1287
  var Es = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ut = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
1288
- for (var ee = 0; ee < Es.length; ee++)
1289
- Ut[Es.charCodeAt(ee)] = ee;
1288
+ for (var te = 0; te < Es.length; te++)
1289
+ Ut[Es.charCodeAt(te)] = te;
1290
1290
  var St = function(t) {
1291
1291
  var e = t.length * 0.75, s = t.length, n, i = 0, o, r, a, u;
1292
1292
  t[t.length - 1] === "=" && (e--, t[t.length - 2] === "=" && e--);
@@ -1295,7 +1295,7 @@ var St = function(t) {
1295
1295
  o = Ut[t.charCodeAt(n)], r = Ut[t.charCodeAt(n + 1)], a = Ut[t.charCodeAt(n + 2)], u = Ut[t.charCodeAt(n + 3)], l[i++] = o << 2 | r >> 4, l[i++] = (r & 15) << 4 | a >> 2, l[i++] = (a & 3) << 6 | u & 63;
1296
1296
  return c;
1297
1297
  };
1298
- const Kt = {
1298
+ const Qt = {
1299
1299
  TEXT: "text/plain",
1300
1300
  JSON: "application/json",
1301
1301
  OCTET_STREAM: "application/octet-stream",
@@ -1307,7 +1307,7 @@ const Kt = {
1307
1307
  Remove: "remove",
1308
1308
  Replace: "replace",
1309
1309
  Add: "add"
1310
- }, Qs = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), re = Symbol.iterator, at = {
1310
+ }, Qs = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), ie = Symbol.iterator, at = {
1311
1311
  mutable: "mutable",
1312
1312
  immutable: "immutable"
1313
1313
  }, ts = {};
@@ -1335,7 +1335,7 @@ function et(t) {
1335
1335
  var e;
1336
1336
  return (e = t.copy) !== null && e !== void 0 ? e : t.original;
1337
1337
  }
1338
- function le(t) {
1338
+ function ce(t) {
1339
1339
  return !!L(t);
1340
1340
  }
1341
1341
  function L(t) {
@@ -1372,14 +1372,14 @@ function qs(t, e = []) {
1372
1372
  }
1373
1373
  return e;
1374
1374
  }
1375
- function Xt(t) {
1375
+ function Kt(t) {
1376
1376
  return Array.isArray(t) ? 1 : t instanceof Map ? 2 : t instanceof Set ? 3 : 0;
1377
1377
  }
1378
1378
  function Et(t, e) {
1379
- return Xt(t) === 2 ? t.get(e) : t[e];
1379
+ return Kt(t) === 2 ? t.get(e) : t[e];
1380
1380
  }
1381
1381
  function ss(t, e, s) {
1382
- Xt(t) === 2 ? t.set(e, s) : t[e] = s;
1382
+ Kt(t) === 2 ? t.set(e, s) : t[e] = s;
1383
1383
  }
1384
1384
  function Me(t, e) {
1385
1385
  const s = L(t);
@@ -1397,7 +1397,7 @@ function Ct(t, e) {
1397
1397
  function fi(t, e) {
1398
1398
  for (let s = 0; s < e.length - 1; s += 1) {
1399
1399
  const n = e[s];
1400
- if (t = Et(Xt(t) === 3 ? Array.from(t) : t, n), typeof t != "object")
1400
+ if (t = Et(Kt(t) === 3 ? Array.from(t) : t, n), typeof t != "object")
1401
1401
  throw new Error(`Cannot resolve patch at '${e.join("/")}'.`);
1402
1402
  }
1403
1403
  return t;
@@ -1486,15 +1486,15 @@ function Ht(t) {
1486
1486
  e[s] = Ht(t[s]);
1487
1487
  return e;
1488
1488
  }
1489
- function oe(t) {
1490
- return le(t) ? Ht(t) : t;
1489
+ function re(t) {
1490
+ return ce(t) ? Ht(t) : t;
1491
1491
  }
1492
1492
  function dt(t) {
1493
1493
  var e;
1494
1494
  t.assignedMap = (e = t.assignedMap) !== null && e !== void 0 ? e : /* @__PURE__ */ new Map(), t.operated || (t.operated = !0, t.parent && dt(t.parent));
1495
1495
  }
1496
1496
  function yi(t, e) {
1497
- const s = Xt(t);
1497
+ const s = Kt(t);
1498
1498
  if (s === 0)
1499
1499
  Reflect.ownKeys(t).forEach((n) => {
1500
1500
  e(n, t[n], t);
@@ -1507,12 +1507,12 @@ function yi(t, e) {
1507
1507
  t.forEach((n, i) => e(i, n, t));
1508
1508
  }
1509
1509
  function Ys(t, e, s) {
1510
- if (le(t) || !xt(t, s) || e.has(t) || Object.isFrozen(t))
1510
+ if (ce(t) || !xt(t, s) || e.has(t) || Object.isFrozen(t))
1511
1511
  return;
1512
1512
  const n = t instanceof Set, i = n ? /* @__PURE__ */ new Map() : void 0;
1513
1513
  if (e.add(t), yi(t, (o, r) => {
1514
1514
  var a;
1515
- if (le(r)) {
1515
+ if (ce(r)) {
1516
1516
  const u = L(r);
1517
1517
  Z(u);
1518
1518
  const c = !((a = u.assignedMap) === null || a === void 0) && a.size || u.operated ? u.copy : u.original;
@@ -1568,12 +1568,12 @@ function gi(t, e, s, n, i) {
1568
1568
  op: K.Replace,
1569
1569
  path: f,
1570
1570
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
1571
- value: oe(u[c])
1571
+ value: re(u[c])
1572
1572
  }), n.push({
1573
1573
  op: K.Replace,
1574
1574
  path: f,
1575
1575
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
1576
- value: oe(o[c])
1576
+ value: re(o[c])
1577
1577
  });
1578
1578
  }
1579
1579
  for (let c = o.length; c < u.length; c += 1) {
@@ -1582,7 +1582,7 @@ function gi(t, e, s, n, i) {
1582
1582
  op: K.Add,
1583
1583
  path: f,
1584
1584
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
1585
- value: oe(u[c])
1585
+ value: re(u[c])
1586
1586
  });
1587
1587
  }
1588
1588
  if (o.length < u.length) {
@@ -1606,7 +1606,7 @@ function gi(t, e, s, n, i) {
1606
1606
  }
1607
1607
  function bi({ original: t, copy: e, assignedMap: s }, n, i, o, r) {
1608
1608
  s.forEach((a, u) => {
1609
- const c = Et(t, u), l = oe(Et(e, u)), f = a ? zt(t, u) ? K.Replace : K.Add : K.Remove;
1609
+ const c = Et(t, u), l = re(Et(e, u)), f = a ? zt(t, u) ? K.Replace : K.Add : K.Remove;
1610
1610
  if ($t(c, l) && f === K.Replace)
1611
1611
  return;
1612
1612
  const p = n.concat(u), g = Ct(p, r);
@@ -1658,7 +1658,7 @@ function Wt(t, e, s, n) {
1658
1658
  }
1659
1659
  }
1660
1660
  let vi = !1;
1661
- const fe = (t, e, s = !1) => {
1661
+ const le = (t, e, s = !1) => {
1662
1662
  if (typeof t == "object" && t !== null && (!xt(t, e) || s) && !vi)
1663
1663
  throw new Error("Strict mode: Mutable data cannot be accessed directly, please use 'unsafe(callback)' wrap.");
1664
1664
  }, Be = {
@@ -1696,7 +1696,7 @@ const fe = (t, e, s = !1) => {
1696
1696
  get(t) {
1697
1697
  var e, s;
1698
1698
  const n = L(this), i = et(n).get(t), o = ((s = (e = n.options).mark) === null || s === void 0 ? void 0 : s.call(e, i, at)) === at.mutable;
1699
- if (n.options.strict && fe(i, n.options, o), o || n.finalized || !xt(i, n.options) || i !== n.original.get(t))
1699
+ if (n.options.strict && le(i, n.options, o), o || n.finalized || !xt(i, n.options) || i !== n.original.get(t))
1700
1700
  return i;
1701
1701
  const r = ts.createDraft({
1702
1702
  original: i,
@@ -1713,7 +1713,7 @@ const fe = (t, e, s = !1) => {
1713
1713
  values() {
1714
1714
  const t = this.keys();
1715
1715
  return {
1716
- [re]: () => this.values(),
1716
+ [ie]: () => this.values(),
1717
1717
  next: () => {
1718
1718
  const e = t.next();
1719
1719
  return e.done ? e : {
@@ -1726,7 +1726,7 @@ const fe = (t, e, s = !1) => {
1726
1726
  entries() {
1727
1727
  const t = this.keys();
1728
1728
  return {
1729
- [re]: () => this.entries(),
1729
+ [ie]: () => this.entries(),
1730
1730
  next: () => {
1731
1731
  const e = t.next();
1732
1732
  if (e.done)
@@ -1739,7 +1739,7 @@ const fe = (t, e, s = !1) => {
1739
1739
  }
1740
1740
  };
1741
1741
  },
1742
- [re]() {
1742
+ [ie]() {
1743
1743
  return this.entries();
1744
1744
  }
1745
1745
  }, wi = Reflect.ownKeys(Be), As = (t, e, { isValuesIterator: s }) => () => {
@@ -1750,7 +1750,7 @@ const fe = (t, e, s = !1) => {
1750
1750
  const r = o.value;
1751
1751
  let a = t.setMap.get(r);
1752
1752
  const u = L(a), c = ((i = (n = t.options).mark) === null || i === void 0 ? void 0 : i.call(n, a, at)) === at.mutable;
1753
- if (t.options.strict && fe(r, t.options, c), !c && !u && xt(r, t.options) && !t.finalized && t.original.has(r)) {
1753
+ if (t.options.strict && le(r, t.options, c), !c && !u && xt(r, t.options) && !t.finalized && t.original.has(r)) {
1754
1754
  const l = ts.createDraft({
1755
1755
  original: r,
1756
1756
  parentDraft: t,
@@ -1765,7 +1765,7 @@ const fe = (t, e, s = !1) => {
1765
1765
  done: !1,
1766
1766
  value: s ? a : [a, a]
1767
1767
  };
1768
- }, pe = {
1768
+ }, fe = {
1769
1769
  get size() {
1770
1770
  return L(this).setMap.size;
1771
1771
  },
@@ -1821,7 +1821,7 @@ const fe = (t, e, s = !1) => {
1821
1821
  keys() {
1822
1822
  return this.values();
1823
1823
  },
1824
- [re]() {
1824
+ [ie]() {
1825
1825
  return this.values();
1826
1826
  },
1827
1827
  forEach(t, e) {
@@ -1831,7 +1831,7 @@ const fe = (t, e, s = !1) => {
1831
1831
  t.call(e, n.value, n.value, this), n = s.next();
1832
1832
  }
1833
1833
  };
1834
- Set.prototype.difference && Object.assign(pe, {
1834
+ Set.prototype.difference && Object.assign(fe, {
1835
1835
  intersection(t) {
1836
1836
  return Set.prototype.intersection.call(new Set(this.values()), t);
1837
1837
  },
@@ -1854,7 +1854,7 @@ Set.prototype.difference && Object.assign(pe, {
1854
1854
  return Set.prototype.isDisjointFrom.call(new Set(this.values()), t);
1855
1855
  }
1856
1856
  });
1857
- const Si = Reflect.ownKeys(pe), Zs = {
1857
+ const Si = Reflect.ownKeys(fe), Zs = {
1858
1858
  get(t, e, s) {
1859
1859
  var n, i;
1860
1860
  const o = (n = t.copy) === null || n === void 0 ? void 0 : n[e];
@@ -1866,13 +1866,13 @@ const Si = Reflect.ownKeys(pe), Zs = {
1866
1866
  if (t.options.mark) {
1867
1867
  const c = e === "size" && (t.original instanceof Map || t.original instanceof Set) ? Reflect.get(t.original, e) : Reflect.get(t.original, e, s);
1868
1868
  if (r = t.options.mark(c, at), r === at.mutable)
1869
- return t.options.strict && fe(c, t.options, !0), c;
1869
+ return t.options.strict && le(c, t.options, !0), c;
1870
1870
  }
1871
1871
  const a = et(t);
1872
1872
  if (a instanceof Map && wi.includes(e))
1873
1873
  return e === "size" ? Object.getOwnPropertyDescriptor(Be, "size").get.call(t.proxy) : Be[e].bind(t.proxy);
1874
1874
  if (a instanceof Set && Si.includes(e))
1875
- return e === "size" ? Object.getOwnPropertyDescriptor(pe, "size").get.call(t.proxy) : pe[e].bind(t.proxy);
1875
+ return e === "size" ? Object.getOwnPropertyDescriptor(fe, "size").get.call(t.proxy) : fe[e].bind(t.proxy);
1876
1876
  if (!zt(a, e)) {
1877
1877
  const c = Ms(a, e);
1878
1878
  return c ? "value" in c ? c.value : (
@@ -1881,7 +1881,7 @@ const Si = Reflect.ownKeys(pe), Zs = {
1881
1881
  ) : void 0;
1882
1882
  }
1883
1883
  const u = a[e];
1884
- if (t.options.strict && fe(u, t.options), t.finalized || !xt(u, t.options))
1884
+ if (t.options.strict && le(u, t.options), t.finalized || !xt(u, t.options))
1885
1885
  return u;
1886
1886
  if (u === Me(t.original, e)) {
1887
1887
  if (Z(t), t.copy[e] = tn({
@@ -1896,7 +1896,7 @@ const Si = Reflect.ownKeys(pe), Zs = {
1896
1896
  }
1897
1897
  return t.copy[e];
1898
1898
  }
1899
- return le(u) && t.finalities.draftsCache.add(u), u;
1899
+ return ce(u) && t.finalities.draftsCache.add(u), u;
1900
1900
  },
1901
1901
  set(t, e, s) {
1902
1902
  var n;
@@ -1941,7 +1941,7 @@ const Si = Reflect.ownKeys(pe), Zs = {
1941
1941
  }
1942
1942
  };
1943
1943
  function tn(t) {
1944
- const { original: e, parentDraft: s, key: n, finalities: i, options: o } = t, r = Xt(e), a = {
1944
+ const { original: e, parentDraft: s, key: n, finalities: i, options: o } = t, r = Kt(e), a = {
1945
1945
  type: r,
1946
1946
  finalized: !1,
1947
1947
  parent: s,
@@ -1980,9 +1980,9 @@ function tn(t) {
1980
1980
  }
1981
1981
  ts.createDraft = tn;
1982
1982
  Object.prototype.constructor.toString();
1983
- const Oi = (t) => typeof t == "string" && t.startsWith("data:"), he = (t) => {
1983
+ const Oi = (t) => typeof t == "string" && t.startsWith("data:"), pe = (t) => {
1984
1984
  const e = t.match(/^data:([^;]+)/);
1985
- return e ? e[1] : Kt.OCTET_STREAM;
1985
+ return e ? e[1] : Qt.OCTET_STREAM;
1986
1986
  }, en = (t) => {
1987
1987
  var e;
1988
1988
  const s = {}, n = (e = t.match(/^data:[^;]+;([^,]+),/)) == null ? void 0 : e[1];
@@ -1992,11 +1992,11 @@ const Oi = (t) => typeof t == "string" && t.startsWith("data:"), he = (t) => {
1992
1992
  }), s;
1993
1993
  }, Ri = (t) => {
1994
1994
  const e = new Uint8Array(t), s = btoa(String.fromCharCode(...e));
1995
- return `data:${Kt.OCTET_STREAM};base64,${s}`;
1995
+ return `data:${Qt.OCTET_STREAM};base64,${s}`;
1996
1996
  }, Ei = (t, e) => {
1997
1997
  const s = t.buffer, n = new Uint8Array(s), i = btoa(String.fromCharCode(...n));
1998
- return `data:${Kt.TYPED_ARRAY}${e};base64,${i}`;
1999
- }, ae = async (t, e) => {
1998
+ return `data:${Qt.TYPED_ARRAY}${e};base64,${i}`;
1999
+ }, oe = async (t, e) => {
2000
2000
  if (Ii(t)) {
2001
2001
  const o = Ai(t);
2002
2002
  if (!o)
@@ -2025,19 +2025,19 @@ const Oi = (t) => typeof t == "string" && t.startsWith("data:"), he = (t) => {
2025
2025
  const s = en(t).type;
2026
2026
  if (!s)
2027
2027
  throw new Error("Data URL does not contain type parameter");
2028
- const n = await ae(t, e), i = globalThis[s];
2028
+ const n = await oe(t, e), i = globalThis[s];
2029
2029
  return new i(n);
2030
- }, Ai = (t) => he(t) !== Kt.URI ? null : decodeURIComponent(t.split(",")[1]), Ii = (t) => he(t) === Kt.URI;
2030
+ }, Ai = (t) => pe(t) !== Qt.URI ? null : decodeURIComponent(t.split(",")[1]), Ii = (t) => pe(t) === Qt.URI;
2031
2031
  var Is = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ci = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
2032
- for (var se = 0; se < Is.length; se++)
2033
- Ci[Is.charCodeAt(se)] = se;
2034
- var de;
2032
+ for (var ee = 0; ee < Is.length; ee++)
2033
+ Ci[Is.charCodeAt(ee)] = ee;
2034
+ var he;
2035
2035
  (function(t) {
2036
2036
  t.base64 = "base64", t.url = "url", t.utf8 = "utf8", t.json = "json", t.key = "key";
2037
- })(de || (de = {}));
2038
- const $i = Object.keys(de).filter((t) => isNaN(Number(t)));
2037
+ })(he || (he = {}));
2038
+ const $i = Object.keys(he).filter((t) => isNaN(Number(t)));
2039
2039
  new Set($i);
2040
- de.utf8;
2040
+ he.utf8;
2041
2041
  new TextEncoder();
2042
2042
  const Pi = (t) => t instanceof ArrayBuffer || t instanceof Blob || ArrayBuffer.isView(t), xi = (t) => typeof t == "string" ? t.startsWith("data:") : !!(t && typeof t == "object" && (t._s === !0 && t._c || t.ref === "base64" && t.c)), _e = async (t) => {
2043
2043
  const e = Object.keys(t), s = [];
@@ -2124,14 +2124,14 @@ async function Ti(t) {
2124
2124
  if (e.type && is.has(e.type))
2125
2125
  return Mi(t);
2126
2126
  if (e.file === "true") {
2127
- const s = e.name ? decodeURIComponent(e.name) : "file", n = e.lastModified ? parseInt(e.lastModified, 10) : void 0, i = he(t), o = await ae(t);
2127
+ const s = e.name ? decodeURIComponent(e.name) : "file", n = e.lastModified ? parseInt(e.lastModified, 10) : void 0, i = pe(t), o = await oe(t);
2128
2128
  return new File([o], s, { type: i, lastModified: n });
2129
2129
  }
2130
2130
  if (e.blob === "true") {
2131
- const s = he(t), n = await ae(t);
2131
+ const s = pe(t), n = await oe(t);
2132
2132
  return new Blob([n], { type: s });
2133
2133
  }
2134
- return t.startsWith("data:application/octet-stream;base64,") ? ae(t) : t;
2134
+ return t.startsWith("data:application/octet-stream;base64,") ? oe(t) : t;
2135
2135
  }
2136
2136
  function Di(t) {
2137
2137
  const e = t._c;
@@ -2390,7 +2390,7 @@ const Hi = /* @__PURE__ */ ki(Ui), Ni = (t) => as(Hi(t)), Bi = (t) => {
2390
2390
  }), Object.keys(i).forEach((o) => {
2391
2391
  i[o] = i[o];
2392
2392
  }), [n, i];
2393
- }, qt = (t, e) => {
2393
+ }, Xt = (t, e) => {
2394
2394
  const [s, n] = rn(t);
2395
2395
  return n[e];
2396
2396
  }, Mt = () => typeof window < "u" && typeof globalThis.location < "u", zi = (t) => {
@@ -2417,7 +2417,7 @@ const Hi = /* @__PURE__ */ ki(Ui), Ni = (t) => as(Hi(t)), Bi = (t) => {
2417
2417
  const n = t instanceof URL ? t : new URL(t), i = an(n.hash, e, s);
2418
2418
  return n.hash = i, n;
2419
2419
  }, us = (t, e) => {
2420
- const s = qt(t, e);
2420
+ const s = Xt(t, e);
2421
2421
  if (s && s !== "")
2422
2422
  return Bi(s);
2423
2423
  }, Wi = (t, e, s) => {
@@ -2427,7 +2427,7 @@ const Hi = /* @__PURE__ */ ki(Ui), Ni = (t) => as(Hi(t)), Bi = (t) => {
2427
2427
  if (Mt())
2428
2428
  return us(globalThis.location.href, t);
2429
2429
  }, Ji = (t, e) => {
2430
- const s = qt(t, e);
2430
+ const s = Xt(t, e);
2431
2431
  return s ? parseFloat(s) : void 0;
2432
2432
  }, un = (t, e, s) => {
2433
2433
  Dt(t, e != null ? e.toString() : void 0, s);
@@ -2435,20 +2435,20 @@ const Hi = /* @__PURE__ */ ki(Ui), Ni = (t) => as(Hi(t)), Bi = (t) => {
2435
2435
  if (Mt())
2436
2436
  return Ji(globalThis.location.href, t);
2437
2437
  }, Ki = (t, e) => {
2438
- const s = qt(t, e);
2438
+ const s = Xt(t, e);
2439
2439
  return s ? parseInt(s) : void 0;
2440
2440
  }, Xi = (t, e, s) => {
2441
2441
  un(t, e, s);
2442
2442
  }, qi = (t) => {
2443
2443
  if (Mt())
2444
2444
  return Ki(globalThis.location.href, t);
2445
- }, Yi = (t, e) => qt(t, e) === "true", Zi = (t, e, s) => {
2445
+ }, Yi = (t, e) => Xt(t, e) === "true", Zi = (t, e, s) => {
2446
2446
  Dt(t, e ? "true" : void 0, s);
2447
2447
  }, tr = (t) => {
2448
2448
  if (Mt())
2449
2449
  return Yi(globalThis.location.href, t);
2450
2450
  }, Lt = (t, e, s) => Vi(t, e, s == null ? void 0 : as(s)), ze = (t, e) => {
2451
- const s = qt(t, e);
2451
+ const s = Xt(t, e);
2452
2452
  return s && s !== "" ? nn(s) : void 0;
2453
2453
  }, er = (t, e, s) => {
2454
2454
  const n = e == null ? void 0 : as(e);
@@ -2507,7 +2507,6 @@ const ir = () => {
2507
2507
  return !1;
2508
2508
  }
2509
2509
  }, ln = {
2510
- version: Jt,
2511
2510
  metaframes: {}
2512
2511
  };
2513
2512
  class rr extends os.EventEmitter {
@@ -2521,7 +2520,7 @@ class rr extends os.EventEmitter {
2521
2520
  return this._definition;
2522
2521
  }
2523
2522
  }
2524
- const ye = (t, e) => e ? C(t, (s) => {
2523
+ const de = (t, e) => e ? C(t, (s) => {
2525
2524
  Object.keys(e).forEach((n) => {
2526
2525
  e[n] === void 0 ? delete s[n] : s[n] = e[n];
2527
2526
  });
@@ -2664,7 +2663,7 @@ class ct extends os.EventEmitter {
2664
2663
  async setInternalInputsAndNotify(e) {
2665
2664
  this.isInputOutputBlobSerialization && (e = await Ft(e));
2666
2665
  const s = e;
2667
- if (this._inputPipeValues = ye(this._inputPipeValues, e), this._inputPipeValues !== s) {
2666
+ if (this._inputPipeValues = de(this._inputPipeValues, e), this._inputPipeValues !== s) {
2668
2667
  Object.keys(e).forEach((n) => {
2669
2668
  try {
2670
2669
  this.emit(W.Input, n, e[n]);
@@ -2693,7 +2692,7 @@ class ct extends os.EventEmitter {
2693
2692
  async setOutputs(e) {
2694
2693
  this.isInputOutputBlobSerialization && (e = await _e(e));
2695
2694
  const s = e;
2696
- this._outputPipeValues = ye(this._outputPipeValues, e), this._outputPipeValues !== s && this._state === ft.Ready && this.sendRpc(q.OutputsUpdate, e);
2695
+ this._outputPipeValues = de(this._outputPipeValues, e), this._outputPipeValues !== s && this._state === ft.Ready && this.sendRpc(q.OutputsUpdate, e);
2697
2696
  }
2698
2697
  disableNotifyOnHashUrlChange() {
2699
2698
  window.removeEventListener("hashchange", this._onHashUrlChange);
@@ -3179,13 +3178,13 @@ const Ps = we, {
3179
3178
  return it;
3180
3179
  };
3181
3180
  var Ir = Ar;
3182
- const me = Oe, pt = we, {
3183
- MAX_LENGTH: ge,
3181
+ const ye = Oe, pt = we, {
3182
+ MAX_LENGTH: me,
3184
3183
  POSIX_REGEX_SOURCE: Cr,
3185
3184
  REGEX_NON_SPECIAL_CHARS: $r,
3186
3185
  REGEX_SPECIAL_CHARS_BACKREF: Pr,
3187
3186
  REPLACEMENTS: gn
3188
- } = me, xr = (t, e) => {
3187
+ } = ye, xr = (t, e) => {
3189
3188
  if (typeof e.expandRange == "function")
3190
3189
  return e.expandRange(...t, e);
3191
3190
  t.sort();
@@ -3200,11 +3199,11 @@ const me = Oe, pt = we, {
3200
3199
  if (typeof t != "string")
3201
3200
  throw new TypeError("Expected a string");
3202
3201
  t = gn[t] || t;
3203
- const s = { ...e }, n = typeof s.maxLength == "number" ? Math.min(ge, s.maxLength) : ge;
3202
+ const s = { ...e }, n = typeof s.maxLength == "number" ? Math.min(me, s.maxLength) : me;
3204
3203
  let i = t.length;
3205
3204
  if (i > n)
3206
3205
  throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);
3207
- const o = { type: "bos", value: "", output: s.prepend || "" }, r = [o], a = s.capture ? "" : "?:", u = me.globChars(s.windows), c = me.extglobChars(u), {
3206
+ const o = { type: "bos", value: "", output: s.prepend || "" }, r = [o], a = s.capture ? "" : "?:", u = ye.globChars(s.windows), c = ye.extglobChars(u), {
3208
3207
  DOT_LITERAL: l,
3209
3208
  PLUS_LITERAL: f,
3210
3209
  SLASH_LITERAL: p,
@@ -3249,7 +3248,7 @@ const me = Oe, pt = we, {
3249
3248
  for (; k() === "!" && (k(2) !== "(" || k(3) === "?"); )
3250
3249
  B(), h.start++, R++;
3251
3250
  return R % 2 === 0 ? !1 : (h.negated = !0, h.start++, !0);
3252
- }, Yt = (R) => {
3251
+ }, qt = (R) => {
3253
3252
  h[R]++, U.push(R);
3254
3253
  }, At = (R) => {
3255
3254
  h[R]--, U.pop();
@@ -3263,11 +3262,11 @@ const me = Oe, pt = we, {
3263
3262
  return;
3264
3263
  }
3265
3264
  R.prev = d, r.push(R), d = R;
3266
- }, Zt = (R, H) => {
3265
+ }, Yt = (R, H) => {
3267
3266
  const S = { ...c[H], conditions: 1, inner: "" };
3268
3267
  S.prev = d, S.parens = h.parens, S.output = h.output;
3269
3268
  const x = (s.capture ? "(" : "") + S.open;
3270
- Yt("parens"), j({ type: R, value: H, output: h.output ? "" : g }), j({ type: "paren", extglob: !0, value: B(), output: x }), N.push(S);
3269
+ qt("parens"), j({ type: R, value: H, output: h.output ? "" : g }), j({ type: "paren", extglob: !0, value: B(), output: x }), N.push(S);
3271
3270
  }, wn = (R) => {
3272
3271
  let H = R.close + (s.capture ? ")" : ""), S;
3273
3272
  if (R.type === "negate") {
@@ -3325,7 +3324,7 @@ const me = Oe, pt = we, {
3325
3324
  continue;
3326
3325
  }
3327
3326
  if (y === "(") {
3328
- Yt("parens"), j({ type: "paren", value: y });
3327
+ qt("parens"), j({ type: "paren", value: y });
3329
3328
  continue;
3330
3329
  }
3331
3330
  if (y === ")") {
@@ -3345,7 +3344,7 @@ const me = Oe, pt = we, {
3345
3344
  throw new SyntaxError(jt("closing", "]"));
3346
3345
  y = `\\${y}`;
3347
3346
  } else
3348
- Yt("brackets");
3347
+ qt("brackets");
3349
3348
  j({ type: "bracket", value: y });
3350
3349
  continue;
3351
3350
  }
@@ -3373,7 +3372,7 @@ const me = Oe, pt = we, {
3373
3372
  continue;
3374
3373
  }
3375
3374
  if (y === "{" && s.nobrace !== !0) {
3376
- Yt("braces");
3375
+ qt("braces");
3377
3376
  const S = {
3378
3377
  type: "brace",
3379
3378
  value: y,
@@ -3440,7 +3439,7 @@ const me = Oe, pt = we, {
3440
3439
  }
3441
3440
  if (y === "?") {
3442
3441
  if (!(d && d.value === "(") && s.noextglob !== !0 && k() === "(" && k(2) !== "?") {
3443
- Zt("qmark", y);
3442
+ Yt("qmark", y);
3444
3443
  continue;
3445
3444
  }
3446
3445
  if (d && d.type === "paren") {
@@ -3458,7 +3457,7 @@ const me = Oe, pt = we, {
3458
3457
  }
3459
3458
  if (y === "!") {
3460
3459
  if (s.noextglob !== !0 && k() === "(" && (k(2) !== "?" || !/[!=<:]/.test(k(3)))) {
3461
- Zt("negate", y);
3460
+ Yt("negate", y);
3462
3461
  continue;
3463
3462
  }
3464
3463
  if (s.nonegate !== !0 && h.index === 0) {
@@ -3468,7 +3467,7 @@ const me = Oe, pt = we, {
3468
3467
  }
3469
3468
  if (y === "+") {
3470
3469
  if (s.noextglob !== !0 && k() === "(" && k(2) !== "?") {
3471
- Zt("plus", y);
3470
+ Yt("plus", y);
3472
3471
  continue;
3473
3472
  }
3474
3473
  if (d && d.value === "(" || s.regex === !1) {
@@ -3502,7 +3501,7 @@ const me = Oe, pt = we, {
3502
3501
  }
3503
3502
  let R = yt();
3504
3503
  if (s.noextglob !== !0 && /^\([^?]/.test(R)) {
3505
- Zt("star", y);
3504
+ Yt("star", y);
3506
3505
  continue;
3507
3506
  }
3508
3507
  if (d.type === "star") {
@@ -3521,8 +3520,8 @@ const me = Oe, pt = we, {
3521
3520
  continue;
3522
3521
  }
3523
3522
  for (; R.slice(0, 3) === "/**"; ) {
3524
- const te = t[h.index + 4];
3525
- if (te && te !== "/")
3523
+ const Zt = t[h.index + 4];
3524
+ if (Zt && Zt !== "/")
3526
3525
  break;
3527
3526
  R = R.slice(3), rt("/**", 3);
3528
3527
  }
@@ -3535,8 +3534,8 @@ const me = Oe, pt = we, {
3535
3534
  continue;
3536
3535
  }
3537
3536
  if (S.type === "slash" && S.prev.type !== "bos" && R[0] === "/") {
3538
- const te = R[1] !== void 0 ? "|$" : "";
3539
- h.output = h.output.slice(0, -(S.output + d.output).length), S.output = `(?:${S.output}`, d.type = "globstar", d.output = `${$(s)}${p}|${p}${te})`, d.value += y, h.output += S.output + d.output, h.globstar = !0, rt(y + B()), j({ type: "slash", value: "/", output: "" });
3537
+ const Zt = R[1] !== void 0 ? "|$" : "";
3538
+ h.output = h.output.slice(0, -(S.output + d.output).length), S.output = `(?:${S.output}`, d.type = "globstar", d.output = `${$(s)}${p}|${p}${Zt})`, d.value += y, h.output += S.output + d.output, h.globstar = !0, rt(y + B()), j({ type: "slash", value: "/", output: "" });
3540
3539
  continue;
3541
3540
  }
3542
3541
  if (S.type === "bos" && R[0] === "/") {
@@ -3580,7 +3579,7 @@ const me = Oe, pt = we, {
3580
3579
  return h;
3581
3580
  };
3582
3581
  hs.fastpaths = (t, e) => {
3583
- const s = { ...e }, n = typeof s.maxLength == "number" ? Math.min(ge, s.maxLength) : ge, i = t.length;
3582
+ const s = { ...e }, n = typeof s.maxLength == "number" ? Math.min(me, s.maxLength) : me, i = t.length;
3584
3583
  if (i > n)
3585
3584
  throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);
3586
3585
  t = gn[t] || t;
@@ -3594,7 +3593,7 @@ hs.fastpaths = (t, e) => {
3594
3593
  NO_DOTS_SLASH: f,
3595
3594
  STAR: p,
3596
3595
  START_ANCHOR: g
3597
- } = me.globChars(s.windows), m = s.dot ? l : c, _ = s.dot ? f : c, v = s.capture ? "" : "?:", M = { negated: !1, prefix: "" };
3596
+ } = ye.globChars(s.windows), m = s.dot ? l : c, _ = s.dot ? f : c, v = s.capture ? "" : "?:", M = { negated: !1, prefix: "" };
3598
3597
  let w = s.bash === !0 ? ".*?" : p;
3599
3598
  s.capture && (w = `(${w})`);
3600
3599
  const E = (D) => D.noglobstar === !0 ? w : `(${v}(?:(?!${g}${D.dot ? u : o}).)*?)`, P = (D) => {
@@ -3704,7 +3703,7 @@ const Hr = /* @__PURE__ */ We(Ur), _n = Ge(fetch), Nr = async (t, e) => {
3704
3703
  retries: 3,
3705
3704
  retryDelay: 1e3
3706
3705
  })).json();
3707
- return await Gs(i, e || Jt);
3706
+ return await Gs(i, e || be);
3708
3707
  }, Br = async (t, e) => {
3709
3708
  if (t.startsWith("data:") || t.startsWith("https://docs.google.com"))
3710
3709
  return;
@@ -3724,7 +3723,7 @@ const Hr = /* @__PURE__ */ We(Ur), _n = Ge(fetch), Nr = async (t, e) => {
3724
3723
  if (i.status !== 200)
3725
3724
  return;
3726
3725
  const o = await i.json();
3727
- return await Js(o, e || be);
3726
+ return await Js(o, e || ge);
3728
3727
  } catch (i) {
3729
3728
  console.error(`Error fetching metaframe definition from ${s.href.substring(0, 200)}`, i);
3730
3729
  return;
@@ -3743,7 +3742,7 @@ class zr extends os.EventEmitter {
3743
3742
  s = s.substring(1);
3744
3743
  s = window.location.protocol + "//" + window.location.hostname + (window.location.port && window.location.port != "" ? ":" + window.location.port : "") + "/" + s;
3745
3744
  }
3746
- if (this.url = s, this._metapage = e, this._debug = r, r) {
3745
+ if (this.url = s, this._metapage = e, this._debug = r, r && !s.startsWith("data:")) {
3747
3746
  var a = new URL(this.url);
3748
3747
  a.searchParams.set(Gt.mp_debug, "true"), this.url = a.href;
3749
3748
  }
@@ -3806,7 +3805,7 @@ Error: ${s != null && s.message ? s == null ? void 0 : s.message : s == null ? v
3806
3805
  setInputs(e) {
3807
3806
  this.log({ m: "MetapageIFrameRpcClient", inputs: e });
3808
3807
  const s = e;
3809
- if (this.inputs = ye(this.inputs, e), this.inputs === s)
3808
+ if (this.inputs = de(this.inputs, e), this.inputs === s)
3810
3809
  return this;
3811
3810
  if (this._loaded || (this._sendInputsAfterRegistration = !0), this._iframe.parentNode && this._loaded && this.sendInputs(e), this.emit(I.Inputs, this.inputs), this._metapage.listenerCount(I.Inputs) > 0) {
3812
3811
  var n = {};
@@ -3821,7 +3820,7 @@ Error: ${s != null && s.message ? s == null ? void 0 : s.message : s == null ? v
3821
3820
  }
3822
3821
  setOutputs(e) {
3823
3822
  const s = e;
3824
- if (this.outputs = ye(this.outputs, e), this.outputs === s)
3823
+ if (this.outputs = de(this.outputs, e), this.outputs === s)
3825
3824
  return this;
3826
3825
  if (this.emit(I.Outputs, e), this._metapage.listenerCount(I.Outputs) > 0) {
3827
3826
  var n = {};
@@ -4003,6 +4002,8 @@ class nt extends rr {
4003
4002
  this.log(`Warning: Cannot inject secrets for unknown metaframe: ${s}`);
4004
4003
  return;
4005
4004
  }
4005
+ if (i.url.startsWith("data:"))
4006
+ return;
4006
4007
  this._injectedSecrets[s] || (this._injectedSecrets[s] = {}), this._injectedQuerySecrets[s] || (this._injectedQuerySecrets[s] = {}), this._originalSecretHashParams[s] || (this._originalSecretHashParams[s] = {}), this._originalSecretQueryParams[s] || (this._originalSecretQueryParams[s] = {});
4007
4008
  const o = new URL(i.url);
4008
4009
  n.hashParams && Object.entries(n.hashParams).forEach(([c, l]) => {
@@ -4039,7 +4040,7 @@ class nt extends rr {
4039
4040
  if (!((l = e.metaframes) != null && l[n]))
4040
4041
  return;
4041
4042
  const i = this._metaframes[n];
4042
- if (!i)
4043
+ if (!i || i.url.startsWith("data:"))
4043
4044
  return;
4044
4045
  let o = i.url;
4045
4046
  const r = this._injectedSecrets[n] || {}, a = this._originalSecretHashParams[n] || {};
@@ -4098,7 +4099,7 @@ class nt extends rr {
4098
4099
  var p, g, m, _, v;
4099
4100
  if (this._metaframes[f]) {
4100
4101
  const M = i[f] || {}, w = o[f] || {}, E = this._metaframes[f], P = (m = (g = (p = this._definition) == null ? void 0 : p.metaframes) == null ? void 0 : g[f]) == null ? void 0 : m.url;
4101
- if (!P)
4102
+ if (!P || P.startsWith("data:"))
4102
4103
  return;
4103
4104
  let O = new URL(P);
4104
4105
  if (Object.keys(M).length > 0) {
@@ -4416,6 +4417,8 @@ class nt extends rr {
4416
4417
  break;
4417
4418
  case q.HashParamsUpdate:
4418
4419
  if (i) {
4420
+ if (i.url.startsWith("data:"))
4421
+ break;
4419
4422
  const c = e.params, l = c.metaframe;
4420
4423
  let f = new URL(i.url);
4421
4424
  f.hash = c.hash, this._injectedSecrets[l] && Object.entries(this._injectedSecrets[l]).forEach(([m, _]) => {
@@ -4700,14 +4703,14 @@ export {
4700
4703
  ct as Metaframe,
4701
4704
  W as MetaframeEvents,
4702
4705
  ft as MetaframeLoadingState,
4703
- be as MetaframeVersionCurrent,
4706
+ ge as MetaframeVersionCurrent,
4704
4707
  ys as MetaframeVersionsAll,
4705
4708
  nt as Metapage,
4706
4709
  I as MetapageEvents,
4707
4710
  Gt as MetapageHashParams,
4708
4711
  zr as MetapageIFrameRpcClient,
4709
4712
  rr as MetapageShared,
4710
- Jt as MetapageVersionCurrent,
4713
+ be as MetapageVersionCurrent,
4711
4714
  ms as MetapageVersionsAll,
4712
4715
  to as PARSE_ERROR,
4713
4716
  Sn as VERSION_METAFRAME,
@@ -4743,7 +4746,7 @@ export {
4743
4746
  Ae as isPageLoaded,
4744
4747
  ls as log,
4745
4748
  Fr as matchPipe,
4746
- ye as merge,
4749
+ de as merge,
4747
4750
  lo as metapageAllSha256Hash,
4748
4751
  fo as metapageOnlyEssentailSha256Hash,
4749
4752
  Yn as normalizeHashParams,