@illuma-ai/code-sandbox 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { jsxs as ze, jsx as ne } from "react/jsx-runtime";
1
+ import { jsxs as je, jsx as J } from "react/jsx-runtime";
2
2
  import Qt, { forwardRef as xl, useRef as Je, useState as Ds, useMemo as mi, useCallback as nt, useImperativeHandle as q0, useEffect as Lt, useLayoutEffect as G0, createContext as gi, useContext as Ht, useId as GA, Fragment as K0, createElement as KA, useInsertionEffect as Y0, Component as YA, memo as Z0 } from "react";
3
3
  function di() {
4
4
  return di = Object.assign ? Object.assign.bind() : function(a) {
@@ -137,39 +137,39 @@ var Gu, Gv, Kv, ZA = (zv || (zv = 1, Gu = qv, (function() {
137
137
  return L || u.test(R) ? h(R.slice(2), L ? 2 : 8) : i.test(R) ? NaN : +R;
138
138
  }
139
139
  return Xv = function(R, U, L) {
140
- var B, G, V, K, se, fe, ee = 0, ie = !1, xe = !1, ae = !0;
140
+ var B, G, V, K, se, fe, te = 0, ie = !1, xe = !1, ae = !0;
141
141
  if (typeof R != "function") throw new TypeError("Expected a function");
142
142
  function Fe(Ce) {
143
- var He = B, Ie = G;
144
- return B = G = void 0, ee = Ce, K = R.apply(Ie, He);
143
+ var We = B, Ie = G;
144
+ return B = G = void 0, te = Ce, K = R.apply(Ie, We);
145
145
  }
146
146
  function re(Ce) {
147
- var He = Ce - fe;
148
- return fe === void 0 || He >= U || He < 0 || xe && Ce - ee >= V;
147
+ var We = Ce - fe;
148
+ return fe === void 0 || We >= U || We < 0 || xe && Ce - te >= V;
149
149
  }
150
150
  function Ee() {
151
151
  var Ce = k();
152
152
  if (re(Ce)) return Be(Ce);
153
- se = setTimeout(Ee, (function(He) {
154
- var Ie = U - (He - fe);
155
- return xe ? w(Ie, V - (He - ee)) : Ie;
153
+ se = setTimeout(Ee, (function(We) {
154
+ var Ie = U - (We - fe);
155
+ return xe ? w(Ie, V - (We - te)) : Ie;
156
156
  })(Ce));
157
157
  }
158
158
  function Be(Ce) {
159
159
  return se = void 0, ae && B ? Fe(Ce) : (B = G = void 0, K);
160
160
  }
161
161
  function ke() {
162
- var Ce = k(), He = re(Ce);
163
- if (B = arguments, G = this, fe = Ce, He) {
162
+ var Ce = k(), We = re(Ce);
163
+ if (B = arguments, G = this, fe = Ce, We) {
164
164
  if (se === void 0) return (function(Ie) {
165
- return ee = Ie, se = setTimeout(Ee, U), ie ? Fe(Ie) : K;
165
+ return te = Ie, se = setTimeout(Ee, U), ie ? Fe(Ie) : K;
166
166
  })(fe);
167
167
  if (xe) return se = setTimeout(Ee, U), Fe(fe);
168
168
  }
169
169
  return se === void 0 && (se = setTimeout(Ee, U)), K;
170
170
  }
171
171
  return U = P(U) || 0, A(L) && (ie = !!L.leading, V = (xe = "maxWait" in L) ? v(P(L.maxWait) || 0, U) : V, ae = "trailing" in L ? !!L.trailing : ae), ke.cancel = function() {
172
- se !== void 0 && clearTimeout(se), ee = 0, B = fe = G = se = void 0;
172
+ se !== void 0 && clearTimeout(se), te = 0, B = fe = G = se = void 0;
173
173
  }, ke.flush = function() {
174
174
  return se === void 0 ? K : Be(k());
175
175
  }, ke;
@@ -683,26 +683,26 @@ class yT extends Vd {
683
683
  resize(i, l, u = this.viewItems.map((w) => w.size), h, m, f = Number.NEGATIVE_INFINITY, _ = Number.POSITIVE_INFINITY, b, v) {
684
684
  if (i < 0 || i >= this.viewItems.length) return 0;
685
685
  const w = mn(i, -1, -1), k = mn(i + 1, this.viewItems.length);
686
- if (m) for (const ee of m) r2(w, ee), r2(k, ee);
687
- if (h) for (const ee of h) Ku(w, ee), Ku(k, ee);
688
- const A = w.map((ee) => this.viewItems[ee]), P = w.map((ee) => u[ee]), R = k.map((ee) => this.viewItems[ee]), U = k.map((ee) => u[ee]), L = w.reduce((ee, ie) => ee + (this.viewItems[ie].minimumSize - u[ie]), 0), B = w.reduce((ee, ie) => ee + (this.viewItems[ie].maximumSize - u[ie]), 0), G = k.length === 0 ? Number.POSITIVE_INFINITY : k.reduce((ee, ie) => ee + (u[ie] - this.viewItems[ie].minimumSize), 0), V = k.length === 0 ? Number.NEGATIVE_INFINITY : k.reduce((ee, ie) => ee + (u[ie] - this.viewItems[ie].maximumSize), 0), K = Math.max(L, V, f), se = Math.min(G, B, _);
686
+ if (m) for (const te of m) r2(w, te), r2(k, te);
687
+ if (h) for (const te of h) Ku(w, te), Ku(k, te);
688
+ const A = w.map((te) => this.viewItems[te]), P = w.map((te) => u[te]), R = k.map((te) => this.viewItems[te]), U = k.map((te) => u[te]), L = w.reduce((te, ie) => te + (this.viewItems[ie].minimumSize - u[ie]), 0), B = w.reduce((te, ie) => te + (this.viewItems[ie].maximumSize - u[ie]), 0), G = k.length === 0 ? Number.POSITIVE_INFINITY : k.reduce((te, ie) => te + (u[ie] - this.viewItems[ie].minimumSize), 0), V = k.length === 0 ? Number.NEGATIVE_INFINITY : k.reduce((te, ie) => te + (u[ie] - this.viewItems[ie].maximumSize), 0), K = Math.max(L, V, f), se = Math.min(G, B, _);
689
689
  let fe = !1;
690
690
  if (b) {
691
- const ee = this.viewItems[b.index], ie = l >= b.limitDelta;
692
- fe = ie !== ee.visible, ee.setVisible(ie, b.size);
691
+ const te = this.viewItems[b.index], ie = l >= b.limitDelta;
692
+ fe = ie !== te.visible, te.setVisible(ie, b.size);
693
693
  }
694
694
  if (!fe && v) {
695
- const ee = this.viewItems[v.index], ie = l < v.limitDelta;
696
- fe = ie !== ee.visible, ee.setVisible(ie, v.size);
695
+ const te = this.viewItems[v.index], ie = l < v.limitDelta;
696
+ fe = ie !== te.visible, te.setVisible(ie, v.size);
697
697
  }
698
698
  if (fe) return this.resize(i, l, u, h, m, f, _);
699
- for (let ee = 0, ie = l = Tn(l, K, se); ee < A.length; ee++) {
700
- const xe = A[ee], ae = Tn(P[ee] + ie, xe.minimumSize, xe.maximumSize);
701
- ie -= ae - P[ee], xe.size = ae;
699
+ for (let te = 0, ie = l = Tn(l, K, se); te < A.length; te++) {
700
+ const xe = A[te], ae = Tn(P[te] + ie, xe.minimumSize, xe.maximumSize);
701
+ ie -= ae - P[te], xe.size = ae;
702
702
  }
703
- for (let ee = 0, ie = l; ee < R.length; ee++) {
704
- const xe = R[ee], ae = Tn(U[ee] - ie, xe.minimumSize, xe.maximumSize);
705
- ie += ae - U[ee], xe.size = ae;
703
+ for (let te = 0, ie = l; te < R.length; te++) {
704
+ const xe = R[te], ae = Tn(U[te] - ie, xe.minimumSize, xe.maximumSize);
705
+ ie += ae - U[te], xe.size = ae;
706
706
  }
707
707
  return l;
708
708
  }
@@ -850,11 +850,11 @@ const rw = xl(({
850
850
  onDragStart: R,
851
851
  onDragEnd: U
852
852
  }, L) => {
853
- const B = Je(null), G = Je([]), V = Je(/* @__PURE__ */ new Map()), K = Je(null), se = Je(/* @__PURE__ */ new Map()), fe = Je(new lT()), ee = Je([]), [ie, xe] = Ds(!1);
853
+ const B = Je(null), G = Je([]), V = Je(/* @__PURE__ */ new Map()), K = Je(null), se = Je(/* @__PURE__ */ new Map()), fe = Je(new lT()), te = Je([]), [ie, xe] = Ds(!1);
854
854
  process.env.NODE_ENV !== "production" && _ && console.warn("Prop sizes is deprecated. Please use defaultSizes instead.");
855
855
  const ae = mi(() => Qt.Children.toArray(a).filter(Qt.isValidElement), [a]), Fe = nt((re) => {
856
856
  var Ee, Be;
857
- const ke = (Ee = ee.current) == null ? void 0 : Ee[re];
857
+ const ke = (Ee = te.current) == null ? void 0 : Ee[re];
858
858
  return typeof (ke == null ? void 0 : ke.preferredSize) == "number" && ((Be = K.current) != null && Be.resizeView(re, Math.round(ke.preferredSize)), !0);
859
859
  }, []);
860
860
  return q0(L, () => ({
@@ -863,7 +863,7 @@ const rw = xl(({
863
863
  else {
864
864
  var re;
865
865
  (re = K.current) == null || re.distributeViewSizes();
866
- for (let Ee = 0; Ee < ee.current.length; Ee++) Fe(Ee);
866
+ for (let Ee = 0; Ee < te.current.length; Ee++) Fe(Ee);
867
867
  }
868
868
  },
869
869
  resize: (re) => {
@@ -880,18 +880,18 @@ const rw = xl(({
880
880
  descriptor: {
881
881
  size: b.reduce((ke, Ce) => ke + Ce, 0),
882
882
  views: b.map((ke, Ce) => {
883
- var He, Ie, Qe, bt;
884
- const te = V.current.get(G.current[Ce]), he = new c2(fe.current, di({
883
+ var We, Ie, Qe, bt;
884
+ const ne = V.current.get(G.current[Ce]), he = new c2(fe.current, di({
885
885
  element: document.createElement("div"),
886
- minimumSize: (He = te == null ? void 0 : te.minSize) != null ? He : h,
887
- maximumSize: (Ie = te == null ? void 0 : te.maxSize) != null ? Ie : u,
888
- priority: (Qe = te == null ? void 0 : te.priority) != null ? Qe : gn.Normal
889
- }, (te == null ? void 0 : te.preferredSize) && {
890
- preferredSize: te == null ? void 0 : te.preferredSize
886
+ minimumSize: (We = ne == null ? void 0 : ne.minSize) != null ? We : h,
887
+ maximumSize: (Ie = ne == null ? void 0 : ne.maxSize) != null ? Ie : u,
888
+ priority: (Qe = ne == null ? void 0 : ne.priority) != null ? Qe : gn.Normal
889
+ }, (ne == null ? void 0 : ne.preferredSize) && {
890
+ preferredSize: ne == null ? void 0 : ne.preferredSize
891
891
  }, {
892
- snap: (bt = te == null ? void 0 : te.snap) != null ? bt : v
892
+ snap: (bt = ne == null ? void 0 : ne.snap) != null ? bt : v
893
893
  }));
894
- return ee.current.push(he), {
894
+ return te.current.push(he), {
895
895
  container: [...se.current.values()][Ce],
896
896
  size: ke,
897
897
  view: he
@@ -907,10 +907,10 @@ const rw = xl(({
907
907
  (ke = B.current) == null || ke.classList.remove("split-view-sash-dragging");
908
908
  }), K.current.on("sashchange", (ke) => {
909
909
  if (P && K.current) {
910
- const Ce = ae.map((He) => He.key);
911
- for (let He = 0; He < Ce.length; He++) {
912
- const Ie = V.current.get(Ce[He]);
913
- (Ie == null ? void 0 : Ie.visible) !== void 0 && Ie.visible !== K.current.isViewVisible(He) && P(He, K.current.isViewVisible(He));
910
+ const Ce = ae.map((We) => We.key);
911
+ for (let We = 0; We < Ce.length; We++) {
912
+ const Ie = V.current.get(Ce[We]);
913
+ (Ie == null ? void 0 : Ie.visible) !== void 0 && Ie.visible !== K.current.isViewVisible(We) && P(We, K.current.isViewVisible(We));
914
914
  }
915
915
  }
916
916
  }), K.current.on("sashreset", (ke) => {
@@ -930,10 +930,10 @@ const rw = xl(({
930
930
  const Re = ae.map((me) => me.key), _e = [...G.current], at = Re.filter((me) => !G.current.includes(me)), ot = Re.filter((me) => G.current.includes(me)), De = G.current.map((me) => !Re.includes(me));
931
931
  for (let me = De.length - 1; me >= 0; me--) {
932
932
  var re;
933
- De[me] && ((re = K.current) != null && re.removeView(me), _e.splice(me, 1), ee.current.splice(me, 1));
933
+ De[me] && ((re = K.current) != null && re.removeView(me), _e.splice(me, 1), te.current.splice(me, 1));
934
934
  }
935
935
  for (const me of at) {
936
- var Ee, Be, ke, Ce, He;
936
+ var Ee, Be, ke, Ce, We;
937
937
  const we = V.current.get(me), Pe = new c2(fe.current, di({
938
938
  element: document.createElement("div"),
939
939
  minimumSize: (Ee = we == null ? void 0 : we.minSize) != null ? Ee : h,
@@ -944,7 +944,7 @@ const rw = xl(({
944
944
  }, {
945
945
  snap: (Ce = we == null ? void 0 : we.snap) != null ? Ce : v
946
946
  }));
947
- (He = K.current) != null && He.addView(se.current.get(me), Pe, pl.Distribute, Re.findIndex((ye) => ye === me)), _e.splice(Re.findIndex((ye) => ye === me), 0, me), ee.current.splice(Re.findIndex((ye) => ye === me), 0, Pe);
947
+ (We = K.current) != null && We.addView(se.current.get(me), Pe, pl.Distribute, Re.findIndex((ye) => ye === me)), _e.splice(Re.findIndex((ye) => ye === me), 0, me), te.current.splice(Re.findIndex((ye) => ye === me), 0, Pe);
948
948
  }
949
949
  for (; !JA(Re, _e); ) for (const [me, we] of Re.entries()) {
950
950
  const Pe = _e.findIndex((ye) => ye === we);
@@ -958,21 +958,21 @@ const rw = xl(({
958
958
  }
959
959
  for (const me of at) {
960
960
  var Qe;
961
- const we = Re.findIndex((ye) => ye === me), Pe = ee.current[we].preferredSize;
961
+ const we = Re.findIndex((ye) => ye === me), Pe = te.current[we].preferredSize;
962
962
  Pe !== void 0 && ((Qe = K.current) == null || Qe.resizeView(we, Pe));
963
963
  }
964
964
  for (const me of [...at, ...ot]) {
965
- var bt, te;
965
+ var bt, ne;
966
966
  const we = V.current.get(me), Pe = Re.findIndex((ye) => ye === me);
967
- we && u2(we) && we.visible !== void 0 && ((bt = K.current) == null ? void 0 : bt.isViewVisible(Pe)) !== we.visible && ((te = K.current) == null || te.setViewVisible(Pe, we.visible));
967
+ we && u2(we) && we.visible !== void 0 && ((bt = K.current) == null ? void 0 : bt.isViewVisible(Pe)) !== we.visible && ((ne = K.current) == null || ne.setViewVisible(Pe, we.visible));
968
968
  }
969
969
  for (const me of ot) {
970
970
  const we = V.current.get(me), Pe = Re.findIndex((ye) => ye === me);
971
971
  if (we && u2(we)) {
972
972
  var he;
973
- we.preferredSize !== void 0 && ee.current[Pe].preferredSize !== we.preferredSize && (ee.current[Pe].preferredSize = we.preferredSize);
973
+ we.preferredSize !== void 0 && te.current[Pe].preferredSize !== we.preferredSize && (te.current[Pe].preferredSize = we.preferredSize);
974
974
  let ye = !1;
975
- we.minSize !== void 0 && ee.current[Pe].minimumSize !== we.minSize && (ee.current[Pe].minimumSize = we.minSize, ye = !0), we.maxSize !== void 0 && ee.current[Pe].maximumSize !== we.maxSize && (ee.current[Pe].maximumSize = we.maxSize, ye = !0), ye && ((he = K.current) == null || he.layout());
975
+ we.minSize !== void 0 && te.current[Pe].minimumSize !== we.minSize && (te.current[Pe].minimumSize = we.minSize, ye = !0), we.maxSize !== void 0 && te.current[Pe].maximumSize !== we.maxSize && (te.current[Pe].maximumSize = we.maxSize, ye = !0), ye && ((he = K.current) == null || he.layout());
976
976
  }
977
977
  }
978
978
  (at.length > 0 || De.length > 0) && (G.current = Re);
@@ -1210,7 +1210,7 @@ function ww(a, i) {
1210
1210
  };
1211
1211
  return { schedule: Xo.reduce((V, K) => {
1212
1212
  const se = f[K];
1213
- return V[K] = (fe, ee = !1, ie = !1) => (l || L(), se.schedule(fe, ee, ie)), V;
1213
+ return V[K] = (fe, te = !1, ie = !1) => (l || L(), se.schedule(fe, te, ie)), V;
1214
1214
  }, {}), cancel: (V) => {
1215
1215
  for (let K = 0; K < Xo.length; K++)
1216
1216
  f[Xo[K]].cancel(V);
@@ -1573,12 +1573,12 @@ function yl(a = st.visualDuration, i = st.bounce) {
1573
1573
  velocity: -/* @__PURE__ */ _n(l.velocity || 0)
1574
1574
  }), R = A || 0, U = v / (2 * Math.sqrt(b * w)), L = f - m, B = /* @__PURE__ */ _n(Math.sqrt(b / w)), G = Math.abs(L) < 5;
1575
1575
  u || (u = G ? st.restSpeed.granular : st.restSpeed.default), h || (h = G ? st.restDelta.granular : st.restDelta.default);
1576
- let V, K, se, fe, ee, ie;
1576
+ let V, K, se, fe, te, ie;
1577
1577
  if (U < 1)
1578
1578
  se = vd(B, U), fe = (R + U * B * L) / se, V = (ae) => {
1579
1579
  const Fe = Math.exp(-U * B * ae);
1580
1580
  return f - Fe * (fe * Math.sin(se * ae) + L * Math.cos(se * ae));
1581
- }, ee = U * B * fe + L * se, ie = U * B * L - fe * se, K = (ae) => Math.exp(-U * B * ae) * (ee * Math.sin(se * ae) + ie * Math.cos(se * ae));
1581
+ }, te = U * B * fe + L * se, ie = U * B * L - fe * se, K = (ae) => Math.exp(-U * B * ae) * (te * Math.sin(se * ae) + ie * Math.cos(se * ae));
1582
1582
  else if (U === 1) {
1583
1583
  V = (Fe) => f - Math.exp(-B * Fe) * (L + (R + B * L) * Fe);
1584
1584
  const ae = R + B * L;
@@ -1600,7 +1600,7 @@ function yl(a = st.visualDuration, i = st.bounce) {
1600
1600
  velocity: (ae) => /* @__PURE__ */ Wt(K(ae)),
1601
1601
  next: (ae) => {
1602
1602
  if (!P && U < 1) {
1603
- const re = Math.exp(-U * B * ae), Ee = Math.sin(se * ae), Be = Math.cos(se * ae), ke = f - re * (fe * Ee + L * Be), Ce = /* @__PURE__ */ Wt(re * (ee * Ee + ie * Be));
1603
+ const re = Math.exp(-U * B * ae), Ee = Math.sin(se * ae), Be = Math.cos(se * ae), ke = f - re * (fe * Ee + L * Be), Ce = /* @__PURE__ */ Wt(re * (te * Ee + ie * Be));
1604
1604
  return _.done = Math.abs(Ce) <= u && Math.abs(f - ke) <= h, _.value = _.done ? f : ke, _;
1605
1605
  }
1606
1606
  const Fe = V(ae);
@@ -1643,7 +1643,7 @@ function wd({ keyframes: a, velocity: i = 0, power: l = 0.8, timeConstant: u = 3
1643
1643
  A.done = Math.abs(xe) <= v, A.value = A.done ? B : ae;
1644
1644
  };
1645
1645
  let se, fe;
1646
- const ee = (ie) => {
1646
+ const te = (ie) => {
1647
1647
  P(A.value) && (se = ie, fe = yl({
1648
1648
  keyframes: [A.value, R(A.value)],
1649
1649
  velocity: Rw(V, ie, A.value),
@@ -1654,11 +1654,11 @@ function wd({ keyframes: a, velocity: i = 0, power: l = 0.8, timeConstant: u = 3
1654
1654
  restSpeed: w
1655
1655
  }));
1656
1656
  };
1657
- return ee(0), {
1657
+ return te(0), {
1658
1658
  calculatedDuration: null,
1659
1659
  next: (ie) => {
1660
1660
  let xe = !1;
1661
- return !fe && se === void 0 && (xe = !0, K(ie), ee(ie)), se !== void 0 && ie >= se ? fe.next(ie - se) : (!xe && K(ie), A);
1661
+ return !fe && se === void 0 && (xe = !0, K(ie), te(ie)), se !== void 0 && ie >= se ? fe.next(ie - se) : (!xe && K(ie), A);
1662
1662
  }
1663
1663
  };
1664
1664
  }
@@ -1814,8 +1814,8 @@ class sh extends nh {
1814
1814
  m && !G && (se.value = m(se.value));
1815
1815
  let { done: fe } = se;
1816
1816
  !G && b !== null && (fe = this.playbackSpeed >= 0 ? this.currentTime >= h : this.currentTime <= 0);
1817
- const ee = this.holdTime === null && (this.state === "finished" || this.state === "running" && fe);
1818
- return ee && R !== wd && (se.value = th(w, this.options, L, this.speed)), U && U(se.value), ee && this.finish(), se;
1817
+ const te = this.holdTime === null && (this.state === "finished" || this.state === "running" && fe);
1818
+ return te && R !== wd && (se.value = th(w, this.options, L, this.speed)), U && U(se.value), te && this.finish(), se;
1819
1819
  }
1820
1820
  /**
1821
1821
  * Allows the returned animation to be awaited or promise-chained. Currently
@@ -3973,8 +3973,8 @@ function bR(a) {
3973
3973
  for (let B = 0; B < yR; B++) {
3974
3974
  const G = gR[B], V = l[G], K = w[G] !== void 0 ? w[G] : k[G], se = Na(K), fe = G === v ? V.isActive : null;
3975
3975
  fe === !1 && (U = B);
3976
- let ee = K === k[G] && K !== w[G] && se;
3977
- if (ee && (u || h) && a.manuallyAnimateOnMount && (ee = !1), V.protectedKeys = { ...R }, // If it isn't active and hasn't *just* been set as inactive
3976
+ let te = K === k[G] && K !== w[G] && se;
3977
+ if (te && (u || h) && a.manuallyAnimateOnMount && (te = !1), V.protectedKeys = { ...R }, // If it isn't active and hasn't *just* been set as inactive
3978
3978
  !V.isActive && fe === null || // If we didn't and don't have any defined prop for this animation type
3979
3979
  !K && !V.prevProp || // Or if the prop doesn't define an animation
3980
3980
  El(K) || typeof K == "boolean")
@@ -3988,7 +3988,7 @@ function bR(a) {
3988
3988
  }
3989
3989
  const ie = vR(V.prevProp, K);
3990
3990
  let xe = ie || // If we're making this variant active, we want to always make it active
3991
- G === v && V.isActive && !ee && se || // If we removed a higher-priority variant (i is in reverse order)
3991
+ G === v && V.isActive && !te && se || // If we removed a higher-priority variant (i is in reverse order)
3992
3992
  B > U && se, ae = !1;
3993
3993
  const Fe = Array.isArray(K) ? K : [K];
3994
3994
  let re = Fe.reduce(m(G), {});
@@ -4005,17 +4005,17 @@ function bR(a) {
4005
4005
  const Qe = re[Ie], bt = Ee[Ie];
4006
4006
  if (R.hasOwnProperty(Ie))
4007
4007
  continue;
4008
- let te = !1;
4009
- Pd(Qe) && Pd(bt) ? te = !vS(Qe, bt) : te = Qe !== bt, te ? Qe != null ? ke(Ie) : P.add(Ie) : Qe !== void 0 && P.has(Ie) ? ke(Ie) : V.protectedKeys[Ie] = !0;
4008
+ let ne = !1;
4009
+ Pd(Qe) && Pd(bt) ? ne = !vS(Qe, bt) : ne = Qe !== bt, ne ? Qe != null ? ke(Ie) : P.add(Ie) : Qe !== void 0 && P.has(Ie) ? ke(Ie) : V.protectedKeys[Ie] = !0;
4010
4010
  }
4011
4011
  V.prevProp = K, V.prevResolvedValues = re, V.isActive && (R = { ...R, ...re }), (u || h) && a.blockInitialAnimation && (xe = !1);
4012
- const Ce = ee && ie;
4012
+ const Ce = te && ie;
4013
4013
  xe && (!Ce || ae) && A.push(...Fe.map((Ie) => {
4014
4014
  const Qe = { type: G };
4015
4015
  if (typeof Ie == "string" && (u || h) && !Ce && a.manuallyAnimateOnMount && a.parent) {
4016
- const { parent: bt } = a, te = hi(bt, Ie);
4017
- if (bt.enteringChildren && te) {
4018
- const { delayChildren: he } = te.transition || {};
4016
+ const { parent: bt } = a, ne = hi(bt, Ie);
4017
+ if (bt.enteringChildren && ne) {
4018
+ const { delayChildren: he } = ne.transition || {};
4019
4019
  Qe.delay = Vw(bt.enteringChildren, a, he);
4020
4020
  }
4021
4021
  }
@@ -5265,7 +5265,7 @@ function cd(a, { forwardMotionProps: i = !1, type: l } = {}, u, h) {
5265
5265
  const L = ID(A);
5266
5266
  k = L.MeasureLayout, R.visualElement = kD(a, U, A, h, L.ProjectionNode, m);
5267
5267
  }
5268
- return ze(Cl.Provider, { value: R, children: [k && R.visualElement ? ne(k, { visualElement: R.visualElement, ...A }) : null, _D(a, v, ED(U, R.visualElement, w), U, P, i, m)] });
5268
+ return je(Cl.Provider, { value: R, children: [k && R.visualElement ? J(k, { visualElement: R.visualElement, ...A }) : null, _D(a, v, ED(U, R.visualElement, w), U, P, i, m)] });
5269
5269
  }
5270
5270
  _.displayName = `motion.${typeof a == "string" ? a : `create(${a.displayName ?? a.name ?? ""})`}`;
5271
5271
  const b = xl(_);
@@ -5911,7 +5911,7 @@ class JD extends YA {
5911
5911
  }
5912
5912
  function HS(a) {
5913
5913
  const [i, l] = iD(), u = Ht(iw);
5914
- return ne(JD, { ...a, layoutGroup: u, switchLayoutGroup: Ht(FS), isPresent: i, safeToRemove: l });
5914
+ return J(JD, { ...a, layoutGroup: u, switchLayoutGroup: Ht(FS), isPresent: i, safeToRemove: l });
5915
5915
  }
5916
5916
  const QD = {
5917
5917
  pan: {
@@ -6120,7 +6120,7 @@ function mO(a) {
6120
6120
  return i;
6121
6121
  }
6122
6122
  function gO({ expanded: a }) {
6123
- return /* @__PURE__ */ ne(
6123
+ return /* @__PURE__ */ J(
6124
6124
  "svg",
6125
6125
  {
6126
6126
  width: "16",
@@ -6129,7 +6129,7 @@ function gO({ expanded: a }) {
6129
6129
  fill: "none",
6130
6130
  className: "shrink-0 transition-transform duration-150",
6131
6131
  style: { transform: a ? "rotate(90deg)" : "none" },
6132
- children: /* @__PURE__ */ ne(
6132
+ children: /* @__PURE__ */ J(
6133
6133
  "path",
6134
6134
  {
6135
6135
  d: "M6 4l4 4-4 4",
@@ -6143,7 +6143,7 @@ function gO({ expanded: a }) {
6143
6143
  );
6144
6144
  }
6145
6145
  function yO({ open: a }) {
6146
- return a ? /* @__PURE__ */ ze(
6146
+ return a ? /* @__PURE__ */ je(
6147
6147
  "svg",
6148
6148
  {
6149
6149
  width: "16",
@@ -6152,14 +6152,14 @@ function yO({ open: a }) {
6152
6152
  fill: "none",
6153
6153
  className: "shrink-0",
6154
6154
  children: [
6155
- /* @__PURE__ */ ne(
6155
+ /* @__PURE__ */ J(
6156
6156
  "path",
6157
6157
  {
6158
6158
  d: "M1.5 3.5A1 1 0 012.5 2.5h3.172a1 1 0 01.707.293L7.5 3.914a1 1 0 00.707.293H13.5a1 1 0 011 1v1.293H3.207a1 1 0 00-.966.741L1.5 10.5V3.5z",
6159
6159
  fill: "#dcb67a"
6160
6160
  }
6161
6161
  ),
6162
- /* @__PURE__ */ ne(
6162
+ /* @__PURE__ */ J(
6163
6163
  "path",
6164
6164
  {
6165
6165
  d: "M2.241 7.241A1 1 0 013.207 6.5H14.5a1 1 0 01.966 1.259l-1.5 5.5A1 1 0 0113 14H2.5a1 1 0 01-1-1V8.5a1 1 0 01.741-.966l0-.293z",
@@ -6168,7 +6168,7 @@ function yO({ open: a }) {
6168
6168
  )
6169
6169
  ]
6170
6170
  }
6171
- ) : /* @__PURE__ */ ne(
6171
+ ) : /* @__PURE__ */ J(
6172
6172
  "svg",
6173
6173
  {
6174
6174
  width: "16",
@@ -6176,7 +6176,7 @@ function yO({ open: a }) {
6176
6176
  viewBox: "0 0 16 16",
6177
6177
  fill: "none",
6178
6178
  className: "shrink-0",
6179
- children: /* @__PURE__ */ ne(
6179
+ children: /* @__PURE__ */ J(
6180
6180
  "path",
6181
6181
  {
6182
6182
  d: "M1.5 3A1.5 1.5 0 013 1.5h3.172a1.5 1.5 0 011.06.44L8.354 3.06a.5.5 0 00.354.147H13A1.5 1.5 0 0114.5 4.707V12A1.5 1.5 0 0113 13.5H3A1.5 1.5 0 011.5 12V3z",
@@ -6213,7 +6213,7 @@ function _O(a) {
6213
6213
  }
6214
6214
  function bO({ name: a }) {
6215
6215
  const i = _O(a);
6216
- return /* @__PURE__ */ ze(
6216
+ return /* @__PURE__ */ je(
6217
6217
  "svg",
6218
6218
  {
6219
6219
  width: "16",
@@ -6222,7 +6222,7 @@ function bO({ name: a }) {
6222
6222
  fill: "none",
6223
6223
  className: "shrink-0",
6224
6224
  children: [
6225
- /* @__PURE__ */ ne(
6225
+ /* @__PURE__ */ J(
6226
6226
  "path",
6227
6227
  {
6228
6228
  d: "M4 1.5h5.5L13 5v9.5a1 1 0 01-1 1H4a1 1 0 01-1-1v-13a1 1 0 011-1z",
@@ -6230,7 +6230,7 @@ function bO({ name: a }) {
6230
6230
  opacity: "0.2"
6231
6231
  }
6232
6232
  ),
6233
- /* @__PURE__ */ ne(
6233
+ /* @__PURE__ */ J(
6234
6234
  "path",
6235
6235
  {
6236
6236
  d: "M4 1.5h5.5L13 5v9.5a1 1 0 01-1 1H4a1 1 0 01-1-1v-13a1 1 0 011-1z",
@@ -6238,7 +6238,7 @@ function bO({ name: a }) {
6238
6238
  strokeWidth: "1"
6239
6239
  }
6240
6240
  ),
6241
- /* @__PURE__ */ ne("path", { d: "M9.5 1.5V5H13", stroke: i, strokeWidth: "1" })
6241
+ /* @__PURE__ */ J("path", { d: "M9.5 1.5V5H13", stroke: i, strokeWidth: "1" })
6242
6242
  ]
6243
6243
  }
6244
6244
  );
@@ -6249,9 +6249,9 @@ function vO({
6249
6249
  onSelectFile: l,
6250
6250
  fileChanges: u
6251
6251
  }) {
6252
- return /* @__PURE__ */ ze("div", { className: "h-full overflow-auto bg-sb-sidebar text-sm select-none", children: [
6253
- /* @__PURE__ */ ne("div", { className: "px-3 py-2 text-[11px] font-semibold text-sb-text-muted uppercase tracking-wider border-b border-sb-border", children: "Explorer" }),
6254
- /* @__PURE__ */ ne("div", { className: "py-1", children: a.map((h) => /* @__PURE__ */ ne(
6252
+ return /* @__PURE__ */ je("div", { className: "h-full overflow-auto bg-sb-sidebar text-sm select-none overscroll-contain", children: [
6253
+ /* @__PURE__ */ J("div", { className: "px-3 py-2 text-[11px] font-semibold text-sb-text-muted uppercase tracking-wider border-b border-sb-border", children: "Explorer" }),
6254
+ /* @__PURE__ */ J("div", { className: "py-1", children: a.map((h) => /* @__PURE__ */ J(
6255
6255
  WS,
6256
6256
  {
6257
6257
  node: h,
@@ -6277,18 +6277,18 @@ function WS({
6277
6277
  const k = h && ((w = a.children) == null ? void 0 : w.some((A) => h[A.path] ? !0 : A.type === "directory" ? Object.keys(h).some(
6278
6278
  (P) => P.startsWith(A.path + "/") && h[P] !== "unchanged"
6279
6279
  ) : !1));
6280
- return /* @__PURE__ */ ze("div", { children: [
6281
- /* @__PURE__ */ ze(
6280
+ return /* @__PURE__ */ je("div", { children: [
6281
+ /* @__PURE__ */ je(
6282
6282
  "button",
6283
6283
  {
6284
6284
  className: `w-full flex items-center gap-1 py-[3px] text-left hover:bg-sb-bg-hover transition-colors ${_ ? "bg-sb-bg-active text-sb-text-active" : "text-sb-text"}`,
6285
6285
  style: { paddingLeft: b },
6286
6286
  onClick: () => f(!m),
6287
6287
  children: [
6288
- /* @__PURE__ */ ne(gO, { expanded: m }),
6289
- /* @__PURE__ */ ne(yO, { open: m }),
6290
- /* @__PURE__ */ ne("span", { className: "truncate ml-0.5 flex-1", children: a.name }),
6291
- k && /* @__PURE__ */ ne(
6288
+ /* @__PURE__ */ J(gO, { expanded: m }),
6289
+ /* @__PURE__ */ J(yO, { open: m }),
6290
+ /* @__PURE__ */ J("span", { className: "truncate ml-0.5 flex-1", children: a.name }),
6291
+ k && /* @__PURE__ */ J(
6292
6292
  "span",
6293
6293
  {
6294
6294
  className: "w-1.5 h-1.5 rounded-full shrink-0 mr-2",
@@ -6298,7 +6298,7 @@ function WS({
6298
6298
  ]
6299
6299
  }
6300
6300
  ),
6301
- m && a.children && /* @__PURE__ */ ne("div", { children: a.children.map((A) => /* @__PURE__ */ ne(
6301
+ m && a.children && /* @__PURE__ */ J("div", { children: a.children.map((A) => /* @__PURE__ */ J(
6302
6302
  WS,
6303
6303
  {
6304
6304
  node: A,
@@ -6311,16 +6311,16 @@ function WS({
6311
6311
  )) })
6312
6312
  ] });
6313
6313
  }
6314
- return /* @__PURE__ */ ze(
6314
+ return /* @__PURE__ */ je(
6315
6315
  "button",
6316
6316
  {
6317
6317
  className: `w-full flex items-center gap-1 py-[3px] text-left hover:bg-sb-bg-hover transition-colors ${_ ? "bg-sb-bg-active text-sb-text-active" : "text-sb-text"}`,
6318
6318
  style: { paddingLeft: b + 20 },
6319
6319
  onClick: () => u(a.path),
6320
6320
  children: [
6321
- /* @__PURE__ */ ne(bO, { name: a.name }),
6322
- /* @__PURE__ */ ne("span", { className: "truncate ml-0.5 flex-1", children: a.name }),
6323
- v !== "unchanged" && /* @__PURE__ */ ne(
6321
+ /* @__PURE__ */ J(bO, { name: a.name }),
6322
+ /* @__PURE__ */ J("span", { className: "truncate ml-0.5 flex-1", children: a.name }),
6323
+ v !== "unchanged" && /* @__PURE__ */ J(
6324
6324
  "span",
6325
6325
  {
6326
6326
  className: "text-[9px] font-bold shrink-0 mr-2",
@@ -6416,18 +6416,18 @@ function kO({
6416
6416
  },
6417
6417
  [u, _]
6418
6418
  );
6419
- return /* @__PURE__ */ ze("div", { className: "flex flex-col h-full bg-sb-editor", children: [
6420
- /* @__PURE__ */ ze("div", { className: "flex items-center bg-sb-bg-alt border-b border-sb-border overflow-x-auto", children: [
6419
+ return /* @__PURE__ */ je("div", { className: "flex flex-col h-full bg-sb-editor", children: [
6420
+ /* @__PURE__ */ je("div", { className: "flex items-center bg-sb-bg-alt border-b border-sb-border overflow-x-auto", children: [
6421
6421
  h.map((V) => {
6422
6422
  const K = V.split("/").pop() || V, se = V === u, fe = l[V] || "unchanged";
6423
- return /* @__PURE__ */ ze(
6423
+ return /* @__PURE__ */ je(
6424
6424
  "div",
6425
6425
  {
6426
6426
  className: `group flex items-center gap-2 px-3 py-1.5 text-xs cursor-pointer border-r border-sb-border
6427
6427
  ${se ? "bg-sb-editor text-sb-text-active border-t-2 border-t-sb-accent" : "bg-sb-bg-alt text-sb-text-muted hover:bg-sb-bg-hover border-t-2 border-t-transparent"}`,
6428
6428
  onClick: () => m(V),
6429
6429
  children: [
6430
- fe !== "unchanged" && /* @__PURE__ */ ne(
6430
+ fe !== "unchanged" && /* @__PURE__ */ J(
6431
6431
  "span",
6432
6432
  {
6433
6433
  className: "w-2 h-2 rounded-full shrink-0",
@@ -6435,13 +6435,13 @@ function kO({
6435
6435
  title: EO[fe]
6436
6436
  }
6437
6437
  ),
6438
- /* @__PURE__ */ ne("span", { className: "truncate max-w-[120px]", children: K }),
6439
- /* @__PURE__ */ ne(
6438
+ /* @__PURE__ */ J("span", { className: "truncate max-w-[120px]", children: K }),
6439
+ /* @__PURE__ */ J(
6440
6440
  "button",
6441
6441
  {
6442
6442
  className: "opacity-0 group-hover:opacity-100 hover:text-sb-text-active ml-1 text-[10px]",
6443
- onClick: (ee) => {
6444
- ee.stopPropagation(), f(V);
6443
+ onClick: (te) => {
6444
+ te.stopPropagation(), f(V);
6445
6445
  },
6446
6446
  title: "Close",
6447
6447
  children: "✕"
@@ -6452,8 +6452,8 @@ function kO({
6452
6452
  V
6453
6453
  );
6454
6454
  }),
6455
- /* @__PURE__ */ ne("div", { className: "flex-1" }),
6456
- L && /* @__PURE__ */ ne(
6455
+ /* @__PURE__ */ J("div", { className: "flex-1" }),
6456
+ L && /* @__PURE__ */ J(
6457
6457
  "button",
6458
6458
  {
6459
6459
  className: `shrink-0 px-2 py-1 mr-1 text-[10px] font-medium rounded transition-colors ${k ? "bg-sb-accent text-white" : "text-sb-text-muted hover:text-sb-text-active hover:bg-sb-bg-hover"}`,
@@ -6463,9 +6463,9 @@ function kO({
6463
6463
  }
6464
6464
  )
6465
6465
  ] }),
6466
- /* @__PURE__ */ ze("div", { className: "flex-1 overflow-hidden", children: [
6467
- !u && /* @__PURE__ */ ne("div", { className: "flex items-center justify-center h-full text-sb-text-muted text-sm", children: "Select a file to edit" }),
6468
- u && v && k && Sl && /* @__PURE__ */ ne(
6466
+ /* @__PURE__ */ je("div", { className: "flex-1 overflow-hidden", children: [
6467
+ !u && /* @__PURE__ */ J("div", { className: "flex items-center justify-center h-full text-sb-text-muted text-sm", children: "Select a file to edit" }),
6468
+ u && v && k && Sl && /* @__PURE__ */ J(
6469
6469
  Sl,
6470
6470
  {
6471
6471
  height: "100%",
@@ -6493,7 +6493,7 @@ function kO({
6493
6493
  }
6494
6494
  }
6495
6495
  ),
6496
- u && v && !k && ui && /* @__PURE__ */ ne(
6496
+ u && v && !k && ui && /* @__PURE__ */ J(
6497
6497
  ui,
6498
6498
  {
6499
6499
  height: "100%",
@@ -6515,35 +6515,129 @@ function kO({
6515
6515
  }
6516
6516
  }
6517
6517
  ),
6518
- u && !v && /* @__PURE__ */ ne("div", { className: "flex items-center justify-center h-full text-sb-text-muted text-sm", children: "Loading editor..." })
6518
+ u && !v && /* @__PURE__ */ J("div", { className: "flex items-center justify-center h-full text-sb-text-muted text-sm", children: "Loading editor..." })
6519
6519
  ] })
6520
6520
  ] });
6521
6521
  }
6522
- function CO({ output: a, className: i = "" }) {
6522
+ function CO(a) {
6523
+ var l;
6524
+ const i = a.trim();
6525
+ return i ? i.startsWith("[stderr]") ? "stderr" : /^\$\s/.test(i) ? "prompt" : /^\s*✓/.test(a) || /^\s*✔/.test(a) || /^done$/i.test(i) ? "success" : /^\s*✗/.test(a) || /^\s*✘/.test(a) || /^error\b/i.test(i) || /^Error:/i.test(i) || /^TypeError:/i.test(i) || /^ReferenceError:/i.test(i) || /^SyntaxError:/i.test(i) || /ENOENT|EACCES|ECONNREFUSED/i.test(i) ? "error" : /^Process exited with code\s+(\d+)/.test(i) ? ((l = i.match(/code\s+(\d+)/)) == null ? void 0 : l[1]) === "0" ? "exit-ok" : "exit-fail" : /^warn\b/i.test(i) || /^warning\b/i.test(i) || /^Warning:/i.test(i) || /deprecated/i.test(i) ? "warning" : /^Installing\b/i.test(i) || /^Dependencies\s+installed/i.test(i) || /^Listening\b/i.test(i) || /^Server\s+(running|started|listening)/i.test(i) || /^Starting\b/i.test(i) ? "info" : "normal" : "dim";
6526
+ }
6527
+ const AO = {
6528
+ prompt: "",
6529
+ // handled specially (split into prompt + command)
6530
+ stderr: "sb-term-stderr",
6531
+ success: "sb-term-success",
6532
+ error: "sb-term-stderr",
6533
+ warning: "sb-term-warning",
6534
+ info: "sb-term-info",
6535
+ "exit-ok": "sb-term-exit-ok",
6536
+ "exit-fail": "sb-term-exit-fail",
6537
+ dim: "sb-term-dim",
6538
+ normal: "sb-term-line"
6539
+ };
6540
+ function TO({ line: a }) {
6541
+ const i = CO(a);
6542
+ if (i === "prompt") {
6543
+ const l = a.replace(/^\$\s*/, "");
6544
+ return /* @__PURE__ */ je("div", { className: "whitespace-pre-wrap", children: [
6545
+ /* @__PURE__ */ J("span", { className: "sb-term-prompt", children: "$ " }),
6546
+ /* @__PURE__ */ J("span", { className: "sb-term-cmd", children: l })
6547
+ ] });
6548
+ }
6549
+ if (i === "stderr") {
6550
+ const l = a.replace(/^\[stderr\]\s*/, "");
6551
+ return /* @__PURE__ */ je("div", { className: "whitespace-pre-wrap sb-term-stderr", children: [
6552
+ /* @__PURE__ */ J("span", { className: "sb-term-dim select-none", children: "stderr " }),
6553
+ l
6554
+ ] });
6555
+ }
6556
+ if (i === "success" && /✓\s+\S+@/.test(a)) {
6557
+ const l = a.match(/(.*✓\s*)(\S+@\S+)(.*)/);
6558
+ if (l)
6559
+ return /* @__PURE__ */ je("div", { className: "whitespace-pre-wrap sb-term-success", children: [
6560
+ l[1],
6561
+ /* @__PURE__ */ J("span", { className: "sb-term-pkg", children: l[2] }),
6562
+ l[3]
6563
+ ] });
6564
+ }
6565
+ if (i === "info" && /:\d{4}/.test(a)) {
6566
+ const l = a.split(/(:\d{4,5})/);
6567
+ return /* @__PURE__ */ J("div", { className: "whitespace-pre-wrap sb-term-info", children: l.map(
6568
+ (u, h) => /^:\d{4,5}$/.test(u) ? /* @__PURE__ */ J("span", { className: "sb-term-path", children: u }, h) : /* @__PURE__ */ J("span", { children: u }, h)
6569
+ ) });
6570
+ }
6571
+ return /* @__PURE__ */ J("div", { className: `whitespace-pre-wrap ${AO[i]}`, children: a });
6572
+ }
6573
+ function IO({ output: a, className: i = "" }) {
6523
6574
  const l = Je(null);
6524
6575
  return Lt(() => {
6525
6576
  const u = l.current;
6526
6577
  u && (u.scrollTop = u.scrollHeight);
6527
- }, [a.length]), /* @__PURE__ */ ze("div", { className: `flex flex-col h-full bg-sb-terminal ${i}`, children: [
6528
- /* @__PURE__ */ ne("div", { className: "flex items-center px-3 py-1 bg-sb-bg-alt border-b border-sb-border", children: /* @__PURE__ */ ne("span", { className: "text-xs font-medium text-sb-text-muted uppercase tracking-wider", children: "Terminal" }) }),
6529
- /* @__PURE__ */ ne(
6530
- "div",
6531
- {
6532
- ref: l,
6533
- className: "flex-1 overflow-auto p-3 font-mono text-xs leading-relaxed",
6534
- children: a.length === 0 ? /* @__PURE__ */ ne("span", { className: "text-sb-text-muted", children: "Waiting for output..." }) : a.map((u, h) => /* @__PURE__ */ ne(
6578
+ }, [a.length]), /* @__PURE__ */ je(
6579
+ "div",
6580
+ {
6581
+ className: `flex flex-col h-full ${i}`,
6582
+ style: { background: "var(--sb-terminal)" },
6583
+ children: [
6584
+ /* @__PURE__ */ je(
6535
6585
  "div",
6536
6586
  {
6537
- className: `whitespace-pre-wrap ${u.startsWith("[stderr]") ? "text-sb-error" : u.startsWith("$") || u.startsWith(" ✓") ? "text-sb-success" : u.startsWith(" ✗") ? "text-sb-error" : "text-sb-text"}`,
6538
- children: u
6539
- },
6540
- h
6541
- ))
6542
- }
6543
- )
6544
- ] });
6587
+ className: "flex items-center gap-2 px-3 py-1.5 border-b border-sb-border shrink-0",
6588
+ style: { background: "var(--sb-terminal-header)" },
6589
+ children: [
6590
+ /* @__PURE__ */ je("div", { className: "flex items-center gap-1.5 mr-1", children: [
6591
+ /* @__PURE__ */ J(
6592
+ "span",
6593
+ {
6594
+ className: "w-2.5 h-2.5 rounded-full",
6595
+ style: { background: "#f85149" }
6596
+ }
6597
+ ),
6598
+ /* @__PURE__ */ J(
6599
+ "span",
6600
+ {
6601
+ className: "w-2.5 h-2.5 rounded-full",
6602
+ style: { background: "#d29922" }
6603
+ }
6604
+ ),
6605
+ /* @__PURE__ */ J(
6606
+ "span",
6607
+ {
6608
+ className: "w-2.5 h-2.5 rounded-full",
6609
+ style: { background: "#3fb950" }
6610
+ }
6611
+ )
6612
+ ] }),
6613
+ /* @__PURE__ */ J(
6614
+ "span",
6615
+ {
6616
+ className: "text-[11px] font-medium tracking-wider",
6617
+ style: { color: "var(--sb-text-muted)" },
6618
+ children: "TERMINAL"
6619
+ }
6620
+ ),
6621
+ /* @__PURE__ */ J("span", { className: "text-[10px] ml-auto", style: { color: "#484f58" }, children: "bash" })
6622
+ ]
6623
+ }
6624
+ ),
6625
+ /* @__PURE__ */ J(
6626
+ "div",
6627
+ {
6628
+ ref: l,
6629
+ className: "flex-1 overflow-auto px-3.5 py-2.5 sb-terminal-output overscroll-contain",
6630
+ children: a.length === 0 ? /* @__PURE__ */ je("div", { className: "flex items-center gap-2 sb-term-dim", children: [
6631
+ /* @__PURE__ */ J("span", { className: "sb-term-prompt", children: "$" }),
6632
+ /* @__PURE__ */ J("span", { className: "animate-pulse", children: "_" })
6633
+ ] }) : a.map((u, h) => /* @__PURE__ */ J(TO, { line: u }, h))
6634
+ }
6635
+ )
6636
+ ]
6637
+ }
6638
+ );
6545
6639
  }
6546
- function AO() {
6640
+ function PO() {
6547
6641
  return `
6548
6642
  (function() {
6549
6643
  // Guard against double-injection
@@ -6608,8 +6702,8 @@ function AO() {
6608
6702
  })();
6609
6703
  `;
6610
6704
  }
6611
- let TO = 0;
6612
- function IO({ url: a, className: i = "", onBrowserError: l }) {
6705
+ let RO = 0;
6706
+ function DO({ url: a, className: i = "", onBrowserError: l }) {
6613
6707
  const u = Je(null), h = Je(l);
6614
6708
  h.current = l;
6615
6709
  const m = nt(() => {
@@ -6620,7 +6714,7 @@ function IO({ url: a, className: i = "", onBrowserError: l }) {
6620
6714
  const b = f.contentDocument || ((_ = f.contentWindow) == null ? void 0 : _.document);
6621
6715
  if (!b) return;
6622
6716
  const v = b.createElement("script");
6623
- v.textContent = AO();
6717
+ v.textContent = PO();
6624
6718
  const w = b.head || b.body || b.documentElement;
6625
6719
  w && w.appendChild(v);
6626
6720
  } catch (b) {
@@ -6643,7 +6737,7 @@ function IO({ url: a, className: i = "", onBrowserError: l }) {
6643
6737
  w = A ? A[1].replace(/^\//, "") : void 0;
6644
6738
  }
6645
6739
  const k = {
6646
- id: `browser_${++TO}_${Date.now()}`,
6740
+ id: `browser_${++RO}_${Date.now()}`,
6647
6741
  category: b.category,
6648
6742
  message: b.message,
6649
6743
  stack: b.stack,
@@ -6657,7 +6751,7 @@ function IO({ url: a, className: i = "", onBrowserError: l }) {
6657
6751
  return window.addEventListener("message", f), () => window.removeEventListener("message", f);
6658
6752
  }, []), Lt(() => {
6659
6753
  u.current && a && (u.current.src = a);
6660
- }, [a]), /* @__PURE__ */ ne("div", { className: `h-full w-full bg-white ${i}`, children: a ? /* @__PURE__ */ ne(
6754
+ }, [a]), /* @__PURE__ */ J("div", { className: `h-full w-full bg-white ${i}`, children: a ? /* @__PURE__ */ J(
6661
6755
  "iframe",
6662
6756
  {
6663
6757
  ref: u,
@@ -6667,9 +6761,9 @@ function IO({ url: a, className: i = "", onBrowserError: l }) {
6667
6761
  sandbox: "allow-scripts allow-forms allow-same-origin allow-popups allow-modals",
6668
6762
  onLoad: m
6669
6763
  }
6670
- ) : /* @__PURE__ */ ne("div", { className: "flex items-center justify-center h-full bg-sb-bg", children: /* @__PURE__ */ ze("div", { className: "text-center px-4", children: [
6671
- /* @__PURE__ */ ne("div", { className: "w-10 h-10 mx-auto mb-3 border-2 border-sb-accent border-t-transparent rounded-full animate-spin" }),
6672
- /* @__PURE__ */ ne("p", { className: "text-sb-text-muted text-sm", children: "Waiting for dev server to start..." })
6764
+ ) : /* @__PURE__ */ J("div", { className: "flex items-center justify-center h-full bg-sb-bg", children: /* @__PURE__ */ je("div", { className: "text-center px-4", children: [
6765
+ /* @__PURE__ */ J("div", { className: "w-10 h-10 mx-auto mb-3 border-2 border-sb-accent border-t-transparent rounded-full animate-spin" }),
6766
+ /* @__PURE__ */ J("p", { className: "text-sb-text-muted text-sm", children: "Waiting for dev server to start..." })
6673
6767
  ] }) }) });
6674
6768
  }
6675
6769
  const T0 = {
@@ -6696,37 +6790,37 @@ const T0 = {
6696
6790
  ready: { icon: "✅", label: "Application Ready", color: "text-green-400" },
6697
6791
  error: { icon: "❌", label: "Error", color: "text-red-400" }
6698
6792
  };
6699
- function PO({ progress: a, className: i = "" }) {
6793
+ function OO({ progress: a, className: i = "" }) {
6700
6794
  const l = T0[a.stage] || T0.initializing;
6701
- return a.stage === "ready" ? null : /* @__PURE__ */ ne(
6795
+ return a.stage === "ready" ? null : /* @__PURE__ */ J(
6702
6796
  "div",
6703
6797
  {
6704
6798
  className: `absolute inset-0 z-50 flex items-center justify-center bg-sb-bg/95 backdrop-blur-sm ${i}`,
6705
- children: /* @__PURE__ */ ze("div", { className: "flex flex-col items-center gap-6 max-w-md px-8", children: [
6706
- /* @__PURE__ */ ne("div", { className: "text-5xl animate-bounce", children: l.icon }),
6707
- /* @__PURE__ */ ze("h2", { className: `text-xl font-semibold ${l.color}`, children: [
6799
+ children: /* @__PURE__ */ je("div", { className: "flex flex-col items-center gap-6 max-w-md px-8", children: [
6800
+ /* @__PURE__ */ J("div", { className: "text-5xl animate-bounce", children: l.icon }),
6801
+ /* @__PURE__ */ je("h2", { className: `text-xl font-semibold ${l.color}`, children: [
6708
6802
  l.label,
6709
- a.stage !== "error" && /* @__PURE__ */ ne(DO, {})
6803
+ a.stage !== "error" && /* @__PURE__ */ J(BO, {})
6710
6804
  ] }),
6711
- /* @__PURE__ */ ne("div", { className: "w-64 h-2 bg-sb-bg-active rounded-full overflow-hidden", children: /* @__PURE__ */ ne(
6805
+ /* @__PURE__ */ J("div", { className: "w-64 h-2 bg-sb-bg-active rounded-full overflow-hidden", children: /* @__PURE__ */ J(
6712
6806
  "div",
6713
6807
  {
6714
6808
  className: "h-full bg-sb-accent rounded-full transition-all duration-500 ease-out",
6715
6809
  style: { width: `${a.percent}%` }
6716
6810
  }
6717
6811
  ) }),
6718
- /* @__PURE__ */ ne("p", { className: "text-sm text-sb-text-muted text-center", children: a.message }),
6719
- /* @__PURE__ */ ne("div", { className: "flex items-center gap-2 mt-4", children: ["initializing", "writing-files", "installing", "starting"].map(
6812
+ /* @__PURE__ */ J("p", { className: "text-sm text-sb-text-muted text-center", children: a.message }),
6813
+ /* @__PURE__ */ J("div", { className: "flex items-center gap-2 mt-4", children: ["initializing", "writing-files", "installing", "starting"].map(
6720
6814
  (u, h) => {
6721
- const m = RO(a.stage) > h, f = a.stage === u;
6722
- return /* @__PURE__ */ ze(Qt.Fragment, { children: [
6723
- /* @__PURE__ */ ne(
6815
+ const m = NO(a.stage) > h, f = a.stage === u;
6816
+ return /* @__PURE__ */ je(Qt.Fragment, { children: [
6817
+ /* @__PURE__ */ J(
6724
6818
  "div",
6725
6819
  {
6726
6820
  className: `w-3 h-3 rounded-full transition-colors duration-300 ${m ? "bg-sb-success" : f ? "bg-sb-accent animate-pulse" : "bg-sb-bg-active"}`
6727
6821
  }
6728
6822
  ),
6729
- h < 3 && /* @__PURE__ */ ne(
6823
+ h < 3 && /* @__PURE__ */ J(
6730
6824
  "div",
6731
6825
  {
6732
6826
  className: `w-8 h-0.5 transition-colors duration-300 ${m ? "bg-sb-success" : "bg-sb-bg-active"}`
@@ -6739,7 +6833,7 @@ function PO({ progress: a, className: i = "" }) {
6739
6833
  }
6740
6834
  );
6741
6835
  }
6742
- function RO(a) {
6836
+ function NO(a) {
6743
6837
  return [
6744
6838
  "initializing",
6745
6839
  "writing-files",
@@ -6748,32 +6842,32 @@ function RO(a) {
6748
6842
  "ready"
6749
6843
  ].indexOf(a);
6750
6844
  }
6751
- function DO() {
6752
- return /* @__PURE__ */ ze("span", { className: "inline-flex ml-1", children: [
6753
- /* @__PURE__ */ ne("span", { className: "animate-pulse", style: { animationDelay: "0ms" }, children: "." }),
6754
- /* @__PURE__ */ ne("span", { className: "animate-pulse", style: { animationDelay: "200ms" }, children: "." }),
6755
- /* @__PURE__ */ ne("span", { className: "animate-pulse", style: { animationDelay: "400ms" }, children: "." })
6845
+ function BO() {
6846
+ return /* @__PURE__ */ je("span", { className: "inline-flex ml-1", children: [
6847
+ /* @__PURE__ */ J("span", { className: "animate-pulse", style: { animationDelay: "0ms" }, children: "." }),
6848
+ /* @__PURE__ */ J("span", { className: "animate-pulse", style: { animationDelay: "200ms" }, children: "." }),
6849
+ /* @__PURE__ */ J("span", { className: "animate-pulse", style: { animationDelay: "400ms" }, children: "." })
6756
6850
  ] });
6757
6851
  }
6758
- const OO = [0.4, 0, 0.2, 1], I0 = Z0(function({
6852
+ const LO = [0.4, 0, 0.2, 1], I0 = Z0(function({
6759
6853
  selected: i,
6760
6854
  children: l,
6761
6855
  onClick: u
6762
6856
  }) {
6763
- return /* @__PURE__ */ ze(
6857
+ return /* @__PURE__ */ je(
6764
6858
  "button",
6765
6859
  {
6766
6860
  onClick: u,
6767
6861
  className: `relative px-3 py-1 rounded-full text-xs font-medium transition-colors ${i ? "text-white" : "text-sb-text-muted hover:text-sb-text"}`,
6768
6862
  children: [
6769
- /* @__PURE__ */ ne("span", { className: "relative z-10", children: l }),
6770
- i && /* @__PURE__ */ ne(
6863
+ /* @__PURE__ */ J("span", { className: "relative z-10", children: l }),
6864
+ i && /* @__PURE__ */ J(
6771
6865
  jd.span,
6772
6866
  {
6773
6867
  layoutId: "view-slider-pill",
6774
6868
  transition: {
6775
6869
  duration: 0.2,
6776
- ease: OO
6870
+ ease: LO
6777
6871
  },
6778
6872
  className: "absolute inset-0 z-0 bg-sb-accent rounded-full"
6779
6873
  }
@@ -6781,12 +6875,12 @@ const OO = [0.4, 0, 0.2, 1], I0 = Z0(function({
6781
6875
  ]
6782
6876
  }
6783
6877
  );
6784
- }), NO = Z0(function({
6878
+ }), MO = Z0(function({
6785
6879
  selected: i,
6786
6880
  onSelect: l
6787
6881
  }) {
6788
- return /* @__PURE__ */ ze("div", { className: "flex items-center gap-0.5 bg-sb-bg rounded-full p-0.5 border border-sb-border", children: [
6789
- /* @__PURE__ */ ne(
6882
+ return /* @__PURE__ */ je("div", { className: "flex items-center gap-0.5 bg-sb-bg rounded-full p-0.5 border border-sb-border", children: [
6883
+ /* @__PURE__ */ J(
6790
6884
  I0,
6791
6885
  {
6792
6886
  selected: i === "code",
@@ -6794,7 +6888,7 @@ const OO = [0.4, 0, 0.2, 1], I0 = Z0(function({
6794
6888
  children: "Code"
6795
6889
  }
6796
6890
  ),
6797
- /* @__PURE__ */ ne(
6891
+ /* @__PURE__ */ J(
6798
6892
  I0,
6799
6893
  {
6800
6894
  selected: i === "preview",
@@ -6804,8 +6898,8 @@ const OO = [0.4, 0, 0.2, 1], I0 = Z0(function({
6804
6898
  )
6805
6899
  ] });
6806
6900
  });
6807
- var BO = Object.defineProperty, LO = (a, i, l) => i in a ? BO(a, i, { enumerable: !0, configurable: !0, writable: !0, value: l }) : a[i] = l, H = (a, i, l) => LO(a, typeof i != "symbol" ? i + "" : i, l);
6808
- let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl, or, ei, lr, ti, md, Ca, cs, $0, U0, sl, Gn, rl, cr, il, j0, Cn, Aa, hl, V0, H0, W0;
6901
+ var FO = Object.defineProperty, $O = (a, i, l) => i in a ? FO(a, i, { enumerable: !0, configurable: !0, writable: !0, value: l }) : a[i] = l, H = (a, i, l) => $O(a, typeof i != "symbol" ? i + "" : i, l);
6902
+ let P0, xa, W, kn, ee, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl, or, ei, lr, ti, md, Ca, cs, $0, U0, sl, Gn, rl, cr, il, j0, Cn, Aa, hl, V0, H0, W0;
6809
6903
  (async () => {
6810
6904
  var a, i, l;
6811
6905
  function h(e) {
@@ -6930,7 +7024,7 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
6930
7024
  COLUMNS: 80,
6931
7025
  ROWS: 24,
6932
7026
  FONT_SIZE: 13
6933
- }, ee = {
7027
+ }, te = {
6934
7028
  PID: 1,
6935
7029
  PPID: 0,
6936
7030
  TITLE: "node",
@@ -7701,7 +7795,7 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
7701
7795
  return ke;
7702
7796
  };
7703
7797
  const Ce = /* @__PURE__ */ new Set();
7704
- function He() {
7798
+ function We() {
7705
7799
  const e = sl();
7706
7800
  if (e)
7707
7801
  for (const t of e.drainListeners) t();
@@ -7712,10 +7806,10 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
7712
7806
  e && e.refCount++;
7713
7807
  }, Cn = function() {
7714
7808
  const e = sl();
7715
- e && e.refCount > 0 && e.refCount--, He();
7809
+ e && e.refCount > 0 && e.refCount--, We();
7716
7810
  };
7717
7811
  const Ie = 10, Qe = /* @__PURE__ */ new WeakSet(), bt = /* @__PURE__ */ new Set();
7718
- function te(e) {
7812
+ function ne(e) {
7719
7813
  const t = globalThis.__nodepodVolume;
7720
7814
  if (!t || typeof t.onGlobalChange != "function")
7721
7815
  return;
@@ -7742,25 +7836,25 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
7742
7836
  let s = n.get(t);
7743
7837
  return s || (s = [], n.set(t, s)), s;
7744
7838
  }
7745
- Q = function() {
7839
+ ee = function() {
7746
7840
  this && !this._registry && (this._registry = /* @__PURE__ */ new Map()), this && this._ceiling === void 0 && (this._ceiling = Ie);
7747
- }, Q.prototype.addListener = function(t, n) {
7748
- return Re(this, t).push(n), t === "change" && !Qe.has(this) && this._watched instanceof Map && (Qe.add(this), te(this)), this;
7749
- }, Q.prototype.on = Q.prototype.addListener, Q.prototype.once = function(t, n) {
7841
+ }, ee.prototype.addListener = function(t, n) {
7842
+ return Re(this, t).push(n), t === "change" && !Qe.has(this) && this._watched instanceof Map && (Qe.add(this), ne(this)), this;
7843
+ }, ee.prototype.on = ee.prototype.addListener, ee.prototype.once = function(t, n) {
7750
7844
  const s = this, r = function(...c) {
7751
7845
  s.removeListener(t, r), n.apply(s, c);
7752
7846
  };
7753
7847
  return Re(this, t).push(r), this;
7754
- }, Q.prototype.removeListener = function(t, n) {
7848
+ }, ee.prototype.removeListener = function(t, n) {
7755
7849
  const s = he(this).get(t);
7756
7850
  if (s) {
7757
7851
  const r = s.indexOf(n);
7758
7852
  r !== -1 && s.splice(r, 1);
7759
7853
  }
7760
7854
  return this;
7761
- }, Q.prototype.off = Q.prototype.removeListener, Q.prototype.removeAllListeners = function(t) {
7855
+ }, ee.prototype.off = ee.prototype.removeListener, ee.prototype.removeAllListeners = function(t) {
7762
7856
  return t !== void 0 ? he(this).delete(t) : he(this).clear(), this;
7763
- }, Q.prototype.emit = function(t, ...n) {
7857
+ }, ee.prototype.emit = function(t, ...n) {
7764
7858
  const s = he(this).get(t);
7765
7859
  if (!s || s.length === 0) {
7766
7860
  if (t === "error") {
@@ -7788,32 +7882,32 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
7788
7882
  } catch {
7789
7883
  }
7790
7884
  return !0;
7791
- }, Q.prototype.listeners = function(t) {
7885
+ }, ee.prototype.listeners = function(t) {
7792
7886
  const n = he(this).get(t);
7793
7887
  return n ? n.slice() : [];
7794
- }, Q.prototype.rawListeners = function(t) {
7888
+ }, ee.prototype.rawListeners = function(t) {
7795
7889
  return this.listeners(t);
7796
- }, Q.prototype.listenerCount = function(t) {
7890
+ }, ee.prototype.listenerCount = function(t) {
7797
7891
  const n = he(this).get(t);
7798
7892
  return n ? n.length : 0;
7799
- }, Q.prototype.eventNames = function() {
7893
+ }, ee.prototype.eventNames = function() {
7800
7894
  return Array.from(he(this).keys());
7801
- }, Q.prototype.setMaxListeners = function(t) {
7895
+ }, ee.prototype.setMaxListeners = function(t) {
7802
7896
  return this._ceiling = t, this;
7803
- }, Q.prototype.getMaxListeners = function() {
7897
+ }, ee.prototype.getMaxListeners = function() {
7804
7898
  return this._ceiling ?? Ie;
7805
- }, Q.prototype.prependListener = function(t, n) {
7899
+ }, ee.prototype.prependListener = function(t, n) {
7806
7900
  return Re(this, t).unshift(n), this;
7807
- }, Q.prototype.prependOnceListener = function(t, n) {
7901
+ }, ee.prototype.prependOnceListener = function(t, n) {
7808
7902
  const s = this, r = function(...o) {
7809
7903
  s.removeListener(t, r), n.apply(s, o);
7810
7904
  };
7811
7905
  return this.prependListener(t, r);
7812
- }, Q.listenerCount = function(e, t) {
7906
+ }, ee.listenerCount = function(e, t) {
7813
7907
  return e.listenerCount(t);
7814
7908
  };
7815
- const _e = Q;
7816
- _e.EventEmitter = Q, _e.once = async (e, t) => new Promise((n, s) => {
7909
+ const _e = ee;
7910
+ _e.EventEmitter = ee, _e.once = async (e, t) => new Promise((n, s) => {
7817
7911
  const r = (...c) => {
7818
7912
  e.removeListener("error", o), n(c);
7819
7913
  }, o = (...c) => {
@@ -7834,7 +7928,7 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
7834
7928
  }
7835
7929
  }), _e.getEventListeners = (e, t) => e.listeners(t), _e.listenerCount = (e, t) => e.listenerCount(t), Object.freeze(Object.defineProperty({
7836
7930
  __proto__: null,
7837
- EventEmitter: Q,
7931
+ EventEmitter: ee,
7838
7932
  default: _e
7839
7933
  }, Symbol.toStringTag, {
7840
7934
  value: "Module"
@@ -8231,7 +8325,7 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
8231
8325
  }
8232
8326
  Se = function(t) {
8233
8327
  if (!this) return;
8234
- Q.call(this), this._queue = [], this._terminated = !1, this._active = !1, this._endFired = !1, this._endEmitted = !1, this._objectMode = !1, this._reading = !1, this._highWaterMark = 16384, this._autoDestroy = !0, this._encoding = null, this._readableByteLength = 0, this._draining = !1, this.readable = !0, this.readableEnded = !1, this.readableFlowing = null, this.destroyed = !1, this.closed = !1, this.errored = null, this.readableObjectMode = !1, this.readableHighWaterMark = 16384, this.readableDidRead = !1, this.readableAborted = !1;
8328
+ ee.call(this), this._queue = [], this._terminated = !1, this._active = !1, this._endFired = !1, this._endEmitted = !1, this._objectMode = !1, this._reading = !1, this._highWaterMark = 16384, this._autoDestroy = !0, this._encoding = null, this._readableByteLength = 0, this._draining = !1, this.readable = !0, this.readableEnded = !1, this.readableFlowing = null, this.destroyed = !1, this.closed = !1, this.errored = null, this.readableObjectMode = !1, this.readableHighWaterMark = 16384, this.readableDidRead = !1, this.readableAborted = !1;
8235
8329
  const n = this;
8236
8330
  this._readableState = {
8237
8331
  get objectMode() {
@@ -8286,11 +8380,11 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
8286
8380
  readingMore: !1,
8287
8381
  dataEmitted: !1
8288
8382
  }, t && (t.objectMode && (this._objectMode = !0, this.readableObjectMode = !0, t.highWaterMark === void 0 && (this._highWaterMark = 16, this.readableHighWaterMark = 16)), t.highWaterMark !== void 0 && (this._highWaterMark = t.highWaterMark, this.readableHighWaterMark = t.highWaterMark), t.autoDestroy !== void 0 && (this._autoDestroy = t.autoDestroy), t.read && (this._read = t.read.bind(this)), t.destroy && (this._destroy = t.destroy.bind(this)));
8289
- }, Object.setPrototypeOf(Se.prototype, Q.prototype), Se.prototype._read = function(t) {
8383
+ }, Object.setPrototypeOf(Se.prototype, ee.prototype), Se.prototype._read = function(t) {
8290
8384
  }, Se.prototype._destroy = function(t, n) {
8291
8385
  n(t);
8292
8386
  }, Se.prototype._rawBind = function(t, n) {
8293
- return Q.prototype.addListener.call(this, t, n), this;
8387
+ return ee.prototype.addListener.call(this, t, n), this;
8294
8388
  }, Se.prototype.on = function(t, n) {
8295
8389
  return this._rawBind(t, n), t === "data" && !this._active && this.resume(), t === "readable" && (this.readableFlowing = !1), t === "end" && this._endEmitted ? queueMicrotask(() => n()) : t === "end" && this._terminated && this._queue.length === 0 && !this._endFired && (this._endFired = !0, queueMicrotask(() => {
8296
8390
  this._endEmitted = !0, this.emit("end"), this._autoDestroy && this.destroy();
@@ -8298,9 +8392,9 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
8298
8392
  }, Se.prototype.addListener = function(t, n) {
8299
8393
  return this.on(t, n);
8300
8394
  }, Se.prototype.once = function(t, n) {
8301
- return t === "end" && this._endEmitted ? (queueMicrotask(() => n()), this) : t === "end" && this._terminated && this._queue.length === 0 && !this._endFired ? (this._endFired = !0, Q.prototype.once.call(this, t, n), queueMicrotask(() => {
8395
+ return t === "end" && this._endEmitted ? (queueMicrotask(() => n()), this) : t === "end" && this._terminated && this._queue.length === 0 && !this._endFired ? (this._endFired = !0, ee.prototype.once.call(this, t, n), queueMicrotask(() => {
8302
8396
  this._endEmitted = !0, this.emit("end"), this._autoDestroy && this.destroy();
8303
- }), this) : t === "data" && !this._active ? (Q.prototype.once.call(this, t, n), this.resume(), this) : Q.prototype.once.call(this, t, n);
8397
+ }), this) : t === "data" && !this._active ? (ee.prototype.once.call(this, t, n), this.resume(), this) : ee.prototype.once.call(this, t, n);
8304
8398
  }, Se.prototype.push = function(t) {
8305
8399
  if (t === null)
8306
8400
  return this._terminated = !0, this.readableEnded = !0, this.readable = !1, this._active && this._queue.length === 0 && !this._endFired && (this._endFired = !0, queueMicrotask(() => {
@@ -8493,7 +8587,7 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
8493
8587
  })(), s;
8494
8588
  }, Ke = function(t) {
8495
8589
  if (!this) return;
8496
- Q.call(this), this._parts = [], this._closed = !1, this._objectMode = !1, this._highWaterMark = 16384, this._autoDestroy = !0, this._corked = 0, this._corkedWrites = [], this._writableByteLength = 0, this.writable = !0, this.writableEnded = !1, this.writableFinished = !1, this.writableNeedDrain = !1, this.destroyed = !1, this.closed = !1, this.errored = null, this.writableObjectMode = !1, this.writableHighWaterMark = 16384, this.writableCorked = 0;
8590
+ ee.call(this), this._parts = [], this._closed = !1, this._objectMode = !1, this._highWaterMark = 16384, this._autoDestroy = !0, this._corked = 0, this._corkedWrites = [], this._writableByteLength = 0, this.writable = !0, this.writableEnded = !1, this.writableFinished = !1, this.writableNeedDrain = !1, this.destroyed = !1, this.closed = !1, this.errored = null, this.writableObjectMode = !1, this.writableHighWaterMark = 16384, this.writableCorked = 0;
8497
8591
  const n = this;
8498
8592
  this._writableState = {
8499
8593
  get objectMode() {
@@ -8543,7 +8637,7 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
8543
8637
  ending: !1,
8544
8638
  bufferedIndex: 0
8545
8639
  }, t && (t.objectMode && (this._objectMode = !0, this.writableObjectMode = !0, t.highWaterMark === void 0 && (this._highWaterMark = 16, this.writableHighWaterMark = 16)), t.highWaterMark !== void 0 && (this._highWaterMark = t.highWaterMark, this.writableHighWaterMark = t.highWaterMark), t.autoDestroy !== void 0 && (this._autoDestroy = t.autoDestroy), t.write && (this._write = t.write.bind(this)), t.writev && (this._writev = t.writev.bind(this)), t.final && (this._final = t.final.bind(this)), t.destroy && (this._destroy = t.destroy.bind(this)));
8546
- }, Object.setPrototypeOf(Ke.prototype, Q.prototype), Ke.prototype._write = function(t, n, s) {
8640
+ }, Object.setPrototypeOf(Ke.prototype, ee.prototype), Ke.prototype._write = function(t, n, s) {
8547
8641
  s(null);
8548
8642
  }, Ke.prototype._final = function(t) {
8549
8643
  t(null);
@@ -8869,9 +8963,9 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
8869
8963
  })), ye.prototype.end.call(this, t, n, s);
8870
8964
  };
8871
8965
  const Bs = function() {
8872
- this && Q.call(this);
8966
+ this && ee.call(this);
8873
8967
  };
8874
- Object.setPrototypeOf(Bs.prototype, Q.prototype), Bs.prototype.pipe = function(t) {
8968
+ Object.setPrototypeOf(Bs.prototype, ee.prototype), Bs.prototype.pipe = function(t) {
8875
8969
  const n = this, s = (o) => {
8876
8970
  t.write && t.write(o);
8877
8971
  };
@@ -9205,7 +9299,7 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
9205
9299
  }));
9206
9300
  const Ph = console;
9207
9301
  function Ol(e, t) {
9208
- const n = new Q(), s = (o) => {
9302
+ const n = new ee(), s = (o) => {
9209
9303
  t && t(o);
9210
9304
  }, r = {
9211
9305
  isTTY: !1,
@@ -9354,7 +9448,7 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
9354
9448
  }
9355
9449
  P0 = function(e) {
9356
9450
  let t = (e == null ? void 0 : e.cwd) || "/", n = 18;
9357
- const s = Date.now(), r = new Q(), o = {
9451
+ const s = Date.now(), r = new ee(), o = {
9358
9452
  NODE_ENV: kn.NODE_ENV,
9359
9453
  PATH: kn.PATH,
9360
9454
  HOME: kn.HOME,
@@ -9390,7 +9484,7 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
9390
9484
  },
9391
9485
  platform: L.PLATFORM,
9392
9486
  arch: L.ARCH,
9393
- title: ee.TITLE,
9487
+ title: te.TITLE,
9394
9488
  version: Ea.NODE,
9395
9489
  versions: {
9396
9490
  ...w
@@ -9400,10 +9494,10 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
9400
9494
  "/index.js"
9401
9495
  ],
9402
9496
  argv0: "node",
9403
- execPath: ee.EXEC_PATH,
9497
+ execPath: te.EXEC_PATH,
9404
9498
  execArgv: [],
9405
- pid: (e == null ? void 0 : e.pid) ?? ee.PID,
9406
- ppid: (e == null ? void 0 : e.ppid) ?? ee.PPID,
9499
+ pid: (e == null ? void 0 : e.pid) ?? te.PID,
9500
+ ppid: (e == null ? void 0 : e.ppid) ?? te.PPID,
9407
9501
  exit(x = 0) {
9408
9502
  throw r.emit("exit", x), e != null && e.onExit && e.onExit(x), new Error(`Process exited with code ${x}`);
9409
9503
  },
@@ -9708,11 +9802,11 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
9708
9802
  };
9709
9803
  const tn = function(t, n) {
9710
9804
  if (!this) return;
9711
- Q.call(this), this._bound = !1, this._addr = null, this._peers = /* @__PURE__ */ new Set(), this._cap = 1 / 0, this.listening = !1, this.maxConnections = void 0;
9805
+ ee.call(this), this._bound = !1, this._addr = null, this._peers = /* @__PURE__ */ new Set(), this._cap = 1 / 0, this.listening = !1, this.maxConnections = void 0;
9712
9806
  let s;
9713
9807
  typeof t == "function" ? s = t : s = n, s && this.on("connection", s);
9714
9808
  };
9715
- Object.setPrototypeOf(tn.prototype, Q.prototype), tn.prototype.listen = function(t, n, s, r) {
9809
+ Object.setPrototypeOf(tn.prototype, ee.prototype), tn.prototype.listen = function(t, n, s, r) {
9716
9810
  let o = 0, c = "0.0.0.0", d;
9717
9811
  typeof t == "number" ? (o = t, typeof n == "string" ? (c = n, d = typeof s == "function" ? s : r) : typeof n == "function" ? d = n : d = typeof s == "function" ? s : r) : t && (o = t.port ?? 0, c = t.host ?? "0.0.0.0", d = typeof n == "function" ? n : r), o === 0 && (o = xe.BASE + Math.floor(Math.random() * xe.RANGE)), this._addr = {
9718
9812
  address: c,
@@ -10004,18 +10098,18 @@ let P0, xa, W, kn, Q, fd, R0, D0, O0, N0, Se, Ts, Ea, Ke, ka, B0, L0, M0, F0, nl
10004
10098
  return Ul(c, t, o, s);
10005
10099
  }
10006
10100
  const xi = function(t) {
10007
- this && (Q.call(this), this._alg = t, this._parts = []);
10101
+ this && (ee.call(this), this._alg = t, this._parts = []);
10008
10102
  };
10009
- Object.setPrototypeOf(xi.prototype, Q.prototype), xi.prototype.update = function(t, n) {
10103
+ Object.setPrototypeOf(xi.prototype, ee.prototype), xi.prototype.update = function(t, n) {
10010
10104
  return this._parts.push(typeof t == "string" ? W.from(t) : t), this;
10011
10105
  }, xi.prototype.sign = function(t, n) {
10012
10106
  const s = fr(this._parts), r = Ls(t), o = Ga(this._alg, s, r);
10013
10107
  return n === "base64" ? btoa(String.fromCharCode(...o)) : n === "hex" ? Array.from(o).map((c) => c.toString(16).padStart(2, "0")).join("") : o;
10014
10108
  };
10015
10109
  const Ei = function(t) {
10016
- this && (Q.call(this), this._alg = t, this._parts = []);
10110
+ this && (ee.call(this), this._alg = t, this._parts = []);
10017
10111
  };
10018
- Object.setPrototypeOf(Ei.prototype, Q.prototype), Ei.prototype.update = function(t, n) {
10112
+ Object.setPrototypeOf(Ei.prototype, ee.prototype), Ei.prototype.update = function(t, n) {
10019
10113
  return this._parts.push(typeof t == "string" ? W.from(t) : t), this;
10020
10114
  }, Ei.prototype.verify = function(t, n, s) {
10021
10115
  const r = fr(this._parts), o = Ls(t);
@@ -10347,32 +10441,32 @@ ${btoa(String.fromCharCode(...s))}
10347
10441
  c.push(null), c.complete = !0;
10348
10442
  }), c;
10349
10443
  };
10350
- const je = function(t) {
10444
+ const Ve = function(t) {
10351
10445
  this && (Ke.call(this), this.statusCode = 200, this.statusMessage = "OK", this.headersSent = !1, this.finished = !1, this.sendDate = !0, this.socket = t.socket, this.connection = t.socket, this.req = t, this._hdrs = /* @__PURE__ */ new Map(), this._chunks = [], this._completionCallback = void 0);
10352
10446
  };
10353
- Object.setPrototypeOf(je.prototype, Ke.prototype), je.prototype._onComplete = function(t) {
10447
+ Object.setPrototypeOf(Ve.prototype, Ke.prototype), Ve.prototype._onComplete = function(t) {
10354
10448
  this._completionCallback = t;
10355
- }, je.prototype.assignSocket = function(t) {
10449
+ }, Ve.prototype.assignSocket = function(t) {
10356
10450
  this.socket = t, this.connection = t;
10357
- }, je.prototype.detachSocket = function(t) {
10451
+ }, Ve.prototype.detachSocket = function(t) {
10358
10452
  this.socket = null, this.connection = null;
10359
- }, je.prototype.setHeader = function(t, n) {
10453
+ }, Ve.prototype.setHeader = function(t, n) {
10360
10454
  if (this.headersSent) throw new Error("Headers already dispatched");
10361
10455
  return this._hdrs.set(t.toLowerCase(), String(n)), this;
10362
- }, je.prototype.getHeader = function(t) {
10456
+ }, Ve.prototype.getHeader = function(t) {
10363
10457
  return this._hdrs.get(t.toLowerCase());
10364
- }, je.prototype.getHeaders = function() {
10458
+ }, Ve.prototype.getHeaders = function() {
10365
10459
  const t = {};
10366
10460
  return this._hdrs.forEach((n, s) => {
10367
10461
  t[s] = n;
10368
10462
  }), t;
10369
- }, je.prototype.getHeaderNames = function() {
10463
+ }, Ve.prototype.getHeaderNames = function() {
10370
10464
  return [
10371
10465
  ...this._hdrs.keys()
10372
10466
  ];
10373
- }, je.prototype.hasHeader = function(t) {
10467
+ }, Ve.prototype.hasHeader = function(t) {
10374
10468
  return this._hdrs.has(t.toLowerCase());
10375
- }, je.prototype.appendHeader = function(t, n) {
10469
+ }, Ve.prototype.appendHeader = function(t, n) {
10376
10470
  const s = t.toLowerCase(), r = this._hdrs.get(s);
10377
10471
  if (r === void 0)
10378
10472
  this._hdrs.set(s, Array.isArray(n) ? n.join(", ") : n);
@@ -10381,16 +10475,16 @@ ${btoa(String.fromCharCode(...s))}
10381
10475
  this._hdrs.set(s, c + ", " + o);
10382
10476
  }
10383
10477
  return this;
10384
- }, je.prototype.removeHeader = function(t) {
10478
+ }, Ve.prototype.removeHeader = function(t) {
10385
10479
  if (this.headersSent) throw new Error("Headers already dispatched");
10386
10480
  this._hdrs.delete(t.toLowerCase());
10387
- }, je.prototype.flushHeaders = function() {
10481
+ }, Ve.prototype.flushHeaders = function() {
10388
10482
  this.headersSent = !0;
10389
- }, je.prototype.writeContinue = function() {
10390
- }, je.prototype.writeProcessing = function() {
10391
- }, je.prototype.writeEarlyHints = function(t, n) {
10483
+ }, Ve.prototype.writeContinue = function() {
10484
+ }, Ve.prototype.writeProcessing = function() {
10485
+ }, Ve.prototype.writeEarlyHints = function(t, n) {
10392
10486
  n && queueMicrotask(n);
10393
- }, je.prototype.writeHead = function(t, n, s) {
10487
+ }, Ve.prototype.writeHead = function(t, n, s) {
10394
10488
  if (this.statusCode = t, typeof n == "string") {
10395
10489
  if (this.statusMessage = n, s)
10396
10490
  if (Array.isArray(s))
@@ -10404,13 +10498,13 @@ ${btoa(String.fromCharCode(...s))}
10404
10498
  else if (n)
10405
10499
  for (const [r, o] of Object.entries(n)) this.setHeader(r, o);
10406
10500
  return this;
10407
- }, je.prototype.write = function(t, n, s) {
10501
+ }, Ve.prototype.write = function(t, n, s) {
10408
10502
  this.headersSent = !0;
10409
10503
  const r = typeof t == "string" ? W.from(t) : t;
10410
10504
  this._chunks.push(r);
10411
10505
  const o = typeof n == "function" ? n : s;
10412
10506
  return o && queueMicrotask(() => o(null)), !0;
10413
- }, je.prototype.end = function(t, n, s) {
10507
+ }, Ve.prototype.end = function(t, n, s) {
10414
10508
  if (typeof t == "function" ? s = t : t !== void 0 && this.write(t), typeof n == "function" && (s = n), this.headersSent = !0, this.finished = !0, this.writableEnded = !0, this.writableFinished = !0, this._completionCallback) {
10415
10509
  const o = {};
10416
10510
  this._hdrs.forEach((d, p) => {
@@ -10428,25 +10522,25 @@ ${btoa(String.fromCharCode(...s))}
10428
10522
  return queueMicrotask(() => {
10429
10523
  r.emit("finish"), s && s();
10430
10524
  }), this;
10431
- }, je.prototype.send = function(t) {
10525
+ }, Ve.prototype.send = function(t) {
10432
10526
  return typeof t == "object" && !W.isBuffer(t) && (this.setHeader("Content-Type", "application/json"), t = JSON.stringify(t)), this.hasHeader("Content-Type") || this.setHeader("Content-Type", "text/html"), this.write(t), this.end();
10433
- }, je.prototype.setTimeout = function(t, n) {
10527
+ }, Ve.prototype.setTimeout = function(t, n) {
10434
10528
  return n && this.once("timeout", n), this;
10435
- }, je.prototype.json = function(t) {
10529
+ }, Ve.prototype.json = function(t) {
10436
10530
  return this.setHeader("Content-Type", "application/json"), this.end(JSON.stringify(t));
10437
- }, je.prototype.status = function(t) {
10531
+ }, Ve.prototype.status = function(t) {
10438
10532
  return this.statusCode = t, this;
10439
- }, je.prototype.redirect = function(t, n) {
10533
+ }, Ve.prototype.redirect = function(t, n) {
10440
10534
  typeof t == "number" ? (this.statusCode = t, this.setHeader("Location", n)) : (this.statusCode = 302, this.setHeader("Location", t)), this.end();
10441
- }, je.prototype.addTrailers = function(t) {
10442
- }, je.prototype._collectedBody = function() {
10535
+ }, Ve.prototype.addTrailers = function(t) {
10536
+ }, Ve.prototype._collectedBody = function() {
10443
10537
  return W.concat(this._chunks);
10444
- }, je.prototype._collectedBodyText = function() {
10538
+ }, Ve.prototype._collectedBodyText = function() {
10445
10539
  return this._collectedBody().toString("utf8");
10446
10540
  };
10447
10541
  const Ct = function(t, n) {
10448
10542
  if (!this) return;
10449
- Q.call(this), typeof t == "function" ? this._handler = t : this._handler = n, this._tcp = new tn(), this.listening = !1, this.maxHeadersCount = null, this.timeout = 0, this.keepAliveTimeout = Ts.HTTP_KEEP_ALIVE, this.headersTimeout = Ts.HTTP_HEADERS, this.requestTimeout = 0, this.maxRequestsPerSocket = null;
10543
+ ee.call(this), typeof t == "function" ? this._handler = t : this._handler = n, this._tcp = new tn(), this.listening = !1, this.maxHeadersCount = null, this.timeout = 0, this.keepAliveTimeout = Ts.HTTP_KEEP_ALIVE, this.headersTimeout = Ts.HTTP_HEADERS, this.requestTimeout = 0, this.maxRequestsPerSocket = null;
10450
10544
  const s = this;
10451
10545
  this._tcp.on("listening", function() {
10452
10546
  s.listening = !0, s.emit("listening");
@@ -10456,7 +10550,7 @@ ${btoa(String.fromCharCode(...s))}
10456
10550
  s.emit("error", o);
10457
10551
  });
10458
10552
  };
10459
- Object.setPrototypeOf(Ct.prototype, Q.prototype), Ct.prototype.listen = function(t, n, s) {
10553
+ Object.setPrototypeOf(Ct.prototype, ee.prototype), Ct.prototype.listen = function(t, n, s) {
10460
10554
  let r, o, c;
10461
10555
  typeof t == "number" ? (r = t, typeof n == "string" ? (o = n, c = s) : c = n) : t && (r = t.port, o = t.host, c = typeof n == "function" ? n : s);
10462
10556
  const d = this, p = c;
@@ -10507,7 +10601,7 @@ ${btoa(String.fromCharCode(...s))}
10507
10601
  const o = this;
10508
10602
  return new Promise((c, d) => {
10509
10603
  var p;
10510
- const y = Dt.build(t, n, s, r), g = new je(y);
10604
+ const y = Dt.build(t, n, s, r), g = new Ve(y);
10511
10605
  g._onComplete(c);
10512
10606
  const x = o.timeout || Ts.HTTP_DISPATCH_SAFETY, E = setTimeout(() => {
10513
10607
  d(new Error(`dispatchRequest timed out after ${x}ms for ${t} ${n}`));
@@ -10861,9 +10955,9 @@ ${btoa(String.fromCharCode(...s))}
10861
10955
  Yl = e;
10862
10956
  }
10863
10957
  const On = function(t) {
10864
- this && (Q.call(this), this.options = t ?? {}, this.maxSockets = (t == null ? void 0 : t.maxSockets) ?? 1 / 0, this.maxFreeSockets = (t == null ? void 0 : t.maxFreeSockets) ?? 256, this.maxTotalSockets = (t == null ? void 0 : t.maxTotalSockets) ?? 1 / 0, this.sockets = {}, this.freeSockets = {}, this.requests = {});
10958
+ this && (ee.call(this), this.options = t ?? {}, this.maxSockets = (t == null ? void 0 : t.maxSockets) ?? 1 / 0, this.maxFreeSockets = (t == null ? void 0 : t.maxFreeSockets) ?? 256, this.maxTotalSockets = (t == null ? void 0 : t.maxTotalSockets) ?? 1 / 0, this.sockets = {}, this.freeSockets = {}, this.requests = {});
10865
10959
  };
10866
- Object.setPrototypeOf(On.prototype, Q.prototype), On.prototype.createConnection = function(t, n) {
10960
+ Object.setPrototypeOf(On.prototype, ee.prototype), On.prototype.createConnection = function(t, n) {
10867
10961
  const s = new lt();
10868
10962
  return n && n(null, s), s;
10869
10963
  }, On.prototype.getName = function(t) {
@@ -10929,7 +11023,7 @@ ${btoa(String.fromCharCode(...s))}
10929
11023
  METHODS: Ya,
10930
11024
  STATUS_CODES: ki,
10931
11025
  Server: Ct,
10932
- ServerResponse: je,
11026
+ ServerResponse: Ve,
10933
11027
  _buildClientRequest: Za,
10934
11028
  closeAllServers: $0,
10935
11029
  closeServersByPid: JS,
@@ -10938,7 +11032,7 @@ ${btoa(String.fromCharCode(...s))}
10938
11032
  default: {
10939
11033
  Server: Ct,
10940
11034
  IncomingMessage: Dt,
10941
- ServerResponse: je,
11035
+ ServerResponse: Ve,
10942
11036
  ClientRequest: et,
10943
11037
  createServer: Ka,
10944
11038
  request: hp,
@@ -10982,12 +11076,12 @@ ${btoa(String.fromCharCode(...s))}
10982
11076
  METHODS: Ya,
10983
11077
  STATUS_CODES: ki,
10984
11078
  Server: Ct,
10985
- ServerResponse: je,
11079
+ ServerResponse: Ve,
10986
11080
  createServer: Ka,
10987
11081
  default: {
10988
11082
  Server: Ct,
10989
11083
  IncomingMessage: Dt,
10990
- ServerResponse: je,
11084
+ ServerResponse: Ve,
10991
11085
  ClientRequest: et,
10992
11086
  createServer: Ka,
10993
11087
  request: fp,
@@ -11619,17 +11713,17 @@ ${btoa(String.fromCharCode(...s))}
11619
11713
  if (z === "boolean")
11620
11714
  F = !0;
11621
11715
  else {
11622
- const J = T.slice(N + 1);
11623
- if (J.length > 0)
11624
- F = J, N = T.length;
11716
+ const Q = T.slice(N + 1);
11717
+ if (Q.length > 0)
11718
+ F = Q, N = T.length;
11625
11719
  else if (g + 1 < t.length)
11626
11720
  F = t[++g];
11627
11721
  else
11628
11722
  throw new Error(`Option '-${j}' requires a value`);
11629
11723
  }
11630
11724
  if (Y != null && Y.multiple) {
11631
- const J = d[Z] ?? [];
11632
- J.push(F), d[Z] = J;
11725
+ const Q = d[Z] ?? [];
11726
+ Q.push(F), d[Z] = Q;
11633
11727
  } else
11634
11728
  d[Z] = F;
11635
11729
  o && y.push({
@@ -12364,7 +12458,7 @@ ${btoa(String.fromCharCode(...s))}
12364
12458
  n > e.avail_out && (n = e.avail_out), n !== 0 && (e.output.set(t.pending_buf.subarray(t.pending_out, t.pending_out + n), e.next_out), e.next_out += n, t.pending_out += n, e.total_out += n, e.avail_out -= n, t.pending -= n, t.pending === 0 && (t.pending_out = 0));
12365
12459
  }, qt = (e, t) => {
12366
12460
  Nx(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, zt(e.strm);
12367
- }, Ve = (e, t) => {
12461
+ }, He = (e, t) => {
12368
12462
  e.pending_buf[e.pending++] = t;
12369
12463
  }, ji = (e, t) => {
12370
12464
  e.pending_buf[e.pending++] = t >>> 8 & 255, e.pending_buf[e.pending++] = t & 255;
@@ -12552,9 +12646,9 @@ ${btoa(String.fromCharCode(...s))}
12552
12646
  return n.last_flush = -1, xt;
12553
12647
  }
12554
12648
  if (n.status === Pc) {
12555
- if (e.adler = 0, Ve(n, 31), Ve(n, 139), Ve(n, 8), n.gzhead)
12556
- Ve(n, (n.gzhead.text ? 1 : 0) + (n.gzhead.hcrc ? 2 : 0) + (n.gzhead.extra ? 4 : 0) + (n.gzhead.name ? 8 : 0) + (n.gzhead.comment ? 16 : 0)), Ve(n, n.gzhead.time & 255), Ve(n, n.gzhead.time >> 8 & 255), Ve(n, n.gzhead.time >> 16 & 255), Ve(n, n.gzhead.time >> 24 & 255), Ve(n, n.level === 9 ? 2 : n.strategy >= no || n.level < 2 ? 4 : 0), Ve(n, n.gzhead.os & 255), n.gzhead.extra && n.gzhead.extra.length && (Ve(n, n.gzhead.extra.length & 255), Ve(n, n.gzhead.extra.length >> 8 & 255)), n.gzhead.hcrc && (e.adler = wt(e.adler, n.pending_buf, n.pending, 0)), n.gzindex = 0, n.status = Rc;
12557
- else if (Ve(n, 0), Ve(n, 0), Ve(n, 0), Ve(n, 0), Ve(n, 0), Ve(n, n.level === 9 ? 2 : n.strategy >= no || n.level < 2 ? 4 : 0), Ve(n, Qx), n.status = $s, zt(e), n.pending !== 0)
12649
+ if (e.adler = 0, He(n, 31), He(n, 139), He(n, 8), n.gzhead)
12650
+ He(n, (n.gzhead.text ? 1 : 0) + (n.gzhead.hcrc ? 2 : 0) + (n.gzhead.extra ? 4 : 0) + (n.gzhead.name ? 8 : 0) + (n.gzhead.comment ? 16 : 0)), He(n, n.gzhead.time & 255), He(n, n.gzhead.time >> 8 & 255), He(n, n.gzhead.time >> 16 & 255), He(n, n.gzhead.time >> 24 & 255), He(n, n.level === 9 ? 2 : n.strategy >= no || n.level < 2 ? 4 : 0), He(n, n.gzhead.os & 255), n.gzhead.extra && n.gzhead.extra.length && (He(n, n.gzhead.extra.length & 255), He(n, n.gzhead.extra.length >> 8 & 255)), n.gzhead.hcrc && (e.adler = wt(e.adler, n.pending_buf, n.pending, 0)), n.gzindex = 0, n.status = Rc;
12651
+ else if (He(n, 0), He(n, 0), He(n, 0), He(n, 0), He(n, 0), He(n, n.level === 9 ? 2 : n.strategy >= no || n.level < 2 ? 4 : 0), He(n, Qx), n.status = $s, zt(e), n.pending !== 0)
12558
12652
  return n.last_flush = -1, xt;
12559
12653
  }
12560
12654
  if (n.status === Rc) {
@@ -12580,7 +12674,7 @@ ${btoa(String.fromCharCode(...s))}
12580
12674
  return n.last_flush = -1, xt;
12581
12675
  r = 0;
12582
12676
  }
12583
- n.gzindex < n.gzhead.name.length ? o = n.gzhead.name.charCodeAt(n.gzindex++) & 255 : o = 0, Ve(n, o);
12677
+ n.gzindex < n.gzhead.name.length ? o = n.gzhead.name.charCodeAt(n.gzindex++) & 255 : o = 0, He(n, o);
12584
12678
  } while (o !== 0);
12585
12679
  n.gzhead.hcrc && n.pending > r && (e.adler = wt(e.adler, n.pending_buf, n.pending - r, r)), n.gzindex = 0;
12586
12680
  }
@@ -12595,7 +12689,7 @@ ${btoa(String.fromCharCode(...s))}
12595
12689
  return n.last_flush = -1, xt;
12596
12690
  r = 0;
12597
12691
  }
12598
- n.gzindex < n.gzhead.comment.length ? o = n.gzhead.comment.charCodeAt(n.gzindex++) & 255 : o = 0, Ve(n, o);
12692
+ n.gzindex < n.gzhead.comment.length ? o = n.gzhead.comment.charCodeAt(n.gzindex++) & 255 : o = 0, He(n, o);
12599
12693
  } while (o !== 0);
12600
12694
  n.gzhead.hcrc && n.pending > r && (e.adler = wt(e.adler, n.pending_buf, n.pending - r, r));
12601
12695
  }
@@ -12605,7 +12699,7 @@ ${btoa(String.fromCharCode(...s))}
12605
12699
  if (n.gzhead.hcrc) {
12606
12700
  if (n.pending + 2 > n.pending_buf_size && (zt(e), n.pending !== 0))
12607
12701
  return n.last_flush = -1, xt;
12608
- Ve(n, e.adler & 255), Ve(n, e.adler >> 8 & 255), e.adler = 0;
12702
+ He(n, e.adler & 255), He(n, e.adler >> 8 & 255), e.adler = 0;
12609
12703
  }
12610
12704
  if (n.status = $s, zt(e), n.pending !== 0)
12611
12705
  return n.last_flush = -1, xt;
@@ -12617,7 +12711,7 @@ ${btoa(String.fromCharCode(...s))}
12617
12711
  if (r === vr && (t === Lx ? Bx(n) : t !== Bf && (Ac(n, 0, 0, !1), t === Mx && (ms(n.head), n.lookahead === 0 && (n.strstart = 0, n.block_start = 0, n.insert = 0))), zt(e), e.avail_out === 0))
12618
12712
  return n.last_flush = -1, xt;
12619
12713
  }
12620
- return t !== sn ? xt : n.wrap <= 0 ? Lf : (n.wrap === 2 ? (Ve(n, e.adler & 255), Ve(n, e.adler >> 8 & 255), Ve(n, e.adler >> 16 & 255), Ve(n, e.adler >> 24 & 255), Ve(n, e.total_in & 255), Ve(n, e.total_in >> 8 & 255), Ve(n, e.total_in >> 16 & 255), Ve(n, e.total_in >> 24 & 255)) : (ji(n, e.adler >>> 16), ji(n, e.adler & 65535)), zt(e), n.wrap > 0 && (n.wrap = -n.wrap), n.pending !== 0 ? xt : Lf);
12714
+ return t !== sn ? xt : n.wrap <= 0 ? Lf : (n.wrap === 2 ? (He(n, e.adler & 255), He(n, e.adler >> 8 & 255), He(n, e.adler >> 16 & 255), He(n, e.adler >> 24 & 255), He(n, e.total_in & 255), He(n, e.total_in >> 8 & 255), He(n, e.total_in >> 16 & 255), He(n, e.total_in >> 24 & 255)) : (ji(n, e.adler >>> 16), ji(n, e.adler & 65535)), zt(e), n.wrap > 0 && (n.wrap = -n.wrap), n.pending !== 0 ? xt : Lf);
12621
12715
  }, lE = (e) => {
12622
12716
  if (Hi(e))
12623
12717
  return Bn;
@@ -12822,7 +12916,7 @@ ${btoa(String.fromCharCode(...s))}
12822
12916
  };
12823
12917
  const ao = 16209, VE = 16191;
12824
12918
  var HE = function(t, n) {
12825
- let s, r, o, c, d, p, y, g, x, E, C, T, N, j, q, Z, Y, z, F, J, I, D, M, $;
12919
+ let s, r, o, c, d, p, y, g, x, E, C, T, N, j, q, Z, Y, z, F, Q, I, D, M, $;
12826
12920
  const O = t.state;
12827
12921
  s = t.next_in, M = t.input, r = s + (t.avail_in - 5), o = t.next_out, $ = t.output, c = o - (n - t.avail_out), d = o + (t.avail_out - 257), p = O.dmax, y = O.wsize, g = O.whave, x = O.wnext, E = O.window, C = O.hold, T = O.bits, N = O.lencode, j = O.distcode, q = (1 << O.lenbits) - 1, Z = (1 << O.distbits) - 1;
12828
12922
  e: do {
@@ -12834,12 +12928,12 @@ ${btoa(String.fromCharCode(...s))}
12834
12928
  F = Y & 65535, z &= 15, z && (T < z && (C += M[s++] << T, T += 8), F += C & (1 << z) - 1, C >>>= z, T -= z), T < 15 && (C += M[s++] << T, T += 8, C += M[s++] << T, T += 8), Y = j[C & Z];
12835
12929
  n: for (; ; ) {
12836
12930
  if (z = Y >>> 24, C >>>= z, T -= z, z = Y >>> 16 & 255, z & 16) {
12837
- if (J = Y & 65535, z &= 15, T < z && (C += M[s++] << T, T += 8, T < z && (C += M[s++] << T, T += 8)), J += C & (1 << z) - 1, J > p) {
12931
+ if (Q = Y & 65535, z &= 15, T < z && (C += M[s++] << T, T += 8, T < z && (C += M[s++] << T, T += 8)), Q += C & (1 << z) - 1, Q > p) {
12838
12932
  t.msg = "invalid distance too far back", O.mode = ao;
12839
12933
  break e;
12840
12934
  }
12841
- if (C >>>= z, T -= z, z = o - c, J > z) {
12842
- if (z = J - z, z > g && O.sane) {
12935
+ if (C >>>= z, T -= z, z = o - c, Q > z) {
12936
+ if (z = Q - z, z > g && O.sane) {
12843
12937
  t.msg = "invalid distance too far back", O.mode = ao;
12844
12938
  break e;
12845
12939
  }
@@ -12849,7 +12943,7 @@ ${btoa(String.fromCharCode(...s))}
12849
12943
  do
12850
12944
  $[o++] = E[I++];
12851
12945
  while (--z);
12852
- I = o - J, D = $;
12946
+ I = o - Q, D = $;
12853
12947
  }
12854
12948
  } else if (x < z) {
12855
12949
  if (I += y + x - z, z -= x, z < F) {
@@ -12862,7 +12956,7 @@ ${btoa(String.fromCharCode(...s))}
12862
12956
  do
12863
12957
  $[o++] = E[I++];
12864
12958
  while (--z);
12865
- I = o - J, D = $;
12959
+ I = o - Q, D = $;
12866
12960
  }
12867
12961
  }
12868
12962
  } else if (I += x - z, z < F) {
@@ -12870,13 +12964,13 @@ ${btoa(String.fromCharCode(...s))}
12870
12964
  do
12871
12965
  $[o++] = E[I++];
12872
12966
  while (--z);
12873
- I = o - J, D = $;
12967
+ I = o - Q, D = $;
12874
12968
  }
12875
12969
  for (; F > 2; )
12876
12970
  $[o++] = D[I++], $[o++] = D[I++], $[o++] = D[I++], F -= 3;
12877
12971
  F && ($[o++] = D[I++], F > 1 && ($[o++] = D[I++]));
12878
12972
  } else {
12879
- I = o - J;
12973
+ I = o - Q;
12880
12974
  do
12881
12975
  $[o++] = $[I++], $[o++] = $[I++], $[o++] = $[I++], F -= 3;
12882
12976
  while (F > 2);
@@ -13039,7 +13133,7 @@ ${btoa(String.fromCharCode(...s))}
13039
13133
  ]);
13040
13134
  var Ki = (e, t, n, s, r, o, c, d) => {
13041
13135
  const p = d.bits;
13042
- let y = 0, g = 0, x = 0, E = 0, C = 0, T = 0, N = 0, j = 0, q = 0, Z = 0, Y, z, F, J, I, D = null, M;
13136
+ let y = 0, g = 0, x = 0, E = 0, C = 0, T = 0, N = 0, j = 0, q = 0, Z = 0, Y, z, F, Q, I, D = null, M;
13043
13137
  const $ = new Uint16Array(Er + 1), O = new Uint16Array(Er + 1);
13044
13138
  let X = null, le, oe, pe;
13045
13139
  for (y = 0; y <= Er; y++)
@@ -13061,7 +13155,7 @@ ${btoa(String.fromCharCode(...s))}
13061
13155
  O[y + 1] = O[y] + $[y];
13062
13156
  for (g = 0; g < s; g++)
13063
13157
  t[n + g] !== 0 && (c[O[t[n + g]]++] = g);
13064
- if (e === Kf ? (D = X = c, M = 20) : e === Fc ? (D = WE, X = zE, M = 257) : (D = qE, X = GE, M = 0), Z = 0, g = 0, y = x, I = o, T = C, N = 0, F = -1, q = 1 << C, J = q - 1, e === Fc && q > qf || e === Yf && q > Gf)
13158
+ if (e === Kf ? (D = X = c, M = 20) : e === Fc ? (D = WE, X = zE, M = 257) : (D = qE, X = GE, M = 0), Z = 0, g = 0, y = x, I = o, T = C, N = 0, F = -1, q = 1 << C, Q = q - 1, e === Fc && q > qf || e === Yf && q > Gf)
13065
13159
  return 1;
13066
13160
  for (; ; ) {
13067
13161
  le = y - N, c[g] + 1 < M ? (oe = 0, pe = c[g]) : c[g] >= M ? (oe = X[c[g] - M], pe = D[c[g] - M]) : (oe = 96, pe = 0), Y = 1 << y - N, z = 1 << T, x = z;
@@ -13075,12 +13169,12 @@ ${btoa(String.fromCharCode(...s))}
13075
13169
  break;
13076
13170
  y = t[n + c[g]];
13077
13171
  }
13078
- if (y > C && (Z & J) !== F) {
13172
+ if (y > C && (Z & Q) !== F) {
13079
13173
  for (N === 0 && (N = C), I += x, T = y - N, j = 1 << T; T + N < E && (j -= $[T + N], !(j <= 0)); )
13080
13174
  T++, j <<= 1;
13081
13175
  if (q += 1 << T, e === Fc && q > qf || e === Yf && q > Gf)
13082
13176
  return 1;
13083
- F = Z & J, r[F] = C << 24 | T << 16 | I - o | 0;
13177
+ F = Z & Q, r[F] = C << 24 | T << 16 | I - o | 0;
13084
13178
  }
13085
13179
  }
13086
13180
  return Z !== 0 && (r[I + Z] = y - N << 24 | 64 << 16 | 0), d.bits = C, 0;
@@ -13145,7 +13239,7 @@ ${btoa(String.fromCharCode(...s))}
13145
13239
  const o = e.state;
13146
13240
  return o.window === null && (o.wsize = 1 << o.wbits, o.wnext = 0, o.whave = 0, o.window = new Uint8Array(o.wsize)), s >= o.wsize ? (o.window.set(t.subarray(n - o.wsize, n), 0), o.wnext = 0, o.whave = o.wsize) : (r = o.wsize - o.wnext, r > s && (r = s), o.window.set(t.subarray(n - s, n - s + r), o.wnext), s -= r, s ? (o.window.set(t.subarray(n - s, n), 0), o.wnext = s, o.whave = o.wsize) : (o.wnext += r, o.wnext === o.wsize && (o.wnext = 0), o.whave < o.wsize && (o.whave += r))), 0;
13147
13241
  }, i1 = (e, t) => {
13148
- let n, s, r, o, c, d, p, y, g, x, E, C, T, N, j = 0, q, Z, Y, z, F, J, I, D;
13242
+ let n, s, r, o, c, d, p, y, g, x, E, C, T, N, j = 0, q, Z, Y, z, F, Q, I, D;
13149
13243
  const M = new Uint8Array(4);
13150
13244
  let $, O;
13151
13245
  const X = new Uint8Array([
@@ -13455,7 +13549,7 @@ ${btoa(String.fromCharCode(...s))}
13455
13549
  d--, y += s[o++] << g, g += 8;
13456
13550
  }
13457
13551
  if (Z && (Z & 240) === 0) {
13458
- for (z = q, F = Z, J = Y; j = n.lencode[J + ((y & (1 << z + F) - 1) >> z)], q = j >>> 24, Z = j >>> 16 & 255, Y = j & 65535, !(z + q <= g); ) {
13552
+ for (z = q, F = Z, Q = Y; j = n.lencode[Q + ((y & (1 << z + F) - 1) >> z)], q = j >>> 24, Z = j >>> 16 & 255, Y = j & 65535, !(z + q <= g); ) {
13459
13553
  if (d === 0)
13460
13554
  break e;
13461
13555
  d--, y += s[o++] << g, g += 8;
@@ -13492,7 +13586,7 @@ ${btoa(String.fromCharCode(...s))}
13492
13586
  d--, y += s[o++] << g, g += 8;
13493
13587
  }
13494
13588
  if ((Z & 240) === 0) {
13495
- for (z = q, F = Z, J = Y; j = n.distcode[J + ((y & (1 << z + F) - 1) >> z)], q = j >>> 24, Z = j >>> 16 & 255, Y = j & 65535, !(z + q <= g); ) {
13589
+ for (z = q, F = Z, Q = Y; j = n.distcode[Q + ((y & (1 << z + F) - 1) >> z)], q = j >>> 24, Z = j >>> 16 & 255, Y = j & 65535, !(z + q <= g); ) {
13496
13590
  if (d === 0)
13497
13591
  break e;
13498
13592
  d--, y += s[o++] << g, g += 8;
@@ -15256,9 +15350,9 @@ Sec-WebSocket-Accept: ${H1(g)}\r
15256
15350
  }
15257
15351
  let q1 = 1;
15258
15352
  const $n = function() {
15259
- this && Q.call(this);
15353
+ this && ee.call(this);
15260
15354
  };
15261
- Object.setPrototypeOf($n.prototype, Q.prototype), $n.prototype.postMessage = function(t, n) {
15355
+ Object.setPrototypeOf($n.prototype, ee.prototype), $n.prototype.postMessage = function(t, n) {
15262
15356
  }, $n.prototype.start = function() {
15263
15357
  }, $n.prototype.close = function() {
15264
15358
  }, $n.prototype.ref = function() {
@@ -15276,7 +15370,7 @@ Sec-WebSocket-Accept: ${H1(g)}\r
15276
15370
  }, _s = function(t, n) {
15277
15371
  var s, r;
15278
15372
  if (!this) return;
15279
- Q.call(this), this.threadId = q1++, this.resourceLimits = {}, this._handle = null, this._terminated = !1, this._isReffed = !1;
15373
+ ee.call(this), this.threadId = q1++, this.resourceLimits = {}, this._handle = null, this._terminated = !1, this._isReffed = !1;
15280
15374
  const o = typeof t == "string" ? t : t.href, c = this;
15281
15375
  if (!Yc) {
15282
15376
  queueMicrotask(() => {
@@ -15314,7 +15408,7 @@ Sec-WebSocket-Accept: ${H1(g)}\r
15314
15408
  c._terminated || c.emit("online");
15315
15409
  });
15316
15410
  };
15317
- Object.setPrototypeOf(_s.prototype, Q.prototype), _s.prototype.postMessage = function(t, n) {
15411
+ Object.setPrototypeOf(_s.prototype, ee.prototype), _s.prototype.postMessage = function(t, n) {
15318
15412
  this._handle && !this._terminated && this._handle.postMessage(t);
15319
15413
  }, _s.prototype.terminate = function() {
15320
15414
  return this._handle && !this._terminated && (this._isReffed && (this._isReffed = !1, Cn()), this._terminated = !0, this._handle.terminate()), Promise.resolve(0);
@@ -15326,9 +15420,9 @@ Sec-WebSocket-Accept: ${H1(g)}\r
15326
15420
  return Promise.resolve({});
15327
15421
  };
15328
15422
  const qs = function(t) {
15329
- this && (Q.call(this), this.name = t);
15423
+ this && (ee.call(this), this.name = t);
15330
15424
  };
15331
- Object.setPrototypeOf(qs.prototype, Q.prototype), qs.prototype.postMessage = function(t) {
15425
+ Object.setPrototypeOf(qs.prototype, ee.prototype), qs.prototype.postMessage = function(t) {
15332
15426
  }, qs.prototype.close = function() {
15333
15427
  }, qs.prototype.ref = function() {
15334
15428
  }, qs.prototype.unref = function() {
@@ -19518,8 +19612,8 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
19518
19612
  for (const F of Y)
19519
19613
  if (s.existsSync(F)) {
19520
19614
  try {
19521
- const J = JSON.parse(s.readFileSync(F + "/package.json", "utf8"));
19522
- (J.napi || J.binary || J.gypfile) && (z = !0);
19615
+ const Q = JSON.parse(s.readFileSync(F + "/package.json", "utf8"));
19616
+ (Q.napi || Q.binary || Q.gypfile) && (z = !0);
19523
19617
  } catch {
19524
19618
  }
19525
19619
  break;
@@ -20003,46 +20097,46 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
20003
20097
  return x;
20004
20098
  }
20005
20099
  jsx_readToken() {
20006
- let F = "", J = this.pos;
20100
+ let F = "", Q = this.pos;
20007
20101
  for (; ; ) {
20008
20102
  this.pos >= this.input.length && this.raise(this.start, "Unterminated JSX contents");
20009
20103
  let I = this.input.charCodeAt(this.pos);
20010
20104
  switch (I) {
20011
20105
  case 60:
20012
20106
  case 123:
20013
- return this.pos === this.start ? I === 60 && this.exprAllowed ? (++this.pos, this.finishToken(C.jsxTagStart)) : this.getTokenFromCode(I) : (F += this.input.slice(J, this.pos), this.finishToken(C.jsxText, F));
20107
+ return this.pos === this.start ? I === 60 && this.exprAllowed ? (++this.pos, this.finishToken(C.jsxTagStart)) : this.getTokenFromCode(I) : (F += this.input.slice(Q, this.pos), this.finishToken(C.jsxText, F));
20014
20108
  case 38:
20015
- F += this.input.slice(J, this.pos), F += this.jsx_readEntity(), J = this.pos;
20109
+ F += this.input.slice(Q, this.pos), F += this.jsx_readEntity(), Q = this.pos;
20016
20110
  break;
20017
20111
  case 62:
20018
20112
  case 125:
20019
20113
  this.raise(this.pos, "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" + (I === 62 ? "&gt;" : "&rbrace;") + '` or `{"' + this.input[this.pos] + '"}`?');
20020
20114
  default:
20021
- Z(I) ? (F += this.input.slice(J, this.pos), F += this.jsx_readNewLine(!0), J = this.pos) : ++this.pos;
20115
+ Z(I) ? (F += this.input.slice(Q, this.pos), F += this.jsx_readNewLine(!0), Q = this.pos) : ++this.pos;
20022
20116
  }
20023
20117
  }
20024
20118
  }
20025
20119
  jsx_readNewLine(F) {
20026
- let J = this.input.charCodeAt(this.pos), I;
20027
- return ++this.pos, J === 13 && this.input.charCodeAt(this.pos) === 10 ? (++this.pos, I = F ? `
20120
+ let Q = this.input.charCodeAt(this.pos), I;
20121
+ return ++this.pos, Q === 13 && this.input.charCodeAt(this.pos) === 10 ? (++this.pos, I = F ? `
20028
20122
  ` : `\r
20029
- `) : I = String.fromCharCode(J), this.options.locations && (++this.curLine, this.lineStart = this.pos), I;
20123
+ `) : I = String.fromCharCode(Q), this.options.locations && (++this.curLine, this.lineStart = this.pos), I;
20030
20124
  }
20031
20125
  jsx_readString(F) {
20032
- let J = "", I = ++this.pos;
20126
+ let Q = "", I = ++this.pos;
20033
20127
  for (; ; ) {
20034
20128
  this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
20035
20129
  let D = this.input.charCodeAt(this.pos);
20036
20130
  if (D === F) break;
20037
- D === 38 ? (J += this.input.slice(I, this.pos), J += this.jsx_readEntity(), I = this.pos) : Z(D) ? (J += this.input.slice(I, this.pos), J += this.jsx_readNewLine(!1), I = this.pos) : ++this.pos;
20131
+ D === 38 ? (Q += this.input.slice(I, this.pos), Q += this.jsx_readEntity(), I = this.pos) : Z(D) ? (Q += this.input.slice(I, this.pos), Q += this.jsx_readNewLine(!1), I = this.pos) : ++this.pos;
20038
20132
  }
20039
- return J += this.input.slice(I, this.pos++), this.finishToken(E.string, J);
20133
+ return Q += this.input.slice(I, this.pos++), this.finishToken(E.string, Q);
20040
20134
  }
20041
20135
  jsx_readEntity() {
20042
- let F = "", J = 0, I, D = this.input[this.pos];
20136
+ let F = "", Q = 0, I, D = this.input[this.pos];
20043
20137
  D !== "&" && this.raise(this.pos, "Entity must start with an ampersand");
20044
20138
  let M = ++this.pos;
20045
- for (; this.pos < this.input.length && J++ < 10; ) {
20139
+ for (; this.pos < this.input.length && Q++ < 10; ) {
20046
20140
  if (D = this.input[this.pos++], D === ";") {
20047
20141
  F[0] === "#" ? F[1] === "x" ? (F = F.substr(2), n.test(F) && (I = String.fromCharCode(parseInt(F, 16)))) : (F = F.substr(1), s.test(F) && (I = String.fromCharCode(parseInt(F, 10)))) : I = t[F];
20048
20142
  break;
@@ -20052,27 +20146,27 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
20052
20146
  return I || (this.pos = M, "&");
20053
20147
  }
20054
20148
  jsx_readWord() {
20055
- let F, J = this.pos;
20149
+ let F, Q = this.pos;
20056
20150
  do
20057
20151
  F = this.input.charCodeAt(++this.pos);
20058
20152
  while (z(F) || F === 45);
20059
- return this.finishToken(C.jsxName, this.input.slice(J, this.pos));
20153
+ return this.finishToken(C.jsxName, this.input.slice(Q, this.pos));
20060
20154
  }
20061
20155
  jsx_parseIdentifier() {
20062
20156
  let F = this.startNode();
20063
20157
  return this.type === C.jsxName ? F.name = this.value : this.type.keyword ? F.name = this.type.keyword : this.unexpected(), this.next(), this.finishNode(F, "JSXIdentifier");
20064
20158
  }
20065
20159
  jsx_parseNamespacedName() {
20066
- let F = this.start, J = this.startLoc, I = this.jsx_parseIdentifier();
20160
+ let F = this.start, Q = this.startLoc, I = this.jsx_parseIdentifier();
20067
20161
  if (!p.allowNamespaces || !this.eat(E.colon)) return I;
20068
- var D = this.startNodeAt(F, J);
20162
+ var D = this.startNodeAt(F, Q);
20069
20163
  return D.namespace = I, D.name = this.jsx_parseIdentifier(), this.finishNode(D, "JSXNamespacedName");
20070
20164
  }
20071
20165
  jsx_parseElementName() {
20072
20166
  if (this.type === C.jsxTagEnd) return "";
20073
- let F = this.start, J = this.startLoc, I = this.jsx_parseNamespacedName();
20167
+ let F = this.start, Q = this.startLoc, I = this.jsx_parseNamespacedName();
20074
20168
  for (this.type === E.dot && I.type === "JSXNamespacedName" && !p.allowNamespacedObjects && this.unexpected(); this.eat(E.dot); ) {
20075
- let D = this.startNodeAt(F, J);
20169
+ let D = this.startNodeAt(F, Q);
20076
20170
  D.object = I, D.property = this.jsx_parseIdentifier(), I = this.finishNode(D, "JSXMemberExpression");
20077
20171
  }
20078
20172
  return I;
@@ -20101,28 +20195,28 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
20101
20195
  let F = this.startNode();
20102
20196
  return this.eat(E.braceL) ? (this.expect(E.ellipsis), F.argument = this.parseMaybeAssign(), this.expect(E.braceR), this.finishNode(F, "JSXSpreadAttribute")) : (F.name = this.jsx_parseNamespacedName(), F.value = this.eat(E.eq) ? this.jsx_parseAttributeValue() : null, this.finishNode(F, "JSXAttribute"));
20103
20197
  }
20104
- jsx_parseOpeningElementAt(F, J) {
20105
- let I = this.startNodeAt(F, J);
20198
+ jsx_parseOpeningElementAt(F, Q) {
20199
+ let I = this.startNodeAt(F, Q);
20106
20200
  I.attributes = [];
20107
20201
  let D = this.jsx_parseElementName();
20108
20202
  for (D && (I.name = D); this.type !== E.slash && this.type !== C.jsxTagEnd; ) I.attributes.push(this.jsx_parseAttribute());
20109
20203
  return I.selfClosing = this.eat(E.slash), this.expect(C.jsxTagEnd), this.finishNode(I, D ? "JSXOpeningElement" : "JSXOpeningFragment");
20110
20204
  }
20111
- jsx_parseClosingElementAt(F, J) {
20112
- let I = this.startNodeAt(F, J), D = this.jsx_parseElementName();
20205
+ jsx_parseClosingElementAt(F, Q) {
20206
+ let I = this.startNodeAt(F, Q), D = this.jsx_parseElementName();
20113
20207
  return D && (I.name = D), this.expect(C.jsxTagEnd), this.finishNode(I, D ? "JSXClosingElement" : "JSXClosingFragment");
20114
20208
  }
20115
- jsx_parseElementAt(F, J) {
20116
- let I = this.startNodeAt(F, J), D = [], M = this.jsx_parseOpeningElementAt(F, J), $ = null;
20209
+ jsx_parseElementAt(F, Q) {
20210
+ let I = this.startNodeAt(F, Q), D = [], M = this.jsx_parseOpeningElementAt(F, Q), $ = null;
20117
20211
  if (!M.selfClosing) {
20118
20212
  e: for (; ; )
20119
20213
  switch (this.type) {
20120
20214
  case C.jsxTagStart:
20121
- if (F = this.start, J = this.startLoc, this.next(), this.eat(E.slash)) {
20122
- $ = this.jsx_parseClosingElementAt(F, J);
20215
+ if (F = this.start, Q = this.startLoc, this.next(), this.eat(E.slash)) {
20216
+ $ = this.jsx_parseClosingElementAt(F, Q);
20123
20217
  break e;
20124
20218
  }
20125
- D.push(this.jsx_parseElementAt(F, J));
20219
+ D.push(this.jsx_parseElementAt(F, Q));
20126
20220
  break;
20127
20221
  case C.jsxText:
20128
20222
  D.push(this.parseExprAtom());
@@ -20143,27 +20237,27 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
20143
20237
  return F.type = "JSXText", F;
20144
20238
  }
20145
20239
  jsx_parseElement() {
20146
- let F = this.start, J = this.startLoc;
20147
- return this.next(), this.jsx_parseElementAt(F, J);
20240
+ let F = this.start, Q = this.startLoc;
20241
+ return this.next(), this.jsx_parseElementAt(F, Q);
20148
20242
  }
20149
20243
  parseExprAtom(F) {
20150
20244
  return this.type === C.jsxText ? this.jsx_parseText() : this.type === C.jsxTagStart ? this.jsx_parseElement() : super.parseExprAtom(F);
20151
20245
  }
20152
20246
  readToken(F) {
20153
- let J = this.curContext();
20154
- if (J === q) return this.jsx_readToken();
20155
- if (J === N || J === j) {
20247
+ let Q = this.curContext();
20248
+ if (Q === q) return this.jsx_readToken();
20249
+ if (Q === N || Q === j) {
20156
20250
  if (Y(F)) return this.jsx_readWord();
20157
20251
  if (F == 62)
20158
20252
  return ++this.pos, this.finishToken(C.jsxTagEnd);
20159
- if ((F === 34 || F === 39) && J == N) return this.jsx_readString(F);
20253
+ if ((F === 34 || F === 39) && Q == N) return this.jsx_readString(F);
20160
20254
  }
20161
20255
  return F === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33 ? (++this.pos, this.finishToken(C.jsxTagStart)) : super.readToken(F);
20162
20256
  }
20163
20257
  updateContext(F) {
20164
20258
  if (this.type == E.braceL) {
20165
- var J = this.curContext();
20166
- J == N ? this.context.push(T.b_expr) : J == q ? this.context.push(T.b_tmpl) : super.updateContext(F), this.exprAllowed = !0;
20259
+ var Q = this.curContext();
20260
+ Q == N ? this.context.push(T.b_expr) : Q == q ? this.context.push(T.b_tmpl) : super.updateContext(F), this.exprAllowed = !0;
20167
20261
  } else if (this.type === E.slash && F === C.jsxTagStart)
20168
20262
  this.context.length -= 2, this.context.push(j), this.exprAllowed = !1;
20169
20263
  else
@@ -20475,7 +20569,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
20475
20569
  }
20476
20570
  const ct = function(t) {
20477
20571
  if (this) {
20478
- if (Q.call(this), this._promptStr = (t == null ? void 0 : t.prompt) ?? "> ", this.input = t == null ? void 0 : t.input, this.output = t == null ? void 0 : t.output, this.closed = !1, this._lineBuffer = "", this._pendingQuestions = [], this.terminal = (t == null ? void 0 : t.terminal) ?? !1, this.line = "", this.cursor = 0, this._historySize = (t == null ? void 0 : t.historySize) ?? 30, this._removeHistoryDuplicates = (t == null ? void 0 : t.removeHistoryDuplicates) ?? !1, this.history = Array.isArray(t == null ? void 0 : t.history) ? t.history.slice(0, this._historySize) : [], this._historyIndex = -1, this._savedLine = "", this._killRing = [], t != null && t.signal) {
20572
+ if (ee.call(this), this._promptStr = (t == null ? void 0 : t.prompt) ?? "> ", this.input = t == null ? void 0 : t.input, this.output = t == null ? void 0 : t.output, this.closed = !1, this._lineBuffer = "", this._pendingQuestions = [], this.terminal = (t == null ? void 0 : t.terminal) ?? !1, this.line = "", this.cursor = 0, this._historySize = (t == null ? void 0 : t.historySize) ?? 30, this._removeHistoryDuplicates = (t == null ? void 0 : t.removeHistoryDuplicates) ?? !1, this.history = Array.isArray(t == null ? void 0 : t.history) ? t.history.slice(0, this._historySize) : [], this._historyIndex = -1, this._savedLine = "", this._killRing = [], t != null && t.signal) {
20479
20573
  const n = t.signal;
20480
20574
  if (n.aborted)
20481
20575
  queueMicrotask(() => this.close());
@@ -20501,7 +20595,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
20501
20595
  }
20502
20596
  }
20503
20597
  };
20504
- Object.setPrototypeOf(ct.prototype, Q.prototype), ct.prototype._refreshLine = function() {
20598
+ Object.setPrototypeOf(ct.prototype, ee.prototype), ct.prototype._refreshLine = function() {
20505
20599
  this.output && typeof this.output.write == "function" && this.output.write(this.line);
20506
20600
  }, ct.prototype._addToHistory = function(t) {
20507
20601
  if (!(this._historySize === 0 || !t)) {
@@ -20907,9 +21001,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
20907
21001
  value: "Module"
20908
21002
  }));
20909
21003
  const is = function(t, n) {
20910
- this && (Q.call(this), this.authorized = !1, this.encrypted = !0);
21004
+ this && (ee.call(this), this.authorized = !1, this.encrypted = !0);
20911
21005
  };
20912
- Object.setPrototypeOf(is.prototype, Q.prototype), is.prototype.getPeerCertificate = function(t) {
21006
+ Object.setPrototypeOf(is.prototype, ee.prototype), is.prototype.getPeerCertificate = function(t) {
20913
21007
  return {};
20914
21008
  }, is.prototype.getCipher = function() {
20915
21009
  return null;
@@ -20920,9 +21014,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
20920
21014
  return !1;
20921
21015
  };
20922
21016
  const Hn = function(t, n) {
20923
- this && Q.call(this);
21017
+ this && ee.call(this);
20924
21018
  };
20925
- Object.setPrototypeOf(Hn.prototype, Q.prototype), Hn.prototype.listen = function(...t) {
21019
+ Object.setPrototypeOf(Hn.prototype, ee.prototype), Hn.prototype.listen = function(...t) {
20926
21020
  return this;
20927
21021
  }, Hn.prototype.close = function(t) {
20928
21022
  return this;
@@ -20975,9 +21069,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
20975
21069
  value: "Module"
20976
21070
  }));
20977
21071
  const Tt = function() {
20978
- this && Q.call(this);
21072
+ this && ee.call(this);
20979
21073
  };
20980
- Object.setPrototypeOf(Tt.prototype, Q.prototype), Tt.prototype.close = function(t) {
21074
+ Object.setPrototypeOf(Tt.prototype, ee.prototype), Tt.prototype.close = function(t) {
20981
21075
  t && setTimeout(t, 0);
20982
21076
  }, Tt.prototype.destroy = function(t, n) {
20983
21077
  }, Object.defineProperty(Tt.prototype, "destroyed", {
@@ -21010,9 +21104,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
21010
21104
  };
21011
21105
  Object.setPrototypeOf(gu.prototype, Tt.prototype);
21012
21106
  const Sn = function() {
21013
- this && Q.call(this);
21107
+ this && ee.call(this);
21014
21108
  };
21015
- Object.setPrototypeOf(Sn.prototype, Q.prototype), Sn.prototype.close = function(t, n) {
21109
+ Object.setPrototypeOf(Sn.prototype, ee.prototype), Sn.prototype.close = function(t, n) {
21016
21110
  }, Object.defineProperty(Sn.prototype, "id", {
21017
21111
  get() {
21018
21112
  return 0;
@@ -21038,21 +21132,21 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
21038
21132
  }, Sn.prototype.end = function(t, n, s) {
21039
21133
  };
21040
21134
  const yu = function() {
21041
- this && Q.call(this);
21135
+ this && ee.call(this);
21042
21136
  };
21043
- Object.setPrototypeOf(yu.prototype, Q.prototype);
21137
+ Object.setPrototypeOf(yu.prototype, ee.prototype);
21044
21138
  const ha = function() {
21045
- this && Q.call(this);
21139
+ this && ee.call(this);
21046
21140
  };
21047
- Object.setPrototypeOf(ha.prototype, Q.prototype), ha.prototype.writeHead = function(t, n) {
21141
+ Object.setPrototypeOf(ha.prototype, ee.prototype), ha.prototype.writeHead = function(t, n) {
21048
21142
  return this;
21049
21143
  }, ha.prototype.end = function(t) {
21050
21144
  };
21051
21145
  function W_(e, t) {
21052
- return new Q();
21146
+ return new ee();
21053
21147
  }
21054
21148
  function z_(e, t) {
21055
- return new Q();
21149
+ return new ee();
21056
21150
  }
21057
21151
  function q_(e, t, n) {
21058
21152
  return new Po();
@@ -21114,9 +21208,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
21114
21208
  value: "Module"
21115
21209
  }));
21116
21210
  const J_ = !0, Q_ = !0, eb = !1, as = function() {
21117
- this && (Q.call(this), this.id = 0, this.process = null);
21211
+ this && (ee.call(this), this.id = 0, this.process = null);
21118
21212
  };
21119
- Object.setPrototypeOf(as.prototype, Q.prototype), as.prototype.send = function(t, n) {
21213
+ Object.setPrototypeOf(as.prototype, ee.prototype), as.prototype.send = function(t, n) {
21120
21214
  return !1;
21121
21215
  }, as.prototype.kill = function(t) {
21122
21216
  }, as.prototype.disconnect = function() {
@@ -21137,7 +21231,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
21137
21231
  }
21138
21232
  function cb(e) {
21139
21233
  }
21140
- const Ss = new Q(), ub = Ss.on.bind(Ss), db = Ss.once.bind(Ss), hb = Ss.emit.bind(Ss), pb = Ss.removeListener.bind(Ss);
21234
+ const Ss = new ee(), ub = Ss.on.bind(Ss), db = Ss.once.bind(Ss), hb = Ss.emit.bind(Ss), pb = Ss.removeListener.bind(Ss);
21141
21235
  Object.freeze(Object.defineProperty({
21142
21236
  __proto__: null,
21143
21237
  SCHED_NONE: rb,
@@ -21182,9 +21276,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
21182
21276
  value: "Module"
21183
21277
  }));
21184
21278
  const ut = function() {
21185
- this && Q.call(this);
21279
+ this && ee.call(this);
21186
21280
  };
21187
- Object.setPrototypeOf(ut.prototype, Q.prototype), ut.prototype.bind = function(t, n, s) {
21281
+ Object.setPrototypeOf(ut.prototype, ee.prototype), ut.prototype.bind = function(t, n, s) {
21188
21282
  return s && setTimeout(s, 0), this;
21189
21283
  }, ut.prototype.close = function(t) {
21190
21284
  t && setTimeout(t, 0);
@@ -21325,9 +21419,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
21325
21419
  value: "Module"
21326
21420
  }));
21327
21421
  const Xs = function() {
21328
- this && Q.call(this);
21422
+ this && ee.call(this);
21329
21423
  };
21330
- Object.setPrototypeOf(Xs.prototype, Q.prototype), Xs.prototype.connect = function() {
21424
+ Object.setPrototypeOf(Xs.prototype, ee.prototype), Xs.prototype.connect = function() {
21331
21425
  }, Xs.prototype.connectToMainThread = function() {
21332
21426
  }, Xs.prototype.disconnect = function() {
21333
21427
  }, Xs.prototype.post = function(t, n, s) {
@@ -21449,9 +21543,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
21449
21543
  value: "Module"
21450
21544
  }));
21451
21545
  const fn = function() {
21452
- this && (Q.call(this), this.members = []);
21546
+ this && (ee.call(this), this.members = []);
21453
21547
  };
21454
- Object.setPrototypeOf(fn.prototype, Q.prototype), fn.prototype.add = function(t) {
21548
+ Object.setPrototypeOf(fn.prototype, ee.prototype), fn.prototype.add = function(t) {
21455
21549
  this.members.push(t);
21456
21550
  }, fn.prototype.remove = function(t) {
21457
21551
  const n = this.members.indexOf(t);
@@ -21544,9 +21638,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
21544
21638
  };
21545
21639
  Object.setPrototypeOf(Su.prototype, SyntaxError.prototype);
21546
21640
  const Wn = function(t) {
21547
- this && (Q.call(this), this.context = /* @__PURE__ */ Object.create(null), this.terminal = !1, this._prompt = "> ", this._commands = /* @__PURE__ */ new Map(), typeof t == "string" ? this._prompt = t : t && (typeof t.prompt == "string" && (this._prompt = t.prompt), t.terminal !== void 0 && (this.terminal = !!t.terminal)));
21641
+ this && (ee.call(this), this.context = /* @__PURE__ */ Object.create(null), this.terminal = !1, this._prompt = "> ", this._commands = /* @__PURE__ */ new Map(), typeof t == "string" ? this._prompt = t : t && (typeof t.prompt == "string" && (this._prompt = t.prompt), t.terminal !== void 0 && (this.terminal = !!t.terminal)));
21548
21642
  };
21549
- Object.setPrototypeOf(Wn.prototype, Q.prototype), Wn.prototype.setPrompt = function(t) {
21643
+ Object.setPrototypeOf(Wn.prototype, ee.prototype), Wn.prototype.setPrompt = function(t) {
21550
21644
  this._prompt = t;
21551
21645
  }, Wn.prototype.getPrompt = function() {
21552
21646
  return this._prompt;
@@ -21736,7 +21830,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
21736
21830
  }, Symbol.toStringTag, {
21737
21831
  value: "Module"
21738
21832
  }));
21739
- const Ae = 0, aC = 2, We = 8, qb = 20, Eu = 28, Gb = 29, oC = 31, ku = 44, St = 52, lC = 54, cC = 55, uC = 70, Kb = 0, Yb = 1, Zb = 2, Xb = 3, Cu = 0, Oo = 3, No = 4, Jb = 7, Au = 1, dC = 1, hC = 2, pC = 4, fC = 8, mC = 0, gC = 1, yC = 2, _C = 0, Tu = 0x0000000000000002n, Iu = 0x0000000000000040n, bC = 0x0000000000000004n, vC = 0x0000000000000020n, wC = 0x0000000000004000n, SC = 0x0000000000002000n, xC = 0x0000000000000200n, EC = 0x0000000000000400n, kC = 0x0000000004000000n, CC = 0x0000000002000000n, AC = 0x0000000000010000n, TC = 0x0000000000020000n, IC = 0x0000000000040000n, PC = 0x0000000001000000n, RC = 0x0000000000008000n, Qb = 0x0000000000200000n, DC = 0x0000000000400000n, OC = 0x1fffffffn, ev = Tu | wC | SC | xC | EC | kC | CC | AC | TC | IC | PC | RC | Qb, NC = Tu | Iu | bC | vC | Qb | DC, BC = 1, LC = 2;
21833
+ const Ae = 0, aC = 2, ze = 8, qb = 20, Eu = 28, Gb = 29, oC = 31, ku = 44, St = 52, lC = 54, cC = 55, uC = 70, Kb = 0, Yb = 1, Zb = 2, Xb = 3, Cu = 0, Oo = 3, No = 4, Jb = 7, Au = 1, dC = 1, hC = 2, pC = 4, fC = 8, mC = 0, gC = 1, yC = 2, _C = 0, Tu = 0x0000000000000002n, Iu = 0x0000000000000040n, bC = 0x0000000000000004n, vC = 0x0000000000000020n, wC = 0x0000000000004000n, SC = 0x0000000000002000n, xC = 0x0000000000000200n, EC = 0x0000000000000400n, kC = 0x0000000004000000n, CC = 0x0000000002000000n, AC = 0x0000000000010000n, TC = 0x0000000000020000n, IC = 0x0000000000040000n, PC = 0x0000000001000000n, RC = 0x0000000000008000n, Qb = 0x0000000000200000n, DC = 0x0000000000400000n, OC = 0x1fffffffn, ev = Tu | wC | SC | xC | EC | kC | CC | AC | TC | IC | PC | RC | Qb, NC = Tu | Iu | bC | vC | Qb | DC, BC = 1, LC = 2;
21740
21834
  class Bo extends Error {
21741
21835
  constructor(t) {
21742
21836
  super(`WASI exit(${t})`), H(this, "code"), this.code = t;
@@ -21889,15 +21983,15 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
21889
21983
  fd_allocate: ve((I, D, M) => St),
21890
21984
  fd_close: ve((I) => {
21891
21985
  const D = p.get(I);
21892
- return D ? (D.kind === 4 && z(D), p.delete(I), Ae) : We;
21986
+ return D ? (D.kind === 4 && z(D), p.delete(I), Ae) : ze;
21893
21987
  }),
21894
21988
  fd_datasync: ve((I) => {
21895
21989
  const D = p.get(I);
21896
- return D ? (D.kind === 4 && z(D), Ae) : We;
21990
+ return D ? (D.kind === 4 && z(D), Ae) : ze;
21897
21991
  }),
21898
21992
  fd_fdstat_get: ve((I, D) => {
21899
21993
  const M = p.get(I);
21900
- if (!M) return We;
21994
+ if (!M) return ze;
21901
21995
  const $ = T();
21902
21996
  let O = Cu, X = 0, le = M.rights, oe = 0n;
21903
21997
  switch (M.kind) {
@@ -21919,7 +22013,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
21919
22013
  fd_fdstat_set_rights: ve((I, D, M) => St),
21920
22014
  fd_filestat_get: ve((I, D) => {
21921
22015
  const M = p.get(I);
21922
- if (!M) return We;
22016
+ if (!M) return ze;
21923
22017
  const $ = T();
21924
22018
  let O = 0n, X = Cu, le = 0n, oe = 0n, pe = 0n, ge = 0n, Ue = 1n;
21925
22019
  if (M.kind === 4) {
@@ -21934,7 +22028,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
21934
22028
  }),
21935
22029
  fd_filestat_set_size: ve((I, D) => {
21936
22030
  const M = p.get(I);
21937
- if (!M || M.kind !== 4) return We;
22031
+ if (!M || M.kind !== 4) return ze;
21938
22032
  const $ = Number(D);
21939
22033
  if (!M.data)
21940
22034
  M.data = new Uint8Array($);
@@ -21947,7 +22041,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
21947
22041
  fd_filestat_set_times: ve((I, D, M, $) => Ae),
21948
22042
  fd_pread: ve((I, D, M, $, O) => {
21949
22043
  const X = p.get(I);
21950
- if (!X || X.kind !== 4) return We;
22044
+ if (!X || X.kind !== 4) return ze;
21951
22045
  if (!X.data)
21952
22046
  return T().setUint32(O, 0, !0), Ae;
21953
22047
  const le = T();
@@ -21961,23 +22055,23 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
21961
22055
  }),
21962
22056
  fd_prestat_get: ve((I, D) => {
21963
22057
  const M = p.get(I);
21964
- if (!M || M.kind !== 3) return We;
22058
+ if (!M || M.kind !== 3) return ze;
21965
22059
  const $ = g.find((le) => le.fd === I);
21966
- if (!$) return We;
22060
+ if (!$) return ze;
21967
22061
  const O = T(), X = ks.encode($.virtualPath).length;
21968
22062
  return O.setUint8(D, _C), O.setUint32(D + 4, X, !0), Ae;
21969
22063
  }),
21970
22064
  fd_prestat_dir_name: ve((I, D, M) => {
21971
22065
  const $ = p.get(I);
21972
- if (!$ || $.kind !== 3) return We;
22066
+ if (!$ || $.kind !== 3) return ze;
21973
22067
  const O = g.find((oe) => oe.fd === I);
21974
- if (!O) return We;
22068
+ if (!O) return ze;
21975
22069
  const X = ks.encode(O.virtualPath), le = Math.min(X.length, M);
21976
22070
  return N().set(X.subarray(0, le), D), Ae;
21977
22071
  }),
21978
22072
  fd_pwrite: ve((I, D, M, $, O) => {
21979
22073
  const X = p.get(I);
21980
- if (!X || X.kind !== 4) return We;
22074
+ if (!X || X.kind !== 4) return ze;
21981
22075
  const le = T();
21982
22076
  let oe = Number($), pe = 0;
21983
22077
  for (let ge = 0; ge < M; ge++) {
@@ -21992,11 +22086,11 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
21992
22086
  }),
21993
22087
  fd_read: ve((I, D, M, $) => {
21994
22088
  const O = p.get(I);
21995
- if (!O) return We;
22089
+ if (!O) return ze;
21996
22090
  const X = T();
21997
22091
  if (O.kind === 0)
21998
22092
  return X.setUint32($, 0, !0), Ae;
21999
- if (O.kind !== 4) return We;
22093
+ if (O.kind !== 4) return ze;
22000
22094
  if (!O.data)
22001
22095
  return X.setUint32($, 0, !0), Ae;
22002
22096
  let le = 0, oe = O.offset ?? 0;
@@ -22009,7 +22103,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
22009
22103
  }),
22010
22104
  fd_readdir: ve((I, D, M, $, O) => {
22011
22105
  const X = p.get(I);
22012
- if (!X || X.kind !== 3 && X.kind !== 4) return We;
22106
+ if (!X || X.kind !== 3 && X.kind !== 4) return ze;
22013
22107
  if (!d) return St;
22014
22108
  let le;
22015
22109
  try {
@@ -22038,7 +22132,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
22038
22132
  }),
22039
22133
  fd_renumber: ve((I, D) => {
22040
22134
  const M = p.get(I);
22041
- if (!M) return We;
22135
+ if (!M) return ze;
22042
22136
  if (p.has(D)) {
22043
22137
  const $ = p.get(D);
22044
22138
  $.kind === 4 && z($);
@@ -22047,10 +22141,10 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
22047
22141
  }),
22048
22142
  fd_seek: ve((I, D, M, $) => {
22049
22143
  const O = p.get(I);
22050
- if (!O) return We;
22144
+ if (!O) return ze;
22051
22145
  if (O.kind === 0 || O.kind === 1 || O.kind === 2)
22052
22146
  return uC;
22053
- if (O.kind === 3) return We;
22147
+ if (O.kind === 3) return ze;
22054
22148
  const X = O.data ? O.data.length : 0;
22055
22149
  let le = O.offset ?? 0;
22056
22150
  const oe = Number(D);
@@ -22071,15 +22165,15 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
22071
22165
  }),
22072
22166
  fd_sync: ve((I) => {
22073
22167
  const D = p.get(I);
22074
- return D ? (D.kind === 4 && z(D), Ae) : We;
22168
+ return D ? (D.kind === 4 && z(D), Ae) : ze;
22075
22169
  }),
22076
22170
  fd_tell: ve((I, D) => {
22077
22171
  const M = p.get(I);
22078
- return !M || M.kind !== 4 ? We : (T().setBigUint64(D, BigInt(M.offset ?? 0), !0), Ae);
22172
+ return !M || M.kind !== 4 ? ze : (T().setBigUint64(D, BigInt(M.offset ?? 0), !0), Ae);
22079
22173
  }),
22080
22174
  fd_write: ve((I, D, M, $) => {
22081
22175
  const O = p.get(I);
22082
- if (!O) return We;
22176
+ if (!O) return ze;
22083
22177
  const X = T();
22084
22178
  if (O.kind === 1 || O.kind === 2) {
22085
22179
  let pe = 0;
@@ -22089,7 +22183,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
22089
22183
  }
22090
22184
  return X.setUint32($, pe, !0), Ae;
22091
22185
  }
22092
- if (O.kind !== 4) return We;
22186
+ if (O.kind !== 4) return ze;
22093
22187
  let le = 0, oe = O.flags && O.flags & Au ? O.data ? O.data.length : 0 : O.offset ?? 0;
22094
22188
  for (let pe = 0; pe < M; pe++) {
22095
22189
  const ge = X.getUint32(D + pe * 8, !0), Ue = X.getUint32(D + pe * 8 + 4, !0), Te = new Uint8Array(C().buffer, ge, Ue), dt = oe + Ue;
@@ -22104,7 +22198,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
22104
22198
  path_create_directory: ve((I, D, M) => {
22105
22199
  if (!d) return St;
22106
22200
  const $ = p.get(I);
22107
- if (!$) return We;
22201
+ if (!$) return ze;
22108
22202
  const O = Y(D, M), X = zn($.path, O);
22109
22203
  return d.mkdirSync(X, {
22110
22204
  recursive: !0
@@ -22113,7 +22207,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
22113
22207
  path_filestat_get: ve((I, D, M, $, O) => {
22114
22208
  if (!d) return St;
22115
22209
  const X = p.get(I);
22116
- if (!X) return We;
22210
+ if (!X) return ze;
22117
22211
  const le = Y(M, $), oe = zn(X.path, le), pe = d.statSync(oe), ge = T();
22118
22212
  let Ue = No;
22119
22213
  pe.isDirectory() ? Ue = Oo : pe.isSymbolicLink() && (Ue = Jb);
@@ -22125,7 +22219,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
22125
22219
  path_open: ve((I, D, M, $, O, X, le, oe, pe) => {
22126
22220
  if (!d) return St;
22127
22221
  const ge = p.get(I);
22128
- if (!ge) return We;
22222
+ if (!ge) return ze;
22129
22223
  const Ue = Y(M, $), Te = zn(ge.path, Ue), dt = (O & hC) !== 0, It = (O & dC) !== 0, os = (O & pC) !== 0, Xr = (O & fC) !== 0;
22130
22224
  let ls = d.existsSync(Te);
22131
22225
  if (os && ls) return qb;
@@ -22171,35 +22265,35 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
22171
22265
  path_readlink: ve((I, D, M, $, O, X) => {
22172
22266
  if (!d || !d.readlinkSync) return St;
22173
22267
  const le = p.get(I);
22174
- if (!le) return We;
22268
+ if (!le) return ze;
22175
22269
  const oe = Y(D, M), pe = zn(le.path, oe), ge = d.readlinkSync(pe), Ue = ks.encode(ge), Te = Math.min(Ue.length, O);
22176
22270
  return N().set(Ue.subarray(0, Te), $), T().setUint32(X, Te, !0), Ae;
22177
22271
  }),
22178
22272
  path_remove_directory: ve((I, D, M) => {
22179
22273
  if (!d) return St;
22180
22274
  const $ = p.get(I);
22181
- if (!$) return We;
22275
+ if (!$) return ze;
22182
22276
  const O = Y(D, M), X = zn($.path, O);
22183
22277
  return d.rmdirSync(X), Ae;
22184
22278
  }),
22185
22279
  path_rename: ve((I, D, M, $, O, X) => {
22186
22280
  if (!d) return St;
22187
22281
  const le = p.get(I), oe = p.get($);
22188
- if (!le || !oe) return We;
22282
+ if (!le || !oe) return ze;
22189
22283
  const pe = Y(D, M), ge = Y(O, X), Ue = zn(le.path, pe), Te = zn(oe.path, ge);
22190
22284
  return d.renameSync(Ue, Te), Ae;
22191
22285
  }),
22192
22286
  path_symlink: ve((I, D, M, $, O) => {
22193
22287
  if (!d || !d.symlinkSync) return St;
22194
22288
  const X = p.get(M);
22195
- if (!X) return We;
22289
+ if (!X) return ze;
22196
22290
  const le = Y(I, D), oe = Y($, O), pe = zn(X.path, oe);
22197
22291
  return d.symlinkSync(le, pe), Ae;
22198
22292
  }),
22199
22293
  path_unlink_file: ve((I, D, M) => {
22200
22294
  if (!d) return St;
22201
22295
  const $ = p.get(I);
22202
- if (!$) return We;
22296
+ if (!$) return ze;
22203
22297
  const O = Y(D, M), X = zn($.path, O);
22204
22298
  return d.unlinkSync(X), Ae;
22205
22299
  }),
@@ -22225,8 +22319,8 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
22225
22319
  sock_send: ve(() => St),
22226
22320
  sock_shutdown: ve(() => St),
22227
22321
  sock_accept: ve(() => St)
22228
- }, J = this;
22229
- J.wasiImport = F, J.start = function(D) {
22322
+ }, Q = this;
22323
+ Q.wasiImport = F, Q.start = function(D) {
22230
22324
  E = D, x = D.exports.memory;
22231
22325
  const M = D.exports._start;
22232
22326
  if (typeof M != "function")
@@ -22243,11 +22337,11 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
22243
22337
  j && (console.log(j), j = ""), q && (console.error(q), q = "");
22244
22338
  }
22245
22339
  return 0;
22246
- }, J.initialize = function(D) {
22340
+ }, Q.initialize = function(D) {
22247
22341
  E = D, x = D.exports.memory;
22248
22342
  const M = D.exports._initialize;
22249
22343
  typeof M == "function" && M();
22250
- }, J.getImportObject = function() {
22344
+ }, Q.getImportObject = function() {
22251
22345
  return {
22252
22346
  wasi_snapshot_preview1: F
22253
22347
  };
@@ -22324,9 +22418,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
22324
22418
  value: "Module"
22325
22419
  }));
22326
22420
  const Wr = function(t) {
22327
- this && Q.call(this);
22421
+ this && ee.call(this);
22328
22422
  };
22329
- Object.setPrototypeOf(Wr.prototype, Q.prototype), Wr.prototype.close = function() {
22423
+ Object.setPrototypeOf(Wr.prototype, ee.prototype), Wr.prototype.close = function() {
22330
22424
  this.emit("close");
22331
22425
  }, Wr.prototype.destroy = function(t) {
22332
22426
  this.emit("close");
@@ -22341,9 +22435,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
22341
22435
  configurable: !0
22342
22436
  });
22343
22437
  const zr = function() {
22344
- this && Q.call(this);
22438
+ this && ee.call(this);
22345
22439
  };
22346
- Object.setPrototypeOf(zr.prototype, Q.prototype), zr.prototype.close = function() {
22440
+ Object.setPrototypeOf(zr.prototype, ee.prototype), zr.prototype.close = function() {
22347
22441
  this.emit("close");
22348
22442
  }, zr.prototype.destroy = function(t) {
22349
22443
  this.emit("close");
@@ -22354,9 +22448,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
22354
22448
  configurable: !0
22355
22449
  });
22356
22450
  const Lo = function() {
22357
- this && Q.call(this);
22451
+ this && ee.call(this);
22358
22452
  };
22359
- Object.setPrototypeOf(Lo.prototype, Q.prototype), Object.defineProperty(Lo.prototype, "id", {
22453
+ Object.setPrototypeOf(Lo.prototype, ee.prototype), Object.defineProperty(Lo.prototype, "id", {
22360
22454
  get: function() {
22361
22455
  return 0;
22362
22456
  },
@@ -23249,7 +23343,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
23249
23343
  function JC() {
23250
23344
  return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
23251
23345
  }
23252
- O0 = class extends Q {
23346
+ O0 = class extends ee {
23253
23347
  constructor(e, t) {
23254
23348
  super(), H(this, "pid"), H(this, "worker"), H(this, "command"), H(this, "args"), H(this, "parentPid"), H(this, "_state", "starting"), H(this, "_exitCode"), H(this, "_stdout", ""), H(this, "_stderr", ""), H(this, "_exitHoldCount", 0), H(this, "_deferredExit", null), H(this, "_shellDoneHoldCount", 0), H(this, "_deferredShellDone", null), H(this, "_syncBlockedCount", 0), this.pid = t.snapshot ? Math.floor(Math.random() * 9e4) + 1e4 : 0, this.worker = e, this.command = t.command, this.args = t.args, this.parentPid = t.parentPid, this._setupWorkerListeners();
23255
23349
  }
@@ -69777,7 +69871,7 @@ comlink/dist/esm/comlink.mjs:
69777
69871
  }
69778
69872
  };
69779
69873
  const Fu = 10, Pv = 50;
69780
- xa = (a = class extends Q {
69874
+ xa = (a = class extends ee {
69781
69875
  constructor(e) {
69782
69876
  super(), H(this, "_processes", /* @__PURE__ */ new Map()), H(this, "_nextPid", 100), H(this, "_volume"), H(this, "_vfsBridge", null), H(this, "_sharedBuffer", null), H(this, "_syncBuffer", null), H(this, "_serverPorts", /* @__PURE__ */ new Map()), H(this, "_childPids", /* @__PURE__ */ new Map()), H(this, "_httpCallbacks", /* @__PURE__ */ new Map()), H(this, "_nextHttpRequestId", 1), this._volume = e;
69783
69877
  }
@@ -70719,8 +70813,8 @@ comlink/dist/esm/comlink.mjs:
70719
70813
  const q = {};
70720
70814
  if (j.peerDependencies) {
70721
70815
  const z = j.peerDependenciesMeta || {};
70722
- for (const [F, J] of Object.entries(j.peerDependencies))
70723
- (r = z[F]) != null && r.optional || (q[F] = J);
70816
+ for (const [F, Q] of Object.entries(j.peerDependencies))
70817
+ (r = z[F]) != null && r.optional || (q[F] = Q);
70724
70818
  }
70725
70819
  if (j.dependencies && Object.assign(q, j.dependencies), j.optionalDependencies)
70726
70820
  if (p.optionalDependencies)
@@ -70731,7 +70825,7 @@ comlink/dist/esm/comlink.mjs:
70731
70825
  const Z = Object.entries(q), Y = 8;
70732
70826
  for (let z = 0; z < Z.length; z += Y) {
70733
70827
  const F = Z.slice(z, z + Y);
70734
- await Promise.all(F.map(([J, I]) => Uu(J, I, n)));
70828
+ await Promise.all(F.map(([Q, I]) => Uu(Q, I, n)));
70735
70829
  }
70736
70830
  } finally {
70737
70831
  d.delete(E);
@@ -71956,7 +72050,7 @@ miniExpose(endpoint);
71956
72050
  value: "Module"
71957
72051
  }));
71958
72052
  const LA = new TextEncoder();
71959
- fd = (i = class extends Q {
72053
+ fd = (i = class extends ee {
71960
72054
  constructor(e = {}) {
71961
72055
  super(), H(this, "registry", /* @__PURE__ */ new Map()), H(this, "baseUrl"), H(this, "opts"), H(this, "channel", null), H(this, "swReady", !1), H(this, "heartbeat", null), H(this, "_processManager", null), H(this, "_workerWsConns", /* @__PURE__ */ new Map()), H(this, "_previewScript", null), H(this, "_swAuthToken", null), H(this, "_wsBridgeToken", null), H(this, "_wsBridge", null), H(this, "_wsConns", /* @__PURE__ */ new Map()), this.opts = e, this.baseUrl = typeof location < "u" ? e.baseUrl || `${location.protocol}//${location.host}` : e.baseUrl || "http://localhost", Ti((t, n) => this.register(n, t)), Ii((t) => this.unregister(t));
71962
72056
  }
@@ -72117,9 +72211,9 @@ miniExpose(endpoint);
72117
72211
  try {
72118
72212
  const Z = new URL(C);
72119
72213
  if (!(Z.hostname === "localhost" || Z.hostname === "127.0.0.1" || Z.hostname === "0.0.0.0")) {
72120
- const z = await fetch(C), F = await z.arrayBuffer(), J = {};
72214
+ const z = await fetch(C), F = await z.arrayBuffer(), Q = {};
72121
72215
  z.headers.forEach((D, M) => {
72122
- J[M] = D;
72216
+ Q[M] = D;
72123
72217
  });
72124
72218
  const I = F.byteLength > 0 ? h(new Uint8Array(F)) : "";
72125
72219
  (t = this.channel) == null || t.port1.postMessage({
@@ -72128,7 +72222,7 @@ miniExpose(endpoint);
72128
72222
  data: {
72129
72223
  statusCode: z.status,
72130
72224
  statusMessage: z.statusText || "OK",
72131
- headers: J,
72225
+ headers: Q,
72132
72226
  bodyBase64: I
72133
72227
  }
72134
72228
  });
@@ -72496,7 +72590,7 @@ miniExpose(endpoint);
72496
72590
  }
72497
72591
  this._vol.rmdirSync(e);
72498
72592
  }
72499
- }, H0 = class extends Q {
72593
+ }, H0 = class extends ee {
72500
72594
  constructor(e = 4194304) {
72501
72595
  super(), H(this, "_abortController", new AbortController()), H(this, "_resolve"), H(this, "_stdout", ""), H(this, "_stderr", ""), H(this, "_exitCode", null), H(this, "_sendStdinFn", null), H(this, "_killFn", null), H(this, "_maxOutputBytes"), H(this, "completion"), this._maxOutputBytes = e, this.completion = new Promise((t) => {
72502
72596
  this._resolve = t;
@@ -73007,8 +73101,8 @@ miniExpose(endpoint);
73007
73101
  persistent: !0
73008
73102
  }), q = !0, new Promise((z) => {
73009
73103
  const F = () => {
73010
- j.removeListener("shell-done", J), j.removeListener("exit", I), j.removeListener("stdout", Z), j.removeListener("stderr", Y);
73011
- }, J = (D, M, $) => {
73104
+ j.removeListener("shell-done", Q), j.removeListener("exit", I), j.removeListener("stdout", Z), j.removeListener("stderr", Y);
73105
+ }, Q = (D, M, $) => {
73012
73106
  F();
73013
73107
  const O = E !== r;
73014
73108
  O || (s = null);
@@ -73031,7 +73125,7 @@ miniExpose(endpoint);
73031
73125
  n === x && (n = null), !X && !O && (T || t.write(`\r
73032
73126
  `), t._setRunning(!1), t._writePrompt()), z();
73033
73127
  };
73034
- j.on("shell-done", J), j.on("exit", I);
73128
+ j.on("shell-done", Q), j.on("exit", I);
73035
73129
  });
73036
73130
  },
73037
73131
  getSendStdin: () => s,
@@ -73104,7 +73198,7 @@ miniExpose(endpoint);
73104
73198
  ])), l);
73105
73199
  })();
73106
73200
  const ft = "[CodeSandbox:Runtime]";
73107
- class MO {
73201
+ class UO {
73108
73202
  constructor(i) {
73109
73203
  this.nodepod = null, this.serverProcess = null, this.originalFiles = {}, this.currentFiles = {}, this.terminalOutput = [], this.status = "initializing", this.error = null, this.previewUrl = null, this.errors = [], this.errorIdCounter = 0, this.onProgress = null, this.onOutput = null, this.onServerReady = null, this.onSandboxError = null, this.config = {
73110
73204
  workdir: "/app",
@@ -73582,7 +73676,7 @@ Process exited with code ${f}`), f !== 0 && this.status !== "ready" && (this.err
73582
73676
  `);
73583
73677
  }
73584
73678
  }
73585
- const FO = `# .ranger — Project Manifest
73679
+ const jO = `# .ranger — Project Manifest
73586
73680
  # This file provides context to the Ranger AI agent about project structure,
73587
73681
  # conventions, and schemas. Update this file when you add new files, routes,
73588
73682
  # or database tables.
@@ -73717,7 +73811,7 @@ To deploy to production with Postgres:
73717
73811
  4. Replace TEXT for timestamps → TIMESTAMP WITH TIME ZONE
73718
73812
  5. Add connection pooling config to config.js
73719
73813
  6. Everything else (repos, routes, middleware) stays the same
73720
- `, $O = `# =============================================================================
73814
+ `, VO = `# =============================================================================
73721
73815
  # Environment Configuration
73722
73816
  # Copy to .env and fill in values for your deployment
73723
73817
  # =============================================================================
@@ -73737,7 +73831,7 @@ JWT_EXPIRES_IN=24h
73737
73831
 
73738
73832
  # CORS
73739
73833
  CORS_ORIGIN=*
73740
- `, UO = `/**
73834
+ `, HO = `/**
73741
73835
  * config.js — Centralized configuration.
73742
73836
  *
73743
73837
  * Reads from process.env with sensible defaults for the sandbox.
@@ -73753,7 +73847,7 @@ var config = {
73753
73847
  };
73754
73848
 
73755
73849
  module.exports = config;
73756
- `, jO = `/**
73850
+ `, WO = `/**
73757
73851
  * db/database.js — SQLite database via sql.js (WASM).
73758
73852
  *
73759
73853
  * Provides a Postgres-compatible interface:
@@ -73933,7 +74027,7 @@ module.exports = {
73933
74027
  exec: exec,
73934
74028
  lastInsertRowId: lastInsertRowId,
73935
74029
  };
73936
- `, VO = `/**
74030
+ `, zO = `/**
73937
74031
  * Migration 001 — Initial schema.
73938
74032
  *
73939
74033
  * Creates the core tables with proper types, constraints, and indexes.
@@ -74000,7 +74094,7 @@ module.exports = [
74000
74094
  \`,
74001
74095
  },
74002
74096
  ];
74003
- `, HO = `/**
74097
+ `, qO = `/**
74004
74098
  * db/repositories/userRepository.js — User data access layer.
74005
74099
  *
74006
74100
  * All database queries for the users table. Uses parameterized SQL.
@@ -74092,7 +74186,7 @@ module.exports = {
74092
74186
  findAll: findAll,
74093
74187
  count: count,
74094
74188
  };
74095
- `, WO = `/**
74189
+ `, GO = `/**
74096
74190
  * db/repositories/itemRepository.js — Item data access layer.
74097
74191
  *
74098
74192
  * All database queries for the items table. Uses parameterized SQL.
@@ -74233,7 +74327,7 @@ module.exports = {
74233
74327
  remove: remove,
74234
74328
  getStats: getStats,
74235
74329
  };
74236
- `, zO = `/**
74330
+ `, KO = `/**
74237
74331
  * middleware/auth.js — JWT authentication.
74238
74332
  *
74239
74333
  * In the sandbox, JWT is a base64-encoded JSON payload (no crypto).
@@ -74346,7 +74440,7 @@ module.exports = {
74346
74440
  authenticate: authenticate,
74347
74441
  requireRole: requireRole,
74348
74442
  };
74349
- `, qO = `/**
74443
+ `, YO = `/**
74350
74444
  * middleware/errorHandler.js — Global error handling.
74351
74445
  *
74352
74446
  * - notFound: 404 handler that serves index.html for SPA routes
@@ -74394,7 +74488,7 @@ module.exports = {
74394
74488
  notFound: notFound,
74395
74489
  errorHandler: errorHandler,
74396
74490
  };
74397
- `, GO = `/**
74491
+ `, ZO = `/**
74398
74492
  * middleware/staticFiles.js — Static file serving for Nodepod.
74399
74493
  *
74400
74494
  * Nodepod doesn't support express.static() or res.sendFile().
@@ -74452,7 +74546,7 @@ function serveStatic(req, res, next) {
74452
74546
  }
74453
74547
 
74454
74548
  module.exports = serveStatic;
74455
- `, KO = `/**
74549
+ `, XO = `/**
74456
74550
  * middleware/validate.js — Request validation helpers.
74457
74551
  *
74458
74552
  * Simple validation middleware factory. For production, consider
@@ -74503,7 +74597,7 @@ module.exports = {
74503
74597
  requireFields: requireFields,
74504
74598
  allowedValues: allowedValues,
74505
74599
  };
74506
- `, YO = `/**
74600
+ `, JO = `/**
74507
74601
  * routes/auth.js — Authentication endpoints.
74508
74602
  *
74509
74603
  * POST /api/auth/register — Create new account
@@ -74604,7 +74698,7 @@ router.get('/me', auth.authenticate, function(req, res) {
74604
74698
  });
74605
74699
 
74606
74700
  module.exports = router;
74607
- `, ZO = `/**
74701
+ `, QO = `/**
74608
74702
  * routes/items.js — Item CRUD endpoints.
74609
74703
  *
74610
74704
  * All routes require authentication (JWT).
@@ -74749,7 +74843,7 @@ router.delete('/:id', function(req, res) {
74749
74843
  });
74750
74844
 
74751
74845
  module.exports = router;
74752
- `, XO = `/**
74846
+ `, eN = `/**
74753
74847
  * server.js — Express application entry point.
74754
74848
  *
74755
74849
  * Middleware chain:
@@ -74837,7 +74931,7 @@ db.initialize().then(function() {
74837
74931
  console.error('[FATAL] Failed to initialize database:', err && err.message ? err.message : err);
74838
74932
  console.error('[FATAL] Stack:', err && err.stack ? err.stack : 'no stack');
74839
74933
  });
74840
- `, JO = `<!DOCTYPE html>
74934
+ `, tN = `<!DOCTYPE html>
74841
74935
  <html lang="en">
74842
74936
  <head>
74843
74937
  <meta charset="UTF-8">
@@ -74889,7 +74983,7 @@ db.initialize().then(function() {
74889
74983
  <!-- App (must be last) -->
74890
74984
  <script src="/App.js"><\/script>
74891
74985
  </body>
74892
- </html>`, QO = `/*
74986
+ </html>`, nN = `/*
74893
74987
  * Ranger Theme Variables — chart colors and design tokens.
74894
74988
  * HSL values stored WITHOUT hsl() wrapper; consume as: color: hsl(var(--chart-1));
74895
74989
  */
@@ -74994,7 +75088,7 @@ db.initialize().then(function() {
74994
75088
  from { opacity: 0; transform: translateY(-16px) scale(0.95); }
74995
75089
  to { opacity: 1; transform: translateY(0) scale(1); }
74996
75090
  }
74997
- `, eN = `/**
75091
+ `, sN = `/**
74998
75092
  * lib/api.js — API client.
74999
75093
  *
75000
75094
  * Wraps fetch() with:
@@ -75060,7 +75154,7 @@ window.ApiClient = (function() {
75060
75154
  del: function(path) { return request(path, { method: 'DELETE' }); },
75061
75155
  };
75062
75156
  })();
75063
- `, tN = `/**
75157
+ `, rN = `/**
75064
75158
  * store/AuthContext.js — Authentication state management.
75065
75159
  *
75066
75160
  * Provides:
@@ -75197,7 +75291,7 @@ window.useAuth = function useAuth() {
75197
75291
  if (!context) throw new Error('useAuth must be used within AuthProvider');
75198
75292
  return context;
75199
75293
  };
75200
- `, nN = `/**
75294
+ `, iN = `/**
75201
75295
  * store/AppContext.js — Application state management.
75202
75296
  *
75203
75297
  * Manages items, loading states, filters, and toasts.
@@ -75382,7 +75476,7 @@ window.useApp = function useApp() {
75382
75476
  if (!context) throw new Error('useApp must be used within AppProvider');
75383
75477
  return context;
75384
75478
  };
75385
- `, sN = `var h = React.createElement;
75479
+ `, aN = `var h = React.createElement;
75386
75480
 
75387
75481
  /**
75388
75482
  * Toast — Notification toast displayed at top-right.
@@ -75407,7 +75501,7 @@ window.Toast = function Toast(props) {
75407
75501
  })
75408
75502
  );
75409
75503
  };
75410
- `, rN = `var h = React.createElement;
75504
+ `, oN = `var h = React.createElement;
75411
75505
  var RR = ReactRouterDOM;
75412
75506
 
75413
75507
  /**
@@ -75463,7 +75557,7 @@ window.Navbar = function Navbar() {
75463
75557
  )
75464
75558
  );
75465
75559
  };
75466
- `, iN = `var h = React.createElement;
75560
+ `, lN = `var h = React.createElement;
75467
75561
 
75468
75562
  var STATUS_STYLES = {
75469
75563
  todo: { bg: 'bg-gray-100', text: 'text-gray-600', label: 'To Do' },
@@ -75521,7 +75615,7 @@ window.ItemCard = function ItemCard(props) {
75521
75615
  )
75522
75616
  );
75523
75617
  };
75524
- `, aN = `var h = React.createElement;
75618
+ `, cN = `var h = React.createElement;
75525
75619
 
75526
75620
  /**
75527
75621
  * ItemForm — Create or edit an item.
@@ -75634,7 +75728,7 @@ window.ItemForm = function ItemForm(props) {
75634
75728
  )
75635
75729
  );
75636
75730
  };
75637
- `, oN = `var h = React.createElement;
75731
+ `, uN = `var h = React.createElement;
75638
75732
  var RR = ReactRouterDOM;
75639
75733
 
75640
75734
  /**
@@ -75726,7 +75820,7 @@ function _featureCard(title, desc, icon) {
75726
75820
  h('p', { className: 'text-sm text-gray-500' }, desc)
75727
75821
  );
75728
75822
  }
75729
- `, lN = `var h = React.createElement;
75823
+ `, dN = `var h = React.createElement;
75730
75824
  var RR = ReactRouterDOM;
75731
75825
 
75732
75826
  /**
@@ -75808,7 +75902,7 @@ window.LoginPage = function LoginPage() {
75808
75902
  )
75809
75903
  );
75810
75904
  };
75811
- `, cN = `var h = React.createElement;
75905
+ `, hN = `var h = React.createElement;
75812
75906
  var RR = ReactRouterDOM;
75813
75907
 
75814
75908
  /**
@@ -75902,7 +75996,7 @@ window.RegisterPage = function RegisterPage() {
75902
75996
  )
75903
75997
  );
75904
75998
  };
75905
- `, uN = `var h = React.createElement;
75999
+ `, pN = `var h = React.createElement;
75906
76000
 
75907
76001
  /**
75908
76002
  * StatsChart — Renders a doughnut chart of item status distribution
@@ -76021,7 +76115,7 @@ window.StatsChart = function StatsChart(props) {
76021
76115
  )
76022
76116
  );
76023
76117
  };
76024
- `, dN = `var h = React.createElement;
76118
+ `, fN = `var h = React.createElement;
76025
76119
  var RR = ReactRouterDOM;
76026
76120
 
76027
76121
  /**
@@ -76179,7 +76273,7 @@ function _filterSelect(label, value, options, onChange) {
76179
76273
  })
76180
76274
  );
76181
76275
  }
76182
- `, hN = `var h = React.createElement;
76276
+ `, mN = `var h = React.createElement;
76183
76277
  var RR = ReactRouterDOM;
76184
76278
 
76185
76279
  /**
@@ -76259,7 +76353,7 @@ function App() {
76259
76353
 
76260
76354
  // Mount
76261
76355
  ReactDOM.createRoot(document.getElementById('root')).render(h(App));
76262
- `, pN = `# ===========================================================================
76356
+ `, gN = `# ===========================================================================
76263
76357
  # Dockerfile — Production-ready multi-stage build
76264
76358
  #
76265
76359
  # Supports two modes:
@@ -76326,7 +76420,7 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \\
76326
76420
  CMD wget -qO- http://localhost:3000/api/health || exit 1
76327
76421
 
76328
76422
  CMD ["node", "server.js"]
76329
- `, fN = `node_modules
76423
+ `, yN = `node_modules
76330
76424
  npm-debug.log*
76331
76425
  .env
76332
76426
  .env.local
@@ -76336,7 +76430,7 @@ npm-debug.log*
76336
76430
  .DS_Store
76337
76431
  *.md
76338
76432
  !README.md
76339
- `, mN = `# docker-compose.yml — Local development and production deployment
76433
+ `, _N = `# docker-compose.yml — Local development and production deployment
76340
76434
  #
76341
76435
  # Usage:
76342
76436
  # SQLite (default): docker compose up
@@ -76387,7 +76481,7 @@ services:
76387
76481
  volumes:
76388
76482
  app-data:
76389
76483
  pg-data:
76390
- `, gN = `# Starter App
76484
+ `, bN = `# Starter App
76391
76485
 
76392
76486
  A production-ready full-stack application built with **Express.js** and **React**.
76393
76487
 
@@ -76618,7 +76712,7 @@ code changes** in your route/repository layer.
76618
76712
  ## License
76619
76713
 
76620
76714
  MIT
76621
- `, yN = `# Contributing
76715
+ `, vN = `# Contributing
76622
76716
 
76623
76717
  Thank you for considering contributing to this project.
76624
76718
 
@@ -76778,7 +76872,7 @@ When adding new features:
76778
76872
  - [ ] New files are listed in \`.ranger\` manifest
76779
76873
  - [ ] Tests pass locally
76780
76874
  - [ ] No hardcoded secrets or credentials
76781
- `, _N = JSON.stringify(
76875
+ `, wN = JSON.stringify(
76782
76876
  {
76783
76877
  name: "starter-app",
76784
76878
  version: "1.0.0",
@@ -76798,47 +76892,47 @@ When adding new features:
76798
76892
  },
76799
76893
  null,
76800
76894
  2
76801
- ), bN = {
76895
+ ), SN = {
76802
76896
  entryCommand: "node server.js",
76803
76897
  port: 3e3,
76804
76898
  files: {
76805
- ".ranger": FO,
76806
- "package.json": _N,
76807
- ".env.example": $O,
76808
- "config.js": UO,
76809
- "server.js": XO,
76810
- Dockerfile: pN,
76811
- ".dockerignore": fN,
76812
- "docker-compose.yml": mN,
76813
- "README.md": gN,
76814
- "CONTRIBUTING.md": yN,
76815
- "db/database.js": jO,
76816
- "db/migrations/001_initial.js": VO,
76817
- "db/repositories/userRepository.js": HO,
76818
- "db/repositories/itemRepository.js": WO,
76819
- "middleware/auth.js": zO,
76820
- "middleware/errorHandler.js": qO,
76821
- "middleware/staticFiles.js": GO,
76822
- "middleware/validate.js": KO,
76823
- "routes/auth.js": YO,
76824
- "routes/items.js": ZO,
76825
- "public/index.html": JO,
76826
- "public/styles.css": QO,
76827
- "public/lib/api.js": eN,
76828
- "public/store/AuthContext.js": tN,
76829
- "public/store/AppContext.js": nN,
76830
- "public/components/Toast.js": sN,
76831
- "public/components/Navbar.js": rN,
76832
- "public/components/ItemCard.js": iN,
76833
- "public/components/ItemForm.js": aN,
76834
- "public/components/StatsChart.js": uN,
76835
- "public/pages/WelcomePage.js": oN,
76836
- "public/pages/LoginPage.js": lN,
76837
- "public/pages/RegisterPage.js": cN,
76838
- "public/pages/DashboardPage.js": dN,
76839
- "public/App.js": hN
76840
- }
76841
- }, vN = `const express = require('express');
76899
+ ".ranger": jO,
76900
+ "package.json": wN,
76901
+ ".env.example": VO,
76902
+ "config.js": HO,
76903
+ "server.js": eN,
76904
+ Dockerfile: gN,
76905
+ ".dockerignore": yN,
76906
+ "docker-compose.yml": _N,
76907
+ "README.md": bN,
76908
+ "CONTRIBUTING.md": vN,
76909
+ "db/database.js": WO,
76910
+ "db/migrations/001_initial.js": zO,
76911
+ "db/repositories/userRepository.js": qO,
76912
+ "db/repositories/itemRepository.js": GO,
76913
+ "middleware/auth.js": KO,
76914
+ "middleware/errorHandler.js": YO,
76915
+ "middleware/staticFiles.js": ZO,
76916
+ "middleware/validate.js": XO,
76917
+ "routes/auth.js": JO,
76918
+ "routes/items.js": QO,
76919
+ "public/index.html": tN,
76920
+ "public/styles.css": nN,
76921
+ "public/lib/api.js": sN,
76922
+ "public/store/AuthContext.js": rN,
76923
+ "public/store/AppContext.js": iN,
76924
+ "public/components/Toast.js": aN,
76925
+ "public/components/Navbar.js": oN,
76926
+ "public/components/ItemCard.js": lN,
76927
+ "public/components/ItemForm.js": cN,
76928
+ "public/components/StatsChart.js": pN,
76929
+ "public/pages/WelcomePage.js": uN,
76930
+ "public/pages/LoginPage.js": dN,
76931
+ "public/pages/RegisterPage.js": hN,
76932
+ "public/pages/DashboardPage.js": fN,
76933
+ "public/App.js": mN
76934
+ }
76935
+ }, xN = `const express = require('express');
76842
76936
  const fs = require('fs');
76843
76937
  const path = require('path');
76844
76938
  const app = express();
@@ -76950,7 +77044,7 @@ app.use(serveStatic);
76950
77044
  app.listen(PORT, function() {
76951
77045
  console.log('Server running on port ' + PORT);
76952
77046
  });
76953
- `, wN = `<!DOCTYPE html>
77047
+ `, EN = `<!DOCTYPE html>
76954
77048
  <html lang="en">
76955
77049
  <head>
76956
77050
  <meta charset="UTF-8">
@@ -76971,7 +77065,7 @@ app.listen(PORT, function() {
76971
77065
  <script src="/components/UserDetail.js"><\/script>
76972
77066
  <script src="/App.js"><\/script>
76973
77067
  </body>
76974
- </html>`, SN = `.tab-active {
77068
+ </html>`, kN = `.tab-active {
76975
77069
  border-bottom: 2px solid #3b82f6;
76976
77070
  color: #3b82f6;
76977
77071
  }
@@ -76986,7 +77080,7 @@ app.listen(PORT, function() {
76986
77080
  from { opacity: 0; transform: translateY(8px); }
76987
77081
  to { opacity: 1; transform: translateY(0); }
76988
77082
  }
76989
- `, xN = `var e = React.createElement;
77083
+ `, CN = `var e = React.createElement;
76990
77084
 
76991
77085
  /**
76992
77086
  * PostCard — Renders a single post as a clickable card.
@@ -77008,7 +77102,7 @@ window.PostCard = function PostCard(props) {
77008
77102
  e('p', { className: 'text-sm text-gray-500 line-clamp-2' }, post.body)
77009
77103
  );
77010
77104
  };
77011
- `, EN = `var e = React.createElement;
77105
+ `, AN = `var e = React.createElement;
77012
77106
 
77013
77107
  /**
77014
77108
  * UserCard — Renders a user profile card with avatar.
@@ -77036,7 +77130,7 @@ window.UserCard = function UserCard(props) {
77036
77130
  )
77037
77131
  );
77038
77132
  };
77039
- `, kN = `var e = React.createElement;
77133
+ `, TN = `var e = React.createElement;
77040
77134
 
77041
77135
  /**
77042
77136
  * CommentCard — Renders a single comment.
@@ -77055,7 +77149,7 @@ window.CommentCard = function CommentCard(props) {
77055
77149
  e('p', { className: 'text-sm text-gray-600' }, c.body)
77056
77150
  );
77057
77151
  };
77058
- `, CN = `var e = React.createElement;
77152
+ `, IN = `var e = React.createElement;
77059
77153
 
77060
77154
  /**
77061
77155
  * PostDetail — Full post view with comments.
@@ -77097,7 +77191,7 @@ window.PostDetail = function PostDetail(props) {
77097
77191
  : e('p', { className: 'text-gray-400 text-sm' }, 'No comments found.')
77098
77192
  );
77099
77193
  };
77100
- `, AN = `var e = React.createElement;
77194
+ `, PN = `var e = React.createElement;
77101
77195
 
77102
77196
  /**
77103
77197
  * UserDetail — Full user profile with their posts.
@@ -77160,7 +77254,7 @@ window.UserDetail = function UserDetail(props) {
77160
77254
  : e('p', { className: 'text-gray-400 text-sm' }, 'No posts found.')
77161
77255
  );
77162
77256
  };
77163
- `, TN = `var e = React.createElement;
77257
+ `, RN = `var e = React.createElement;
77164
77258
 
77165
77259
  /**
77166
77260
  * App — Main application component.
@@ -77327,28 +77421,28 @@ ReactDOM.createRoot(document.getElementById('root')).render(e(App));
77327
77421
  null,
77328
77422
  2
77329
77423
  ),
77330
- "server.js": vN,
77424
+ "server.js": xN,
77331
77425
  // Frontend files — served by Express's static middleware
77332
- "public/index.html": wN,
77333
- "public/styles.css": SN,
77334
- "public/App.js": TN,
77335
- "public/components/PostCard.js": xN,
77336
- "public/components/UserCard.js": EN,
77337
- "public/components/CommentCard.js": kN,
77338
- "public/components/PostDetail.js": CN,
77339
- "public/components/UserDetail.js": AN
77426
+ "public/index.html": EN,
77427
+ "public/styles.css": kN,
77428
+ "public/App.js": RN,
77429
+ "public/components/PostCard.js": CN,
77430
+ "public/components/UserCard.js": AN,
77431
+ "public/components/CommentCard.js": TN,
77432
+ "public/components/PostDetail.js": IN,
77433
+ "public/components/UserDetail.js": PN
77340
77434
  }
77341
77435
  },
77342
- "fullstack-starter": bN
77436
+ "fullstack-starter": SN
77343
77437
  };
77344
- function IN(a) {
77438
+ function DN(a) {
77345
77439
  return zS[a] || null;
77346
77440
  }
77347
- function N3() {
77441
+ function M3() {
77348
77442
  return Object.keys(zS);
77349
77443
  }
77350
77444
  const ni = "[CodeSandbox:useRuntime]";
77351
- function PN(a, i) {
77445
+ function ON(a, i) {
77352
77446
  const l = {};
77353
77447
  for (const u of Object.keys(i))
77354
77448
  u in a ? a[u] !== i[u] && (l[u] = "modified") : l[u] = "new";
@@ -77356,7 +77450,7 @@ function PN(a, i) {
77356
77450
  u in i || (l[u] = "deleted");
77357
77451
  return l;
77358
77452
  }
77359
- function RN(a) {
77453
+ function NN(a) {
77360
77454
  const {
77361
77455
  files: i,
77362
77456
  template: l,
@@ -77383,26 +77477,26 @@ function RN(a) {
77383
77477
  fileChanges: {},
77384
77478
  error: null,
77385
77479
  errors: []
77386
- }), [G, V] = Ds(null), [K, se] = Ds([]), fe = nt((te) => {
77480
+ }), [G, V] = Ds(null), [K, se] = Ds([]), fe = nt((ne) => {
77387
77481
  var he;
77388
77482
  B((Re) => ({
77389
77483
  ...Re,
77390
- errors: [...Re.errors, te]
77391
- })), (he = R.current) == null || he.call(R, te);
77392
- }, []), ee = nt(
77393
- async (te) => {
77484
+ errors: [...Re.errors, ne]
77485
+ })), (he = R.current) == null || he.call(R, ne);
77486
+ }, []), te = nt(
77487
+ async (ne) => {
77394
77488
  const he = A.current;
77395
- he && await he.reportError(te), fe(te);
77489
+ he && await he.reportError(ne), fe(ne);
77396
77490
  },
77397
77491
  [fe]
77398
77492
  ), ie = nt(() => {
77399
- var te;
77493
+ var ne;
77400
77494
  if (i && Object.keys(i).length > 0) {
77401
77495
  let he = u || "node server.js";
77402
77496
  if (!u && i["package.json"])
77403
77497
  try {
77404
77498
  const Re = JSON.parse(i["package.json"]);
77405
- (te = Re.scripts) != null && te.start && (he = Re.scripts.start);
77499
+ (ne = Re.scripts) != null && ne.start && (he = Re.scripts.start);
77406
77500
  } catch {
77407
77501
  }
77408
77502
  return {
@@ -77412,7 +77506,7 @@ function RN(a) {
77412
77506
  };
77413
77507
  }
77414
77508
  if (l) {
77415
- const he = IN(l);
77509
+ const he = DN(l);
77416
77510
  if (he)
77417
77511
  return {
77418
77512
  files: he.files,
@@ -77422,18 +77516,18 @@ function RN(a) {
77422
77516
  }
77423
77517
  return null;
77424
77518
  }, [i, l, u, h]), xe = nt(
77425
- (te, he, Re) => {
77426
- const _e = new MO({
77427
- files: te,
77519
+ (ne, he, Re) => {
77520
+ const _e = new UO({
77521
+ files: ne,
77428
77522
  entryCommand: he,
77429
77523
  port: Re,
77430
77524
  env: m
77431
77525
  });
77432
77526
  A.current = _e, B((De) => ({
77433
77527
  ...De,
77434
- files: te
77528
+ files: ne
77435
77529
  }));
77436
- const at = Object.keys(te), ot = at.find((De) => De === "server.js") || at.find((De) => De === "index.js") || at.find((De) => De.endsWith(".js")) || at[0];
77530
+ const at = Object.keys(ne), ot = at.find((De) => De === "server.js") || at.find((De) => De === "index.js") || at.find((De) => De.endsWith(".js")) || at[0];
77437
77531
  return ot && (V(ot), se([ot])), _e.setProgressCallback((De) => {
77438
77532
  B((me) => ({
77439
77533
  ...me,
@@ -77460,7 +77554,7 @@ function RN(a) {
77460
77554
  },
77461
77555
  [m, b, v, _, fe]
77462
77556
  ), ae = nt(
77463
- async (te, he) => {
77557
+ async (ne, he) => {
77464
77558
  var me, we;
77465
77559
  const Re = (he == null ? void 0 : he.restartServer) !== !1, _e = A.current;
77466
77560
  if (!_e) {
@@ -77473,29 +77567,29 @@ function RN(a) {
77473
77567
  }
77474
77568
  P.current = !0;
77475
77569
  let Pe = u || "node server.js";
77476
- if (!u && te["package.json"])
77570
+ if (!u && ne["package.json"])
77477
77571
  try {
77478
- const Pn = JSON.parse(te["package.json"]);
77572
+ const Pn = JSON.parse(ne["package.json"]);
77479
77573
  (me = Pn.scripts) != null && me.start && (Pe = Pn.scripts.start);
77480
77574
  } catch {
77481
77575
  }
77482
- xe(te, Pe, h || 3e3);
77576
+ xe(ne, Pe, h || 3e3);
77483
77577
  return;
77484
77578
  }
77485
77579
  const at = _e.getCurrentFiles();
77486
77580
  let ot = !1;
77487
- for (const [Pe, ye] of Object.entries(te))
77581
+ for (const [Pe, ye] of Object.entries(ne))
77488
77582
  if (at[Pe] !== ye)
77489
77583
  try {
77490
77584
  await _e.writeFile(Pe, ye), ot = !0, console.log(ni, `updated file: ${Pe}`);
77491
77585
  } catch (Pn) {
77492
77586
  console.warn(ni, `failed to write ${Pe}:`, Pn);
77493
77587
  }
77494
- const De = PN(at, te);
77588
+ const De = ON(at, ne);
77495
77589
  if (B((Pe) => ({
77496
77590
  ...Pe,
77497
77591
  originalFiles: at,
77498
- files: te,
77592
+ files: ne,
77499
77593
  fileChanges: De
77500
77594
  })), ot && Re) {
77501
77595
  console.log(
@@ -77511,7 +77605,7 @@ function RN(a) {
77511
77605
  (we = U.current) == null || we.call(U, De);
77512
77606
  },
77513
77607
  [u, h, xe]
77514
- ), Fe = nt(async (te, he) => {
77608
+ ), Fe = nt(async (ne, he) => {
77515
77609
  const Re = A.current;
77516
77610
  if (!Re) {
77517
77611
  console.warn(
@@ -77521,13 +77615,13 @@ function RN(a) {
77521
77615
  return;
77522
77616
  }
77523
77617
  try {
77524
- await Re.writeFile(te, he);
77618
+ await Re.writeFile(ne, he);
77525
77619
  } catch (_e) {
77526
- console.error(`Failed to write file ${te}:`, _e);
77620
+ console.error(`Failed to write file ${ne}:`, _e);
77527
77621
  }
77528
77622
  B((_e) => {
77529
- const at = { ..._e.files, [te]: he }, ot = { ..._e.fileChanges };
77530
- return te in _e.originalFiles ? _e.originalFiles[te] !== he ? ot[te] = "modified" : delete ot[te] : ot[te] = "new", {
77623
+ const at = { ..._e.files, [ne]: he }, ot = { ..._e.fileChanges };
77624
+ return ne in _e.originalFiles ? _e.originalFiles[ne] !== he ? ot[ne] = "modified" : delete ot[ne] : ot[ne] = "new", {
77531
77625
  ..._e,
77532
77626
  files: at,
77533
77627
  fileChanges: ot
@@ -77536,10 +77630,10 @@ function RN(a) {
77536
77630
  }, []);
77537
77631
  Lt(() => {
77538
77632
  if (P.current) return;
77539
- const te = ie();
77540
- if (te) {
77541
- if (P.current = !0, Object.keys(te.files).length === 0) return;
77542
- xe(te.files, te.entryCommand, te.port);
77633
+ const ne = ie();
77634
+ if (ne) {
77635
+ if (P.current = !0, Object.keys(ne.files).length === 0) return;
77636
+ xe(ne.files, ne.entryCommand, ne.port);
77543
77637
  }
77544
77638
  return () => {
77545
77639
  var he;
@@ -77547,44 +77641,44 @@ function RN(a) {
77547
77641
  };
77548
77642
  }, []);
77549
77643
  const re = nt(
77550
- async (te, he) => {
77644
+ async (ne, he) => {
77551
77645
  const Re = A.current;
77552
77646
  if (Re) {
77553
77647
  try {
77554
- await Re.writeFile(te, he);
77648
+ await Re.writeFile(ne, he);
77555
77649
  } catch (_e) {
77556
- console.error(`Failed to write file ${te}:`, _e);
77650
+ console.error(`Failed to write file ${ne}:`, _e);
77557
77651
  }
77558
77652
  B((_e) => {
77559
- const at = { ..._e.files, [te]: he }, ot = { ..._e.fileChanges };
77560
- return te in _e.originalFiles ? _e.originalFiles[te] !== he ? ot[te] = "modified" : delete ot[te] : ot[te] = "new", {
77653
+ const at = { ..._e.files, [ne]: he }, ot = { ..._e.fileChanges };
77654
+ return ne in _e.originalFiles ? _e.originalFiles[ne] !== he ? ot[ne] = "modified" : delete ot[ne] : ot[ne] = "new", {
77561
77655
  ..._e,
77562
77656
  files: at,
77563
77657
  fileChanges: ot
77564
77658
  };
77565
- }), f == null || f(te, he);
77659
+ }), f == null || f(ne, he);
77566
77660
  }
77567
77661
  },
77568
77662
  [f]
77569
- ), Ee = nt((te) => {
77570
- V(te), se((he) => he.includes(te) ? he : [...he, te]);
77663
+ ), Ee = nt((ne) => {
77664
+ V(ne), se((he) => he.includes(ne) ? he : [...he, ne]);
77571
77665
  }, []), Be = nt(
77572
- (te) => {
77666
+ (ne) => {
77573
77667
  se((he) => {
77574
- const Re = he.filter((_e) => _e !== te);
77575
- return G === te && V(Re.length > 0 ? Re[Re.length - 1] : null), Re;
77668
+ const Re = he.filter((_e) => _e !== ne);
77669
+ return G === ne && V(Re.length > 0 ? Re[Re.length - 1] : null), Re;
77576
77670
  });
77577
77671
  },
77578
77672
  [G]
77579
77673
  ), ke = nt(async () => {
77580
- const te = A.current;
77581
- te && await te.restart();
77674
+ const ne = A.current;
77675
+ ne && await ne.restart();
77582
77676
  }, []), Ce = nt(() => {
77583
- var te;
77584
- return ((te = A.current) == null ? void 0 : te.getCurrentFiles()) ?? {};
77585
- }, []), He = nt(() => {
77586
- var te;
77587
- return ((te = A.current) == null ? void 0 : te.getChangedFiles()) ?? {};
77677
+ var ne;
77678
+ return ((ne = A.current) == null ? void 0 : ne.getCurrentFiles()) ?? {};
77679
+ }, []), We = nt(() => {
77680
+ var ne;
77681
+ return ((ne = A.current) == null ? void 0 : ne.getChangedFiles()) ?? {};
77588
77682
  }, []), Ie = nt(() => L.fileChanges, [L.fileChanges]), Qe = nt(() => L.errors, [L.errors]), bt = nt(() => L, [L]);
77589
77683
  return {
77590
77684
  state: L,
@@ -77593,22 +77687,22 @@ function RN(a) {
77593
77687
  handleFileChange: re,
77594
77688
  handleSelectFile: Ee,
77595
77689
  handleCloseFile: Be,
77596
- handleBrowserError: ee,
77690
+ handleBrowserError: te,
77597
77691
  restart: ke,
77598
77692
  // Imperative methods (exposed via handle)
77599
77693
  updateFiles: ae,
77600
77694
  updateFile: Fe,
77601
77695
  getFiles: Ce,
77602
- getChangedFiles: He,
77696
+ getChangedFiles: We,
77603
77697
  getFileChanges: Ie,
77604
77698
  getErrors: Qe,
77605
77699
  getState: bt,
77606
77700
  runtime: A
77607
77701
  };
77608
77702
  }
77609
- const DN = xl(
77703
+ const BN = xl(
77610
77704
  function(i, l) {
77611
- const { className: u = "", height: h = "100vh", port: m = 3e3 } = i, f = RN(i), {
77705
+ const { className: u = "", height: h = "100vh", port: m = 3e3 } = i, f = NN(i), {
77612
77706
  state: _,
77613
77707
  selectedFile: b,
77614
77708
  openFiles: v,
@@ -77648,7 +77742,7 @@ const DN = xl(
77648
77742
  se
77649
77743
  ]
77650
77744
  );
77651
- const fe = mi(() => mO(_.files), [_.files]), ee = _.status !== "ready" && _.status !== "error", [ie, xe] = Ds("code"), ae = !!_.previewUrl;
77745
+ const fe = mi(() => mO(_.files), [_.files]), te = _.status !== "ready" && _.status !== "error", [ie, xe] = Ds("code"), ae = !!_.previewUrl;
77652
77746
  Lt(() => {
77653
77747
  ae && xe("preview");
77654
77748
  }, [ae]);
@@ -77658,15 +77752,15 @@ const DN = xl(
77658
77752
  },
77659
77753
  [k]
77660
77754
  );
77661
- return /* @__PURE__ */ ze(
77755
+ return /* @__PURE__ */ je(
77662
77756
  "div",
77663
77757
  {
77664
77758
  className: `sb-root relative w-full bg-sb-bg text-sb-text overflow-hidden flex flex-col ${u}`,
77665
77759
  style: { height: h },
77666
77760
  children: [
77667
- ee && /* @__PURE__ */ ne(PO, { progress: _.progress }),
77668
- /* @__PURE__ */ ne(
77669
- NN,
77761
+ te && /* @__PURE__ */ J(OO, { progress: _.progress }),
77762
+ /* @__PURE__ */ J(
77763
+ MN,
77670
77764
  {
77671
77765
  activeView: ie,
77672
77766
  onViewChange: xe,
@@ -77675,8 +77769,8 @@ const DN = xl(
77675
77769
  onRefresh: R
77676
77770
  }
77677
77771
  ),
77678
- /* @__PURE__ */ ze("div", { className: "flex-1 relative overflow-hidden min-h-0", children: [
77679
- /* @__PURE__ */ ne(
77772
+ /* @__PURE__ */ je("div", { className: "flex-1 relative overflow-hidden min-h-0", children: [
77773
+ /* @__PURE__ */ J(
77680
77774
  jd.div,
77681
77775
  {
77682
77776
  className: "absolute inset-0",
@@ -77686,8 +77780,8 @@ const DN = xl(
77686
77780
  pointerEvents: ie === "code" ? "auto" : "none"
77687
77781
  },
77688
77782
  transition: { duration: 0.15 },
77689
- children: /* @__PURE__ */ ne(
77690
- LN,
77783
+ children: /* @__PURE__ */ J(
77784
+ $N,
77691
77785
  {
77692
77786
  fileTree: fe,
77693
77787
  files: _.files,
@@ -77703,7 +77797,7 @@ const DN = xl(
77703
77797
  )
77704
77798
  }
77705
77799
  ),
77706
- /* @__PURE__ */ ne(
77800
+ /* @__PURE__ */ J(
77707
77801
  jd.div,
77708
77802
  {
77709
77803
  className: "absolute inset-0",
@@ -77713,8 +77807,8 @@ const DN = xl(
77713
77807
  pointerEvents: ie === "preview" ? "auto" : "none"
77714
77808
  },
77715
77809
  transition: { duration: 0.15 },
77716
- children: /* @__PURE__ */ ne(
77717
- IO,
77810
+ children: /* @__PURE__ */ J(
77811
+ DO,
77718
77812
  {
77719
77813
  url: _.previewUrl,
77720
77814
  onBrowserError: P
@@ -77728,38 +77822,38 @@ const DN = xl(
77728
77822
  );
77729
77823
  }
77730
77824
  );
77731
- DN.displayName = "CodeSandbox";
77732
- function ON(a, i) {
77825
+ BN.displayName = "CodeSandbox";
77826
+ function LN(a, i) {
77733
77827
  if (!a) return "";
77734
77828
  const l = a.match(/\/__(?:preview|virtual)__\/\d+(\/.*)?$/), u = (l == null ? void 0 : l[1]) ?? "/";
77735
77829
  return `localhost:${i}${u}`;
77736
77830
  }
77737
- function NN({
77831
+ function MN({
77738
77832
  activeView: a,
77739
77833
  onViewChange: i,
77740
77834
  previewUrl: l,
77741
77835
  port: u,
77742
77836
  onRefresh: h
77743
77837
  }) {
77744
- const m = ON(l, u);
77745
- return /* @__PURE__ */ ze("div", { className: "flex items-center gap-2 px-2 py-1 bg-sb-bg-alt border-b border-sb-border min-h-[36px] shrink-0", children: [
77746
- /* @__PURE__ */ ne(NO, { selected: a, onSelect: i }),
77747
- /* @__PURE__ */ ne("div", { className: "flex-1 min-w-0", children: a === "preview" ? /* @__PURE__ */ ze("div", { className: "flex items-center gap-1.5", children: [
77748
- /* @__PURE__ */ ne(
77838
+ const m = LN(l, u);
77839
+ return /* @__PURE__ */ je("div", { className: "flex items-center gap-2 px-2 py-1 bg-sb-bg-alt border-b border-sb-border min-h-[36px] shrink-0", children: [
77840
+ /* @__PURE__ */ J(MO, { selected: a, onSelect: i }),
77841
+ /* @__PURE__ */ J("div", { className: "flex-1 min-w-0", children: a === "preview" ? /* @__PURE__ */ je("div", { className: "flex items-center gap-1.5", children: [
77842
+ /* @__PURE__ */ J(
77749
77843
  "button",
77750
77844
  {
77751
77845
  className: "shrink-0 p-1 rounded text-sb-text-muted hover:text-sb-text-active hover:bg-sb-bg-hover transition-colors text-xs",
77752
77846
  onClick: h,
77753
77847
  title: "Refresh preview",
77754
- children: /* @__PURE__ */ ne(BN, {})
77848
+ children: /* @__PURE__ */ J(FN, {})
77755
77849
  }
77756
77850
  ),
77757
- /* @__PURE__ */ ne("div", { className: "flex-1 min-w-0 bg-sb-bg rounded px-2 py-0.5 text-xs text-sb-text-muted font-mono truncate", children: l ? m : "Waiting for server..." })
77758
- ] }) : /* @__PURE__ */ ne("div", { className: "text-xs text-sb-text-muted px-1 truncate", children: "Editor" }) })
77851
+ /* @__PURE__ */ J("div", { className: "flex-1 min-w-0 bg-sb-bg rounded px-2 py-0.5 text-xs text-sb-text-muted font-mono truncate", children: l ? m : "Waiting for server..." })
77852
+ ] }) : /* @__PURE__ */ J("div", { className: "text-xs text-sb-text-muted px-1 truncate", children: "Editor" }) })
77759
77853
  ] });
77760
77854
  }
77761
- function BN() {
77762
- return /* @__PURE__ */ ze(
77855
+ function FN() {
77856
+ return /* @__PURE__ */ je(
77763
77857
  "svg",
77764
77858
  {
77765
77859
  width: "14",
@@ -77771,13 +77865,13 @@ function BN() {
77771
77865
  strokeLinecap: "round",
77772
77866
  strokeLinejoin: "round",
77773
77867
  children: [
77774
- /* @__PURE__ */ ne("polyline", { points: "23 4 23 10 17 10" }),
77775
- /* @__PURE__ */ ne("path", { d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" })
77868
+ /* @__PURE__ */ J("polyline", { points: "23 4 23 10 17 10" }),
77869
+ /* @__PURE__ */ J("path", { d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" })
77776
77870
  ]
77777
77871
  }
77778
77872
  );
77779
77873
  }
77780
- function LN({
77874
+ function $N({
77781
77875
  fileTree: a,
77782
77876
  files: i,
77783
77877
  originalFiles: l,
@@ -77789,8 +77883,8 @@ function LN({
77789
77883
  onCloseFile: b,
77790
77884
  onFileChange: v
77791
77885
  }) {
77792
- return /* @__PURE__ */ ne("div", { className: "h-full w-full", children: /* @__PURE__ */ ze(Qr, { children: [
77793
- /* @__PURE__ */ ne(Qr.Pane, { preferredSize: 200, minSize: 120, maxSize: 350, children: /* @__PURE__ */ ne(
77886
+ return /* @__PURE__ */ J("div", { className: "h-full w-full", children: /* @__PURE__ */ je(Qr, { children: [
77887
+ /* @__PURE__ */ J(Qr.Pane, { preferredSize: 200, minSize: 120, maxSize: 350, children: /* @__PURE__ */ J(
77794
77888
  vO,
77795
77889
  {
77796
77890
  files: a,
@@ -77799,8 +77893,8 @@ function LN({
77799
77893
  fileChanges: u
77800
77894
  }
77801
77895
  ) }),
77802
- /* @__PURE__ */ ne(Qr.Pane, { children: /* @__PURE__ */ ze(Qr, { vertical: !0, children: [
77803
- /* @__PURE__ */ ne(Qr.Pane, { preferredSize: "70%", children: /* @__PURE__ */ ne(
77896
+ /* @__PURE__ */ J(Qr.Pane, { children: /* @__PURE__ */ je(Qr, { vertical: !0, children: [
77897
+ /* @__PURE__ */ J(Qr.Pane, { preferredSize: "70%", children: /* @__PURE__ */ J(
77804
77898
  kO,
77805
77899
  {
77806
77900
  files: i,
@@ -77813,22 +77907,22 @@ function LN({
77813
77907
  onFileChange: v
77814
77908
  }
77815
77909
  ) }),
77816
- /* @__PURE__ */ ne(Qr.Pane, { preferredSize: "30%", minSize: 60, children: /* @__PURE__ */ ne(CO, { output: f }) })
77910
+ /* @__PURE__ */ J(Qr.Pane, { preferredSize: "30%", minSize: 60, children: /* @__PURE__ */ J(IO, { output: f }) })
77817
77911
  ] }) })
77818
77912
  ] }) });
77819
77913
  }
77820
77914
  export {
77821
- PO as BootOverlay,
77915
+ OO as BootOverlay,
77822
77916
  kO as CodeEditor,
77823
- DN as CodeSandbox,
77917
+ BN as CodeSandbox,
77824
77918
  vO as FileTree,
77825
- MO as NodepodRuntime,
77826
- IO as Preview,
77827
- CO as Terminal,
77828
- NO as ViewSlider,
77919
+ UO as NodepodRuntime,
77920
+ DO as Preview,
77921
+ IO as Terminal,
77922
+ MO as ViewSlider,
77829
77923
  mO as buildFileTree,
77830
- IN as getTemplate,
77831
- N3 as listTemplates,
77832
- RN as useRuntime
77924
+ DN as getTemplate,
77925
+ M3 as listTemplates,
77926
+ NN as useRuntime
77833
77927
  };
77834
77928
  //# sourceMappingURL=index.js.map