@pygmalionjs/pygmalion 0.6.16 → 0.6.18

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.
@@ -5,7 +5,7 @@ import { jsxs as ui, jsx as li } from "react/jsx-runtime";
5
5
  import tn, { useState as or, forwardRef as sr, memo as ar, createElement as nn, useRef as yt, useEffect as di, Component as Da } from "react";
6
6
  import { unstable_batchedUpdates as Ra, flushSync as La } from "react-dom";
7
7
  import { createRoot as vo } from "react-dom/client";
8
- var ka = {
8
+ var Fa = {
9
9
  0: "Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",
10
10
  1: function(e, n) {
11
11
  return "Cannot apply '" + e + "' to '" + n.toString() + "': Field not found.";
@@ -80,12 +80,12 @@ var ka = {
80
80
  },
81
81
  38: "'ownKeys()' can only be used on observable objects",
82
82
  39: "'defineProperty()' can only be used on observable objects"
83
- }, Fa = process.env.NODE_ENV !== "production" ? ka : {};
83
+ }, ka = process.env.NODE_ENV !== "production" ? Fa : {};
84
84
  function w(t) {
85
85
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
86
86
  n[r - 1] = arguments[r];
87
87
  if (process.env.NODE_ENV !== "production") {
88
- var i = typeof t == "string" ? t : Fa[t];
88
+ var i = typeof t == "string" ? t : ka[t];
89
89
  throw typeof i == "function" && (i = i.apply(null, n)), new Error("[MobX] " + i);
90
90
  }
91
91
  throw new Error(typeof t == "number" ? "[MobX] minified error nr: " + t + (n.length ? " " + n.map(String).join(",") : "") + ". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts" : "[MobX] " + t);
@@ -108,7 +108,7 @@ function _t(t) {
108
108
  function ae() {
109
109
  return ++b.mobxGuid;
110
110
  }
111
- function kr(t) {
111
+ function Fr(t) {
112
112
  var e = !1;
113
113
  return function() {
114
114
  if (!e)
@@ -212,7 +212,7 @@ var Ka = Object.getOwnPropertyDescriptors || function(e) {
212
212
  function q(t, e) {
213
213
  return !!(t & e);
214
214
  }
215
- function J(t, e, n) {
215
+ function Y(t, e, n) {
216
216
  return n ? t |= e : t &= ~e, t;
217
217
  }
218
218
  function fi(t, e) {
@@ -230,7 +230,7 @@ function Ua(t, e, n) {
230
230
  function Wa(t, e) {
231
231
  for (var n = 0; n < e.length; n++) {
232
232
  var r = e[n];
233
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, Ja(r.key), r);
233
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, Ya(r.key), r);
234
234
  }
235
235
  }
236
236
  function gt(t, e, n) {
@@ -241,7 +241,7 @@ function gt(t, e, n) {
241
241
  function ct(t, e) {
242
242
  var n = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
243
243
  if (n) return (n = n.call(t)).next.bind(n);
244
- if (Array.isArray(t) || (n = Ya(t)) || e) {
244
+ if (Array.isArray(t) || (n = Ja(t)) || e) {
245
245
  n && (t = n);
246
246
  var r = 0;
247
247
  return function() {
@@ -270,7 +270,7 @@ function ur(t) {
270
270
  return e.__proto__ || Object.getPrototypeOf(e);
271
271
  }, ur(t);
272
272
  }
273
- function Fr(t, e) {
273
+ function kr(t, e) {
274
274
  t.prototype = Object.create(e.prototype), t.prototype.constructor = t, At(t, e);
275
275
  }
276
276
  function Ga(t) {
@@ -305,11 +305,11 @@ function qa(t, e) {
305
305
  }
306
306
  return String(t);
307
307
  }
308
- function Ja(t) {
308
+ function Ya(t) {
309
309
  var e = qa(t, "string");
310
310
  return typeof e == "symbol" ? e : e + "";
311
311
  }
312
- function Ya(t, e) {
312
+ function Ja(t, e) {
313
313
  if (t) {
314
314
  if (typeof t == "string") return fi(t, e);
315
315
  var n = {}.toString.call(t).slice(8, -1);
@@ -372,7 +372,7 @@ function Lt(t) {
372
372
  function An(t, e) {
373
373
  process.env.NODE_ENV !== "production" && !e.includes(t.kind) && w("The decorator applied to '" + String(t.name) + "' cannot be used on a " + t.kind + " element");
374
374
  }
375
- var E = /* @__PURE__ */ Symbol("mobx administration"), ke = /* @__PURE__ */ (function() {
375
+ var E = /* @__PURE__ */ Symbol("mobx administration"), Fe = /* @__PURE__ */ (function() {
376
376
  function t(n) {
377
377
  n === void 0 && (n = process.env.NODE_ENV !== "production" ? "Atom@" + ae() : "Atom"), this.name_ = void 0, this.flags_ = 0, this.observers_ = /* @__PURE__ */ new Set(), this.lastAccessedBy_ = 0, this.lowestObserverState_ = N.NOT_TRACKING_, this.onBOL = void 0, this.onBUOL = void 0, this.name_ = n;
378
378
  }
@@ -397,7 +397,7 @@ var E = /* @__PURE__ */ Symbol("mobx administration"), ke = /* @__PURE__ */ (fun
397
397
  return q(this.flags_, t.isBeingObservedMask_);
398
398
  },
399
399
  set: function(r) {
400
- this.flags_ = J(this.flags_, t.isBeingObservedMask_, r);
400
+ this.flags_ = Y(this.flags_, t.isBeingObservedMask_, r);
401
401
  }
402
402
  }, {
403
403
  key: "isPendingUnobservation",
@@ -405,7 +405,7 @@ var E = /* @__PURE__ */ Symbol("mobx administration"), ke = /* @__PURE__ */ (fun
405
405
  return q(this.flags_, t.isPendingUnobservationMask_);
406
406
  },
407
407
  set: function(r) {
408
- this.flags_ = J(this.flags_, t.isPendingUnobservationMask_, r);
408
+ this.flags_ = Y(this.flags_, t.isPendingUnobservationMask_, r);
409
409
  }
410
410
  }, {
411
411
  key: "diffValue",
@@ -413,18 +413,18 @@ var E = /* @__PURE__ */ Symbol("mobx administration"), ke = /* @__PURE__ */ (fun
413
413
  return q(this.flags_, t.diffValueMask_) ? 1 : 0;
414
414
  },
415
415
  set: function(r) {
416
- this.flags_ = J(this.flags_, t.diffValueMask_, r === 1);
416
+ this.flags_ = Y(this.flags_, t.diffValueMask_, r === 1);
417
417
  }
418
418
  }]);
419
419
  })();
420
- ke.isBeingObservedMask_ = 1;
421
- ke.isPendingUnobservationMask_ = 2;
422
- ke.diffValueMask_ = 4;
423
- var jr = /* @__PURE__ */ et("Atom", ke);
420
+ Fe.isBeingObservedMask_ = 1;
421
+ Fe.isPendingUnobservationMask_ = 2;
422
+ Fe.diffValueMask_ = 4;
423
+ var jr = /* @__PURE__ */ et("Atom", Fe);
424
424
  function Ao(t, e, n) {
425
425
  e === void 0 && (e = at), n === void 0 && (n = at);
426
- var r = new ke(t);
427
- return e !== at && hu(r, e), n !== at && Yo(r, n), r;
426
+ var r = new Fe(t);
427
+ return e !== at && hu(r, e), n !== at && Jo(r, n), r;
428
428
  }
429
429
  function Qa(t, e) {
430
430
  return ds(t, e);
@@ -445,7 +445,7 @@ function Ge(t, e, n) {
445
445
  name: n
446
446
  }) : xe(t) ? T.set(t, {
447
447
  name: n
448
- }) : typeof t == "function" && !Ye(t) && !Nt(t) ? _o(t) ? ft(t) : xt(n, t) : t;
448
+ }) : typeof t == "function" && !Je(t) && !Nt(t) ? _o(t) ? ft(t) : xt(n, t) : t;
449
449
  }
450
450
  function tc(t, e, n) {
451
451
  if (t == null || Xe(t) || zt(t) || Pe(t) || ye(t))
@@ -482,7 +482,7 @@ var rc = "override";
482
482
  function sn(t) {
483
483
  return t.annotationType_ === rc;
484
484
  }
485
- function kt(t, e) {
485
+ function Ft(t, e) {
486
486
  return {
487
487
  annotationType_: t,
488
488
  options_: e,
@@ -497,7 +497,7 @@ function ic(t, e, n, r) {
497
497
  return this.extend_(t, e, n, !1) === null ? 0 : 1;
498
498
  if (r === t.target_)
499
499
  return this.extend_(t, e, n, !1) === null ? 0 : 2;
500
- if (Ye(n.value))
500
+ if (Je(n.value))
501
501
  return 1;
502
502
  var o = xo(t, this, e, n, !1);
503
503
  return Se(r, e, o), 2;
@@ -515,11 +515,11 @@ function sc(t, e) {
515
515
  if (n == "field")
516
516
  return function(c) {
517
517
  var u, l = c;
518
- return Ye(l) || (l = s(l)), (u = o.options_) != null && u.bound && (l = l.bind(this), l.isMobxAction = !0), l;
518
+ return Je(l) || (l = s(l)), (u = o.options_) != null && u.bound && (l = l.bind(this), l.isMobxAction = !0), l;
519
519
  };
520
520
  if (n == "method") {
521
521
  var a;
522
- return Ye(t) || (t = s(t)), (a = this.options_) != null && a.bound && i(function() {
522
+ return Je(t) || (t = s(t)), (a = this.options_) != null && a.bound && i(function() {
523
523
  var c = this, u = c[r].bind(c);
524
524
  u.isMobxAction = !0, c[r] = u;
525
525
  }), t;
@@ -732,7 +732,7 @@ function wc(t, e, n, r) {
732
732
  if (n.get)
733
733
  return Mn.make_(t, e, n, r);
734
734
  if (n.set) {
735
- var s = Ye(n.set) ? n.set : qe(e.toString(), n.set);
735
+ var s = Je(n.set) ? n.set : qe(e.toString(), n.set);
736
736
  return r === t.target_ ? t.defineProperty_(e, {
737
737
  configurable: b.safeDescriptors ? t.isPlainObject_ : !0,
738
738
  set: s
@@ -821,7 +821,7 @@ var Dc = {
821
821
  },
822
822
  array: function(e, n) {
823
823
  var r = Bt(n);
824
- return (b.useProxies === !1 || r.proxy === !1 ? Fu : Mu)(e, Ht(r), r.name);
824
+ return (b.useProxies === !1 || r.proxy === !1 ? ku : Mu)(e, Ht(r), r.name);
825
825
  },
826
826
  map: function(e, n) {
827
827
  var r = Bt(n);
@@ -832,7 +832,7 @@ var Dc = {
832
832
  return new ss(e, Ht(r), r.name);
833
833
  },
834
834
  object: function(e, n, r) {
835
- return Fe(function() {
835
+ return ke(function() {
836
836
  return Zo(b.useProxies === !1 || (r == null ? void 0 : r.proxy) === !1 ? nt({}, r) : Eu({}, r), e, n);
837
837
  });
838
838
  },
@@ -855,7 +855,7 @@ var Dc = {
855
855
  };
856
856
  Object.assign(Mn, fr);
857
857
  Mn.struct = /* @__PURE__ */ we(Lc);
858
- var hi, pi, an = 0, kc = 1, Fc = (hi = (pi = /* @__PURE__ */ rn(function() {
858
+ var hi, pi, an = 0, Fc = 1, kc = (hi = (pi = /* @__PURE__ */ rn(function() {
859
859
  }, "name")) == null ? void 0 : pi.configurable) != null ? hi : !1, mi = {
860
860
  value: "action",
861
861
  configurable: !0,
@@ -869,7 +869,7 @@ function qe(t, e, n, r) {
869
869
  }
870
870
  return i.isMobxAction = !0, i.toString = function() {
871
871
  return e.toString();
872
- }, Fc && (mi.value = t, Se(i, "name", mi)), i;
872
+ }, kc && (mi.value = t, Se(i, "name", mi)), i;
873
873
  }
874
874
  function Do(t, e, n, r, i) {
875
875
  var o = jc(t, e, r, i);
@@ -886,7 +886,7 @@ function jc(t, e, n, r) {
886
886
  if (process.env.NODE_ENV !== "production" && i) {
887
887
  o = Date.now();
888
888
  var s = r ? Array.from(r) : on;
889
- Y({
889
+ J({
890
890
  type: Br,
891
891
  name: t,
892
892
  object: n,
@@ -904,7 +904,7 @@ function jc(t, e, n, r) {
904
904
  prevAllowStateReads_: l,
905
905
  notifySpy_: i,
906
906
  startTime_: o,
907
- actionId_: kc++,
907
+ actionId_: Fc++,
908
908
  parentActionId_: an
909
909
  };
910
910
  return an = d.actionId_, d;
@@ -934,7 +934,7 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
934
934
  var c;
935
935
  if (o === void 0 && (o = process.env.NODE_ENV !== "production" ? "ObservableValue@" + ae() : "ObservableValue"), s === void 0 && (s = !0), a === void 0 && (a = We.default), c = t.call(this, o) || this, c.enhancer = void 0, c.name_ = void 0, c.equals = void 0, c.hasUnreportedChange_ = !1, c.interceptors_ = void 0, c.changeListeners_ = void 0, c.value_ = void 0, c.dehancer = void 0, c.enhancer = i, c.name_ = o, c.equals = a, c.value_ = i(r, void 0, o), process.env.NODE_ENV !== "production" && s && j()) {
936
936
  var u;
937
- Je({
937
+ Ye({
938
938
  type: Bc,
939
939
  object: c,
940
940
  observableKind: "value",
@@ -944,7 +944,7 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
944
944
  }
945
945
  return c;
946
946
  }
947
- Fr(e, t);
947
+ kr(e, t);
948
948
  var n = e.prototype;
949
949
  return n.dehanceValue = function(i) {
950
950
  return this.dehancer !== void 0 ? this.dehancer(i) : i;
@@ -952,7 +952,7 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
952
952
  var o = this.value_;
953
953
  if (i = this.prepareNewValue_(i), i !== b.UNCHANGED) {
954
954
  var s = j();
955
- process.env.NODE_ENV !== "production" && s && Y({
955
+ process.env.NODE_ENV !== "production" && s && J({
956
956
  type: fe,
957
957
  object: this,
958
958
  observableKind: "value",
@@ -984,7 +984,7 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
984
984
  }, n.get = function() {
985
985
  return this.reportObserved(), this.dehanceValue(this.value_);
986
986
  }, n.intercept_ = function(i) {
987
- return Ft(this, i);
987
+ return kt(this, i);
988
988
  }, n.observe_ = function(i, o) {
989
989
  return o && i({
990
990
  observableKind: "value",
@@ -1005,7 +1005,7 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
1005
1005
  }, n[Symbol.toPrimitive] = function() {
1006
1006
  return this.valueOf();
1007
1007
  }, e;
1008
- })(ke), U = /* @__PURE__ */ (function() {
1008
+ })(Fe), U = /* @__PURE__ */ (function() {
1009
1009
  function t(n) {
1010
1010
  this.dependenciesState_ = N.NOT_TRACKING_, this.observing_ = [], this.newObserving_ = null, this.observers_ = /* @__PURE__ */ new Set(), this.runId_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = N.UP_TO_DATE_, this.unboundDepsCount_ = 0, this.value_ = new cn(null), this.name_ = void 0, this.triggeredBy_ = void 0, this.flags_ = 0, this.derivation = void 0, this.setter_ = void 0, this.isTracing_ = se.NONE, this.scope_ = void 0, this.equals_ = void 0, this.requiresReaction_ = void 0, this.keepAlive_ = void 0, this.onBOL = void 0, this.onBUOL = void 0, n.get || w(31), this.derivation = n.get, this.name_ = n.name || (process.env.NODE_ENV !== "production" ? "ComputedValue@" + ae() : "ComputedValue"), n.set && (this.setter_ = qe(process.env.NODE_ENV !== "production" ? this.name_ + "-setter" : "ComputedValue-setter", n.set)), this.equals_ = n.equals || (n.compareStructural || n.struct ? We.structural : We.default), this.scope_ = n.context, this.requiresReaction_ = n.requiresReaction, this.keepAlive_ = !!n.keepAlive;
1011
1011
  }
@@ -1026,10 +1026,10 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
1026
1026
  hr(this) && (this.warnAboutUntrackedRead_(), re(), this.value_ = this.computeValue_(!1), ie());
1027
1027
  else if (Vo(this), hr(this)) {
1028
1028
  var r = b.trackingContext;
1029
- this.keepAlive_ && !r && (b.trackingContext = this), this.trackAndCompute() && Yc(this), b.trackingContext = r;
1029
+ this.keepAlive_ && !r && (b.trackingContext = this), this.trackAndCompute() && Jc(this), b.trackingContext = r;
1030
1030
  }
1031
1031
  var i = this.value_;
1032
- if (Yt(i))
1032
+ if (Jt(i))
1033
1033
  throw i.cause;
1034
1034
  return i;
1035
1035
  }, e.set = function(r) {
@@ -1046,8 +1046,8 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
1046
1046
  var r = this.value_, i = (
1047
1047
  /* see #1208 */
1048
1048
  this.dependenciesState_ === N.NOT_TRACKING_
1049
- ), o = this.computeValue_(!0), s = i || Yt(r) || Yt(o) || !this.equals_(r, o);
1050
- return s && (this.value_ = o, process.env.NODE_ENV !== "production" && j() && Je({
1049
+ ), o = this.computeValue_(!0), s = i || Jt(r) || Jt(o) || !this.equals_(r, o);
1050
+ return s && (this.value_ = o, process.env.NODE_ENV !== "production" && j() && Ye({
1051
1051
  observableKind: "computed",
1052
1052
  debugObjectName: this.name_,
1053
1053
  object: this.scope_,
@@ -1102,7 +1102,7 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
1102
1102
  return q(this.flags_, t.isComputingMask_);
1103
1103
  },
1104
1104
  set: function(r) {
1105
- this.flags_ = J(this.flags_, t.isComputingMask_, r);
1105
+ this.flags_ = Y(this.flags_, t.isComputingMask_, r);
1106
1106
  }
1107
1107
  }, {
1108
1108
  key: "isRunningSetter",
@@ -1110,7 +1110,7 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
1110
1110
  return q(this.flags_, t.isRunningSetterMask_);
1111
1111
  },
1112
1112
  set: function(r) {
1113
- this.flags_ = J(this.flags_, t.isRunningSetterMask_, r);
1113
+ this.flags_ = Y(this.flags_, t.isRunningSetterMask_, r);
1114
1114
  }
1115
1115
  }, {
1116
1116
  key: "isBeingObserved",
@@ -1118,7 +1118,7 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
1118
1118
  return q(this.flags_, t.isBeingObservedMask_);
1119
1119
  },
1120
1120
  set: function(r) {
1121
- this.flags_ = J(this.flags_, t.isBeingObservedMask_, r);
1121
+ this.flags_ = Y(this.flags_, t.isBeingObservedMask_, r);
1122
1122
  }
1123
1123
  }, {
1124
1124
  key: "isPendingUnobservation",
@@ -1126,7 +1126,7 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
1126
1126
  return q(this.flags_, t.isPendingUnobservationMask_);
1127
1127
  },
1128
1128
  set: function(r) {
1129
- this.flags_ = J(this.flags_, t.isPendingUnobservationMask_, r);
1129
+ this.flags_ = Y(this.flags_, t.isPendingUnobservationMask_, r);
1130
1130
  }
1131
1131
  }, {
1132
1132
  key: "diffValue",
@@ -1134,7 +1134,7 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
1134
1134
  return q(this.flags_, t.diffValueMask_) ? 1 : 0;
1135
1135
  },
1136
1136
  set: function(r) {
1137
- this.flags_ = J(this.flags_, t.diffValueMask_, r === 1);
1137
+ this.flags_ = Y(this.flags_, t.diffValueMask_, r === 1);
1138
1138
  }
1139
1139
  }]);
1140
1140
  })();
@@ -1154,7 +1154,7 @@ var se;
1154
1154
  var cn = function(e) {
1155
1155
  this.cause = void 0, this.cause = e;
1156
1156
  };
1157
- function Yt(t) {
1157
+ function Jt(t) {
1158
1158
  return t instanceof cn;
1159
1159
  }
1160
1160
  function hr(t) {
@@ -1180,7 +1180,7 @@ function hr(t) {
1180
1180
  return Me(n), Ot(e), !0;
1181
1181
  }
1182
1182
  }
1183
- return ko(t), Me(n), Ot(e), !1;
1183
+ return Fo(t), Me(n), Ot(e), !1;
1184
1184
  }
1185
1185
  }
1186
1186
  }
@@ -1195,7 +1195,7 @@ function Hc(t) {
1195
1195
  }
1196
1196
  function Ro(t, e, n) {
1197
1197
  var r = Vr(!0);
1198
- ko(t), t.newObserving_ = new Array(
1198
+ Fo(t), t.newObserving_ = new Array(
1199
1199
  // Reserve constant space for initial dependencies, dynamic space otherwise.
1200
1200
  // See https://github.com/mobxjs/mobx/pull/3833
1201
1201
  t.runId_ === 0 ? 100 : t.observing_.length
@@ -1227,7 +1227,7 @@ function Uc(t) {
1227
1227
  }
1228
1228
  for (; i--; ) {
1229
1229
  var u = n[i];
1230
- u.diffValue === 1 && (u.diffValue = 0, Jc(u, t));
1230
+ u.diffValue === 1 && (u.diffValue = 0, Yc(u, t));
1231
1231
  }
1232
1232
  r !== N.UP_TO_DATE_ && (t.dependenciesState_ = r, t.onBecomeStale_());
1233
1233
  }
@@ -1260,7 +1260,7 @@ function Vr(t) {
1260
1260
  function Ot(t) {
1261
1261
  b.allowStateReads = t;
1262
1262
  }
1263
- function ko(t) {
1263
+ function Fo(t) {
1264
1264
  if (t.dependenciesState_ !== N.UP_TO_DATE_) {
1265
1265
  t.dependenciesState_ = N.UP_TO_DATE_;
1266
1266
  for (var e = t.observing_, n = e.length; n--; )
@@ -1269,14 +1269,14 @@ function ko(t) {
1269
1269
  }
1270
1270
  var Xt = function() {
1271
1271
  this.version = 6, this.UNCHANGED = {}, this.trackingDerivation = null, this.trackingContext = null, this.runId = 0, this.mobxGuid = 0, this.inBatch = 0, this.pendingUnobservations = [], this.pendingReactions = [], this.isRunningReactions = !1, this.allowStateChanges = !1, this.allowStateReads = !0, this.enforceActions = !0, this.spyListeners = [], this.globalReactionErrorHandlers = [], this.computedRequiresReaction = !1, this.reactionRequiresObservable = !1, this.observableRequiresReaction = !1, this.disableErrorBoundaries = !1, this.suppressReactionErrors = !1, this.useProxies = !0, this.verifyProxies = !1, this.safeDescriptors = !0;
1272
- }, Zt = !0, Fo = !1, b = /* @__PURE__ */ (function() {
1272
+ }, Zt = !0, ko = !1, b = /* @__PURE__ */ (function() {
1273
1273
  var t = /* @__PURE__ */ wn();
1274
1274
  return t.__mobxInstanceCount > 0 && !t.__mobxGlobals && (Zt = !1), t.__mobxGlobals && t.__mobxGlobals.version !== new Xt().version && (Zt = !1), Zt ? t.__mobxGlobals ? (t.__mobxInstanceCount += 1, t.__mobxGlobals.UNCHANGED || (t.__mobxGlobals.UNCHANGED = {}), t.__mobxGlobals) : (t.__mobxInstanceCount = 1, t.__mobxGlobals = /* @__PURE__ */ new Xt()) : (setTimeout(function() {
1275
- Fo || w(35);
1275
+ ko || w(35);
1276
1276
  }, 1), new Xt());
1277
1277
  })();
1278
1278
  function Wc() {
1279
- if ((b.pendingReactions.length || b.inBatch || b.isRunningReactions) && w(36), Fo = !0, Zt) {
1279
+ if ((b.pendingReactions.length || b.inBatch || b.isRunningReactions) && w(36), ko = !0, Zt) {
1280
1280
  var t = wn();
1281
1281
  --t.__mobxInstanceCount === 0 && (t.__mobxGlobals = void 0), b = new Xt();
1282
1282
  }
@@ -1287,7 +1287,7 @@ function Gc(t) {
1287
1287
  function qc(t) {
1288
1288
  return t.observers_;
1289
1289
  }
1290
- function Jc(t, e) {
1290
+ function Yc(t, e) {
1291
1291
  t.observers_.add(e), t.lowestObserverState_ > e.dependenciesState_ && (t.lowestObserverState_ = e.dependenciesState_);
1292
1292
  }
1293
1293
  function jo(t, e) {
@@ -1319,7 +1319,7 @@ function Bo(t) {
1319
1319
  e.dependenciesState_ === N.UP_TO_DATE_ && (process.env.NODE_ENV !== "production" && e.isTracing_ !== se.NONE && Ho(e, t), e.onBecomeStale_()), e.dependenciesState_ = N.STALE_;
1320
1320
  }));
1321
1321
  }
1322
- function Yc(t) {
1322
+ function Jc(t) {
1323
1323
  t.lowestObserverState_ !== N.STALE_ && (t.lowestObserverState_ = N.STALE_, t.observers_.forEach(function(e) {
1324
1324
  e.dependenciesState_ === N.POSSIBLY_STALE_ ? (e.dependenciesState_ = N.STALE_, process.env.NODE_ENV !== "production" && e.isTracing_ !== se.NONE && Ho(e, t)) : e.dependenciesState_ === N.UP_TO_DATE_ && (t.lowestObserverState_ = N.UP_TO_DATE_);
1325
1325
  }));
@@ -1375,7 +1375,7 @@ var Oe = /* @__PURE__ */ (function() {
1375
1375
  if (b.trackingContext = this, hr(this)) {
1376
1376
  this.isTrackPending = !0;
1377
1377
  try {
1378
- this.onInvalidate_(), process.env.NODE_ENV !== "production" && this.isTrackPending && j() && Je({
1378
+ this.onInvalidate_(), process.env.NODE_ENV !== "production" && this.isTrackPending && j() && Ye({
1379
1379
  name: this.name_,
1380
1380
  type: "scheduled-reaction"
1381
1381
  });
@@ -1389,14 +1389,14 @@ var Oe = /* @__PURE__ */ (function() {
1389
1389
  if (!this.isDisposed) {
1390
1390
  re();
1391
1391
  var i = j(), o;
1392
- process.env.NODE_ENV !== "production" && i && (o = Date.now(), Y({
1392
+ process.env.NODE_ENV !== "production" && i && (o = Date.now(), J({
1393
1393
  name: this.name_,
1394
1394
  type: "reaction"
1395
1395
  })), this.isRunning = !0;
1396
1396
  var s = b.trackingContext;
1397
1397
  b.trackingContext = this;
1398
1398
  var a = Ro(this, r, void 0);
1399
- b.trackingContext = s, this.isRunning = !1, this.isTrackPending = !1, this.isDisposed && pr(this), Yt(a) && this.reportExceptionInDerivation_(a.cause), process.env.NODE_ENV !== "production" && i && X({
1399
+ b.trackingContext = s, this.isRunning = !1, this.isTrackPending = !1, this.isDisposed && pr(this), Jt(a) && this.reportExceptionInDerivation_(a.cause), process.env.NODE_ENV !== "production" && i && X({
1400
1400
  time: Date.now() - o
1401
1401
  }), ie();
1402
1402
  }
@@ -1409,7 +1409,7 @@ var Oe = /* @__PURE__ */ (function() {
1409
1409
  if (b.disableErrorBoundaries)
1410
1410
  throw r;
1411
1411
  var o = process.env.NODE_ENV !== "production" ? "[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '" + this + "'" : "[mobx] uncaught error in '" + this + "'";
1412
- b.suppressReactionErrors ? process.env.NODE_ENV !== "production" && console.warn("[mobx] (error in reaction '" + this.name_ + "' suppressed, fix error of causing action below)") : console.error(o, r), process.env.NODE_ENV !== "production" && j() && Je({
1412
+ b.suppressReactionErrors ? process.env.NODE_ENV !== "production" && console.warn("[mobx] (error in reaction '" + this.name_ + "' suppressed, fix error of causing action below)") : console.error(o, r), process.env.NODE_ENV !== "production" && j() && Ye({
1413
1413
  type: "error",
1414
1414
  name: this.name_,
1415
1415
  message: o,
@@ -1434,7 +1434,7 @@ var Oe = /* @__PURE__ */ (function() {
1434
1434
  return q(this.flags_, t.isDisposedMask_);
1435
1435
  },
1436
1436
  set: function(r) {
1437
- this.flags_ = J(this.flags_, t.isDisposedMask_, r);
1437
+ this.flags_ = Y(this.flags_, t.isDisposedMask_, r);
1438
1438
  }
1439
1439
  }, {
1440
1440
  key: "isScheduled",
@@ -1442,7 +1442,7 @@ var Oe = /* @__PURE__ */ (function() {
1442
1442
  return q(this.flags_, t.isScheduledMask_);
1443
1443
  },
1444
1444
  set: function(r) {
1445
- this.flags_ = J(this.flags_, t.isScheduledMask_, r);
1445
+ this.flags_ = Y(this.flags_, t.isScheduledMask_, r);
1446
1446
  }
1447
1447
  }, {
1448
1448
  key: "isTrackPending",
@@ -1450,7 +1450,7 @@ var Oe = /* @__PURE__ */ (function() {
1450
1450
  return q(this.flags_, t.isTrackPendingMask_);
1451
1451
  },
1452
1452
  set: function(r) {
1453
- this.flags_ = J(this.flags_, t.isTrackPendingMask_, r);
1453
+ this.flags_ = Y(this.flags_, t.isTrackPendingMask_, r);
1454
1454
  }
1455
1455
  }, {
1456
1456
  key: "isRunning",
@@ -1458,7 +1458,7 @@ var Oe = /* @__PURE__ */ (function() {
1458
1458
  return q(this.flags_, t.isRunningMask_);
1459
1459
  },
1460
1460
  set: function(r) {
1461
- this.flags_ = J(this.flags_, t.isRunningMask_, r);
1461
+ this.flags_ = Y(this.flags_, t.isRunningMask_, r);
1462
1462
  }
1463
1463
  }, {
1464
1464
  key: "diffValue",
@@ -1466,7 +1466,7 @@ var Oe = /* @__PURE__ */ (function() {
1466
1466
  return q(this.flags_, t.diffValueMask_) ? 1 : 0;
1467
1467
  },
1468
1468
  set: function(r) {
1469
- this.flags_ = J(this.flags_, t.diffValueMask_, r === 1);
1469
+ this.flags_ = Y(this.flags_, t.diffValueMask_, r === 1);
1470
1470
  }
1471
1471
  }]);
1472
1472
  })();
@@ -1502,17 +1502,17 @@ function Qc(t) {
1502
1502
  function j() {
1503
1503
  return process.env.NODE_ENV !== "production" && !!b.spyListeners.length;
1504
1504
  }
1505
- function Je(t) {
1505
+ function Ye(t) {
1506
1506
  if (process.env.NODE_ENV !== "production" && b.spyListeners.length)
1507
1507
  for (var e = b.spyListeners, n = 0, r = e.length; n < r; n++)
1508
1508
  e[n](t);
1509
1509
  }
1510
- function Y(t) {
1510
+ function J(t) {
1511
1511
  if (process.env.NODE_ENV !== "production") {
1512
1512
  var e = Ie({}, t, {
1513
1513
  spyReportStart: !0
1514
1514
  });
1515
- Je(e);
1515
+ Ye(e);
1516
1516
  }
1517
1517
  }
1518
1518
  var eu = {
@@ -1520,24 +1520,24 @@ var eu = {
1520
1520
  spyReportEnd: !0
1521
1521
  };
1522
1522
  function X(t) {
1523
- process.env.NODE_ENV !== "production" && Je(t ? Ie({}, t, {
1523
+ process.env.NODE_ENV !== "production" && Ye(t ? Ie({}, t, {
1524
1524
  type: "report-end",
1525
1525
  spyReportEnd: !0
1526
1526
  }) : eu);
1527
1527
  }
1528
1528
  function tu(t) {
1529
1529
  return process.env.NODE_ENV === "production" ? (console.warn("[mobx.spy] Is a no-op in production builds"), function() {
1530
- }) : (b.spyListeners.push(t), kr(function() {
1530
+ }) : (b.spyListeners.push(t), Fr(function() {
1531
1531
  b.spyListeners = b.spyListeners.filter(function(e) {
1532
1532
  return e !== t;
1533
1533
  });
1534
1534
  }));
1535
1535
  }
1536
- var Br = "action", nu = "action.bound", Wo = "autoAction", ru = "autoAction.bound", Go = "<unnamed action>", gr = /* @__PURE__ */ kt(Br), iu = /* @__PURE__ */ kt(nu, {
1536
+ var Br = "action", nu = "action.bound", Wo = "autoAction", ru = "autoAction.bound", Go = "<unnamed action>", gr = /* @__PURE__ */ Ft(Br), iu = /* @__PURE__ */ Ft(nu, {
1537
1537
  bound: !0
1538
- }), vr = /* @__PURE__ */ kt(Wo, {
1538
+ }), vr = /* @__PURE__ */ Ft(Wo, {
1539
1539
  autoAction: !0
1540
- }), ou = /* @__PURE__ */ kt(ru, {
1540
+ }), ou = /* @__PURE__ */ Ft(ru, {
1541
1541
  autoAction: !0,
1542
1542
  bound: !0
1543
1543
  });
@@ -1552,7 +1552,7 @@ function qo(t) {
1552
1552
  if (Re(i))
1553
1553
  return Rt(r, i, t ? vr : gr);
1554
1554
  if (Re(r))
1555
- return we(kt(t ? Wo : Br, {
1555
+ return we(Ft(t ? Wo : Br, {
1556
1556
  name: r,
1557
1557
  autoAction: t
1558
1558
  }));
@@ -1569,19 +1569,19 @@ xt.bound = /* @__PURE__ */ we(ou);
1569
1569
  function su(t) {
1570
1570
  return Do(t.name || Go, !1, t, this, void 0);
1571
1571
  }
1572
- function Ye(t) {
1572
+ function Je(t) {
1573
1573
  return $(t) && t.isMobxAction === !0;
1574
1574
  }
1575
1575
  function au(t, e) {
1576
1576
  var n, r, i, o;
1577
- e === void 0 && (e = Lr), process.env.NODE_ENV !== "production" && ($(t) || w("Autorun expects a function as first argument"), Ye(t) && w("Autorun does not accept actions since actions are untrackable"));
1577
+ e === void 0 && (e = Lr), process.env.NODE_ENV !== "production" && ($(t) || w("Autorun expects a function as first argument"), Je(t) && w("Autorun does not accept actions since actions are untrackable"));
1578
1578
  var s = (n = (r = e) == null ? void 0 : r.name) != null ? n : process.env.NODE_ENV !== "production" ? t.name || "Autorun@" + ae() : "Autorun", a = !e.scheduler && !e.delay, c;
1579
1579
  if (a)
1580
1580
  c = new Oe(s, function() {
1581
1581
  this.track(d);
1582
1582
  }, e.onError, e.requiresObservable);
1583
1583
  else {
1584
- var u = Jo(e), l = !1;
1584
+ var u = Yo(e), l = !1;
1585
1585
  c = new Oe(s, function() {
1586
1586
  l || (l = !0, u(function() {
1587
1587
  l = !1, c.isDisposed || c.track(d);
@@ -1596,7 +1596,7 @@ function au(t, e) {
1596
1596
  var cu = function(e) {
1597
1597
  return e();
1598
1598
  };
1599
- function Jo(t) {
1599
+ function Yo(t) {
1600
1600
  return t.scheduler ? t.scheduler : t.delay ? function(e) {
1601
1601
  return setTimeout(e, t.delay);
1602
1602
  } : cu;
@@ -1604,17 +1604,17 @@ function Jo(t) {
1604
1604
  function uu(t, e, n) {
1605
1605
  var r, i, o;
1606
1606
  n === void 0 && (n = Lr), process.env.NODE_ENV !== "production" && ((!$(t) || !$(e)) && w("First and second argument to reaction should be functions"), K(n) || w("Third argument of reactions should be an object"));
1607
- var s = (r = n.name) != null ? r : process.env.NODE_ENV !== "production" ? "Reaction@" + ae() : "Reaction", a = He(s, n.onError ? lu(n.onError, e) : e), c = !n.scheduler && !n.delay, u = Jo(n), l = !0, d = !1, f, h = n.compareStructural ? We.structural : n.equals || We.default, g = new Oe(s, function() {
1607
+ var s = (r = n.name) != null ? r : process.env.NODE_ENV !== "production" ? "Reaction@" + ae() : "Reaction", a = He(s, n.onError ? lu(n.onError, e) : e), c = !n.scheduler && !n.delay, u = Yo(n), l = !0, d = !1, f, h = n.compareStructural ? We.structural : n.equals || We.default, g = new Oe(s, function() {
1608
1608
  l || c ? p() : d || (d = !0, u(p));
1609
1609
  }, n.onError, n.requiresObservable);
1610
1610
  function p() {
1611
1611
  if (d = !1, !g.isDisposed) {
1612
1612
  var m = !1, S = f;
1613
1613
  g.track(function() {
1614
- var _ = Vc(!1, function() {
1614
+ var y = Vc(!1, function() {
1615
1615
  return t(g);
1616
1616
  });
1617
- m = l || !h(f, _), f = _;
1617
+ m = l || !h(f, y), f = y;
1618
1618
  }), (l && n.fireImmediately || !l && m) && a(f, S, g), l = !1;
1619
1619
  }
1620
1620
  }
@@ -1633,7 +1633,7 @@ var du = "onBO", fu = "onBUO";
1633
1633
  function hu(t, e, n) {
1634
1634
  return Xo(du, t, e, n);
1635
1635
  }
1636
- function Yo(t, e, n) {
1636
+ function Jo(t, e, n) {
1637
1637
  return Xo(fu, t, e, n);
1638
1638
  }
1639
1639
  function Xo(t, e, n, r) {
@@ -1658,7 +1658,7 @@ function gu(t) {
1658
1658
  function Zo(t, e, n, r) {
1659
1659
  process.env.NODE_ENV !== "production" && (arguments.length > 4 && w("'extendObservable' expected 2-4 arguments"), typeof t != "object" && w("'extendObservable' expects an object as first argument"), Pe(t) && w("'extendObservable' should not be used on maps, use map.merge instead"), K(e) || w("'extendObservable' only accepts plain objects as second argument"), (Mt(e) || Mt(n)) && w("Extending an object with another observable (object) is not supported"));
1660
1660
  var i = Ka(e);
1661
- return Fe(function() {
1661
+ return ke(function() {
1662
1662
  var o = nt(t, r)[E];
1663
1663
  dt(i).forEach(function(s) {
1664
1664
  o.extend_(
@@ -1696,7 +1696,7 @@ var bu = 0, yu = /* @__PURE__ */ (function(t) {
1696
1696
  var r;
1697
1697
  return r = t.call(this, "FLOW_CANCELLED") || this, Object.setPrototypeOf(r, (this instanceof e ? this.constructor : void 0).prototype), r.name = "FlowCancellationError", r;
1698
1698
  }
1699
- Fr(e, t);
1699
+ kr(e, t);
1700
1700
  var n = e.prototype;
1701
1701
  return n.toString = function() {
1702
1702
  return "Error: " + this.message;
@@ -1721,9 +1721,9 @@ var bu = 0, yu = /* @__PURE__ */ (function(t) {
1721
1721
  } catch (A) {
1722
1722
  return p(A);
1723
1723
  }
1724
- y(P);
1724
+ _(P);
1725
1725
  }
1726
- function _(O) {
1726
+ function y(O) {
1727
1727
  f = void 0;
1728
1728
  var P;
1729
1729
  try {
@@ -1731,14 +1731,14 @@ var bu = 0, yu = /* @__PURE__ */ (function(t) {
1731
1731
  } catch (A) {
1732
1732
  return p(A);
1733
1733
  }
1734
- y(P);
1734
+ _(P);
1735
1735
  }
1736
- function y(O) {
1736
+ function _(O) {
1737
1737
  if ($(O == null ? void 0 : O.then)) {
1738
- O.then(y, p);
1738
+ O.then(_, p);
1739
1739
  return;
1740
1740
  }
1741
- return O.done ? g(O.value) : (f = Promise.resolve(O.value), f.then(S, _));
1741
+ return O.done ? g(O.value) : (f = Promise.resolve(O.value), f.then(S, y));
1742
1742
  }
1743
1743
  S(void 0);
1744
1744
  });
@@ -1778,7 +1778,7 @@ function ns(t, e) {
1778
1778
  function Mt(t) {
1779
1779
  return process.env.NODE_ENV !== "production" && arguments.length !== 1 && w("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"), ns(t);
1780
1780
  }
1781
- function Jh(t, e) {
1781
+ function Yh(t, e) {
1782
1782
  return process.env.NODE_ENV !== "production" && !Re(e) ? w("expected a property name as second argument") : ns(t, e);
1783
1783
  }
1784
1784
  function Su() {
@@ -1846,9 +1846,9 @@ function Eu(t, e) {
1846
1846
  function te(t) {
1847
1847
  return t.interceptors_ !== void 0 && t.interceptors_.length > 0;
1848
1848
  }
1849
- function Ft(t, e) {
1849
+ function kt(t, e) {
1850
1850
  var n = t.interceptors_ || (t.interceptors_ = []);
1851
- return n.push(e), kr(function() {
1851
+ return n.push(e), Fr(function() {
1852
1852
  var r = n.indexOf(e);
1853
1853
  r !== -1 && n.splice(r, 1);
1854
1854
  });
@@ -1868,7 +1868,7 @@ function he(t) {
1868
1868
  }
1869
1869
  function jt(t, e) {
1870
1870
  var n = t.changeListeners_ || (t.changeListeners_ = []);
1871
- return n.push(e), kr(function() {
1871
+ return n.push(e), Fr(function() {
1872
1872
  var r = n.indexOf(e);
1873
1873
  r !== -1 && n.splice(r, 1);
1874
1874
  });
@@ -1883,7 +1883,7 @@ function pe(t, e) {
1883
1883
  }
1884
1884
  }
1885
1885
  function Au(t, e, n) {
1886
- return Fe(function() {
1886
+ return ke(function() {
1887
1887
  var r, i = nt(t, n)[E];
1888
1888
  process.env.NODE_ENV !== "production" && e && t[H] && w("makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported."), (r = e) != null || (e = Za(t)), dt(e).forEach(function(o) {
1889
1889
  return i.make_(o, e[o]);
@@ -1892,7 +1892,7 @@ function Au(t, e, n) {
1892
1892
  }
1893
1893
  var Dn = /* @__PURE__ */ Symbol("mobx-keys");
1894
1894
  function rs(t, e, n) {
1895
- return process.env.NODE_ENV !== "production" && (!K(t) && !K(Object.getPrototypeOf(t)) && w("'makeAutoObservable' can only be used for classes that don't have a superclass"), Xe(t) && w("makeAutoObservable can only be used on objects not already made observable")), K(t) ? Zo(t, t, e, n) : (Fe(function() {
1895
+ return process.env.NODE_ENV !== "production" && (!K(t) && !K(Object.getPrototypeOf(t)) && w("'makeAutoObservable' can only be used for classes that don't have a superclass"), Xe(t) && w("makeAutoObservable can only be used on objects not already made observable")), K(t) ? Zo(t, t, e, n) : (ke(function() {
1896
1896
  var r = nt(t, n)[E];
1897
1897
  if (!t[Dn]) {
1898
1898
  var i = Object.getPrototypeOf(t), o = new Set([].concat(dt(t), dt(i)));
@@ -1921,7 +1921,7 @@ var bi = "splice", fe = "update", xu = 1e4, Nu = {
1921
1921
  }
1922
1922
  }, Hr = /* @__PURE__ */ (function() {
1923
1923
  function t(n, r, i, o) {
1924
- n === void 0 && (n = process.env.NODE_ENV !== "production" ? "ObservableArray@" + ae() : "ObservableArray"), this.owned_ = void 0, this.legacyMode_ = void 0, this.atom_ = void 0, this.values_ = [], this.interceptors_ = void 0, this.changeListeners_ = void 0, this.enhancer_ = void 0, this.dehancer = void 0, this.proxy_ = void 0, this.lastKnownLength_ = 0, this.owned_ = i, this.legacyMode_ = o, this.atom_ = new ke(n), this.enhancer_ = function(s, a) {
1924
+ n === void 0 && (n = process.env.NODE_ENV !== "production" ? "ObservableArray@" + ae() : "ObservableArray"), this.owned_ = void 0, this.legacyMode_ = void 0, this.atom_ = void 0, this.values_ = [], this.interceptors_ = void 0, this.changeListeners_ = void 0, this.enhancer_ = void 0, this.dehancer = void 0, this.proxy_ = void 0, this.lastKnownLength_ = 0, this.owned_ = i, this.legacyMode_ = o, this.atom_ = new Fe(n), this.enhancer_ = function(s, a) {
1925
1925
  return r(s, a, process.env.NODE_ENV !== "production" ? n + "[..]" : "ObservableArray[..]");
1926
1926
  };
1927
1927
  }
@@ -1931,7 +1931,7 @@ var bi = "splice", fe = "update", xu = 1e4, Nu = {
1931
1931
  }, e.dehanceValues_ = function(r) {
1932
1932
  return this.dehancer !== void 0 && r.length > 0 ? r.map(this.dehancer) : r;
1933
1933
  }, e.intercept_ = function(r) {
1934
- return Ft(this, r);
1934
+ return kt(this, r);
1935
1935
  }, e.observe_ = function(r, i) {
1936
1936
  return i === void 0 && (i = !1), i && r({
1937
1937
  observableKind: "array",
@@ -2005,7 +2005,7 @@ var bi = "splice", fe = "update", xu = 1e4, Nu = {
2005
2005
  newValue: i,
2006
2006
  oldValue: o
2007
2007
  } : null;
2008
- process.env.NODE_ENV !== "production" && s && Y(c), this.atom_.reportChanged(), a && pe(this, c), process.env.NODE_ENV !== "production" && s && X();
2008
+ process.env.NODE_ENV !== "production" && s && J(c), this.atom_.reportChanged(), a && pe(this, c), process.env.NODE_ENV !== "production" && s && X();
2009
2009
  }, e.notifyArraySplice_ = function(r, i, o) {
2010
2010
  var s = !this.owned_ && j(), a = he(this), c = a || s ? {
2011
2011
  observableKind: "array",
@@ -2018,7 +2018,7 @@ var bi = "splice", fe = "update", xu = 1e4, Nu = {
2018
2018
  removedCount: o.length,
2019
2019
  addedCount: i.length
2020
2020
  } : null;
2021
- process.env.NODE_ENV !== "production" && s && Y(c), this.atom_.reportChanged(), a && pe(this, c), process.env.NODE_ENV !== "production" && s && X();
2021
+ process.env.NODE_ENV !== "production" && s && J(c), this.atom_.reportChanged(), a && pe(this, c), process.env.NODE_ENV !== "production" && s && X();
2022
2022
  }, e.get_ = function(r) {
2023
2023
  if (this.legacyMode_ && r >= this.values_.length) {
2024
2024
  console.warn(process.env.NODE_ENV !== "production" ? "[mobx.array] Attempt to read an array index (" + r + ") that is out of bounds (" + this.values_.length + "). Please check length first. Out of bound indices will not be tracked by MobX" : "[mobx] Out of bounds read: " + r);
@@ -2053,7 +2053,7 @@ var bi = "splice", fe = "update", xu = 1e4, Nu = {
2053
2053
  }, t;
2054
2054
  })();
2055
2055
  function Mu(t, e, n, r) {
2056
- return n === void 0 && (n = process.env.NODE_ENV !== "production" ? "ObservableArray@" + ae() : "ObservableArray"), r === void 0 && (r = !1), yo(), Fe(function() {
2056
+ return n === void 0 && (n = process.env.NODE_ENV !== "production" ? "ObservableArray@" + ae() : "ObservableArray"), r === void 0 && (r = !1), yo(), ke(function() {
2057
2057
  var i = new Hr(n, e, r, !1);
2058
2058
  So(i.values_, E, i);
2059
2059
  var o = new Proxy(i.values_, Nu);
@@ -2188,7 +2188,7 @@ function zt(t) {
2188
2188
  var Pu = {}, De = "add", dn = "delete", os = /* @__PURE__ */ (function() {
2189
2189
  function t(n, r, i) {
2190
2190
  var o = this;
2191
- r === void 0 && (r = Ge), i === void 0 && (i = process.env.NODE_ENV !== "production" ? "ObservableMap@" + ae() : "ObservableMap"), this.enhancer_ = void 0, this.name_ = void 0, this[E] = Pu, this.data_ = void 0, this.hasMap_ = void 0, this.keysAtom_ = void 0, this.interceptors_ = void 0, this.changeListeners_ = void 0, this.dehancer = void 0, this.enhancer_ = r, this.name_ = i, $(Map) || w(18), Fe(function() {
2191
+ r === void 0 && (r = Ge), i === void 0 && (i = process.env.NODE_ENV !== "production" ? "ObservableMap@" + ae() : "ObservableMap"), this.enhancer_ = void 0, this.name_ = void 0, this[E] = Pu, this.data_ = void 0, this.hasMap_ = void 0, this.keysAtom_ = void 0, this.interceptors_ = void 0, this.changeListeners_ = void 0, this.dehancer = void 0, this.enhancer_ = r, this.name_ = i, $(Map) || w(18), ke(function() {
2192
2192
  o.keysAtom_ = Ao(process.env.NODE_ENV !== "production" ? o.name_ + ".keys()" : "ObservableMap.keys()"), o.data_ = /* @__PURE__ */ new Map(), o.hasMap_ = /* @__PURE__ */ new Map(), n && o.merge(n);
2193
2193
  });
2194
2194
  }
@@ -2202,7 +2202,7 @@ var Pu = {}, De = "add", dn = "delete", os = /* @__PURE__ */ (function() {
2202
2202
  var o = this.hasMap_.get(r);
2203
2203
  if (!o) {
2204
2204
  var s = o = new Ue(this.has_(r), xn, process.env.NODE_ENV !== "production" ? this.name_ + "." + cr(r) + "?" : "ObservableMap.key?", !1);
2205
- this.hasMap_.set(r, s), Yo(s, function() {
2205
+ this.hasMap_.set(r, s), Jo(s, function() {
2206
2206
  return i.hasMap_.delete(r);
2207
2207
  });
2208
2208
  }
@@ -2241,7 +2241,7 @@ var Pu = {}, De = "add", dn = "delete", os = /* @__PURE__ */ (function() {
2241
2241
  oldValue: this.data_.get(r).value_,
2242
2242
  name: r
2243
2243
  } : null;
2244
- return process.env.NODE_ENV !== "production" && s && Y(c), Ne(function() {
2244
+ return process.env.NODE_ENV !== "production" && s && J(c), Ne(function() {
2245
2245
  var u;
2246
2246
  i.keysAtom_.reportChanged(), (u = i.hasMap_.get(r)) == null || u.setNewValue_(!1);
2247
2247
  var l = i.data_.get(r);
@@ -2261,7 +2261,7 @@ var Pu = {}, De = "add", dn = "delete", os = /* @__PURE__ */ (function() {
2261
2261
  name: r,
2262
2262
  newValue: i
2263
2263
  } : null;
2264
- process.env.NODE_ENV !== "production" && s && Y(c), o.setNewValue_(i), a && pe(this, c), process.env.NODE_ENV !== "production" && s && X();
2264
+ process.env.NODE_ENV !== "production" && s && J(c), o.setNewValue_(i), a && pe(this, c), process.env.NODE_ENV !== "production" && s && X();
2265
2265
  }
2266
2266
  }, e.addValue_ = function(r, i) {
2267
2267
  var o = this;
@@ -2277,7 +2277,7 @@ var Pu = {}, De = "add", dn = "delete", os = /* @__PURE__ */ (function() {
2277
2277
  name: r,
2278
2278
  newValue: i
2279
2279
  } : null;
2280
- process.env.NODE_ENV !== "production" && s && Y(c), a && pe(this, c), process.env.NODE_ENV !== "production" && s && X();
2280
+ process.env.NODE_ENV !== "production" && s && J(c), a && pe(this, c), process.env.NODE_ENV !== "production" && s && X();
2281
2281
  }, e.get = function(r) {
2282
2282
  return this.has(r) ? this.dehanceValue_(this.data_.get(r).get()) : this.dehanceValue_(void 0);
2283
2283
  }, e.getOrInsert = function(r, i) {
@@ -2355,10 +2355,10 @@ var Pu = {}, De = "add", dn = "delete", os = /* @__PURE__ */ (function() {
2355
2355
  }
2356
2356
  }
2357
2357
  for (var h = ct(o.entries()), g; !(g = h()).done; ) {
2358
- var p = g.value, m = p[0], S = p[1], _ = i.data_.has(m);
2358
+ var p = g.value, m = p[0], S = p[1], y = i.data_.has(m);
2359
2359
  if (i.set(m, S), i.data_.has(m)) {
2360
- var y = i.data_.get(m);
2361
- s.set(m, y), _ || (a = !0);
2360
+ var _ = i.data_.get(m);
2361
+ s.set(m, _), y || (a = !0);
2362
2362
  }
2363
2363
  }
2364
2364
  if (!a)
@@ -2381,7 +2381,7 @@ var Pu = {}, De = "add", dn = "delete", os = /* @__PURE__ */ (function() {
2381
2381
  }, e.observe_ = function(r, i) {
2382
2382
  return process.env.NODE_ENV !== "production" && i === !0 && w("`observe` doesn't support fireImmediately=true in combination with maps."), jt(this, r);
2383
2383
  }, e.intercept_ = function(r) {
2384
- return Ft(this, r);
2384
+ return kt(this, r);
2385
2385
  }, gt(t, [{
2386
2386
  key: "size",
2387
2387
  get: function() {
@@ -2415,7 +2415,7 @@ var Tu = {}, ss = /* @__PURE__ */ (function() {
2415
2415
  var o = this;
2416
2416
  r === void 0 && (r = Ge), i === void 0 && (i = process.env.NODE_ENV !== "production" ? "ObservableSet@" + ae() : "ObservableSet"), this.name_ = void 0, this[E] = Tu, this.data_ = /* @__PURE__ */ new Set(), this.atom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.dehancer = void 0, this.enhancer_ = void 0, this.name_ = i, $(Set) || w(22), this.enhancer_ = function(s, a) {
2417
2417
  return r(s, a, i);
2418
- }, Fe(function() {
2418
+ }, ke(function() {
2419
2419
  o.atom_ = Ao(o.name_), n && o.replace(n);
2420
2420
  });
2421
2421
  }
@@ -2460,7 +2460,7 @@ var Tu = {}, ss = /* @__PURE__ */ (function() {
2460
2460
  object: this,
2461
2461
  newValue: r
2462
2462
  } : null;
2463
- s && process.env.NODE_ENV !== "production" && Y(c), a && pe(this, c), s && process.env.NODE_ENV !== "production" && X();
2463
+ s && process.env.NODE_ENV !== "production" && J(c), a && pe(this, c), s && process.env.NODE_ENV !== "production" && X();
2464
2464
  }
2465
2465
  return this;
2466
2466
  }, e.delete = function(r) {
@@ -2482,7 +2482,7 @@ var Tu = {}, ss = /* @__PURE__ */ (function() {
2482
2482
  object: this,
2483
2483
  oldValue: r
2484
2484
  } : null;
2485
- return s && process.env.NODE_ENV !== "production" && Y(c), Ne(function() {
2485
+ return s && process.env.NODE_ENV !== "production" && J(c), Ne(function() {
2486
2486
  i.atom_.reportChanged(), i.data_.delete(r);
2487
2487
  }), a && pe(this, c), s && process.env.NODE_ENV !== "production" && X(), !0;
2488
2488
  }
@@ -2558,7 +2558,7 @@ var Tu = {}, ss = /* @__PURE__ */ (function() {
2558
2558
  }, e.observe_ = function(r, i) {
2559
2559
  return process.env.NODE_ENV !== "production" && i === !0 && w("`observe` doesn't support fireImmediately=true in combination with sets."), jt(this, r);
2560
2560
  }, e.intercept_ = function(r) {
2561
- return Ft(this, r);
2561
+ return kt(this, r);
2562
2562
  }, e.toJSON = function() {
2563
2563
  return Array.from(this);
2564
2564
  }, e.toString = function() {
@@ -2582,7 +2582,7 @@ function _i(t) {
2582
2582
  }
2583
2583
  var Si = /* @__PURE__ */ Object.create(null), wi = "remove", br = /* @__PURE__ */ (function() {
2584
2584
  function t(n, r, i, o) {
2585
- r === void 0 && (r = /* @__PURE__ */ new Map()), o === void 0 && (o = Sc), this.target_ = void 0, this.values_ = void 0, this.name_ = void 0, this.defaultAnnotation_ = void 0, this.keysAtom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.proxy_ = void 0, this.isPlainObject_ = void 0, this.appliedAnnotations_ = void 0, this.pendingKeys_ = void 0, this.lazyComputedKeys_ = void 0, this.lazyObservableKeys_ = void 0, this.target_ = n, this.values_ = r, this.name_ = i, this.defaultAnnotation_ = o, this.keysAtom_ = new ke(process.env.NODE_ENV !== "production" ? this.name_ + ".keys" : "ObservableObject.keys"), this.isPlainObject_ = K(this.target_), process.env.NODE_ENV !== "production" && !fs(this.defaultAnnotation_) && w("defaultAnnotation must be valid annotation"), process.env.NODE_ENV !== "production" && (this.appliedAnnotations_ = {});
2585
+ r === void 0 && (r = /* @__PURE__ */ new Map()), o === void 0 && (o = Sc), this.target_ = void 0, this.values_ = void 0, this.name_ = void 0, this.defaultAnnotation_ = void 0, this.keysAtom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.proxy_ = void 0, this.isPlainObject_ = void 0, this.appliedAnnotations_ = void 0, this.pendingKeys_ = void 0, this.lazyComputedKeys_ = void 0, this.lazyObservableKeys_ = void 0, this.target_ = n, this.values_ = r, this.name_ = i, this.defaultAnnotation_ = o, this.keysAtom_ = new Fe(process.env.NODE_ENV !== "production" ? this.name_ + ".keys" : "ObservableObject.keys"), this.isPlainObject_ = K(this.target_), process.env.NODE_ENV !== "production" && !fs(this.defaultAnnotation_) && w("defaultAnnotation must be valid annotation"), process.env.NODE_ENV !== "production" && (this.appliedAnnotations_ = {});
2586
2586
  }
2587
2587
  var e = t.prototype;
2588
2588
  return e.getObservablePropValue_ = function(r) {
@@ -2627,7 +2627,7 @@ var Si = /* @__PURE__ */ Object.create(null), wi = "remove", br = /* @__PURE__ *
2627
2627
  name: r,
2628
2628
  newValue: i
2629
2629
  } : null;
2630
- process.env.NODE_ENV !== "production" && l && Y(d), a.setNewValue_(i), u && pe(this, d), process.env.NODE_ENV !== "production" && l && X();
2630
+ process.env.NODE_ENV !== "production" && l && J(d), a.setNewValue_(i), u && pe(this, d), process.env.NODE_ENV !== "production" && l && X();
2631
2631
  }
2632
2632
  return !0;
2633
2633
  }, e.get_ = function(r) {
@@ -2806,7 +2806,7 @@ var Si = /* @__PURE__ */ Object.create(null), wi = "remove", br = /* @__PURE__ *
2806
2806
  oldValue: l,
2807
2807
  name: r
2808
2808
  };
2809
- process.env.NODE_ENV !== "production" && c && Y(f), a && pe(this, f), process.env.NODE_ENV !== "production" && c && X();
2809
+ process.env.NODE_ENV !== "production" && c && J(f), a && pe(this, f), process.env.NODE_ENV !== "production" && c && X();
2810
2810
  }
2811
2811
  } finally {
2812
2812
  ie();
@@ -2815,7 +2815,7 @@ var Si = /* @__PURE__ */ Object.create(null), wi = "remove", br = /* @__PURE__ *
2815
2815
  }, e.observe_ = function(r, i) {
2816
2816
  return process.env.NODE_ENV !== "production" && i === !0 && w("`observe` doesn't support the fire immediately property for observable objects."), jt(this, r);
2817
2817
  }, e.intercept_ = function(r) {
2818
- return Ft(this, r);
2818
+ return kt(this, r);
2819
2819
  }, e.notifyPropertyAddition_ = function(r, i) {
2820
2820
  var o, s = he(this), a = process.env.NODE_ENV !== "production" && j();
2821
2821
  if (s || a) {
@@ -2827,7 +2827,7 @@ var Si = /* @__PURE__ */ Object.create(null), wi = "remove", br = /* @__PURE__ *
2827
2827
  name: r,
2828
2828
  newValue: i
2829
2829
  } : null;
2830
- process.env.NODE_ENV !== "production" && a && Y(c), s && pe(this, c), process.env.NODE_ENV !== "production" && a && X();
2830
+ process.env.NODE_ENV !== "production" && a && J(c), s && pe(this, c), process.env.NODE_ENV !== "production" && a && X();
2831
2831
  }
2832
2832
  (o = this.pendingKeys_) == null || (o = o.get(r)) == null || o.set(!0), this.keysAtom_.reportChanged();
2833
2833
  }, e.ownKeys_ = function() {
@@ -2889,12 +2889,12 @@ Lu(as, Array.prototype);
2889
2889
  var Kr = /* @__PURE__ */ (function(t) {
2890
2890
  function e(r, i, o, s) {
2891
2891
  var a;
2892
- return o === void 0 && (o = process.env.NODE_ENV !== "production" ? "ObservableArray@" + ae() : "ObservableArray"), s === void 0 && (s = !1), a = t.call(this) || this, Fe(function() {
2892
+ return o === void 0 && (o = process.env.NODE_ENV !== "production" ? "ObservableArray@" + ae() : "ObservableArray"), s === void 0 && (s = !1), a = t.call(this) || this, ke(function() {
2893
2893
  var c = new Hr(o, i, s, !0);
2894
2894
  c.proxy_ = a, So(a, E, c), r && r.length && a.spliceWithArray(0, 0, r), Ru && Object.defineProperty(a, "0", Du);
2895
2895
  }), a;
2896
2896
  }
2897
- Fr(e, t);
2897
+ kr(e, t);
2898
2898
  var n = e.prototype;
2899
2899
  return n.concat = function() {
2900
2900
  this[E].atom_.reportObserved();
@@ -2951,18 +2951,18 @@ function cs(t) {
2951
2951
  }
2952
2952
  };
2953
2953
  }
2954
- function ku(t) {
2954
+ function Fu(t) {
2955
2955
  Se(Kr.prototype, "" + t, cs(t));
2956
2956
  }
2957
2957
  function us(t) {
2958
2958
  if (t > Rn) {
2959
2959
  for (var e = Rn; e < t + 100; e++)
2960
- ku(e);
2960
+ Fu(e);
2961
2961
  Rn = t;
2962
2962
  }
2963
2963
  }
2964
2964
  us(1e3);
2965
- function Fu(t, e, n) {
2965
+ function ku(t, e, n) {
2966
2966
  return new Kr(t, e, n);
2967
2967
  }
2968
2968
  function Ze(t, e) {
@@ -3002,13 +3002,13 @@ function fn(t, e) {
3002
3002
  if (e !== void 0)
3003
3003
  n = Ze(t, e);
3004
3004
  else {
3005
- if (Ye(t))
3005
+ if (Je(t))
3006
3006
  return t.name;
3007
3007
  Xe(t) || Pe(t) || ye(t) ? n = ls(t) : n = Ze(t);
3008
3008
  }
3009
3009
  return n.name_;
3010
3010
  }
3011
- function Fe(t) {
3011
+ function ke(t) {
3012
3012
  var e = tt(), n = In(!0);
3013
3013
  re();
3014
3014
  try {
@@ -3205,7 +3205,7 @@ var Uu = 1e4, Wu = 1e4, Gu = (
3205
3205
  * LICENSE file in the root directory of this source tree.
3206
3206
  */
3207
3207
  var Ii;
3208
- function Ju() {
3208
+ function Yu() {
3209
3209
  if (Ii) return Ln;
3210
3210
  Ii = 1;
3211
3211
  var t = tn;
@@ -3245,7 +3245,7 @@ function Ju() {
3245
3245
  var l = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? u : a;
3246
3246
  return Ln.useSyncExternalStore = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : l, Ln;
3247
3247
  }
3248
- var kn = {};
3248
+ var Fn = {};
3249
3249
  /**
3250
3250
  * @license React
3251
3251
  * use-sync-external-store-shim.development.js
@@ -3256,7 +3256,7 @@ var kn = {};
3256
3256
  * LICENSE file in the root directory of this source tree.
3257
3257
  */
3258
3258
  var Pi;
3259
- function Yu() {
3259
+ function Ju() {
3260
3260
  return Pi || (Pi = 1, process.env.NODE_ENV !== "production" && (function() {
3261
3261
  function t(h, g) {
3262
3262
  return h === g && (h !== 0 || 1 / h === 1 / g) || h !== h && g !== g;
@@ -3275,16 +3275,16 @@ function Yu() {
3275
3275
  m = s({
3276
3276
  inst: { value: p, getSnapshot: g }
3277
3277
  });
3278
- var S = m[0].inst, _ = m[1];
3278
+ var S = m[0].inst, y = m[1];
3279
3279
  return c(
3280
3280
  function() {
3281
- S.value = p, S.getSnapshot = g, n(S) && _({ inst: S });
3281
+ S.value = p, S.getSnapshot = g, n(S) && y({ inst: S });
3282
3282
  },
3283
3283
  [h, p, g]
3284
3284
  ), a(
3285
3285
  function() {
3286
- return n(S) && _({ inst: S }), h(function() {
3287
- n(S) && _({ inst: S });
3286
+ return n(S) && y({ inst: S }), h(function() {
3287
+ n(S) && y({ inst: S });
3288
3288
  });
3289
3289
  },
3290
3290
  [h]
@@ -3305,12 +3305,12 @@ function Yu() {
3305
3305
  }
3306
3306
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
3307
3307
  var i = tn, o = typeof Object.is == "function" ? Object.is : t, s = i.useState, a = i.useEffect, c = i.useLayoutEffect, u = i.useDebugValue, l = !1, d = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : e;
3308
- kn.useSyncExternalStore = i.useSyncExternalStore !== void 0 ? i.useSyncExternalStore : f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
3309
- })()), kn;
3308
+ Fn.useSyncExternalStore = i.useSyncExternalStore !== void 0 ? i.useSyncExternalStore : f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
3309
+ })()), Fn;
3310
3310
  }
3311
3311
  var Ci;
3312
3312
  function Xu() {
3313
- return Ci || (Ci = 1, process.env.NODE_ENV === "production" ? Ut.exports = Ju() : Ut.exports = Yu()), Ut.exports;
3313
+ return Ci || (Ci = 1, process.env.NODE_ENV === "production" ? Ut.exports = Yu() : Ut.exports = Ju()), Ut.exports;
3314
3314
  }
3315
3315
  var Zu = Xu();
3316
3316
  function Ti(t) {
@@ -3358,8 +3358,8 @@ function Qu(t, e) {
3358
3358
  throw s;
3359
3359
  return o;
3360
3360
  }
3361
- var Fn, jn, el = !0, $i = !0, hs = typeof Symbol == "function" && Symbol.for, tl = (jn = (Fn = Object.getOwnPropertyDescriptor(function() {
3362
- }, "name")) === null || Fn === void 0 ? void 0 : Fn.configurable) !== null && jn !== void 0 ? jn : !1, Di = hs ? Symbol.for("react.forward_ref") : typeof sr == "function" && sr(function(t) {
3361
+ var kn, jn, el = !0, $i = !0, hs = typeof Symbol == "function" && Symbol.for, tl = (jn = (kn = Object.getOwnPropertyDescriptor(function() {
3362
+ }, "name")) === null || kn === void 0 ? void 0 : kn.configurable) !== null && jn !== void 0 ? jn : !1, Di = hs ? Symbol.for("react.forward_ref") : typeof sr == "function" && sr(function(t) {
3363
3363
  return null;
3364
3364
  }).$$typeof, Ri = hs ? Symbol.for("react.memo") : typeof ar == "function" && ar(function(t) {
3365
3365
  return null;
@@ -3544,13 +3544,13 @@ function ms(t) {
3544
3544
  };
3545
3545
  }
3546
3546
  let gs = {};
3547
- function Yh(t) {
3547
+ function Jh(t) {
3548
3548
  gs = t;
3549
3549
  }
3550
3550
  function le() {
3551
3551
  return gs;
3552
3552
  }
3553
- const ki = /* @__PURE__ */ new WeakMap();
3553
+ const Fi = /* @__PURE__ */ new WeakMap();
3554
3554
  function ml(t) {
3555
3555
  return t.__PYG_CSS_MODULES__ ?? [];
3556
3556
  }
@@ -3558,13 +3558,13 @@ function Tn(t) {
3558
3558
  const e = t.ownerDocument.defaultView;
3559
3559
  if (!e) return null;
3560
3560
  const n = ml(e);
3561
- let r = ki.get(e);
3561
+ let r = Fi.get(e);
3562
3562
  if (!r || r.len !== n.length) {
3563
3563
  const i = /* @__PURE__ */ new Map();
3564
3564
  for (const o of n)
3565
3565
  for (const [s, a] of Object.entries(o.classes))
3566
3566
  typeof a == "string" && !i.has(a) && i.set(a, { file: o.file, componentFile: o.componentFile, localName: s });
3567
- r = { len: n.length, map: i }, ki.set(e, r);
3567
+ r = { len: n.length, map: i }, Fi.set(e, r);
3568
3568
  }
3569
3569
  for (const i of Array.from(t.classList)) {
3570
3570
  const o = r.map.get(i);
@@ -3606,7 +3606,7 @@ function Sr(t) {
3606
3606
  !/^[A-Za-z_$][A-Za-z0-9_$-]*(?::[A-Za-z_$][A-Za-z0-9_$-]*)?$/.test(r) || r === "__proto__" || r === "constructor" || r === "prototype" || r.startsWith("data-pygmalion-") || (typeof i == "boolean" || typeof i == "number" && Number.isFinite(i) || typeof i == "string" && i.length <= 1e4 && !i.includes("\0")) && (n[r] = i);
3607
3607
  return n;
3608
3608
  }
3609
- function Fi(t) {
3609
+ function ki(t) {
3610
3610
  const e = t.getAttribute("data-pygmalion-slot-count");
3611
3611
  if (!e || !/^\d+$/.test(e)) return null;
3612
3612
  const n = Number(e);
@@ -3931,7 +3931,7 @@ class Sl {
3931
3931
  if (o && o.children !== "nodes")
3932
3932
  return "The selected registration component does not support children node slots.";
3933
3933
  const s = (o == null ? void 0 : o.children) === "nodes" && /^[A-Z]/.test(i);
3934
- return (o == null ? void 0 : o.children) === "nodes" && !s ? "The JSX source location of the component call-site is not passed to the DOM, so it cannot be safely inserted." : !(!o && /^[a-z]/.test(i) && !vl.has(i.toLowerCase())) && !s ? "Only regular containers or registered components that support children nodes can be used as slots." : Fi(e) == null ? "Since the number of JSX children is not directly measured, safe insertion positions cannot be calculated." : this.hasPendingValueEdit(e) ? "Please undo this slot owner's prop/text changes first and then insert them." : this.hasPendingStructuralEdit(e) ? "This slot owner already has a pending structure change. Please insert after undo." : this.entries.find(
3934
+ return (o == null ? void 0 : o.children) === "nodes" && !s ? "The JSX source location of the component call-site is not passed to the DOM, so it cannot be safely inserted." : !(!o && /^[a-z]/.test(i) && !vl.has(i.toLowerCase())) && !s ? "Only regular containers or registered components that support children nodes can be used as slots." : ki(e) == null ? "Since the number of JSX children is not directly measured, safe insertion positions cannot be calculated." : this.hasPendingValueEdit(e) ? "Please undo this slot owner's prop/text changes first and then insert them." : this.hasPendingStructuralEdit(e) ? "This slot owner already has a pending structure change. Please insert after undo." : this.entries.find(
3935
3935
  (u) => u.kind === "structure" && u.structureParent === e
3936
3936
  ) ? "A structural change can only be staged once in the same children slot." : null;
3937
3937
  }
@@ -4018,7 +4018,7 @@ class Sl {
4018
4018
  /** Inserts the registry component directly into the children slot of the selected element. */
4019
4019
  recordComponentInsert(e, n, r, i, o = null, s = []) {
4020
4020
  if (this.componentInsertBlockReason(e, o)) return !1;
4021
- const a = ce(e), c = Fi(e), u = le()[n], l = yl(n);
4021
+ const a = ce(e), c = ki(e), u = le()[n], l = yl(n);
4022
4022
  if (!a || c == null || !u || !l || !Number.isSafeInteger(r) || r < 0 || r > c)
4023
4023
  return !1;
4024
4024
  const d = _l(
@@ -4484,7 +4484,7 @@ function Ll(t) {
4484
4484
  return null;
4485
4485
  }
4486
4486
  }
4487
- function kl(t) {
4487
+ function Fl(t) {
4488
4488
  var n;
4489
4489
  const e = (n = t.domAttributes) == null ? void 0 : n[_s];
4490
4490
  if (!e) return [];
@@ -4501,7 +4501,7 @@ function kl(t) {
4501
4501
  function Qh(t) {
4502
4502
  const e = /* @__PURE__ */ new Map(), n = (r) => {
4503
4503
  if (!r) return;
4504
- for (const o of kl(r)) e.set(o.id, o);
4504
+ for (const o of Fl(r)) e.set(o.id, o);
4505
4505
  const i = Ll(r);
4506
4506
  i && e.set(i.id, i);
4507
4507
  for (const o of r.children ?? []) n(o);
@@ -4509,7 +4509,7 @@ function Qh(t) {
4509
4509
  return n(t.root), [...e.values()];
4510
4510
  }
4511
4511
  let Os = 0;
4512
- function Fl() {
4512
+ function kl() {
4513
4513
  Os += 1;
4514
4514
  }
4515
4515
  function ep() {
@@ -4534,7 +4534,7 @@ function As(t, e) {
4534
4534
  return n;
4535
4535
  }
4536
4536
  function zl(t) {
4537
- Es = ut(t), Fl();
4537
+ Es = ut(t), kl();
4538
4538
  }
4539
4539
  function np() {
4540
4540
  return ut(Es);
@@ -4681,6 +4681,14 @@ function Kl(t) {
4681
4681
  const e = It.get();
4682
4682
  return e == null ? !0 : t.includes(ht[e].id);
4683
4683
  }
4684
+ function up(t, e, n) {
4685
+ return !Number.isFinite(t.left) || !Number.isFinite(t.top) || !Number.isFinite(t.width) || !Number.isFinite(t.height) || !Number.isFinite(e.left) || !Number.isFinite(e.top) || !Number.isFinite(n.panX) || !Number.isFinite(n.panY) || !Number.isFinite(n.zoom) || n.zoom <= 0 || t.width <= 0 || t.height <= 0 ? null : {
4686
+ x: (t.left - e.left - n.panX) / n.zoom,
4687
+ y: (t.top - e.top - n.panY) / n.zoom,
4688
+ width: t.width / n.zoom,
4689
+ height: t.height / n.zoom
4690
+ };
4691
+ }
4684
4692
  const Ul = Object.freeze({
4685
4693
  panX: 300,
4686
4694
  panY: 40,
@@ -4693,7 +4701,7 @@ function Wi(t) {
4693
4701
  zoom: Math.min(3, Math.max(0.25, t.zoom))
4694
4702
  } : { ...Ul };
4695
4703
  }
4696
- function up(t, e, n = {}) {
4704
+ function lp(t, e, n = {}) {
4697
4705
  const r = Math.max(0, n.padding ?? 40), i = Math.max(0.01, n.minZoom ?? 0.25), o = Math.max(i, n.maxZoom ?? 1), s = Math.max(0, e.insetLeft ?? 0), a = Math.max(0, e.insetRight ?? 0), c = Math.max(0, e.insetTop ?? 0), u = Math.max(0, e.insetBottom ?? 0), l = Math.max(
4698
4706
  1,
4699
4707
  e.width - s - a - r * 2
@@ -4717,7 +4725,7 @@ function Gi(t, e, n, r, i, o, s) {
4717
4725
  const a = i + t * o, c = i + (t + Math.max(1, e)) * o, u = Math.max(1, r - n);
4718
4726
  return c - a <= u ? a < n - s ? i + n - a : c > r + s ? i - (c - r) : i : c >= n && a <= r ? i : c < n ? i + r - c : i + n - a;
4719
4727
  }
4720
- function lp(t, e, n, r = {}) {
4728
+ function dp(t, e, n, r = {}) {
4721
4729
  const i = Math.max(0, r.padding ?? 24), o = Math.max(0, r.tolerance ?? 8), s = Math.min(3, Math.max(0.25, n.zoom)), a = Math.max(0, e.insetLeft ?? 0) + i, c = Math.max(
4722
4730
  a + 1,
4723
4731
  e.width - Math.max(0, e.insetRight ?? 0) - i
@@ -4780,7 +4788,7 @@ function ql(t, e = {}) {
4780
4788
  height: s.length === 0 ? 0 : a - r
4781
4789
  };
4782
4790
  }
4783
- const qr = 80, Jl = 1.6;
4791
+ const qr = 80, Yl = 1.6;
4784
4792
  function pt(t) {
4785
4793
  return Number.isFinite(t) ? Math.max(1, Math.round(t)) : 1;
4786
4794
  }
@@ -4789,7 +4797,7 @@ function qi(t, e = {}) {
4789
4797
  return { frames: [], width: 0, height: 0, rowWidth: 0 };
4790
4798
  const n = Math.max(0, e.gap ?? qr), r = Math.max(
4791
4799
  0.25,
4792
- e.targetAspectRatio ?? Jl
4800
+ e.targetAspectRatio ?? Yl
4793
4801
  ), i = e.maxRowWidth == null ? Number.POSITIVE_INFINITY : Math.max(1, e.maxRowWidth), o = t.map((p) => ({
4794
4802
  width: pt(p.width),
4795
4803
  height: pt(p.height)
@@ -4802,7 +4810,7 @@ function qi(t, e = {}) {
4802
4810
  Math.min(i, c)
4803
4811
  );
4804
4812
  if (o.length > 1) {
4805
- const p = o.map((S) => S.width).sort((S, _) => _ - S), m = p[0] + n + p[1];
4813
+ const p = o.map((S) => S.width).sort((S, y) => y - S), m = p[0] + n + p[1];
4806
4814
  m <= i && (u = Math.max(u, m));
4807
4815
  }
4808
4816
  const l = [];
@@ -4816,7 +4824,7 @@ function qi(t, e = {}) {
4816
4824
  rowWidth: u
4817
4825
  };
4818
4826
  }
4819
- function Yl(t, e = {}) {
4827
+ function Jl(t, e = {}) {
4820
4828
  if (t.length === 0)
4821
4829
  return {
4822
4830
  frames: [],
@@ -4847,8 +4855,8 @@ function Yl(t, e = {}) {
4847
4855
  let D = 0;
4848
4856
  for (let V = 1; V < h.length; V += 1)
4849
4857
  h[V].height < h[D].height && (D = V);
4850
- const F = h[D], z = F.frames.length === 0 ? 0 : F.height + n;
4851
- F.frames.push({ index: I, y: z }), F.width = Math.max(F.width, A.width), F.height = z + A.height;
4858
+ const k = h[D], z = k.frames.length === 0 ? 0 : k.height + n;
4859
+ k.frames.push({ index: I, y: z }), k.width = Math.max(k.width, A.width), k.height = z + A.height;
4852
4860
  });
4853
4861
  const g = h.reduce((A, I) => A + I.width, 0) + n * Math.max(0, h.length - 1);
4854
4862
  if (g > o && f > 1) continue;
@@ -4863,9 +4871,9 @@ function Yl(t, e = {}) {
4863
4871
  };
4864
4872
  S += A.width + n;
4865
4873
  }
4866
- const _ = Math.max(1, g * p), y = g / Math.max(1, p), O = Math.abs(
4867
- Math.log(y / r)
4868
- ), P = Math.max(0, 1 - a / _);
4874
+ const y = Math.max(1, g * p), _ = g / Math.max(1, p), O = Math.abs(
4875
+ Math.log(_ / r)
4876
+ ), P = Math.max(0, 1 - a / y);
4869
4877
  c.push({
4870
4878
  frames: m,
4871
4879
  width: g,
@@ -4882,7 +4890,7 @@ function Yl(t, e = {}) {
4882
4890
  ), { score: l, ...d } = u;
4883
4891
  return d;
4884
4892
  }
4885
- const dp = {
4893
+ const fp = {
4886
4894
  /** Rule width and the gap between rule and text. */
4887
4895
  ruleWidth: 4,
4888
4896
  gap: 10,
@@ -4895,11 +4903,11 @@ const dp = {
4895
4903
  accent: "#b8b8c2",
4896
4904
  countColor: "#a1a1b3",
4897
4905
  countSize: 14
4898
- }, Ji = {
4906
+ }, Yi = {
4899
4907
  laneGap: 210,
4900
4908
  maxFramesPerRow: 6
4901
4909
  }, xs = "";
4902
- function fp(t, e = {}) {
4910
+ function hp(t, e = {}) {
4903
4911
  const n = [], r = /* @__PURE__ */ new Set(), i = e.sections ? new Set(e.sections) : null;
4904
4912
  for (const o of t) {
4905
4913
  const s = `${o.section}
@@ -4924,15 +4932,15 @@ ${o.id}`;
4924
4932
  }
4925
4933
  return n;
4926
4934
  }
4927
- let Jr = [];
4928
- function hp(t) {
4929
- Jr = t ?? [];
4935
+ let Yr = [];
4936
+ function pp(t) {
4937
+ Yr = t ?? [];
4930
4938
  }
4931
4939
  function Ns(t) {
4932
- return Jr.filter((e) => e.section === t);
4940
+ return Yr.filter((e) => e.section === t);
4933
4941
  }
4934
4942
  function Xl(t, e) {
4935
- return e === xs ? null : Jr.find(
4943
+ return e === xs ? null : Yr.find(
4936
4944
  (n) => n.section === t && n.id === e
4937
4945
  ) ?? null;
4938
4946
  }
@@ -5049,7 +5057,7 @@ function Ms(t, e) {
5049
5057
  const n = t.domAttributes;
5050
5058
  return (n == null ? void 0 : n["data-testid"]) === e ? !0 : (t.children ?? []).some((r) => Ms(r, e));
5051
5059
  }
5052
- function pp(t, e) {
5060
+ function mp(t, e) {
5053
5061
  return e.filter((n) => {
5054
5062
  var o, s;
5055
5063
  const r = (o = n.requires) == null ? void 0 : o.route;
@@ -5072,7 +5080,7 @@ function Ps(t, e) {
5072
5080
  (n) => n.capturedWhen != null && Is(e.root, n.capturedWhen)
5073
5081
  );
5074
5082
  }
5075
- function mp(t, e) {
5083
+ function gp(t, e) {
5076
5084
  if (e) {
5077
5085
  const n = Ps(t, e);
5078
5086
  if (n) return n;
@@ -5080,7 +5088,7 @@ function mp(t, e) {
5080
5088
  return t.options.find((n) => !Et(n));
5081
5089
  }
5082
5090
  let Er = [];
5083
- function gp(t) {
5091
+ function vp(t) {
5084
5092
  const e = t ?? [];
5085
5093
  if (e === Er) return;
5086
5094
  const n = ed(e).filter(
@@ -5095,7 +5103,7 @@ function gp(t) {
5095
5103
  );
5096
5104
  Er = e;
5097
5105
  }
5098
- function vp() {
5106
+ function bp() {
5099
5107
  return Er;
5100
5108
  }
5101
5109
  const Cs = {
@@ -5107,10 +5115,10 @@ const Cs = {
5107
5115
  titleMuted: "#a1a1b3",
5108
5116
  meta: "#bebecb",
5109
5117
  purpose: "#c4ccd8"
5110
- }, Yr = /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
5111
- function bp(t, e) {
5118
+ }, Jr = /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
5119
+ function yp(t, e) {
5112
5120
  const n = t.length === 4 ? `#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}` : t;
5113
- if (!Yr.test(n)) return t;
5121
+ if (!Jr.test(n)) return t;
5114
5122
  const r = Number.parseInt(n.slice(1), 16), i = (c) => Math.round(c + (255 - c) * Math.min(1, Math.max(0, e))), o = i(r >> 16 & 255), s = i(r >> 8 & 255), a = i(r & 255);
5115
5123
  return `#${(o << 16 | s << 8 | a).toString(16).padStart(6, "0")}`;
5116
5124
  }
@@ -5120,11 +5128,11 @@ const td = {
5120
5128
  omissions: "some omissions",
5121
5129
  checkFlow: "check flow"
5122
5130
  };
5123
- function yp(t) {
5131
+ function _p(t) {
5124
5132
  return { ...td, ...t };
5125
5133
  }
5126
5134
  const Ts = "step", $s = "variant", nd = "#8b8b9e";
5127
- function _p(t, e = {}) {
5135
+ function Sp(t, e = {}) {
5128
5136
  const n = [], r = /* @__PURE__ */ new Set();
5129
5137
  for (const i of t)
5130
5138
  r.has(i.kind) && n.push({
@@ -5135,7 +5143,7 @@ function _p(t, e = {}) {
5135
5143
  severity: "error",
5136
5144
  kind: i.kind,
5137
5145
  message: "a branch kind needs a label — it is what the pill reads"
5138
- }), Yr.test(i.accent) || n.push({
5146
+ }), Jr.test(i.accent) || n.push({
5139
5147
  severity: "error",
5140
5148
  kind: i.kind,
5141
5149
  message: `accent "${i.accent}" is not a hex colour`
@@ -5160,10 +5168,10 @@ function Xr(t) {
5160
5168
  function Ds(t) {
5161
5169
  return t.route != null && Xr(t).length === 0;
5162
5170
  }
5163
- function Sp(t) {
5171
+ function wp(t) {
5164
5172
  return t.filter(Ds);
5165
5173
  }
5166
- function wp(t) {
5174
+ function Op(t) {
5167
5175
  if (t.stateKind) return t.stateKind;
5168
5176
  const e = rd(t);
5169
5177
  return e != null && e.split(".").length > 2 ? $s : Ts;
@@ -5173,7 +5181,7 @@ function rd(t) {
5173
5181
  var e;
5174
5182
  return ((e = Rs.exec(t.name.trim())) == null ? void 0 : e[1]) ?? null;
5175
5183
  }
5176
- function Op(t) {
5184
+ function Ep(t) {
5177
5185
  const e = t.name.trim(), n = Rs.exec(e), r = n ? n[2] : e, i = r.lastIndexOf(" / "), o = i >= 0 ? r.slice(i + 3).trim() : r;
5178
5186
  return {
5179
5187
  code: n ? n[1] : null,
@@ -5181,13 +5189,13 @@ function Op(t) {
5181
5189
  ...t.state ? { state: t.state } : {}
5182
5190
  };
5183
5191
  }
5184
- function Ep(t, e) {
5192
+ function Ap(t, e) {
5185
5193
  const n = [];
5186
5194
  t.layerImportTruncated ? n.push(e.omissions) : t.layerImportError && n.push(e.checkFlow);
5187
5195
  const r = Xr(t);
5188
5196
  return r.length > 0 ? n.push(r.join(" · ")) : Ds(t) && n.push(e.noScenario), t.layersImported && !t.layerImportTruncated && n.push(`${t.layerImportCount ?? 0} ${e.layers}`), n.join(" · ");
5189
5197
  }
5190
- const Ap = {
5198
+ const xp = {
5191
5199
  ...Cs,
5192
5200
  radius: 10,
5193
5201
  pillRadius: 999,
@@ -5203,15 +5211,15 @@ const Ap = {
5203
5211
  pillPaddingX: 10,
5204
5212
  /** Bottom margin between the label and its frame. */
5205
5213
  marginBottom: 8
5206
- }, xp = 0.35;
5207
- let Ls = [], ks;
5208
- function Np(t, e) {
5209
- Ls = t, ks = e;
5214
+ }, Np = 0.35;
5215
+ let Ls = [], Fs;
5216
+ function Mp(t, e) {
5217
+ Ls = t, Fs = e;
5210
5218
  }
5211
- function Mp() {
5212
- return ks;
5219
+ function Ip() {
5220
+ return Fs;
5213
5221
  }
5214
- function Ip(t) {
5222
+ function Pp(t) {
5215
5223
  return Ls.find((e) => e.kind === t) ?? {
5216
5224
  kind: t,
5217
5225
  label: t,
@@ -5225,10 +5233,10 @@ const id = {
5225
5233
  scenarios: "scenarios",
5226
5234
  flows: "flows"
5227
5235
  };
5228
- function Pp(t) {
5236
+ function Cp(t) {
5229
5237
  return { ...id, ...t };
5230
5238
  }
5231
- function Cp(t, e) {
5239
+ function Tp(t, e) {
5232
5240
  const n = [], r = new Set(e.sections), i = /* @__PURE__ */ new Set();
5233
5241
  for (const o of t)
5234
5242
  i.has(o.section) && n.push({
@@ -5251,7 +5259,7 @@ function Cp(t, e) {
5251
5259
  severity: "error",
5252
5260
  section: o.section,
5253
5261
  message: "a header needs a purpose — it is the line a planner reads"
5254
- }), Yr.test(o.accent) || n.push({
5262
+ }), Jr.test(o.accent) || n.push({
5255
5263
  severity: "error",
5256
5264
  section: o.section,
5257
5265
  message: `accent "${o.accent}" is not a hex colour`
@@ -5264,7 +5272,7 @@ function Cp(t, e) {
5264
5272
  });
5265
5273
  return n;
5266
5274
  }
5267
- function Tp(t, e = {}) {
5275
+ function $p(t, e = {}) {
5268
5276
  const n = e.isShown ?? (() => !0), r = /* @__PURE__ */ new Set(), i = [], o = /* @__PURE__ */ new Set();
5269
5277
  let s = 0;
5270
5278
  for (const a of t) {
@@ -5282,13 +5290,13 @@ function Tp(t, e = {}) {
5282
5290
  viewport: o.size === 1 ? [...o][0] : null
5283
5291
  };
5284
5292
  }
5285
- function $p(t, e) {
5293
+ function Dp(t, e) {
5286
5294
  const n = [];
5287
5295
  return n.push(
5288
5296
  t.foldedCount > 0 ? `${t.frameCount} ${e.frames} (+${t.foldedCount} ${e.folded})` : `${t.frameCount} ${e.frames}`
5289
5297
  ), t.flows.length > 1 && n.push(`${e.flows} ${t.flows.join(" / ")}`), t.scenarioCount > 0 && n.push(`${e.scenarios} ${t.scenarioCount}`), t.viewport && n.push(t.viewport), n.join(" · ");
5290
5298
  }
5291
- const Dp = {
5299
+ const Rp = {
5292
5300
  ...Cs,
5293
5301
  radius: 12,
5294
5302
  pillRadius: 999,
@@ -5303,18 +5311,18 @@ const Dp = {
5303
5311
  pillSize: 12,
5304
5312
  pillPaddingY: 6,
5305
5313
  pillPaddingX: 14
5306
- }, od = 176, Rp = 1280;
5307
- let Zr = [], Fs;
5308
- function Lp(t, e) {
5309
- Zr = t, Fs = e;
5314
+ }, od = 176, Lp = 1280;
5315
+ let Zr = [], ks;
5316
+ function Fp(t, e) {
5317
+ Zr = t, ks = e;
5310
5318
  }
5311
5319
  function js() {
5312
5320
  return Zr;
5313
5321
  }
5314
5322
  function kp() {
5315
- return Fs;
5323
+ return ks;
5316
5324
  }
5317
- function Fp(t) {
5325
+ function jp(t) {
5318
5326
  return Zr.find((e) => e.section === t) ?? null;
5319
5327
  }
5320
5328
  function Z(t, e) {
@@ -5357,7 +5365,7 @@ function sd(t, e = 28) {
5357
5365
  return o.length > e ? `${o.slice(0, e - 1)}…` : o;
5358
5366
  }
5359
5367
  const ad = 24;
5360
- function jp(t, e) {
5368
+ function zp(t, e) {
5361
5369
  var i, o, s;
5362
5370
  const n = [], r = /* @__PURE__ */ new Set();
5363
5371
  for (const a of t) {
@@ -5446,7 +5454,7 @@ function dd(t, e) {
5446
5454
  const n = (r = t.options) == null ? void 0 : r.find((i) => i.label === e);
5447
5455
  return n ? n.props : null;
5448
5456
  }
5449
- function zp(t, e) {
5457
+ function Vp(t, e) {
5450
5458
  var n;
5451
5459
  if (e.componentName !== t.component) return null;
5452
5460
  if (t.prop) {
@@ -5463,14 +5471,14 @@ function zp(t, e) {
5463
5471
  return null;
5464
5472
  }
5465
5473
  let Vs = [];
5466
- function Vp(t) {
5474
+ function Bp(t) {
5467
5475
  Vs = t;
5468
5476
  }
5469
- function Bp() {
5477
+ function Hp() {
5470
5478
  return Vs;
5471
5479
  }
5472
5480
  const Qr = 12;
5473
- function Hp(t, e) {
5481
+ function Kp(t, e) {
5474
5482
  var i, o;
5475
5483
  const n = [], r = /* @__PURE__ */ new Set();
5476
5484
  for (const s of t) {
@@ -5522,7 +5530,7 @@ function Hp(t, e) {
5522
5530
  }
5523
5531
  for (const [p, m] of Object.entries(f.props)) {
5524
5532
  const S = (o = h.props) == null ? void 0 : o[p];
5525
- (!S || !S.some((_) => Object.is(_, m))) && n.push({
5533
+ (!S || !S.some((y) => Object.is(y, m))) && n.push({
5526
5534
  severity: "error",
5527
5535
  cardId: s.id,
5528
5536
  message: `option "${f.label}" sets ${p}=${JSON.stringify(m)} outside the adapter's vocabulary`
@@ -5541,7 +5549,7 @@ function Hp(t, e) {
5541
5549
  }
5542
5550
  return n;
5543
5551
  }
5544
- function Kp(t, e) {
5552
+ function Up(t, e) {
5545
5553
  return je(
5546
5554
  t.root,
5547
5555
  (n) => Z(n, e.card),
@@ -5563,7 +5571,7 @@ function Qt(t, e) {
5563
5571
  }
5564
5572
  ) : Z(t, e.match);
5565
5573
  }
5566
- function Up(t, e) {
5574
+ function Wp(t, e) {
5567
5575
  const n = Bs(t, e);
5568
5576
  if (!n) return [];
5569
5577
  const r = [];
@@ -5573,7 +5581,7 @@ function Up(t, e) {
5573
5581
  }
5574
5582
  return r;
5575
5583
  }
5576
- function Wp(t, e) {
5584
+ function Gp(t, e) {
5577
5585
  return sd(t) || `#${e + 1}`;
5578
5586
  }
5579
5587
  function fd(t, e, n) {
@@ -5632,14 +5640,14 @@ function md(t, e) {
5632
5640
  return n.length;
5633
5641
  }
5634
5642
  let Hs = [];
5635
- function Gp(t) {
5643
+ function qp(t) {
5636
5644
  Hs = t;
5637
5645
  }
5638
- function qp() {
5646
+ function Yp() {
5639
5647
  return Hs;
5640
5648
  }
5641
5649
  const gd = 0, vd = 12, Ks = gd, Us = vd, bd = 64;
5642
- function Yi(t) {
5650
+ function Ji(t) {
5643
5651
  if (!t) return !0;
5644
5652
  if (t.testId) return !1;
5645
5653
  const e = t.classIncludes;
@@ -5652,11 +5660,11 @@ function Jp(t) {
5652
5660
  severity: "error",
5653
5661
  listId: r.id,
5654
5662
  message: `duplicate list id "${r.id}"`
5655
- }), n.add(r.id), Yi(r.container) && e.push({
5663
+ }), n.add(r.id), Ji(r.container) && e.push({
5656
5664
  severity: "error",
5657
5665
  listId: r.id,
5658
5666
  message: "a list needs a container matcher"
5659
- }), Yi(r.item) && e.push({
5667
+ }), Ji(r.item) && e.push({
5660
5668
  severity: "error",
5661
5669
  listId: r.id,
5662
5670
  message: "a list needs an item matcher"
@@ -5778,17 +5786,17 @@ function Cd(t, e, n) {
5778
5786
  i >= 0 && Pd(r[i]);
5779
5787
  }
5780
5788
  let Gs = [];
5781
- function Yp(t) {
5789
+ function Xp(t) {
5782
5790
  Gs = t;
5783
5791
  }
5784
- function Xp() {
5792
+ function Zp() {
5785
5793
  return Gs;
5786
5794
  }
5787
5795
  const Td = 12, $d = 800, Dd = /* @__PURE__ */ new Set(["SCRIPT", "STYLE", "NOSCRIPT", "META", "LINK", "TEMPLATE", "IFRAME", "BR", "HEAD"]), Rd = /* @__PURE__ */ new Set(["SVG", "IMG", "VIDEO", "CANVAS", "PICTURE"]), Ld = /* @__PURE__ */ new Set(["SVG", "IMG", "VIDEO", "CANVAS", "PICTURE"]);
5788
- let kd = 0;
5796
+ let Fd = 0;
5789
5797
  function Gt(t, e) {
5790
5798
  return {
5791
- id: `imp${++kd}`,
5799
+ id: `imp${++Fd}`,
5792
5800
  type: t,
5793
5801
  name: t,
5794
5802
  widthMode: "fill",
@@ -5827,7 +5835,7 @@ function Gt(t, e) {
5827
5835
  };
5828
5836
  }
5829
5837
  const Ae = (t) => Math.round(parseFloat(t) || 0);
5830
- function Fd(t) {
5838
+ function kd(t) {
5831
5839
  const e = Number.parseFloat(t);
5832
5840
  return Number.isFinite(e) ? Math.max(0, Math.min(1, e)) : 1;
5833
5841
  }
@@ -6059,7 +6067,7 @@ function qd(t) {
6059
6067
  }
6060
6068
  return !1;
6061
6069
  }
6062
- function Jd(t, e) {
6070
+ function Yd(t, e) {
6063
6071
  if (!e.resolveInstance) return !1;
6064
6072
  const n = Array.from(t.children ?? []);
6065
6073
  for (; n.length > 0; ) {
@@ -6069,10 +6077,10 @@ function Jd(t, e) {
6069
6077
  }
6070
6078
  return !1;
6071
6079
  }
6072
- const Yd = "http://www.w3.org/1999/xhtml";
6080
+ const Jd = "http://www.w3.org/1999/xhtml";
6073
6081
  function qn(t, e) {
6074
6082
  const n = t.namespaceURI;
6075
- return n != null && n !== Yd && t.localName || e.toLowerCase();
6083
+ return n != null && n !== Jd && t.localName || e.toLowerCase();
6076
6084
  }
6077
6085
  function qs(t, e, n, r, i, o, s) {
6078
6086
  var z, V, vt;
@@ -6100,8 +6108,8 @@ function qs(t, e, n, r, i, o, s) {
6100
6108
  sourceProps: Sr(
6101
6109
  t.getAttribute("data-pygmalion-own-props")
6102
6110
  )
6103
- }, _ = p != null && g === "expand" && ((V = o.collapseInstance) == null ? void 0 : V.call(o, p)) === !0 && !Jd(t, o) && Gd(t, p) && !qd(t);
6104
- if (p && (g === "collapse" || _))
6111
+ }, y = p != null && g === "expand" && ((V = o.collapseInstance) == null ? void 0 : V.call(o, p)) === !0 && !Yd(t, o) && Gd(t, p) && !qd(t);
6112
+ if (p && (g === "collapse" || y))
6105
6113
  return Gt("component", {
6106
6114
  name: p.name,
6107
6115
  componentName: p.name,
@@ -6113,10 +6121,10 @@ function qs(t, e, n, r, i, o, s) {
6113
6121
  ...S,
6114
6122
  ...Qi(f, e, l.display, h)
6115
6123
  });
6116
- const y = Ud(t, u, p == null ? void 0 : p.name);
6124
+ const _ = Ud(t, u, p == null ? void 0 : p.name);
6117
6125
  if (Rd.has(u) && (o.mediaMode ?? "placeholder") === "placeholder")
6118
6126
  return Gt("rows", {
6119
- name: y,
6127
+ name: _,
6120
6128
  widthMode: "fixed",
6121
6129
  width: Math.max(4, Math.round(f.width / h)),
6122
6130
  heightMode: "fixed",
@@ -6131,8 +6139,8 @@ function qs(t, e, n, r, i, o, s) {
6131
6139
  });
6132
6140
  const O = l.display === "flex" || l.display === "inline-flex", P = O && l.flexDirection.startsWith("row") ? "columns" : "rows", A = Ae(P === "columns" ? l.columnGap : l.rowGap), I = Math.round(
6133
6141
  (Ae(l.paddingTop) + Ae(l.paddingRight) + Ae(l.paddingBottom) + Ae(l.paddingLeft)) / 4
6134
- ), D = Ae(l.borderTopWidth), F = Gt(P, {
6135
- name: y,
6142
+ ), D = Ae(l.borderTopWidth), k = Gt(P, {
6143
+ name: _,
6136
6144
  ...Qi(f, e, l.display, h),
6137
6145
  gap: Number.isFinite(A) ? A : 0,
6138
6146
  padding: I,
@@ -6145,7 +6153,7 @@ function qs(t, e, n, r, i, o, s) {
6145
6153
  // A fully transparent element reads as opacity "0", and 0 is falsy — an
6146
6154
  // `|| 1` fallback here turned every hover-only affordance (a list row's
6147
6155
  // reveal-on-hover action) into a permanently visible one.
6148
- opacity: Fd(l.opacity),
6156
+ opacity: kd(l.opacity),
6149
6157
  hidden: d,
6150
6158
  domTag: qn(t, u),
6151
6159
  domAttributes: Wn(t),
@@ -6160,7 +6168,7 @@ function qs(t, e, n, r, i, o, s) {
6160
6168
  message: `DOM capture stopped descending at depth ${c}.`,
6161
6169
  limit: c,
6162
6170
  actual: n
6163
- }), F;
6171
+ }), k;
6164
6172
  for (const Ce of Array.from(t.childNodes)) {
6165
6173
  if (r.count >= a) {
6166
6174
  Un(r, {
@@ -6183,13 +6191,13 @@ function qs(t, e, n, r, i, o, s) {
6183
6191
  const M = ze.getBoundingClientRect();
6184
6192
  (M.width >= 1 || M.height >= 1) && Zi(
6185
6193
  r,
6186
- [...s, F.children.length],
6194
+ [...s, k.children.length],
6187
6195
  M,
6188
6196
  h
6189
6197
  );
6190
6198
  } catch {
6191
6199
  }
6192
- F.children.push(
6200
+ k.children.push(
6193
6201
  Gt("text", {
6194
6202
  name: "text",
6195
6203
  text: x,
@@ -6203,12 +6211,12 @@ function qs(t, e, n, r, i, o, s) {
6203
6211
  } else if (Ce.nodeType === Node.ELEMENT_NODE) {
6204
6212
  const x = qs(Ce, f, n + 1, r, i, o, [
6205
6213
  ...s,
6206
- F.children.length
6214
+ k.children.length
6207
6215
  ]);
6208
- x && F.children.push(x);
6216
+ x && k.children.push(x);
6209
6217
  }
6210
6218
  }
6211
- return F;
6219
+ return k;
6212
6220
  }
6213
6221
  function ti(t, e, n = {}) {
6214
6222
  const r = {
@@ -6313,7 +6321,7 @@ function tf(t) {
6313
6321
  return `${n}${r}${i}${o ? `[data-testid=${o}]` : ""}`;
6314
6322
  }
6315
6323
  const no = "__PYGMALION_DOCUMENT_STABILITY__", nf = 'dialog[open],[role="dialog"],[role="alertdialog"],[aria-modal="true"]';
6316
- function Js(t, e) {
6324
+ function Ys(t, e) {
6317
6325
  var s;
6318
6326
  const n = t.defaultView;
6319
6327
  if (!n)
@@ -6365,7 +6373,7 @@ function Js(t, e) {
6365
6373
  return n[no] = i, i;
6366
6374
  }
6367
6375
  function rf(t, e = []) {
6368
- const n = e.join(","), r = Js(t, n), i = t.defaultView, o = t.documentElement, s = t.body, a = [...t.querySelectorAll(nf)].filter((c) => {
6376
+ const n = e.join(","), r = Ys(t, n), i = t.defaultView, o = t.documentElement, s = t.body, a = [...t.querySelectorAll(nf)].filter((c) => {
6369
6377
  const u = i == null ? void 0 : i.getComputedStyle(c), l = c.getBoundingClientRect();
6370
6378
  return !c.hasAttribute("hidden") && c.getAttribute("aria-hidden") !== "true" && (u == null ? void 0 : u.display) !== "none" && (u == null ? void 0 : u.visibility) !== "hidden" && Number.parseFloat((u == null ? void 0 : u.opacity) || "1") !== 0 && l.width > 0 && l.height > 0;
6371
6379
  }).map((c) => {
@@ -6391,7 +6399,7 @@ function rf(t, e = []) {
6391
6399
  });
6392
6400
  }
6393
6401
  function of(t, e = [], n = 6) {
6394
- return [...Js(t, e.join(",")).churn.entries()].sort((i, o) => o[1] - i[1]).slice(0, Math.max(0, n)).map(([i, o]) => ({ target: i, count: o }));
6402
+ return [...Ys(t, e.join(",")).churn.entries()].sort((i, o) => o[1] - i[1]).slice(0, Math.max(0, n)).map(([i, o]) => ({ target: i, count: o }));
6395
6403
  }
6396
6404
  async function sf(t, {
6397
6405
  volatileSelectors: e = [],
@@ -6434,7 +6442,7 @@ const B = {
6434
6442
  "focus-visible": "data-pygmalion-held-focus-visible",
6435
6443
  "focus-within": "data-pygmalion-held-focus-within",
6436
6444
  active: "data-pygmalion-held-active"
6437
- }, Ys = "data-pygmalion-held-pseudo-style", xr = /* @__PURE__ */ new WeakMap();
6445
+ }, Js = "data-pygmalion-held-pseudo-style", xr = /* @__PURE__ */ new WeakMap();
6438
6446
  function ro(t) {
6439
6447
  return (t ?? "").replace(/\s+/g, " ").trim();
6440
6448
  }
@@ -6523,7 +6531,7 @@ function lf(t, e) {
6523
6531
  (a) => e.exact ? a === i : a.includes(i)
6524
6532
  ));
6525
6533
  }
6526
- function Jn(t, e, n) {
6534
+ function Yn(t, e, n) {
6527
6535
  let r = t;
6528
6536
  for (; r; ) {
6529
6537
  r.setAttribute(e, "");
@@ -6541,14 +6549,14 @@ function df(t, e) {
6541
6549
  i.optional || r.push(`Held pseudo target was not found:${i.label}`);
6542
6550
  continue;
6543
6551
  }
6544
- if ((o === "hover" || o === "active") && Jn(
6552
+ if ((o === "hover" || o === "active") && Yn(
6545
6553
  s,
6546
6554
  B[o],
6547
6555
  n
6548
- ), o === "active" && Jn(s, B.hover, n), o === "focus" || o === "focus-visible") {
6556
+ ), o === "active" && Yn(s, B.hover, n), o === "focus" || o === "focus-visible") {
6549
6557
  s.setAttribute(B.focus, "");
6550
6558
  const a = n.get(s) ?? /* @__PURE__ */ new Set();
6551
- a.add(B.focus), o === "focus-visible" && (s.setAttribute(B["focus-visible"], ""), a.add(B["focus-visible"])), n.set(s, a), Jn(
6559
+ a.add(B.focus), o === "focus-visible" && (s.setAttribute(B["focus-visible"], ""), a.add(B["focus-visible"])), n.set(s, a), Yn(
6552
6560
  s,
6553
6561
  B["focus-within"],
6554
6562
  n
@@ -6572,7 +6580,7 @@ function io(t) {
6572
6580
  ).forEach((e) => {
6573
6581
  for (const n of Object.values(B))
6574
6582
  e.removeAttribute(n);
6575
- }), t.querySelectorAll(`style[${Ys}]`).forEach((e) => e.remove());
6583
+ }), t.querySelectorAll(`style[${Js}]`).forEach((e) => e.remove());
6576
6584
  }
6577
6585
  function qt(t, e) {
6578
6586
  io(t);
@@ -6599,7 +6607,7 @@ function qt(t, e) {
6599
6607
  }
6600
6608
  if (o.length > 0 && xr.set(t, o), i.length > 0) {
6601
6609
  const s = t.createElement("style");
6602
- s.setAttribute(Ys, ""), s.textContent = i.join(`
6610
+ s.setAttribute(Js, ""), s.textContent = i.join(`
6603
6611
  `), (t.head ?? t.documentElement).append(s);
6604
6612
  }
6605
6613
  return {
@@ -6771,7 +6779,7 @@ function Pt(t) {
6771
6779
  const r = t.getBoundingClientRect();
6772
6780
  return r.width > 0 && r.height > 0;
6773
6781
  }
6774
- function Yn(t) {
6782
+ function Jn(t) {
6775
6783
  if ("disabled" in t && t.disabled) return !1;
6776
6784
  try {
6777
6785
  if (t.matches(":disabled")) return !1;
@@ -6795,7 +6803,7 @@ function ea(t) {
6795
6803
  return !!(s && (s === t || t.contains(s)));
6796
6804
  }
6797
6805
  function gf(t, e) {
6798
- return e === "focus" || e === "focus-visible" ? gn(t) && Yn(t) && "focus" in t : !(!Pt(t) || e !== "hover" && !Yn(t) || !ea(t) || e === "fill" && "readOnly" in t && t.readOnly);
6806
+ return e === "focus" || e === "focus-visible" ? gn(t) && Jn(t) && "focus" in t : !(!Pt(t) || e !== "hover" && !Jn(t) || !ea(t) || e === "fill" && "readOnly" in t && t.readOnly);
6799
6807
  }
6800
6808
  async function Xn(t, e, n) {
6801
6809
  const r = Date.now(), i = e.timeoutMs ?? 5e3;
@@ -6820,131 +6828,134 @@ async function Xn(t, e, n) {
6820
6828
  } while (!0);
6821
6829
  return null;
6822
6830
  }
6823
- async function Nr(t, e) {
6824
- let n = 0;
6825
- const r = [];
6831
+ async function Nr(t, e, n = {}) {
6832
+ let r = 0;
6833
+ const i = [];
6826
6834
  try {
6827
- const i = t.contentDocument;
6828
- i && qt(i, []);
6835
+ const o = t.contentDocument;
6836
+ o && qt(o, []);
6829
6837
  } catch {
6830
6838
  }
6831
- for (const i of e) {
6832
- if (i.action === "wait") {
6833
- if ((i.selector || i.text) && !await Xn(
6839
+ for (const o of e) {
6840
+ if (o.action === "wait") {
6841
+ if ((o.selector || o.text) && !await Xn(
6834
6842
  t,
6835
- i,
6836
- i.waitState ?? "visible"
6843
+ o,
6844
+ o.waitState ?? "visible"
6837
6845
  )) {
6838
- if (i.optional) continue;
6846
+ if (o.optional) continue;
6839
6847
  return {
6840
6848
  complete: !1,
6841
- completed: n,
6849
+ completed: r,
6842
6850
  total: e.length,
6843
- failedLabel: i.label,
6844
- error: `"${i.label}"I waited for the screen status of the step, but it did not appear.`
6851
+ failedLabel: o.label,
6852
+ error: `"${o.label}"I waited for the screen status of the step, but it did not appear.`
6845
6853
  };
6846
6854
  }
6847
- await Ke(t, i.settleMs ?? Number(i.value ?? 500)), n += 1;
6855
+ await Ke(t, o.settleMs ?? Number(o.value ?? 500)), r += 1;
6848
6856
  continue;
6849
6857
  }
6850
- if (i.action === "storage") {
6858
+ if (o.action === "storage") {
6851
6859
  try {
6852
- const a = t.contentWindow, c = i.storage === "session" ? a == null ? void 0 : a.sessionStorage : a == null ? void 0 : a.localStorage;
6853
- if (!c || !i.key) throw new Error("storage context unavailable");
6854
- i.value == null ? c.removeItem(i.key) : c.setItem(i.key, i.value);
6860
+ const c = t.contentWindow, u = o.storage === "session" ? c == null ? void 0 : c.sessionStorage : c == null ? void 0 : c.localStorage;
6861
+ if (!u || !o.key) throw new Error("storage context unavailable");
6862
+ o.value == null ? u.removeItem(o.key) : u.setItem(o.key, o.value);
6855
6863
  } catch {
6856
- if (i.optional) continue;
6864
+ if (o.optional) continue;
6857
6865
  return {
6858
6866
  complete: !1,
6859
- completed: n,
6867
+ completed: r,
6860
6868
  total: e.length,
6861
- failedLabel: i.label,
6862
- error: `"${i.label}"Failed to access the app store in step.`
6869
+ failedLabel: o.label,
6870
+ error: `"${o.label}"Failed to access the app store in step.`
6863
6871
  };
6864
6872
  }
6865
- n += 1, await Ke(t, i.settleMs ?? 50);
6873
+ r += 1, await Ke(t, o.settleMs ?? 50);
6866
6874
  continue;
6867
6875
  }
6868
- if (i.action === "scroll") {
6869
- let a = null;
6876
+ if (o.action === "scroll") {
6877
+ let c = null;
6870
6878
  try {
6871
- a = t.contentDocument;
6879
+ c = t.contentDocument;
6872
6880
  } catch {
6873
- a = null;
6881
+ c = null;
6874
6882
  }
6875
- const c = a && (i.selector || i.text) ? await Xn(t, i, "attached") : null;
6876
- if (!a || (i.selector || i.text) && !c || !mf(a, c, i)) {
6877
- if (i.optional) continue;
6883
+ const u = c && (o.selector || o.text) ? await Xn(t, o, "attached") : null;
6884
+ if (!c || (o.selector || o.text) && !u || !mf(c, u, o)) {
6885
+ if (o.optional) continue;
6878
6886
  return {
6879
6887
  complete: !1,
6880
- completed: n,
6888
+ completed: r,
6881
6889
  total: e.length,
6882
- failedLabel: i.label,
6883
- error: `"${i.label}" scroll target was not found.`
6890
+ failedLabel: o.label,
6891
+ error: `"${o.label}" scroll target was not found.`
6884
6892
  };
6885
6893
  }
6886
- n += 1, await Ke(t, i.settleMs ?? 100);
6894
+ r += 1, await Ke(t, o.settleMs ?? 100);
6887
6895
  continue;
6888
6896
  }
6889
- const o = await Xn(t, i, "actionable");
6890
- if (!o) {
6891
- if (i.optional) continue;
6897
+ const s = await Xn(t, o, "actionable");
6898
+ if (!s) {
6899
+ if (o.optional) continue;
6892
6900
  return {
6893
6901
  complete: !1,
6894
- completed: n,
6902
+ completed: r,
6895
6903
  total: e.length,
6896
- failedLabel: i.label,
6897
- error: `"${i.label}"The screen element for the step was not found or actionable.`
6904
+ failedLabel: o.label,
6905
+ error: `"${o.label}"The screen element for the step was not found or actionable.`
6898
6906
  };
6899
6907
  }
6900
- const s = o.ownerDocument.defaultView;
6901
- if (!s)
6908
+ const a = s.ownerDocument.defaultView;
6909
+ if (!a)
6902
6910
  return {
6903
6911
  complete: !1,
6904
- completed: n,
6912
+ completed: r,
6905
6913
  total: e.length,
6906
- failedLabel: i.label,
6907
- error: `"${i.label}"Failed to read the screen context for the step.`
6914
+ failedLabel: o.label,
6915
+ error: `"${o.label}"Failed to read the screen context for the step.`
6908
6916
  };
6909
- if (i.action === "click")
6910
- so(o, s);
6911
- else if (i.action === "focus")
6912
- o.focus({ preventScroll: !0 });
6913
- else if (i.action === "hover")
6914
- Qs(o, s), r.push(i), qt(o.ownerDocument, r);
6915
- else if (i.action === "focus-visible")
6916
- o.focus({ preventScroll: !0 }), r.push(i), qt(o.ownerDocument, r);
6917
- else if (i.action === "active")
6918
- hf(o, s), r.push(i), qt(o.ownerDocument, r);
6919
- else if (i.action === "fill") {
6920
- if (!(o instanceof s.HTMLInputElement || o instanceof s.HTMLTextAreaElement))
6917
+ if (o.action === "click")
6918
+ so(s, a);
6919
+ else if (o.action === "focus")
6920
+ s.focus({ preventScroll: !0 });
6921
+ else if (o.action === "hover")
6922
+ Qs(s, a), i.push(o), qt(s.ownerDocument, i);
6923
+ else if (o.action === "focus-visible")
6924
+ s.focus({ preventScroll: !0 }), i.push(o), qt(s.ownerDocument, i);
6925
+ else if (o.action === "active")
6926
+ hf(s, a), i.push(o), qt(s.ownerDocument, i);
6927
+ else if (o.action === "fill") {
6928
+ if (!(s instanceof a.HTMLInputElement || s instanceof a.HTMLTextAreaElement))
6921
6929
  return {
6922
6930
  complete: !1,
6923
- completed: n,
6931
+ completed: r,
6924
6932
  total: e.length,
6925
- failedLabel: i.label,
6926
- error: `"${i.label}"Step is not an input element.`
6933
+ failedLabel: o.label,
6934
+ error: `"${o.label}"Step is not an input element.`
6927
6935
  };
6928
- pf(o, i.value ?? "");
6929
- } else if (i.action === "check") {
6930
- if (!(o instanceof s.HTMLInputElement))
6936
+ pf(s, o.value ?? "");
6937
+ } else if (o.action === "check") {
6938
+ if (!(s instanceof a.HTMLInputElement))
6931
6939
  return {
6932
6940
  complete: !1,
6933
- completed: n,
6941
+ completed: r,
6934
6942
  total: e.length,
6935
- failedLabel: i.label,
6936
- error: `"${i.label}"The step is not a checked element.`
6943
+ failedLabel: o.label,
6944
+ error: `"${o.label}"The step is not a checked element.`
6937
6945
  };
6938
- o.checked || so(o, s);
6946
+ s.checked || so(s, a);
6939
6947
  } else {
6940
- const a = i.key ?? i.value ?? "Enter";
6941
- o.dispatchEvent(new s.KeyboardEvent("keydown", { key: a, bubbles: !0 })), o.dispatchEvent(new s.KeyboardEvent("keyup", { key: a, bubbles: !0 }));
6948
+ const c = o.key ?? o.value ?? "Enter";
6949
+ s.dispatchEvent(new a.KeyboardEvent("keydown", { key: c, bubbles: !0 })), s.dispatchEvent(new a.KeyboardEvent("keyup", { key: c, bubbles: !0 }));
6942
6950
  }
6943
- n += 1, await Ke(t, i.settleMs ?? 600);
6951
+ r += 1, await Ke(
6952
+ t,
6953
+ o.settleMs ?? n.defaultActionSettleMs ?? 600
6954
+ );
6944
6955
  }
6945
- return { complete: !0, completed: n, total: e.length };
6956
+ return { complete: !0, completed: r, total: e.length };
6946
6957
  }
6947
- const Zp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6958
+ const Qp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6948
6959
  __proto__: null,
6949
6960
  elementVisible: Pt,
6950
6961
  runScreenInteractions: Nr,
@@ -7047,12 +7058,12 @@ function _f(t, e, n = {}) {
7047
7058
  for (const p of e)
7048
7059
  for (const m of t.pages) {
7049
7060
  if (((l = n.include) == null ? void 0 : l.call(n, m, p)) === !1) continue;
7050
- const S = (d = n.transformPage) == null ? void 0 : d.call(n, m, p), _ = ((f = n.createPageId) == null ? void 0 : f.call(n, m, p)) ?? `${m.id}:viewport:${p.id}`, y = ((h = n.createPageName) == null ? void 0 : h.call(n, m, p)) ?? `${m.name} · ${p.label}`, O = ((g = n.createSection) == null ? void 0 : g.call(n, m, p)) ?? `${m.section} · ${p.label}`;
7061
+ const S = (d = n.transformPage) == null ? void 0 : d.call(n, m, p), y = ((f = n.createPageId) == null ? void 0 : f.call(n, m, p)) ?? `${m.id}:viewport:${p.id}`, _ = ((h = n.createPageName) == null ? void 0 : h.call(n, m, p)) ?? `${m.name} · ${p.label}`, O = ((g = n.createSection) == null ? void 0 : g.call(n, m, p)) ?? `${m.section} · ${p.label}`;
7051
7062
  i.push({
7052
7063
  ...m,
7053
7064
  ...S,
7054
- id: _,
7055
- name: y,
7065
+ id: y,
7066
+ name: _,
7056
7067
  section: O,
7057
7068
  width: Math.round(p.width),
7058
7069
  height: Math.round(p.height),
@@ -7065,7 +7076,7 @@ function _f(t, e, n = {}) {
7065
7076
  id: `${P.id}:viewport:${p.id}`,
7066
7077
  name: `${P.name} · ${p.label}`,
7067
7078
  section: O,
7068
- pageId: _
7079
+ pageId: y
7069
7080
  });
7070
7081
  }
7071
7082
  const s = i.map((p) => p.id), a = o.map((p) => p.id), c = Le(s), u = Le(a);
@@ -7092,76 +7103,76 @@ function Sf({
7092
7103
  captureRequirements: i
7093
7104
  }) {
7094
7105
  var S;
7095
- const o = t.map((_) => {
7096
- var y, O;
7106
+ const o = t.map((y) => {
7107
+ var _, O;
7097
7108
  return {
7098
- ..._,
7099
- preset: r != null && r.preset || _.preset ? oa(r == null ? void 0 : r.preset, _.preset) : void 0,
7100
- assertions: (y = r == null ? void 0 : r.assertions) != null && y.length || (O = _.assertions) != null && O.length ? [
7109
+ ...y,
7110
+ preset: r != null && r.preset || y.preset ? oa(r == null ? void 0 : r.preset, y.preset) : void 0,
7111
+ assertions: (_ = r == null ? void 0 : r.assertions) != null && _.length || (O = y.assertions) != null && O.length ? [
7101
7112
  ...((r == null ? void 0 : r.assertions) ?? []).map(lo),
7102
- ...(_.assertions ?? []).map(lo)
7113
+ ...(y.assertions ?? []).map(lo)
7103
7114
  ] : void 0
7104
7115
  };
7105
- }), s = e.map((_) => _.id), a = new Set(s), c = o.map((_) => _.id), u = [
7106
- ...Le(s).map((_) => `Duplicate scenario ID:${_}`),
7107
- ...Le(c).map((_) => `Duplicate screen case IDs:${_}`)
7116
+ }), s = e.map((y) => y.id), a = new Set(s), c = o.map((y) => y.id), u = [
7117
+ ...Le(s).map((y) => `Duplicate scenario ID:${y}`),
7118
+ ...Le(c).map((y) => `Duplicate screen case IDs:${y}`)
7108
7119
  ], l = /* @__PURE__ */ new Map();
7109
- for (const _ of o) {
7110
- i != null && i.preset && !_.preset && u.push(`screen "${_.id}"There are no required presets.`), i != null && i.assertions && !((S = _.assertions) != null && S.length) && u.push(`screen "${_.id}" is missing a required assertion.`);
7111
- for (const y of _.scenarioIds ?? []) {
7112
- if (!a.has(y)) {
7113
- u.push(`screen "${_.id}"Scenario without${y}see`);
7120
+ for (const y of o) {
7121
+ i != null && i.preset && !y.preset && u.push(`screen "${y.id}"There are no required presets.`), i != null && i.assertions && !((S = y.assertions) != null && S.length) && u.push(`screen "${y.id}" is missing a required assertion.`);
7122
+ for (const _ of y.scenarioIds ?? []) {
7123
+ if (!a.has(_)) {
7124
+ u.push(`screen "${y.id}"Scenario without${_}see`);
7114
7125
  continue;
7115
7126
  }
7116
- const O = l.get(y);
7127
+ const O = l.get(_);
7117
7128
  if (O) {
7118
- u.push(`scenario${y}Go to screen "${O}", "${_.id}"Duplicate classification in`);
7129
+ u.push(`scenario${_}Go to screen "${O}", "${y.id}"Duplicate classification in`);
7119
7130
  continue;
7120
7131
  }
7121
- l.set(y, _.id);
7132
+ l.set(_, y.id);
7122
7133
  }
7123
7134
  }
7124
7135
  const d = /* @__PURE__ */ new Set();
7125
- for (const _ of n) {
7126
- if (!a.has(_.id)) {
7127
- u.push(`Scenario without non-visual classification${_.id}see`);
7136
+ for (const y of n) {
7137
+ if (!a.has(y.id)) {
7138
+ u.push(`Scenario without non-visual classification${y.id}see`);
7128
7139
  continue;
7129
7140
  }
7130
- if (l.has(_.id)) {
7131
- u.push(`scenario${_.id}Overlapping classification of visual and non-visual actions`);
7141
+ if (l.has(y.id)) {
7142
+ u.push(`scenario${y.id}Overlapping classification of visual and non-visual actions`);
7132
7143
  continue;
7133
7144
  }
7134
- if (d.has(_.id)) {
7135
- u.push(`scenario${_.id}Non-visual classification overlap of`);
7145
+ if (d.has(y.id)) {
7146
+ u.push(`scenario${y.id}Non-visual classification overlap of`);
7136
7147
  continue;
7137
7148
  }
7138
- d.add(_.id);
7149
+ d.add(y.id);
7139
7150
  }
7140
- const f = s.filter((_) => !l.has(_) && !d.has(_));
7151
+ const f = s.filter((y) => !l.has(y) && !d.has(y));
7141
7152
  if (f.length && u.push(`Unclassified Scenario:${f.join(", ")}`), u.length)
7142
7153
  throw new Error(`[Pygmalion] Screens scenario classification error${u.join(`
7143
7154
  `)}`);
7144
- const h = new Map(e.map((_) => [_.id, _])), g = o.map((_) => ({
7145
- id: `state:${_.id}`,
7146
- name: _.name,
7147
- section: _.section,
7148
- pageId: _.id,
7149
- sourcePath: _.sourcePath,
7150
- codeName: _.codeName ?? _.state,
7151
- flow: _.flow,
7152
- scenarioId: _.scenarioId,
7153
- description: [_.scenario, _.state].filter(Boolean).join(" · ")
7154
- })), p = [...l.entries()].map(([_, y]) => {
7155
- const O = h.get(_);
7155
+ const h = new Map(e.map((y) => [y.id, y])), g = o.map((y) => ({
7156
+ id: `state:${y.id}`,
7157
+ name: y.name,
7158
+ section: y.section,
7159
+ pageId: y.id,
7160
+ sourcePath: y.sourcePath,
7161
+ codeName: y.codeName ?? y.state,
7162
+ flow: y.flow,
7163
+ scenarioId: y.scenarioId,
7164
+ description: [y.scenario, y.state].filter(Boolean).join(" · ")
7165
+ })), p = [...l.entries()].map(([y, _]) => {
7166
+ const O = h.get(y);
7156
7167
  return {
7157
- id: `scenario:${_}`,
7158
- name: O.name ?? _,
7168
+ id: `scenario:${y}`,
7169
+ name: O.name ?? y,
7159
7170
  section: O.section,
7160
- pageId: y,
7171
+ pageId: _,
7161
7172
  sourcePath: O.sourcePath,
7162
7173
  codeName: O.codeName,
7163
7174
  flow: O.flow,
7164
- scenarioId: _,
7175
+ scenarioId: y,
7165
7176
  description: O.description
7166
7177
  };
7167
7178
  }), m = [...g, ...p];
@@ -7174,8 +7185,8 @@ function Sf({
7174
7185
  // and no canonical id look uncovered.
7175
7186
  pages: o.map(
7176
7187
  ({
7177
- sourcePath: _,
7178
- codeName: y,
7188
+ sourcePath: y,
7189
+ codeName: _,
7179
7190
  coverageRoutes: O,
7180
7191
  ...P
7181
7192
  }) => P
@@ -7371,17 +7382,17 @@ function Nf(t, e = {}) {
7371
7382
  var h, g, p;
7372
7383
  const l = [], d = [], f = [];
7373
7384
  for (const m of ot) {
7374
- const S = t.collections[m], _ = new Set(S.pages.map((y) => y.id));
7375
- d.push(...S.assets.map((y) => `${m}:${y.id}`)), f.push(...S.pages.map((y) => `${m}:${y.id}`)), S.assets.length !== S.expectedCount && l.push(`${m}: expected ${S.expectedCount}, imported ${S.assets.length}`);
7376
- for (const y of S.assets)
7377
- _.has(y.pageId) || l.push(`${m}:${y.id}: unknown pageId ${y.pageId}`);
7378
- for (const y of S.pages) {
7379
- m === "screens" && ((h = y.interactions) != null && h.length || (g = y.assertions) != null && g.length || y.preset) && !y.route && l.push(`${m}:${y.id}: capture contract requires a route preview`), y.preset && !vn(y.preset) && l.push(`${m}:${y.id}: preset must contain only finite JSON-serializable data`), y.environment && !vn(y.environment) && l.push(`${m}:${y.id}: environment must contain only finite JSON-serializable data`);
7380
- for (const O of y.assertions ?? [])
7381
- O.selector.trim() || l.push(`${m}:${y.id}: assertion selector is required`), O.label.trim() || l.push(`${m}:${y.id}: assertion label is required`), O.attribute && !O.attribute.name.trim() && l.push(`${m}:${y.id}: assertion attribute name is required`);
7382
- !y.route && !y.componentName && !((p = y.gallery) != null && p.length) && l.push(`${m}:${y.id}: componentName, gallery, or route is required`), y.frameSizeMode != null && y.frameSizeMode !== "fixed" && y.frameSizeMode !== "content" && l.push(`${m}:${y.id}: frameSizeMode must be fixed or content`), y.heightMode != null && y.heightMode !== "fixed" && y.heightMode !== "document" && l.push(`${m}:${y.id}: heightMode must be fixed or document`), y.maxHeight != null && (!Number.isFinite(y.maxHeight) || y.maxHeight <= 0) && l.push(`${m}:${y.id}: maxHeight must be a positive finite number`), y.componentName && !n[y.componentName] && l.push(`${m}:${y.id}: missing registry component ${y.componentName}`);
7383
- for (const O of y.gallery ?? [])
7384
- n[O] || l.push(`${m}:${y.id}: missing gallery component ${O}`);
7385
+ const S = t.collections[m], y = new Set(S.pages.map((_) => _.id));
7386
+ d.push(...S.assets.map((_) => `${m}:${_.id}`)), f.push(...S.pages.map((_) => `${m}:${_.id}`)), S.assets.length !== S.expectedCount && l.push(`${m}: expected ${S.expectedCount}, imported ${S.assets.length}`);
7387
+ for (const _ of S.assets)
7388
+ y.has(_.pageId) || l.push(`${m}:${_.id}: unknown pageId ${_.pageId}`);
7389
+ for (const _ of S.pages) {
7390
+ m === "screens" && ((h = _.interactions) != null && h.length || (g = _.assertions) != null && g.length || _.preset) && !_.route && l.push(`${m}:${_.id}: capture contract requires a route preview`), _.preset && !vn(_.preset) && l.push(`${m}:${_.id}: preset must contain only finite JSON-serializable data`), _.environment && !vn(_.environment) && l.push(`${m}:${_.id}: environment must contain only finite JSON-serializable data`);
7391
+ for (const O of _.assertions ?? [])
7392
+ O.selector.trim() || l.push(`${m}:${_.id}: assertion selector is required`), O.label.trim() || l.push(`${m}:${_.id}: assertion label is required`), O.attribute && !O.attribute.name.trim() && l.push(`${m}:${_.id}: assertion attribute name is required`);
7393
+ !_.route && !_.componentName && !((p = _.gallery) != null && p.length) && l.push(`${m}:${_.id}: componentName, gallery, or route is required`), _.frameSizeMode != null && _.frameSizeMode !== "fixed" && _.frameSizeMode !== "content" && l.push(`${m}:${_.id}: frameSizeMode must be fixed or content`), _.heightMode != null && _.heightMode !== "fixed" && _.heightMode !== "document" && l.push(`${m}:${_.id}: heightMode must be fixed or document`), _.maxHeight != null && (!Number.isFinite(_.maxHeight) || _.maxHeight <= 0) && l.push(`${m}:${_.id}: maxHeight must be a positive finite number`), _.componentName && !n[_.componentName] && l.push(`${m}:${_.id}: missing registry component ${_.componentName}`);
7394
+ for (const O of _.gallery ?? [])
7395
+ n[O] || l.push(`${m}:${_.id}: missing gallery component ${O}`);
7385
7396
  }
7386
7397
  }
7387
7398
  for (const m of Le(d)) l.push(`duplicate asset id ${m}`);
@@ -7391,13 +7402,13 @@ ${l.join(`
7391
7402
  `)}`);
7392
7403
  };
7393
7404
  c();
7394
- const u = async (l, d) => {
7395
- var S, _;
7396
- const f = [];
7397
- let h = !d.preset;
7405
+ const u = async (l, d, f) => {
7406
+ var y, _;
7407
+ const h = [];
7408
+ let g = !d.preset;
7398
7409
  if (d.preset)
7399
7410
  if (!e.executeScreenPreset)
7400
- f.push({
7411
+ h.push({
7401
7412
  stage: "preset",
7402
7413
  code: "preset_executor_missing",
7403
7414
  label: "screen preset",
@@ -7405,41 +7416,45 @@ ${l.join(`
7405
7416
  });
7406
7417
  else
7407
7418
  try {
7408
- const y = await e.executeScreenPreset(
7419
+ const O = await e.executeScreenPreset(
7409
7420
  { pageId: d.pageId, route: d.route, preset: Ct(d.preset) },
7410
7421
  { iframe: l }
7411
7422
  );
7412
- y && !y.complete ? f.push({
7423
+ O && !O.complete ? h.push({
7413
7424
  stage: "preset",
7414
7425
  code: "preset_rejected",
7415
7426
  label: "screen preset",
7416
- message: y.message ?? "The host refused to apply the screen preset.",
7417
- actual: y.details
7418
- }) : h = !0;
7419
- } catch (y) {
7420
- f.push({
7427
+ message: O.message ?? "The host refused to apply the screen preset.",
7428
+ actual: O.details
7429
+ }) : g = !0;
7430
+ } catch (O) {
7431
+ h.push({
7421
7432
  stage: "preset",
7422
7433
  code: "preset_error",
7423
7434
  label: "screen preset",
7424
- message: `An error occurred while applying the screen preset:${String(y).slice(0, 160)}`
7435
+ message: `An error occurred while applying the screen preset:${String(O).slice(0, 160)}`
7425
7436
  });
7426
7437
  }
7427
- let g = wf(((S = d.interactions) == null ? void 0 : S.length) ?? 0), p = Of(((_ = d.assertions) == null ? void 0 : _.length) ?? 0);
7428
- f.length === 0 && (g = await Nr(l, d.interactions ?? []), g.complete || f.push({
7438
+ let p = wf(((y = d.interactions) == null ? void 0 : y.length) ?? 0), m = Of(((_ = d.assertions) == null ? void 0 : _.length) ?? 0);
7439
+ h.length === 0 && (p = await Nr(
7440
+ l,
7441
+ d.interactions ?? [],
7442
+ f
7443
+ ), p.complete || h.push({
7429
7444
  stage: "interaction",
7430
7445
  code: "interaction_failed",
7431
- label: g.failedLabel,
7432
- message: g.error ?? "Couldn't reproduce the user flow."
7433
- })), f.length === 0 && (p = await xf(l, d.assertions ?? []), f.push(...p.failures));
7434
- const m = f[0];
7446
+ label: p.failedLabel,
7447
+ message: p.error ?? "Couldn't reproduce the user flow."
7448
+ })), h.length === 0 && (m = await xf(l, d.assertions ?? []), h.push(...m.failures));
7449
+ const S = h[0];
7435
7450
  return {
7436
- complete: f.length === 0,
7437
- presetApplied: h,
7438
- interactions: g,
7439
- assertions: p,
7440
- failures: f,
7441
- failedLabel: m == null ? void 0 : m.label,
7442
- error: m == null ? void 0 : m.message
7451
+ complete: h.length === 0,
7452
+ presetApplied: g,
7453
+ interactions: p,
7454
+ assertions: m,
7455
+ failures: h,
7456
+ failedLabel: S == null ? void 0 : S.label,
7457
+ error: S == null ? void 0 : S.message
7443
7458
  };
7444
7459
  };
7445
7460
  return {
@@ -7523,23 +7538,23 @@ ${l.join(`
7523
7538
  return null;
7524
7539
  }
7525
7540
  if (!(m != null && m.body) || !S) return null;
7526
- const _ = Date.now();
7527
- let y = Date.now(), O = m.body.querySelectorAll("*").length;
7541
+ const y = Date.now();
7542
+ let _ = Date.now(), O = m.body.querySelectorAll("*").length;
7528
7543
  const P = S.MutationObserver, A = new P(() => {
7529
- y = Date.now(), O = m.body.querySelectorAll("*").length;
7544
+ _ = Date.now(), O = m.body.querySelectorAll("*").length;
7530
7545
  });
7531
7546
  A.observe(m.body, { childList: !0, subtree: !0, attributes: !0, characterData: !0 });
7532
7547
  try {
7533
7548
  await new Promise((D) => {
7534
- const F = () => {
7549
+ const k = () => {
7535
7550
  const z = Date.now(), V = m.body.querySelectorAll("*").length;
7536
- if (V !== O && (O = V, y = z), V >= g && z - y >= f || z - _ >= h) {
7551
+ if (V !== O && (O = V, _ = z), V >= g && z - _ >= f || z - y >= h) {
7537
7552
  D();
7538
7553
  return;
7539
7554
  }
7540
- S.setTimeout(F, 100);
7555
+ S.setTimeout(k, 100);
7541
7556
  };
7542
- S.setTimeout(F, 100);
7557
+ S.setTimeout(k, 100);
7543
7558
  });
7544
7559
  } finally {
7545
7560
  A.disconnect();
@@ -7591,7 +7606,7 @@ function Mf(t) {
7591
7606
  function bn() {
7592
7607
  return sa;
7593
7608
  }
7594
- const Qp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7609
+ const em = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7595
7610
  __proto__: null,
7596
7611
  DESIGN_IMPORT_KINDS: ot,
7597
7612
  assertScreenCaptureComplete: vf,
@@ -7643,11 +7658,11 @@ function Rf(t) {
7643
7658
  if (!g) continue;
7644
7659
  const p = If(g);
7645
7660
  if (!p) continue;
7646
- const m = (p.x - s.x) / r - f.x, S = (p.y - s.y) / r - f.y, _ = p.width / r - f.width, y = p.height / r - f.height, O = Math.max(
7661
+ const m = (p.x - s.x) / r - f.x, S = (p.y - s.y) / r - f.y, y = p.width / r - f.width, _ = p.height / r - f.height, O = Math.max(
7647
7662
  Math.abs(m),
7648
7663
  Math.abs(S),
7649
- Math.abs(_),
7650
- Math.abs(y)
7664
+ Math.abs(y),
7665
+ Math.abs(_)
7651
7666
  );
7652
7667
  a += 1, !(O <= Pf) && (c = Math.max(c, O), u.push({
7653
7668
  nodeId: h.id,
@@ -7667,8 +7682,8 @@ function Rf(t) {
7667
7682
  },
7668
7683
  dx: Math.round(m),
7669
7684
  dy: Math.round(S),
7670
- dwidth: Math.round(_),
7671
- dheight: Math.round(y),
7685
+ dwidth: Math.round(y),
7686
+ dheight: Math.round(_),
7672
7687
  drift: Math.round(O)
7673
7688
  }));
7674
7689
  }
@@ -7720,14 +7735,14 @@ function Lf(t) {
7720
7735
  }
7721
7736
  return null;
7722
7737
  }
7723
- function kf(t) {
7738
+ function Ff(t) {
7724
7739
  var e;
7725
7740
  return t.bodyAttributes != null ? t.bodyAttributes.includes("data-pygmalion-source-stamped") : ((e = t.snapshotHtml) == null ? void 0 : e.includes("data-pygmalion-source-stamped")) ?? !1;
7726
7741
  }
7727
7742
  function la(t) {
7728
7743
  return t < 12 ? 1 : Math.max(3, Math.floor(t * 0.25));
7729
7744
  }
7730
- function Ff(t, e = 600) {
7745
+ function kf(t, e = 600) {
7731
7746
  if (!t) return 0;
7732
7747
  let n = 0;
7733
7748
  for (let r = t.indexOf("<"); r !== -1 && n < e; r = t.indexOf("<", r + 1)) {
@@ -7777,11 +7792,11 @@ function Ir(t) {
7777
7792
  const e = en.get(t);
7778
7793
  return !e || e.stale ? null : e.handle;
7779
7794
  }
7780
- const em = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7795
+ const tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7781
7796
  __proto__: null,
7782
- countMarkupElements: Ff,
7797
+ countMarkupElements: kf,
7783
7798
  createStampedInstanceResolver: aa,
7784
- frozenSnapshotStamped: kf,
7799
+ frozenSnapshotStamped: Ff,
7785
7800
  getMountedShadowPreviewHandle: Ir,
7786
7801
  importCountFloor: la,
7787
7802
  importDomFromShadowPreview: da,
@@ -7836,14 +7851,14 @@ function qf(t) {
7836
7851
  return Tr.add(t), () => Tr.delete(t);
7837
7852
  }
7838
7853
  let _a = "";
7839
- function Jf(t) {
7854
+ function Yf(t) {
7840
7855
  _a = t;
7841
7856
  }
7842
7857
  function $r() {
7843
7858
  return _a;
7844
7859
  }
7845
7860
  let Sa = "bitmap";
7846
- function Yf(t) {
7861
+ function Jf(t) {
7847
7862
  Sa = t;
7848
7863
  }
7849
7864
  function Xf() {
@@ -7885,7 +7900,7 @@ function ch(t) {
7885
7900
  function Dr() {
7886
7901
  return va;
7887
7902
  }
7888
- const tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7903
+ const nm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7889
7904
  __proto__: null,
7890
7905
  getAppOrigin: ba,
7891
7906
  getArtifactOrigin: Uf,
@@ -7900,7 +7915,7 @@ const tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7900
7915
  getStaticFrameSurface: Xf,
7901
7916
  setAppOrigin: Bf,
7902
7917
  setArtifactOrigin: Kf,
7903
- setFlowCanvas: Jf,
7918
+ setFlowCanvas: Yf,
7904
7919
  setOnApply: Zf,
7905
7920
  setOnDesignChange: sh,
7906
7921
  setOnInspectApply: eh,
@@ -7908,7 +7923,7 @@ const tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7908
7923
  setOnInspectPreview: nh,
7909
7924
  setOnPreviewOpenChange: ch,
7910
7925
  setPreviewRevision: Gf,
7911
- setStaticFrameSurface: Yf,
7926
+ setStaticFrameSurface: Jf,
7912
7927
  subscribeAppOrigin: Hf,
7913
7928
  subscribeArtifactOrigin: Wf,
7914
7929
  subscribePreviewRevision: qf
@@ -8028,7 +8043,7 @@ function fo(t, e) {
8028
8043
  var n;
8029
8044
  return t.modelField.startsWith("domStyle:") ? e.domStyle[t.modelField.slice(9)] ?? "" : ((n = Oa[t.modelField]) == null ? void 0 : n.read(e)) ?? t.from;
8030
8045
  }
8031
- function Jt(t) {
8046
+ function Yt(t) {
8032
8047
  return typeof t == "string" || typeof t == "boolean" || typeof t == "number" && Number.isFinite(t);
8033
8048
  }
8034
8049
  function ph(t) {
@@ -8062,7 +8077,7 @@ class mh {
8062
8077
  ...Object.keys(r.sourceProps)
8063
8078
  ])) {
8064
8079
  const l = (c = i.node.sourceProps) == null ? void 0 : c[u], d = r.sourceProps[u];
8065
- if (!Jt(l) || !Jt(d) || typeof l != typeof d || l === d)
8080
+ if (!Yt(l) || !Yt(d) || typeof l != typeof d || l === d)
8066
8081
  continue;
8067
8082
  const f = `prop:${Sn(i.ownIdentity)}:${u}`, h = this.baselines.get(f);
8068
8083
  (h == null ? void 0 : h.kind) === "prop" ? h.nodeId = n : this.baselines.set(f, {
@@ -8149,7 +8164,7 @@ class mh {
8149
8164
  }
8150
8165
  if (s.kind === "prop") {
8151
8166
  const h = (o = a.node.sourceProps) == null ? void 0 : o[s.prop];
8152
- if (!Jt(h) || typeof h != typeof s.from || h === s.from)
8167
+ if (!Yt(h) || typeof h != typeof s.from || h === s.from)
8153
8168
  continue;
8154
8169
  r.push({
8155
8170
  kind: "prop",
@@ -8207,7 +8222,7 @@ class mh {
8207
8222
  o.from = s.node.text;
8208
8223
  else if (o.kind === "prop") {
8209
8224
  const a = (i = s.node.sourceProps) == null ? void 0 : i[o.prop];
8210
- Jt(a) && typeof a == typeof o.from && (o.from = a);
8225
+ Yt(a) && typeof a == typeof o.from && (o.from = a);
8211
8226
  } else
8212
8227
  o.from = fo(o, s.node);
8213
8228
  }
@@ -8391,7 +8406,10 @@ function Rr(t, e) {
8391
8406
  return !t || !e ? !1 : t === e ? !0 : t.endsWith(`/${e.replace(/^\/+/, "")}`);
8392
8407
  }
8393
8408
  function Ph(t, e) {
8394
- return !!(t && (t === e.id || t === e.name || t === e.codeName));
8409
+ const n = t.split("|").filter(Boolean);
8410
+ return !!(n.length > 0 && n.some(
8411
+ (r) => r === e.id || r === e.name || r === e.codeName
8412
+ ));
8395
8413
  }
8396
8414
  function Aa(t) {
8397
8415
  var n;
@@ -8402,7 +8420,7 @@ function Ch(t) {
8402
8420
  const e = t.sourceStyle, n = e.lastIndexOf("#");
8403
8421
  return n > 0 ? $t(e.slice(0, n)) : "";
8404
8422
  }
8405
- function nm(t, e) {
8423
+ function rm(t, e) {
8406
8424
  const n = $t(e.sourcePath), r = Aa(t), i = Ch(t);
8407
8425
  return {
8408
8426
  assetPath: n || null,
@@ -8443,7 +8461,7 @@ const xa = (t) => t === "rows" || t === "columns", ho = (t) => {
8443
8461
  "selected"
8444
8462
  ]);
8445
8463
  let Dh = 0;
8446
- class k {
8464
+ class F {
8447
8465
  constructor(e, n) {
8448
8466
  v(this, "id", `n${++Dh}`);
8449
8467
  v(this, "type");
@@ -8538,7 +8556,7 @@ function W(t) {
8538
8556
  }
8539
8557
  function G(t, e = !1) {
8540
8558
  const { children: n, id: r, type: i, ...o } = t;
8541
- return new k(i, {
8559
+ return new F(i, {
8542
8560
  ...o,
8543
8561
  ...e ? {} : { id: r },
8544
8562
  children: n.map((s) => G(s, e))
@@ -8564,13 +8582,13 @@ function rr(t, e) {
8564
8582
  const n = t.importPageId ?? t.path ?? t.route ?? t.name;
8565
8583
  return `${e}:${t.importKind ?? ""}:${t.canvas ?? "default"}:${n}`;
8566
8584
  }
8567
- function kh(t, e) {
8585
+ function Fh(t, e) {
8568
8586
  if (!t || typeof t != "object") return !1;
8569
8587
  const n = t;
8570
8588
  return n.version === ii && n.scope === e && Array.isArray(n.frames) && Array.isArray(n.sections);
8571
8589
  }
8572
8590
  let it = 0;
8573
- class Fh {
8591
+ class kh {
8574
8592
  constructor() {
8575
8593
  /** Multi-page — each page has an independent tree. */
8576
8594
  v(this, "pages");
@@ -8955,7 +8973,7 @@ ${e}`;
8955
8973
  var l, d;
8956
8974
  const a = s.gallery ? s.gallery.map((f) => {
8957
8975
  const h = le()[f];
8958
- return new k("component", {
8976
+ return new F("component", {
8959
8977
  componentName: f,
8960
8978
  name: f,
8961
8979
  widthMode: "fit",
@@ -8963,12 +8981,12 @@ ${e}`;
8963
8981
  childrenText: (h == null ? void 0 : h.children) === "text" ? f : ""
8964
8982
  });
8965
8983
  }) : s.componentName ? [
8966
- new k("component", {
8984
+ new F("component", {
8967
8985
  componentName: s.componentName,
8968
8986
  name: s.componentName,
8969
8987
  widthMode: "fill"
8970
8988
  })
8971
- ] : [], c = s.gallery ? new k("rows", { name: "Page", padding: 24, gap: 24, fill: "#ffffff", children: a }) : new k("rows", { name: "Page", children: a }), u = {
8989
+ ] : [], c = s.gallery ? new F("rows", { name: "Page", padding: 24, gap: 24, fill: "#ffffff", children: a }) : new F("rows", { name: "Page", children: a }), u = {
8972
8990
  id: `p${++it}`,
8973
8991
  name: s.name,
8974
8992
  canvas: s.canvas,
@@ -9044,7 +9062,7 @@ ${e}`;
9044
9062
  publish: !0,
9045
9063
  x: n.x,
9046
9064
  y: n.y,
9047
- root: new k("rows", { name: "Page", padding: 20, gap: 16, fill: "#ffffff" })
9065
+ root: new F("rows", { name: "Page", padding: 20, gap: 16, fill: "#ffffff" })
9048
9066
  };
9049
9067
  return Te(i.root, i), this.pages.push(i), this.activePageId = e, this.selectedIds = [], this.selectedCanvasObject = { kind: "frame", id: e }, this.hoveredId = null, this.editingTextId = null, !0;
9050
9068
  }
@@ -9194,8 +9212,8 @@ ${e}`;
9194
9212
  })),
9195
9213
  {
9196
9214
  gap: 80,
9197
- laneGap: Ji.laneGap,
9198
- maxFramesPerRow: Ji.maxFramesPerRow
9215
+ laneGap: Yi.laneGap,
9216
+ maxFramesPerRow: Yi.maxFramesPerRow
9199
9217
  }
9200
9218
  ) : qi(
9201
9219
  d.map((p) => ({
@@ -9239,7 +9257,7 @@ ${e}`;
9239
9257
  }
9240
9258
  let c = n;
9241
9259
  for (const u of a.values()) {
9242
- const l = Yl(
9260
+ const l = Jl(
9243
9261
  u.map((d) => ({
9244
9262
  width: d.width ?? 1,
9245
9263
  height: d.height ?? 1
@@ -9337,7 +9355,7 @@ ${e}`;
9337
9355
  const a = window.localStorage.getItem(i);
9338
9356
  if (a) {
9339
9357
  const c = JSON.parse(a);
9340
- kh(c, r) && this.restoreCanvasLayout(c);
9358
+ Fh(c, r) && this.restoreCanvasLayout(c);
9341
9359
  }
9342
9360
  } catch {
9343
9361
  }
@@ -9508,7 +9526,7 @@ ${e}`;
9508
9526
  const c = L(o.root, a.id);
9509
9527
  if (!c) return !1;
9510
9528
  this.checkpoint(`dimension:${n.id}`, !0);
9511
- const u = new k("component", {
9529
+ const u = new F("component", {
9512
9530
  name: n.component,
9513
9531
  componentName: n.component,
9514
9532
  componentProps: { ...s },
@@ -9606,7 +9624,7 @@ ${e}`;
9606
9624
  u.children.splice(0, u.children.length, ...f);
9607
9625
  } else if (u.children.some((f) => Qt(f, o)))
9608
9626
  return !0;
9609
- const l = fd(a, o, c), d = l ? G(W(l), !0) : new k("component", {
9627
+ const l = fd(a, o, c), d = l ? G(W(l), !0) : new F("component", {
9610
9628
  name: o.component,
9611
9629
  componentName: o.component,
9612
9630
  componentProps: { ...o.props },
@@ -10284,7 +10302,7 @@ ${e}`;
10284
10302
  }
10285
10303
  addNode(e) {
10286
10304
  this.checkpoint("add", !0);
10287
- const n = e === "text" ? new k("text") : new k(e, { gap: 8, padding: 8 }), r = this.insertTarget();
10305
+ const n = e === "text" ? new F("text") : new F(e, { gap: 8, padding: 8 }), r = this.insertTarget();
10288
10306
  r.children.push(n), this.syncSharedSourceStructure(r), this.selectedIds = [n.id], this.selectedCanvasObject = null;
10289
10307
  }
10290
10308
  /** Insert a registry component into the canvas — an “actual React component” node. */
@@ -10292,7 +10310,7 @@ ${e}`;
10292
10310
  const n = le()[e];
10293
10311
  if (!n) return;
10294
10312
  this.checkpoint("add", !0);
10295
- const r = new k("component", {
10313
+ const r = new F("component", {
10296
10314
  componentName: e,
10297
10315
  name: e,
10298
10316
  // Fill is natural for container-type (nodes) components (Card, etc.).
@@ -10357,7 +10375,7 @@ ${e}`;
10357
10375
  this.checkpoint("group", !0);
10358
10376
  const i = Math.min(...r.map((s) => n.children.indexOf(s)));
10359
10377
  for (const s of r) n.children.splice(n.children.indexOf(s), 1);
10360
- const o = new k("rows", { name: "Group", children: r, widthMode: "fill" });
10378
+ const o = new F("rows", { name: "Group", children: r, widthMode: "fill" });
10361
10379
  n.children.splice(i, 0, o), this.syncSharedSourceStructure(n), this.selectedIds = [o.id];
10362
10380
  }
10363
10381
  /** ⌘⇧G — Unpacks the selected container and spreads its children into the parent's place. */
@@ -10540,30 +10558,30 @@ function L(t, e) {
10540
10558
  return null;
10541
10559
  }
10542
10560
  function jh() {
10543
- const t = (e) => new k("rows", {
10561
+ const t = (e) => new F("rows", {
10544
10562
  name: "Chip",
10545
10563
  widthMode: "fit",
10546
10564
  padding: 10,
10547
10565
  radius: 8,
10548
10566
  fill: "#f2f4f6",
10549
- children: [new k("text", { text: e, fontSize: 13, color: "#4e5968" })]
10567
+ children: [new F("text", { text: e, fontSize: 13, color: "#4e5968" })]
10550
10568
  });
10551
- return new k("rows", {
10569
+ return new F("rows", {
10552
10570
  name: "Page",
10553
10571
  padding: 20,
10554
10572
  gap: 16,
10555
10573
  fill: "#ffffff",
10556
10574
  children: [
10557
- new k("text", { text: "Please write a title", fontSize: 18, fontWeight: 700 }),
10558
- new k("text", { text: "Please write a description within 2 lines.", fontSize: 14, color: "#8b95a1" }),
10559
- new k("columns", { name: "Chips", gap: 8, children: [t("quick start"), t("custom")] }),
10560
- new k("rows", {
10575
+ new F("text", { text: "Please write a title", fontSize: 18, fontWeight: 700 }),
10576
+ new F("text", { text: "Please write a description within 2 lines.", fontSize: 14, color: "#8b95a1" }),
10577
+ new F("columns", { name: "Chips", gap: 8, children: [t("quick start"), t("custom")] }),
10578
+ new F("rows", {
10561
10579
  name: "Button",
10562
10580
  fill: "#3182f6",
10563
10581
  radius: 12,
10564
10582
  padding: 14,
10565
10583
  children: [
10566
- new k("text", {
10584
+ new F("text", {
10567
10585
  text: "I confirmed it",
10568
10586
  fontSize: 15,
10569
10587
  fontWeight: 600,
@@ -10575,7 +10593,7 @@ function jh() {
10575
10593
  ]
10576
10594
  });
10577
10595
  }
10578
- const ir = new Fh();
10596
+ const ir = new kh();
10579
10597
  class zh extends Da {
10580
10598
  constructor() {
10581
10599
  super(...arguments);
@@ -10606,7 +10624,7 @@ function Vh({
10606
10624
  }), c = yt(() => {
10607
10625
  }), u = yt(i);
10608
10626
  u.current = i;
10609
- const l = yt(0), [d, f] = or([]), [h, g] = or("none"), p = ir.frozenPreviewOverrideCss(t), m = ir.frozenPreviewCssRules(), S = ir.frozenPreviewMutations(), _ = JSON.stringify({ cssRules: m, mutations: S }), y = () => {
10627
+ const l = yt(0), [d, f] = or([]), [h, g] = or("none"), p = ir.frozenPreviewOverrideCss(t), m = ir.frozenPreviewCssRules(), S = ir.frozenPreviewMutations(), y = JSON.stringify({ cssRules: m, mutations: S }), _ = () => {
10610
10628
  var vt, Ce;
10611
10629
  const O = (vt = s.current) == null ? void 0 : vt.contentDocument;
10612
10630
  if (!(O != null && O.head)) return;
@@ -10616,7 +10634,7 @@ function Vh({
10616
10634
  );
10617
10635
  p ? I || (I = O.createElement("style"), I.dataset.pygmalionFrozenOverrides = "", O.head.append(I)) : I == null || I.remove(), I && I.textContent !== p && (I.textContent = p), a.current();
10618
10636
  const D = [];
10619
- let F = 0, z = 0;
10637
+ let k = 0, z = 0;
10620
10638
  for (const x of m)
10621
10639
  try {
10622
10640
  O.querySelector(x.selector);
@@ -10685,7 +10703,7 @@ function Vh({
10685
10703
  ve
10686
10704
  )
10687
10705
  )
10688
- ), F += 1;
10706
+ ), k += 1;
10689
10707
  } catch (ve) {
10690
10708
  si(ve);
10691
10709
  }
@@ -10734,14 +10752,14 @@ function Vh({
10734
10752
  };
10735
10753
  const V = [...new Set(A)];
10736
10754
  g(
10737
- z > 0 ? "stale" : F > 0 ? "applied" : "none"
10755
+ z > 0 ? "stale" : k > 0 ? "applied" : "none"
10738
10756
  ), f(
10739
10757
  (x) => JSON.stringify(x) === JSON.stringify(V) ? x : V
10740
10758
  ), o == null || o(V);
10741
10759
  };
10742
- return di(() => (y(), () => {
10760
+ return di(() => (_(), () => {
10743
10761
  l.current += 1, a.current();
10744
- }), [p, e, _]), di(
10762
+ }), [p, e, y]), di(
10745
10763
  () => () => {
10746
10764
  c.current();
10747
10765
  },
@@ -10763,7 +10781,7 @@ function Vh({
10763
10781
  className: "block border-0 bg-white",
10764
10782
  style: { width: "100%", height: n, pointerEvents: "none" },
10765
10783
  onLoad: () => {
10766
- y();
10784
+ _();
10767
10785
  const O = s.current;
10768
10786
  if (!O) return;
10769
10787
  c.current();
@@ -10814,28 +10832,28 @@ function Vh({
10814
10832
  }
10815
10833
  );
10816
10834
  }
10817
- const rm = nl(Vh);
10835
+ const im = nl(Vh);
10818
10836
  export {
10819
- kf as $,
10820
- xp as A,
10821
- Ap as B,
10822
- bp as C,
10823
- Mp as D,
10837
+ Ff as $,
10838
+ Np as A,
10839
+ xp as B,
10840
+ yp as C,
10841
+ Ip as D,
10824
10842
  be as E,
10825
10843
  Vh as F,
10826
10844
  ho as G,
10827
10845
  L as H,
10828
- Pp as I,
10829
- Tp as J,
10830
- $p as K,
10846
+ Cp as I,
10847
+ $p as J,
10848
+ Dp as K,
10831
10849
  Zl as L,
10832
10850
  Xl as M,
10833
- k as N,
10834
- dp as O,
10835
- Fp as P,
10836
- Rp as Q,
10851
+ F as N,
10852
+ fp as O,
10853
+ jp as P,
10854
+ Lp as Q,
10837
10855
  Oe as R,
10838
- Dp as S,
10856
+ Rp as S,
10839
10857
  kp as T,
10840
10858
  Ns as U,
10841
10859
  af as V,
@@ -10844,49 +10862,49 @@ export {
10844
10862
  Qh as Y,
10845
10863
  dl as Z,
10846
10864
  Vf as _,
10847
- Yh as a,
10848
- nh as a$,
10849
- rm as a0,
10865
+ Jh as a,
10866
+ vp as a$,
10867
+ im as a0,
10850
10868
  vf as a1,
10851
10869
  Xf as a2,
10852
10870
  ll as a3,
10853
10871
  zf as a4,
10854
- Ff as a5,
10872
+ kf as a5,
10855
10873
  la as a6,
10856
10874
  rs as a7,
10857
10875
  uu as a8,
10858
10876
  We as a9,
10859
- zp as aA,
10860
- Bp as aB,
10877
+ Vp as aA,
10878
+ Hp as aB,
10861
10879
  yd as aC,
10862
10880
  _d as aD,
10863
- Wp as aE,
10864
- Up as aF,
10865
- pp as aG,
10881
+ Gp as aE,
10882
+ Wp as aF,
10883
+ mp as aG,
10866
10884
  Et as aH,
10867
- mp as aI,
10868
- nm as aJ,
10885
+ gp as aI,
10886
+ rm as aJ,
10869
10887
  xa as aK,
10870
- lp as aL,
10871
- up as aM,
10872
- Jh as aN,
10873
- qh as aO,
10874
- tp as aP,
10875
- Mf as aQ,
10876
- op as aR,
10877
- Jf as aS,
10888
+ dp as aL,
10889
+ lp as aM,
10890
+ up as aN,
10891
+ Yh as aO,
10892
+ qh as aP,
10893
+ tp as aQ,
10894
+ Mf as aR,
10895
+ op as aS,
10878
10896
  Yf as aT,
10879
- Vp as aU,
10880
- Yp as aV,
10881
- Lp as aW,
10882
- hp as aX,
10883
- Np as aY,
10884
- Gp as aZ,
10885
- gp as a_,
10897
+ Jf as aU,
10898
+ Bp as aV,
10899
+ Xp as aW,
10900
+ Fp as aX,
10901
+ pp as aY,
10902
+ Mp as aZ,
10903
+ qp as a_,
10886
10904
  ah as aa,
10887
10905
  Xh as ab,
10888
10906
  yl as ac,
10889
- Fi as ad,
10907
+ ki as ad,
10890
10908
  ce as ae,
10891
10909
  Be as af,
10892
10910
  bs as ag,
@@ -10902,48 +10920,49 @@ export {
10902
10920
  ap as aq,
10903
10921
  Hl as ar,
10904
10922
  sp as as,
10905
- vp as at,
10906
- qp as au,
10907
- Kp as av,
10908
- Xp as aw,
10923
+ bp as at,
10924
+ Yp as au,
10925
+ Up as av,
10926
+ Zp as aw,
10909
10927
  gd as ax,
10910
10928
  vd as ay,
10911
10929
  ld as az,
10912
10930
  Zh as b,
10913
- Bf as b0,
10914
- Gf as b1,
10915
- zl as b2,
10916
- Uf as b3,
10917
- ch as b4,
10918
- Zf as b5,
10919
- eh as b6,
10920
- ih as b7,
10921
- sh as b8,
10922
- ot as b9,
10923
- jl as ba,
10924
- Nf as bb,
10925
- Sf as bc,
10926
- yf as bd,
10927
- _f as be,
10928
- Sp as bf,
10929
- oa as bg,
10930
- Kf as bh,
10931
- _p as bi,
10932
- Ql as bj,
10933
- Hp as bk,
10934
- jp as bl,
10935
- fp as bm,
10936
- Jp as bn,
10937
- ed as bo,
10938
- Cp as bp,
10939
- Zp as bq,
10931
+ nh as b0,
10932
+ Bf as b1,
10933
+ Gf as b2,
10934
+ zl as b3,
10935
+ Uf as b4,
10936
+ ch as b5,
10937
+ Zf as b6,
10938
+ eh as b7,
10939
+ ih as b8,
10940
+ sh as b9,
10941
+ ot as ba,
10942
+ jl as bb,
10943
+ Nf as bc,
10944
+ Sf as bd,
10945
+ yf as be,
10946
+ _f as bf,
10947
+ wp as bg,
10948
+ oa as bh,
10949
+ Kf as bi,
10950
+ Sp as bj,
10951
+ Ql as bk,
10952
+ Kp as bl,
10953
+ zp as bm,
10954
+ hp as bn,
10955
+ Jp as bo,
10956
+ ed as bp,
10957
+ Tp as bq,
10940
10958
  Qp as br,
10941
10959
  em as bs,
10942
10960
  tm as bt,
10961
+ nm as bu,
10943
10962
  ms as c,
10944
10963
  Tn as d,
10945
10964
  ir as e,
10946
- Fl as f,
10965
+ kl as f,
10947
10966
  le as g,
10948
10967
  np as h,
10949
10968
  ep as i,
@@ -10959,9 +10978,9 @@ export {
10959
10978
  W as s,
10960
10979
  nl as t,
10961
10980
  Lo as u,
10962
- yp as v,
10963
- Op as w,
10964
- Ip as x,
10965
- wp as y,
10966
- Ep as z
10981
+ _p as v,
10982
+ Ep as w,
10983
+ Pp as x,
10984
+ Op as y,
10985
+ Ap as z
10967
10986
  };